Skip to content

Commit b10aca8

Browse files
authored
support bluespec verilog (#163)
* 添加了一个语法 * 现在的语法变得非常丑了 * 简陋的文档树 * 添加hover提示 * 添加了workspace cache * lint也好啦(无上下文) * 修好了跳转 * update changelog and readme
1 parent d559604 commit b10aca8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+62832
-19
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/out
44
/package-lock.json
55
/.vscode/
6-
!/.vscode/launch.json
6+
!/.vscode/launch.json
7+
/syntaxes/.antlr/*

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "extensionHost",
88
"request": "launch",
99
"runtimeExecutable": "${execPath}",
10-
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ]
10+
"args": ["--disable-extensions","--extensionDevelopmentPath=${workspaceRoot}" ]
1111
}
1212
]
1313
}

BSV.configuration.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@
3030
{"open":"[", "close":"]"},
3131
{"open":"{", "close":"}"},
3232
{"open":"\"", "close":"\"", "notIn":["string"]}
33-
]
33+
],
34+
35+
"wordPattern":"((\\\\.)|[a-zA-Z_$])((\\\\.)|[a-zA-Z_$0-9])*"
3436
}

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66

7+
## Unreleased - 2021-06-09
8+
9+
### Added
10+
11+
- Add Bluespec Verilog Syntax Support [#162](https://github.com/mshr-h/vscode-verilog-hdl-support/issues/162)
12+
713
## [1.4.5] - 2021-05-15
814

915
### Fixed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Install it from [VS Code Marketplace](https://marketplace.visualstudio.com/items
2626
- Vivado Logical Simulation - `xvlog`
2727
- Modelsim - `modelsim`
2828
- Verilator - `verilator`
29+
- Linting support
30+
- Bluespec SystemVerilog
2931
- Ctags Integration
3032
- Autocomplete
3133
- Document Symbols Outline

package.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
],
2323
"icon": "images/icon.png",
2424
"activationEvents": [
25-
"onLanguage:verilog",
26-
"onLanguage:systemverilog"
25+
"onStartupFinished"
2726
],
2827
"main": "./out/src/extension",
2928
"contributes": {
@@ -153,6 +152,10 @@
153152
{
154153
"language": "systemverilog",
155154
"path": "./snippets/systemverilog.json"
155+
},
156+
{
157+
"language": "bsv",
158+
"path": "./snippets/bsv.json"
156159
}
157160
],
158161
"configuration": {
@@ -260,16 +263,21 @@
260263
"vscode:prepublish": "npm run compile",
261264
"compile": "tsc -p ./",
262265
"watch": "tsc -w -p ./",
263-
"update-vscode": "vscode-install"
266+
"update-vscode": "vscode-install",
267+
"makeBsv": "antlr4ts -visitor syntaxes/bsv.g4 -o src/bsvjs"
264268
},
265269
"dependencies": {
270+
"antlr4": "^4.9.2",
271+
"antlr4ts": "^0.5.0-alpha.4",
266272
"vsce": "^1.83.0",
267273
"vscode-languageclient": "^6.1.3"
268274
},
269275
"devDependencies": {
276+
"@types/antlr4": "^4.7.2",
270277
"@types/mocha": "^2.2.45",
271278
"@types/node": "^7.10.11",
272279
"@types/vscode": "^1.46.0",
280+
"antlr4ts-cli": "^0.5.0-alpha.4",
273281
"typescript": "^3.9.5",
274282
"vscode-test": "^1.4.0"
275283
},

snippets/bsv.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"package": {
3+
"prefix": "package",
4+
"body": [
5+
"package $0",
6+
"endpackage : $0"
7+
],
8+
"description": "package"
9+
},
10+
"rule": {
11+
"prefix": "rule",
12+
"body": [
13+
"rule $0 ( $1 );",
14+
"endrule : $0"
15+
],
16+
},
17+
"import": {
18+
"prefix": "import",
19+
"body": [
20+
"import $0 :: *;"
21+
],
22+
"description": "import"
23+
},
24+
"interface": {
25+
"prefix": "interface",
26+
"body": [
27+
"interface $IfcCounter #($type $t);",
28+
"method $t readCounter;",
29+
"endinterface"
30+
],
31+
"description": "interface"
32+
},
33+
"example module": {
34+
"prefix": "module ex",
35+
"body": [
36+
"module ${0:mkExample}(${1:Empty});",
37+
"",
38+
" rule ${2:rl_print_answer};",
39+
" \\$display (\"Deep Thought says: Hello, World! The answer is 42.\");",
40+
" \\$finish;",
41+
" endrule",
42+
"endmodule"
43+
],
44+
"description": "example module"
45+
}
46+
}

0 commit comments

Comments
 (0)