Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Verilog-AMS Syntax Highlighter #515

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)\
## [1.15.6] - 2025-01-22

### Unreleased

- Added Verilog-AMS syntax highlighting

## [1.15.5] - 2024-11-09

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Install it from [VS Code Marketplace](https://marketplace.visualstudio.com/items
- SystemVerilog
- Bluespec SystemVerilog
- VHDL
- Verilog-AMS
- Vivado UCF constraints
- Synopsys Design Constraints
- Verilog Filelists (dot-F files)
Expand Down
64 changes: 64 additions & 0 deletions configs/verilogams.configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},

"brackets": [
["{", "}"],
["[", "]"],
["(", ")"],
["fork", "join"],
["case", "endcase"],
["casex", "endcase"],
["casez", "endcase"],
["config", "endconfig"],
["begin", "end"],
["connectrules", "endconnectrules"],
["discipline", "enddiscipline"],
["function", "endfunction"],
["generate", "endgenerate"],
["module", "endmodule"],
["connectmodule","endmodule"],
["macromodule", "endmodule"],
["nature", "endnature"],
["paramset", "endparamset"],
["primitive", "endprimitive"],
["specify", "endspecify"],
["table", "endtable"],
["task", "endtask"]
],

"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/*", "close": " */", "notIn": ["string"] },
{ "open": "begin", "close": "\nend", "notIn": ["string"] },
{ "open": "fork", "close": "\njoin", "notIn": ["string"] }
],

"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"],
["\"", "\""],
["`", "`"]
],

"folding": {
"offSide": true,
"markers": {
"start": "^\\s*[//]*region",
"end": "^\\s*[//]*endregion"
}
},

"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
"indentationRules": {
"increaseIndentPattern": "(begin$)",
"decreaseIndentPattern": "(end$)"
}
}
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
],
"configuration": "./configs/verilog.configuration.json"
},
{
"id": "verilogams",
"aliases": [
"Verilog-AMS",
"verilog-ams",
"vams",
"VAMS",
"verilogams"
],
"extensions": [
".vams",
".va"
],
"configuration": "./configs/verilogams.configuration.json"
},
{
"id": "systemverilog",
"aliases": [
Expand Down Expand Up @@ -139,6 +154,11 @@
"scopeName": "source.verilog",
"path": "./syntaxes/verilog.tmLanguage.json"
},
{
"language": "verilogams",
"scopeName": "source.verilogams",
"path": "./syntaxes/verilogams.tmLanguage.json"
},
{
"language": "systemverilog",
"scopeName": "source.systemverilog",
Expand Down Expand Up @@ -196,6 +216,14 @@
"language": "verilog",
"path": "./snippets/verilog.json"
},
{
"language": "verilogams",
"path": "./snippets/verilogams.json"
},
{
"language": "verilogams",
"path": "./snippets/verilog.json"
},
{
"language": "systemverilog",
"path": "./snippets/verilog.json"
Expand Down
79 changes: 79 additions & 0 deletions snippets/verilogams.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"ddt": {
"prefix": ["dd", "ddt"],
"body": [
"ddt ( ${1:exp}, ${2:[tol]} )"
],
"description": "Time Derivative Operator"
},
"ddx": {
"prefix": ["dd", "ddx"],
"body": [
"ddx ( ${1:exp}, ${2:[unknown]} )"
],
"description": "Symbolic Derivative Operator"
},
"idt": {
"prefix": ["id", "idt"],
"body": [
"idt ( ${1:exp[}, ${2:ic[}, ${3:assert[}, ${4:tol]]]} )"
],
"description": "Time Integral Operator"
},
"idtmod": {
"prefix": ["idtm", "idtmod"],
"body": [
"idtmod ( ${1:exp[}, ${2:ic[}, ${3:modulus[}, ${4:offset[}, ${5:tol]]]]} )"
],
"description": "Circular Integral Operator"
},
"absdelay": {
"prefix": ["abs", "absdelay"],
"body": [
"absdelay ( ${1:exp}, ${2:td[}, ${3:max_delay]} )"
],
"description": "Absolute Delay Operator"
},
"transition": {
"prefix": ["trans", "transition"],
"body": [
"transition ( ${1:exp[}, ${2:td[}, ${3:rise_time[}, ${4:fall_time[}, ${3:time_tol]]]]})"
],
"description": "Transition Filter"
},
"slew": {
"prefix": ["sl", "slew"],
"body": [
"slew ( ${1:exp[}, ${2:max_pos_slew_rate[}, ${3:max_neg_slew_rate]]})"
],
"description": "Slew Filter"
},
"last_crossing": {
"prefix": ["sl", "slew"],
"body": [
"slew ( ${1:exp[}, ${2:direction]})"
],
"description": "Last Crossing Function"
},
"limexp": {
"prefix": ["lim", "limexp"],
"body": [
"limexp ( ${1:exp})"
],
"description": "Limited Exponential"
},
"laplace": {
"prefix": ["lap", "laplace"],
"body": [
"laplace_${1:zp/zd/np/nd} ( ${2:exp}, ${3:Zero}, ${4:Pole [}, ${5:tol]})"
],
"description": "Laplace Transform Filters"
},
"zfilter": {
"prefix": ["z", "zi"],
"body": [
"zi_${1:zp/zd/np/nd} ( ${2:exp}, ${3:Zero}, ${4:Pole }, ${5:period[}, ${6:transition time[}, ${7:time first transition]]})"
],
"description": "Z Transform Filters"
}
}
Loading
Loading