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

Verilog Gadget

by poucotm ST2/ST3

🔧 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 2K
  • Win 1K
  • OS X 264
  • Linux 386
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 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10
Windows 3 2 4 3 5 1 1 1 1 3 3 2 1 2 1 0 0 8 5 2 5 3 2 5 1 8 5 1 2 1 3 0 2 5 3 2 4 3 3 3 2 2 3 4 2 3
OS X 0 1 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0
Linux 0 0 1 0 6 2 0 1 0 0 0 0 0 0 1 0 1 3 1 1 1 0 3 2 0 2 0 0 2 1 4 1 0 1 1 2 2 3 4 1 0 2 0 3 2 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.

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

  • It parses module ports in currently open file
  • It generates module's instance text
  • It copies generated text to clipboard
  • You can paste the text on where you want
  • Supports Verilog-1995, Verilog-2001 style ports and parameters
  • example)

Image

Verilog Gadget: Generate Testbench

  • It parses module ports in currently open file
  • It generates a simple testbench with module's instance and signals
  • Testbench will be generated as a systemverilog file
  • Supports Verilog-1995, Verilog-2001 style ports and parameters
  • example)

Image

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

  • You can insert your own header-description as your format from the file specified in settings
  • {DATE} will be replaced with current date
  • {YEAR} will be replaced with this year
  • {TIME} will be replaced with current time
  • {FILE} will be replaced with current file name
  • {TABS} will be replaced with current tab size
  • {SUBLIME_VERSION} will be replaced with current sublime text version
  • example)
In settings : "header": "D:/template/verilog_header.v"

// -----------------------------------------------------------------------------
// Copyright (c) 2014-{YEAR} All rights reserved
// -----------------------------------------------------------------------------
// Author : yongchan jeon (Kris) poucotm@gmail.com
// File   : {FILE}
// Create : {DATE} {TIME}
// Editor : sublime text{SUBLIME_VERSION}, tab size ({TABS})
// -----------------------------------------------------------------------------
--> after insertion
// -----------------------------------------------------------------------------
// Copyright (c) 2014-2016 All rights reserved
// -----------------------------------------------------------------------------
// Author : yongchan jeon (Kris) poucotm@gmail.com
// File   : abc.v
// Create : 2016-06-03 22:34:43
// Editor : sublime text3, tab size (3)
// -----------------------------------------------------------------------------

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

  • Select codes to be repeated, it may include Python's format symbol like {…}
  • Type 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 row step, default is 1, [→step] means column step, default is 0
  • The codes will be repeated with incremental or decremental numbers
  • Python's format symbol supports variable formats : binary, hex, leading zeros, …
  • To use '{' as is, you should type twice as '{{'
  • Refer to Python's format symbol here, https://www.python.org/dev/peps/pep-3101/
  • For sublime text 2 (python 2.x), you should insert index behind of ':' in curly brackets like foo {0:5b} bar {1:3d}
  • 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 range to apply alignment
  • Press the shortcut key
  • Alignment is based on the longest length of left hand side in selection
  • Tabs will be replaced as spaces except for indent
  • example)

Image

Verilog Gadget: Insert Template (DEPRECATED)

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