-
-
Notifications
You must be signed in to change notification settings - Fork 8
Hierarchy
Hierarchy extraction is done via Verilog-Perl vhier
.
Visualize with outline-minor-mode
and outshine
.
- For Ubuntu/Debian:
sudo apt-get install libverilog-perl
By default verilog-ext-vhier-current-file
will look at the list of current Verilog open buffers and their corresponding directories to search for modules. In case there is some missing module or an error related with compilation order, you can customize the variable verilog-ext-vhier-command-file
and set a command file that can include a list of the files/includes used for hierarchy extraction, according to vhier
syntax. E.g:
(setq verilog-ext-vhier-command-file "~/my-verilog-project/commands.f")
And being the content of commands.f
:
-y ~/my-verilog-project/some-not-found-dir
~/my-verilog-project/src/my_pkg.sv
+define+SYNTHESIS+0
After extracting the hierarchy the output will be dumped in directory "vhier" to a file named same as current top module. To customize the output file path you can set the variable verilog-ext-vhier-output-file
.
Hierarchy navigation is done through the minor-mode verilog-ext-vhier-mode
. It is based on outshine-mode
and creates the following keybindings:
- Hide/Show
-
a
outline-show-all
-
i
outline-show-children
-
h
outline-show-children
-
l
vhier-hide-sublevels
-
I
outline-show-branches
-
;
outline-hide-other
- Movement
-
u
vhier-up-heading
-
C-c C-u
vhier-up-heading
-
n
vhier-next-visible-heading
-
j
vhier-next-visible-heading
-
p
vhier-previous-visible-heading
-
k
vhier-previous-visible-heading
-
C-c C-n
vhier-forward-same-level
-
C-c C-p
vhier-backward-same-level
-
u
- Jump
-
o
verilog-ext-vhier-outline-jump-to-file
-
RET
verilog-ext-vhier-outline-jump-to-file
-
C-j
verilog-ext-vhier-outline-jump-to-file
-
o
Current navigation implementation uses outshine
since it is a very simple method. There are a couple of alternatives to take into consideration to improve current implementation:
-
Using the built-in package hierarchy.el
-
As an extension to Treemacs: https://github.com/Alexander-Miller/treemacs/blob/master/Extensions.org