sponsor Vim development Vim logo Vim Book Ad

vtags : verdi like, verilog code signal trace and show topo script  

 script karma  Rating 51/18, Downloaded by 1115  Comments, bugs, improvements  Vim wiki

created by
Jun Cao
 
script type
utility
 
description
vtags-3.00 changed from the inside out and the most significant changes are:

1. The designer become a father(my little boy was born, thanks my wife very much).
2. Support both gvim/vim with python2 or python3
3. Rebuild the verilog syntax parser with c, which is more fast(x10~100), accurate and powerful than old python parser.
4. All other provide function all changed to relay on new c-parser result, which also more more fast and accurate.
5. Provide new functions for easy view code and design, detail see bellow.

---------------------------------------------------------------------------------
Key                                    function                                        
---------------------------------------------------------------------------------
                             Build vtags.db                                      
---------------------------------------------------------------------------------
vtags                                   Build vtags data base at current dir and include  design at current dir and itís sub dir          
---------------------------------------------------------------------------------
-v <design_file>                  Specify signal design file                      
---------------------------------------------------------------------------------
-f <design_file_list>            Specify design file list and direct use vcs and  verdi file list                                  
---------------------------------------------------------------------------------
+vtags_incdir+ <dir_path>  Add dir and itís sub dirís design files into vtags data base                                  
---------------------------------------------------------------------------------
+incdir+ <dir_path>            Same like vcs/verdi , and include file search  path                                            
---------------------------------------------------------------------------------
                          Function in Gvim/VIM window                            
---------------------------------------------------------------------------------
gi                                        go into submodule                                
---------------------------------------------------------------------------------
gu                                       go upper module                                  
---------------------------------------------------------------------------------
mt                                       Print the module call trace from top to current module [3.00 +]                                  
---------------------------------------------------------------------------------
ct                                        Clear vtags module call trace (used when gi/gu ...) [3.00 +]                  
---------------------------------------------------------------------------------
<Space><Left>                  trace source                                    
---------------------------------------------------------------------------------
<Space><Right>                trace destination                                
---------------------------------------------------------------------------------
<Space><Down>               roll back                                        
---------------------------------------------------------------------------------
<Space><Up>                   go forward                                      
---------------------------------------------------------------------------------
<Space> + v                      Show the sidebar, fold or unfold moduleís topt Dynamic build vtags data base for current file  and file dir [3.00+]                            
---------------------------------------------------------------------------------
<Space> + c                     Add check point                                          
---------------------------------------------------------------------------------
<Space> + b                     Add base module                                          
---------------------------------------------------------------------------------
<Space> + d                     Delete check point or base module                        
---------------------------------------------------------------------------------
<Space> +h                      Hold current window                                      
---------------------------------------------------------------------------------
<Space>                            Fast access:                                    
                                           1.Sidebar module                                
                                           2.Trace Report                                  
                                           3.mt command report [3.00+]                              
---------------------------------------------------------------------------------
<Space> + s                      Save snap short                                          
---------------------------------------------------------------------------------
<Space> +r                        Reload snap short at current window [3.00+]          
---------------------------------------------------------------------------------
<Space> + q                      Close all open gvim windows [3.00+]                      
---------------------------------------------------------------------------------
                          Function when Gvim/VIM opening                                  
---------------------------------------------------------------------------------
gvim/vim <vtags.db path>   Reload snap short saved at <vtags.db path>[3.00+]  
---------------------------------------------------------------------------------
                          Offline function base on vtags.db                                
---------------------------------------------------------------------------------
vtags -db <vtags.db path> "mtrace( <module_name> )"                              
At <vtags.db path> corresponding design, list <module_name> all the call trace  
from most top module to <module_name>                                                    
---------------------------------------------------------------------------------
vtags -db <vtags.db path> "mfilelist( <module_name> )"                          
At <vtags.db path> corresponding design, list <module_name>ís used file list              
---------------------------------------------------------------------------------
vtags -db <vtags.db path> "mtopo( <module_name>, depth, mask )"                  
At <vtags.db path> corresponding design, list module call instance topo          
depth : optional parm, topo depth                                                
mask  : optional parm,  when sub module call more than mask times not list it
             one by one                                                                            
---------------------------------------------------------------------------------
vtags -db <vtags.db path> ďmopen( <module_name>)Ē                                
At <vtags.db path> corresponding design, open <module_name> file                          
---------------------------------------------------------------------------------

attention:
(1)  when you update your vtags from 2.xx to 3.x please delate old vtags.db in your folder, and use command  "vtags"  generate new vtags.db  again !
(2)  if your design file not all use  "v"  as the postfix, you need add you own postfix at  vtags-3.xx/vim_glb_config.py line:46 support_verilog_postfix , If not, vtags will not treat other postfix other than 'v' as your design files.
        exp:   I use  xxx.v,  xxx.sv,   xxx.V,   xxx.d in my design i need set as :  support_verilog_postfix     = ['v', 'sv', 'V', 'd' ]
 
