ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Verilog Gadget

by poucotm ALL Trending

🔧 Verilog plugin for Sublime Text 2/3. It helps to generate a simple testbench, instantiate a module, insert a user-header, repeat codes with formatted incremental/decremental numbers, etc.

Labels verilog

Details

Installs

  • Total 15K
  • Win 12K
  • Mac 1K
  • Linux 2K
Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3
Windows 2 13 12 2 10 9 13 10 8 11 6 6 3 5 10 6 6 8 4 8 8 11 5 2 1 6 5 3 5 5 5 2 2 5 2 0 0 1 2 0 5 6 3 7 3 2
Mac 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 1 3 3 3 2 0 1 0 2 1 1 1 0 0 2 1 2 1 0 1 0 0 0 0 0 0 1 0 0 2 1 1 3 0 0 1 0 1 0 1 0 1

Readme

Source
raw.​githubusercontent.​com

Verilog Gadget for Sublime Text

Package Control PayPal

Use Verilog Gadget Commands in command palette (ctrl+shift+p) or context menu to run. The context menu only can be seen for .v, .vh, .sv, .svh file. (file extensions can be added or changed in settings). The theme is Guna, which is used in examples. There's a linter plug-in for Verilog. SublimeLinter-contrib-verilator

Verilog Gadget: Instantiate Module (ctrl+shift+c)

  • It parses module ports for the currently open file
  • It generates an instance text of the module
  • It copies generated text to clipboard
  • Then, you can paste the text to the desired location
  • Supports Verilog-1995, Verilog-2001 style ports and parameters
  • example)

Image

Verilog Gadget: Generate Testbench

  • It parses module ports for the currently open file
  • It generates a simple testbench with an instance and signals of the module
  • The testbench is created as a systemverilog file
  • Supports Verilog-1995, Verilog-2001 style ports and parameters
  • example)

Image

Verilog Gadget: Simulaton Template

  • It creates files for simulation based on the template
  • You can make your own template as a compressed file (.zip,.tar,.tgz)
  • You can specify the path of your template ("simulation_template","simulation_directory“)
  • 'example-modelsim' is the template for modelsim, 'example-vcs' is the template for vcs
  • It automatically generates the testbench files for the current view
  • It changes keywords in files of the template ({{TESTBENCH FILE}}, {{TESTBENCH NAME}}, {{MODULE FILE}}, {{MODULE NAME}},{{MODULE PORTLIST}})
  • example)

Image

Verilog Gadget: Insert Header (ctrl+shift+insert)

  • You can insert your own header-description in a format from the file specified in settings
  • {YEAR} is replaced as the current year
  • {DATE} is replaced as the create date
  • {TIME} is replaced as the create time
  • {RDATE} is replaced as the revised date
  • {RTIME} is replaced as the revised time
  • {FILE} is replaced as the file name
  • {TABS} is replaced as the tab size
  • {SUBLIME_VERSION} is replaced as the current sublime text version
  • example) header example

Image

Verilog Gadget: Repeat Code with Numbers (ctrl+f12)

  • Select codes you want to repeat, this may include Python's format symbol, such as {…}
  • Enter a range in the input panel as the following : [from]~[to],[↓step],[→step] (e.g. 0~10 or 0~10,2 or 10~0,-1 or 0~5,1,1 ...)
  • [↓step] means the row step, default is 1, [→step] means the column step, default is 0
  • The code is repeated in incremental or decremental numbers
  • Python's format symbol supports variable formats : binary, hex, leading zeros, …
  • To use '{' as it is, you must enter twice like '{{'
  • Refer to Python's format symbol here, https://www.python.org/dev/peps/pep-3101/
  • For sublime text 2 (python 2.x), you must put an index behind ':' in curly brackets like foo {0:5b} bar {1:3d}
  • example)

Image

  • The index can be used to repeat the same number
  • example)

Image

  • It is possible to repeat numbers with clipboard text (line by line)
  • Use {cb} for clipboard text
  • example)

Image

Verilog Gadget: Alignment (ctrl+shift+x)

  • Select a range to apply the alignment to
  • Press the shortcut key
  • Alignment is based on the longest length of the left hand side in the selection
  • Tabs are replaced as spaces except indentation
  • example)

Image

Verilog Gadget: Insert Snippet (ctrl+alt+p)

  • You can make your own parameterized snippets like this example
  • Add your snippet settings like this
  • Run Insert Snippet command
  • example)

Image

Verilog Gadget: VCD to WaveDrom (ctrl+alt+v)

  • WaveDrom : digital timing diagram editor
  • Open .vcd file (a clock should be included)
  • Run VCD to WaveDrom command

Image

Verilog Linter (another package)

SublimeLinter-contrib-verilator

Image

Donate

Doate Image

Thank you for donating. It is helpful to continue to improve the plug-in.

Issues

When you have an issue, tell me through https://github.com/poucotm/Verilog-Gadget/issues, or send me an e-mail poucotm@gmail.com