User Tools

Site Tools


hdl_navigation

HDL Navigation

RTL Overview using Chip Vault

The Chip Vault program can show to you the RTL modules of your design in an ASCII art graphic view. On top of that, it can open its correspondent source file, navigate to connected modules or down and upwards the modules' hierarchy.

Copy and unpack cv.pl to the top directory of your RTL design. Call <perl cv.pl top_module.v>. Now you can navigate through the RTL modules using the arrows and open the module's graphic view by typing “p”. More on Chip Vault usage here or by typing “h” while using the program.

Source Code Navigation with Vim, Ctags and Cscope

I strongly recommend the usage of special tools for the navigation of source files. I have been using Ctags+Cscope on Vim. But you can use Ctags and Cscope on other editors too. However, you have to check how they work there for yourself then.

How does it work? You install Vim, Ctags and Cscope:

sudo apt-get install gvim-gnome exuberant-ctags cscope

Open Vim from your home directory, type vim. Inside of Vim type the following, each line followed by an enter.

:edit $VIMRUNTIME/vimrc_example.vim
:w .vimrc
:q!

Copy the file to your ”~/.vim/plugin” directory.

Now go to or1200/rtl/verilog directory and type:

$ ls *.v > cscope.files
$ ctags -L cscope.files
$ cscope -b

You are now ready to go!

So what? To start with, you can now from this directory open Vim directly to a module or signal by typing: vim -t module name or signal name: example: (g)vim -t or1200_top

Then, you have two main commands with that set-up:

  1. go to reference: <CTRL+]>
  2. search all references to that name: <CTRL+\+s>

To use them, you just put the cursor on a word in the file and type them. On 1), vim will navigate to the reference of that symbol. On 2), Vim opens a menu with all appearances of that symbol, you select one by typing its number and then Vim navigates to it.

Alternatively you can use directly:

:ta symbol_name
:cs f s symbol_name

And you can always go back by typing <CTRL+t>.

Extra: if you install taglist on top of that, link. You can open a module visualization left of the text and click on port, ports and signal definitions to go to their place on the file. To do that, type ”:TlistToggle” inside of Vim.

If you want to navigate in software you should run the following:

cd minsoc/sw
find . -name '*.c' > cscope.files
find . -name '*.h' >> cscope.files
ctags -L cscope.files 
cscope -b

IDEs

Most IDEs for hardware development are closed source and not free. The Xilinx and Altera project managers are not really well suited to HDL development since they lack source navigation. Two commercial tools I know of are HDL designer from Mentor Graphics and Active HDL from Aldec. However, I didn't use them extensively enough to offer a review.

A tool I also didn't use so much, but which open source users around might be interested in, is Veditor. It is a plugin to the known IDE Eclipse, which offers you a simulation environment using Icarus Verilog and full source navigation features.

hdl_navigation.txt · Last modified: 2011/11/15 20:33 by Constantinos Xanthopoulos