install details
(1)  tar -zxvf vtags-3.xx.tar.gz    // unpack the file to the path you want to install. we assuming to "~/"
(2)  in  "~/.cshrc"   add line:  alias vtags 'python  ~/vtags-3.xx/vtags.py'
      or  "~/.bashrc"  add line:  alias=vtags 'python  ~/vtags-3.xx/vtags.py'
      "source ~/.cshrc"  or  "source ~/.bashrc"
(3)  in "~/.vimrc"  add line: source  ~/vtags-3.xx/vtags_vim_api.vim
(4)  config vtags-3.xx/vim_glb_config.py as it decribe in vim_glb_config.py. (can do it in local_config.py see below)
 

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
vtags-3.00.tar.gz 3.00 2019-06-17 7.3 Jun Cao 1. support both gvim with python2 or python3.
2. rebuild the verilog syntax parser with c, which is more fast(x10~100), accurate and powerful than old python parser.
3. all other provide function all changed to relay on new c-parser result, which also more more fast and accurate.
4. provide new function for easy view code and design detail see bellow.
vtags-2.24.tar.gz 2.24 2018-09-08 7.3 Jun Cao fix the bug caused by 2.23 which not write back report log, so when open a new log it will not found it and repeat open same file, cause new vtags log file can not open.
vtags-2.23.tar.gz 2.23 2018-09-05 7.3 Jun Cao Remove self writeback Report file and  Frame file(no related with rtl, just vtags's report file), user need save yourself if needed when close those file, to bypass vim's unsolved E323 bugs.
vtags-2.22.tar.gz 2.22 2018-07-28 7.3 Jun Cao Fix database save file name limited problem.
Fix some import problem.
vtags-2.21.tar.gz 2.21 2017-09-04 7.3 Jun Cao fix bug for vim.buffer cannot pickle when <Space>+s
vtags-2.20.tar.gz 2.20 2017-07-23 7.3 Jun Cao 1. vtags support file(or folder) list now, you can list all the design file or it's folder in the filelist and then use command "vtags -f filelist" to generate vtags database.
2. add new   shortcut keys :  "mt" , which used to print the current module's instantiation trace from top module.
3. enhanced shortcut keys :  "gu",  new version you can go to any upper module in the vtags.db, no need open it before.
4. enhanced shortcut keys :  " <Space><Left>", "<Space><Right>"  new version you can trace cross module from any module, no need open from top module as before.

Attention: for people update to new vtags 2.20 version needs use command "vtags or vtags -f filelist" to refresh your old vtags.db, then you can use all the new function in new version listed before.
vtags-2.12.tar.gz 2.12 2017-05-07 7.3 Jun Cao fix bug for offerline function "print_module_list(module_name)", pre version if multi module in one hdl file maybe can not list second match module list, current fix it.
vtags-2.11.tar.gz 2.11 2017-04-24 7.3 Jun Cao fix a bug at CodeLib.py line:443-443, which will made can not trace following subcall s_c, s_d signal:
A  #(p_a,p_b,p_c) A_inst (s_a, {s_b, s_c, s_d }, ...  )
vtags-2.10.tar.gz 2.10 2017-03-19 7.3 Jun Cao fix 3 bugs and not active vtags when vim not open a valid  rtl or not find vtags.db.
vtags-2.0.tar.gz 2.0 2017-03-07 7.3 Jun Cao vtags 2.x version is my current most satisfied version, hoping to share with you.
vtags-2.x almost completely refactored vtags-1.x all the features and implementation, both in function, speed and user experience have a qualitative leap, the main changes are reflected in:
1. The new version greatly expanded support for verilog multiple syntaxes.
2. The new version of the implementation of a complete and fast database dynamic update mechanism, vtags will change with the design of dynamic with the new.
3. The new version uses a new recognition algorithm, which greatly improves the accuracy and speed of recognition.
4. The new version uses a decentralized and lazy loading technology, which greatly saves the resources that vtags runs.
5. The new version provides a set of functions and APIs to facilitate the use of vtags and the database when the user does not open vim.
6. The new version optimized vtags's import, so that the vim open non-vtags support file is almost no delay.
vtags-1.23.tar.gz 1.23 2017-01-22 7.3 Jun Cao fix a bug in Code.py line 465, need 'Source' but use source, if you open Debug mode may find this error.
fix a bug in Base.py line 986, add i += 1 in while loop, if your code wrong and has endmodule without module define it will loop forever.
vtags-1.22.tar.gz 1.22 2017-01-07 7.3 Jun Cao fix the bug when use <Space>B add last topo line module to base module, and refresh the topo will not work .
vtags-1.21.tar.gz 1.21 2016-12-08 7.0 Jun Cao add some optimize for trace speed and accuracy, some case pre version can not deside if source or dest current can sure is' source or dest.
vtags-1.20.tar.gz 1.20 2016-12-06 7.2 Jun Cao Initial upload
ip used for rating: 54.211.135.32

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.
   
OSDN.net Logo