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

Add SystemVerilog syntax #1581

Merged
merged 1 commit into from
Mar 15, 2021
Merged

Add SystemVerilog syntax #1581

merged 1 commit into from
Mar 15, 2021

Conversation

SeanMcLoughlin
Copy link
Contributor

See #1580.

@@ -216,3 +216,6 @@
[submodule "assets/syntaxes/02_Extra/gnuplot"]
path = assets/syntaxes/02_Extra/gnuplot
url = https://github.com/hesstobi/sublime_gnuplot
[submodule "assets/syntaxes/02_Extra/SystemVerilog"]
path = assets/syntaxes/02_Extra/SystemVerilog
url = git@github.com:TheClams/SystemVerilog.git
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other submodules have a https link. Not sure if that could cause any problems, but might make sense to change it even if only for the sake of consistency.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be changed away from SSH, yes.

@@ -17,6 +17,9 @@ fn no_duplicate_extensions() {
// The '.fs' extension appears in F# and GLSL.
// We default to F#.
"fs",
// SystemVerilog and Verilog both use .v files.
// We default to Verilog.
"v",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain shortly what Verilog and SystemVerilog are, why we need syntaxes for both, and why a SystemVerilog syntax would still be valuable if .v files are highlighted as Verilog, by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you mean to add the explanation in the comments of this file or here, but I'll add it here first:

Verilog is a hardware description language used to describe circuits at the register transfer level. It's used in the semiconductor, ASIC, and FPGA industries.

SystemVerilog is a superset of Verilog, which provides many more features, including object-oriented programming, a random constraint solver, an assertion language, functional coverage constructs, and several others.

Unless required to for tool reasons, most developers these days will be using SystemVerilog instead of Verilog. Most of the logic in your CPU/GPU is most likely programmed in SystemVerilog.

The reason I have .v for SystemVerilog and Verilog is because that's what the Sublime Text submodule I added has them defined as, and I didn't see a way to get around that without updating the submodule. Personally, I have never seen a SystemVerilog file defined with .v, and the Wikipedia article I linked above seems to agree. If you know of a way to avoid that without updating the submodule, I can add it to this PR to avoid this extension conflict.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explanation was only for me, thank you! :-)

I somehow thought .v was commonly used by both languages, but if there is .sv for SystemVerilog, your solution here is completely fine.

@sharkdp
Copy link
Owner

sharkdp commented Mar 14, 2021

Thank you for you contribution.

@sharkdp sharkdp merged commit d89fa3e into sharkdp:master Mar 15, 2021
sharkdp pushed a commit that referenced this pull request Mar 27, 2021
Using SSH to fetch the submodule was causing build failures for me, and as mentioned in #1581, this should be changed to HTTPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants