VHIER(1p)
π vhier β the manual, but make it cute
okay bestie, so vhier is a thing from the User Contributed Perl Documentation crew (that's the manual name, VHIER(1p), if you were wondering π
) and it's about to make your Verilog hierarchy look gorgeous. Let's get into it. π¦
β¨ SYNOPSIS β¨
vhier --help
vhier [verilog_options] [-o filename] [verilog_files.v...]
πΈ DESCRIPTION πΈ
So vhier reads the Verilog files you hand it on the command line, and then it outputs a whole tree of every filename, module, and cell that got referenced by that file. It's giving family tree, but for your design. π³β¨
π VERILOG ARGUMENTS π
These ones play nice with GCC, VCS, and honestly most Verilog programs out there. Compatible king energy. π
+define+var+value,-Dvar=valueβ Defines that preprocessor symbol for you. (yes, both spellings, the original wrote them together like that, we don't argue with the source π)-F fileβ Reads the file you name, and acts like every single line of text inside it was typed out as command line parameters. Sneaky! And heads up: any relative paths are relative to the directory that contains the file you specified. π-f fileβ Same deal as-Fabove, reads the file and pretends all its text was command line parameters. BUT. Any relative paths are relative to the current directory instead. Different vibe, same function. π+incdir+dir,-Idirβ Adds that directory to the list of places we go hunting for include directories or libraries. π΅οΈβοΈ+libext+ext+ext...β Tells us which extensions to use when we're out here finding modules. Like, if modulexgets referenced, we go look inx.ext. π-svβ Specifies that SystemVerilog language features should be enabled; equivalent to--language 1800-2023. And plot twist β this option is selected by default already, it just exists for compatibility with other simulators. It's the default main character. β¨-y dirβ Adds that directory to the list of directories searched for include directories or libraries. Same energy as the incdir one. π«Ά
π VHIER ARGUMENTS π
This is the section that's actually ours. Buckle up.
--helpβ Displays this message and program version, then exits. The classic. π--o fileβ Use the given filename for output instead ofstdout. Yes, that's how the original spells it, two dashes, no cap.--cellsβ Show the module name of all cells, in top-down order. β¬οΈ--forestβ Show an "ASCII-art" hierarchy tree of all cells (likeps --forest). Art. Iconic. π²--input-filesβ Show all input filenames. If you copy all of these files, you should end up with only the files needed to represent the entire design. Chef's kiss packaging. π--includesβ Show each source filename that includes another filename. The included filename will be exactly as specified in the original source filename, so you might need to resolve it into an absolute path for further processing. Heads up on that. π--instanceβ With--cellsor--forest, show module instance names. π·οΈ--languagefollowed by one of<1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017|1800-2023>β Set the language standard for the files. This is the thing that decides which tokens are signals versus keywords β like the ever-commondo(a data-out signal, versus a do-while loop keyword). Context matters bestie. π--resolve-filesβ Show resolved filenames passed on the command line. This converts raw module and filenames without paths so they include the library search path directory. Output filenames will be in the same order as passed on the command line. And β unlike--input-filesor--module-filesβ hierarchy is not traversed. π--module-filesβ Show all module filenames in top-down order. Child modules will always appear as low as possible, so if you reverse the list you get bottom-up processing of modules. And unlikeinput-files, header files are not included. π§--modulesβ Show all module names. That's it, that's the option. π--no-missingβ Do not complain about references to missing modules. Peace and quiet era. π€«--missing-modulesβ With--nomissing, show all modules that are not found. π»--skiplist fileβ The given file contains a list of regular expressions, one per line. If a module name in the design hierarchy matches one of these expressions, skip showing that module and any sub-hierarchy. Whole branch, gone, bye. π«--synthesisβ DefineSYNTHESIS, and ignore text betweenambit,pragma,synopsysorsynthesistranslate_offandtranslate_onmeta comments.
β οΈ Note: using metacomments is discouraged because they have led to silicon bugs (versus ifdef SYNTHESIS). The original points you at <https://www.veripool.org/papers/TenIPEdits_SNUGBos07_paper.pdf> β go read it, it's real. π
--top-module moduleβ Start the report at the specified module name, ignoring all modules that are not the one specified with--top-moduleor below it, and report an error if the--top-moduleyou specified doesn't exist. Without this option,vhierreports all modules, starting at the module(s) that have no children below them.
Also note: this option will not change the result of the --input-files list, because the files needed to parse any design are independent of which modules are used. Facts are facts. π«Ά
--versionβ Displays program version and exits. βοΈ--xmlβ Create output in XML format. Fancy. π₯
π DISTRIBUTION π
Verilog-Perl is part of the <https://www.veripool.org/> free Verilog EDA software tool suite. The latest version is available from CPAN and from <https://www.veripool.org/verilog-perl>. Go get you some. π¦
Copyright 2005-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. Pick your fighter. βοΈ
π AUTHORS π
Wilson Snyder <wsnyder@wsnyder.org> β the legend himself. π
π₯ SEE ALSO π₯
Verilog-PerlVerilog::GetoptVerilog::PreprocVerilog::Netlist
and that's the whole thing bestie!! π This page came to you from perl v5.40.1, dated 2025-04-20 β so if you're reading this way later, go check for a glow-up. π β¨ slay, go build something, ily π¦
π¦ where this page comes from
- debian trixie: libverilog-perl 3.482-2 Β· Artistic-2.0 OR LGPL-3.0-only
- ubuntu resolute: libverilog-perl 3.482-2 Β· Artistic-2.0 OR LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms