VHIER(1)

πŸ“¦
version 3.482 Β· 3 versions
, in fedora 43

πŸ’– VHIER(1) πŸ’–

okay bestie, welcome to the vhier page β€” it lives in the User Contributed Perl Documentation section of the manual, and it's genuinely one of the most useful little gremlins in the Verilog-Perl toolbox. Let's get into it πŸ¦‹


✨ NAME ✨

vhier β€” returns all files in a verilog hierarchy, using Verilog::Netlist. that's the whole vibe. periodt.


🌸 SYNOPSIS 🌸

vhier --help
vhier [verilog_options] [-o filename] [verilog_files.v...]

πŸ’… DESCRIPTION πŸ’…

so the way that vhier works is so clean: it reads the Verilog files you hand it on the command line, and then it prints out a whole tree of every filename, every module, and every cell that got referenced by that file. that's it. that's the gig. main character behavior honestly πŸ‘‘


πŸ”₯ VERILOG ARGUMENTS πŸ”₯

these ones are compatible with GCC, VCS, and most Verilog programs, so they'll feel familiar if you've ever yelled at a compiler πŸ’€

  • +define+var+value β€” also written as -Dvar=value. Defines the given preprocessor symbol.
  • -F file β€” read the specified file and act as if all the text inside it was specified as command line parameters. any relative paths are relative to the directory containing the specified file.
  • -f file β€” read the specified file and act as if all the text inside it was specified as command line parameters. any relative paths are relative to the current directory (yes, that's the difference from -F, bestie, don't mix them up πŸ™ˆ).
  • +incdir+dir β€” also written as -Idir. Adds the directory to the list of directories that should be searched for include directories or libraries.
  • +libext+ext+ext... β€” specifies the extensions that should be used for finding modules. if, for example, module x is referenced, it'll look in x.ext.
  • -sv β€” specifies that SystemVerilog language features should be enabled; equivalent to --language 1800-2023. this option is selected by default β€” it exists for compatibility with other simulators.
  • -y dir β€” adds the directory to the list of directories that should be searched for include directories or libraries.

πŸŽ€ VHIER ARGUMENTS πŸŽ€

these are the ones that are actually ours, and they're iconic:

  • --help β€” displays this message and program version, then exits.
  • --o file β€” use the given filename for output instead of stdout.
  • --cells β€” show the module name of all cells in top-down order.
  • --forest β€” show an "ASCII-art" hierarchy tree of all cells (like ps --forest). yes, it's giving forest. 🌲
  • --input-files β€” show all input filenames. copying all of these files should result in only those files needed to represent the entire design.
  • --includes β€” show each source filename that includes another filename. the included filename will be as specified in the original source filename, so it may be necessary to resolve it into an absolute path for further processing.
  • --instance β€” with --cells or --forest, show module instance names.
  • --language β€” takes one of <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017|1800-2023>. sets the language standard for the files. this determines which tokens are signals versus keywords, such as the ever-common "do" (data-out signal, versus a do-while loop keyword).
  • --resolve-files β€” show resolved filenames passed on the command line. this will convert raw module and filenames without paths to include the library search path directory. output filenames will be in the same order as passed on the command line. unlike --input-files or --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 that reversing the list will allow bottom-up processing of modules. unlike input-files, header files are not included.
  • --modules β€” show all module names.
  • --no-missing β€” do not complain about references to missing modules.
  • --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.
  • --synthesis β€” define SYNTHESIS, and ignore text between "ambit", "pragma", "synopsys" or "synthesis" translate_off and translate_on meta comments. note that using metacomments is discouraged as they have led to silicon bugs (versus ifdef SYNTHESIS); see <https://www.veripool.org/papers/TenIPEdits_SNUGBos07_paper.pdf>.
  • --top-module module β€” start the report at the specified module name, ignoring all modules that are not the one specified with --top-module or below, and report an error if the --top-module specified does not exist. without this option vhier will report all modules, starting at the module(s) that have no children below them.
heads up: this option will not change the result of the --input-files list, as the files needed to parse any design are independent of which modules are used.
  • --version β€” displays program version and exits.
  • --xml β€” create output in XML format.

🌈 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>.

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.


πŸ‘‘ AUTHORS πŸ‘‘

Wilson Snyder <wsnyder@wsnyder.org> β€” the icon himself πŸ’œ


🫢 SEE ALSO 🫢

Verilog-Perl, Verilog::Getopt, Verilog::Preproc, Verilog::Netlist


and that's the page bestie!! ✨ fr fr, go build something cute with it. this was perl v5.42.0, dated 2025-07-25, and it's the VHIER(1) manual β€” slay πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from