sponsor Vim development Vim logo Vim Book Ad

vlog_inst_gen : utility for verilog instance generation

 script karma  Rating 187/64, Downloaded by 4146  Comments, bugs, improvements  Vim wiki

created by
wenming zhang
 
script type
utility
 
description
This script is used for automatically generating verilog instance from the file. When you type the given hot-key, instance will be copied to system clipboard, and display or not by  its working mode. Once your file can access syntax check, this plunin will work, or there must be a bug. It's encouraged to share it with me and all other people.

Supported working mode:
    mode 0(default):
        copy inst to clipboard and echo inst in commandline
    mode 1:
        only copy to clipboard
    mode 2:
        copy to clipboard and echo inst in split window
    mode 3:
        copy to clipboard and update inst_comment to file
    
  To change the default working mode, you should modify the line in this script "let g:vlog_inst_gen_mode=x", x is the default working mode; or you can add  "let g:vlog_inst_gen_mode=x" to your _vimrc or .vimrc file.

User defined command:
        VlogInstGen : generate verilog instance
        VlogInstMod : change working mode
Default hot-keys:
        ,ig         : VlogInstGen
        ,im        : VlogInstMod
Contact:
        mingforregister@163.com

v1.6 md5sum: 5dcf0cb9f833ff77c03cfd4e1bfbbe48
This version can work in both windows and linux, when used in linux do not need dos2unix any more!
 
install details
Only tested in gvim7.3 for windows version, it may works well in linux, you can try.
Method1: copy this file to your $VIM_HOME/vim74/plugin, recommanded!
Method2:
copy the vlog_inst_gen.vim file to $VLOG_INST_GEN_DIR
added the following to your vimrc(_vimrc for windows and .vimrc for linux)
so $VLOG_INST_GEN_DIR/vlog_inst_gen.vim

 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vlog_inst_gen.vim 1.6 2022-06-09 7.4 wenming zhang 1. Thank LongTang for bugs feedback
2. Fix bug when used in linux and ports more than 100
3. Run faster than before
vlog_inst_gen.vim 1.5 2017-08-30 7.4 wenming zhang 1. Thank LongTang for bugs feedback
2. Parameter support keywords signed/integer/real/realtime/time
3. Support `ifdef/`else/`endif in module port declearation
4. Disable port declearation check
vlog_inst_gen.vim 1.4 2012-08-20 7.3 wenming zhang add one feature:
copy instance also to clickboard ", so that you can use key 'p' to paste it. Also you can disable this feature by modifying  this script's line:
    let g:is_copy_inst_to_doublequotation = 1
to:
    let g:is_copy_inst_to_doublequotation = 0
vlog_inst_gen.vim 1.3 2012-08-07 7.3 wenming zhang only modified a little that you can't feel..
vlog_inst_gen.vim 1.2 2012-07-30 7.3 wenming zhang 1. add user defined command:
        VlogInstGen and VlogInstMod
2. change key-mapping to ,ig and ,im
        ig: instance generation
        im: instance mode
3. add my voice to zhizhi
        hot-key:,zz  ,,,  ,tc
vlog_inst_gen.vim 1.1 2012-07-30 7.3 wenming zhang Add working mode information to file head...
Update file head information;
Remove test functions;
Remove additional records when I debugging;
Remove additional key-map(eg. reload this script)
vlog_inst_gen.vim 1.0 2012-07-30 7.0 wenming zhang Initial upload
ip used for rating: 18.217.108.11

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github