2024-01-01 08:19:59 +00:00
|
|
|
.. Copyright 2003-2024 by Wilson Snyder.
|
2021-04-11 22:55:06 +00:00
|
|
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
|
|
|
|
*****
|
|
|
|
Files
|
|
|
|
*****
|
|
|
|
|
|
|
|
.. _Files in the Distribution:
|
|
|
|
|
|
|
|
Files in the Git Tree
|
|
|
|
=====================
|
|
|
|
|
|
|
|
The following is a summary of the files in the Git Tree (distribution) of
|
|
|
|
Verilator:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
Changes => Version history
|
|
|
|
README.rst => This document
|
|
|
|
bin/verilator => Compiler wrapper invoked to Verilate code
|
|
|
|
docs/ => Additional documentation
|
|
|
|
examples/ => Examples (see manual for descriptions)
|
|
|
|
include/ => Files that should be in your -I compiler path
|
|
|
|
include/verilated*.cpp => Global routines to link into your simulator
|
|
|
|
include/verilated*.h => Global headers
|
|
|
|
include/verilated.mk => Common Makefile
|
|
|
|
src/ => Translator source code
|
|
|
|
test_regress => Internal tests
|
|
|
|
|
|
|
|
|
|
|
|
.. _Files Read/Written:
|
|
|
|
|
|
|
|
Files Read/Written
|
|
|
|
==================
|
|
|
|
|
|
|
|
All output files are placed in the output directory specified with the
|
|
|
|
:vlopt:`--Mdir` option, or "obj_dir" if not specified.
|
|
|
|
|
|
|
|
Verilator creates the following files in the output directory:
|
|
|
|
|
|
|
|
For --cc/--sc, it creates:
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
|
|
|
* - *{prefix}*\ .cmake
|
|
|
|
- CMake include script for compiling (from --make cmake)
|
|
|
|
* - *{prefix}*\ .mk
|
|
|
|
- Make include file for compiling (from --make gmake)
|
|
|
|
* - *{prefix}*\ _classes.mk
|
|
|
|
- Make include file with class names (from --make gmake)
|
|
|
|
* - *{prefix}*\ .h
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
- Model header
|
|
|
|
* - *{prefix}*\ .cpp
|
|
|
|
- Model C++ file
|
|
|
|
* - *{prefix}*\ ___024root.h
|
2022-12-11 01:09:47 +00:00
|
|
|
- Top-level internal header file (from SystemVerilog $root)
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
* - *{prefix}*\ ___024root.cpp
|
2022-12-11 01:09:47 +00:00
|
|
|
- Top-level internal C++ file (from SystemVerilog $root)
|
2022-07-28 12:41:01 +00:00
|
|
|
* - *{prefix}*\ ___024root\ *{__n}*\ .cpp
|
2022-12-11 01:09:47 +00:00
|
|
|
- Additional top-level internal C++ files
|
2022-07-28 12:41:01 +00:00
|
|
|
* - *{prefix}*\ ___024root\ *{__DepSet_hash__n}*\ .cpp
|
2022-12-11 01:09:47 +00:00
|
|
|
- Additional top-level internal C++ files (hashed to reduce build times)
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
* - *{prefix}*\ ___024root__Slow\ *{__n}*\ .cpp
|
2021-04-11 22:55:06 +00:00
|
|
|
- Infrequent cold routines
|
2022-07-28 12:41:01 +00:00
|
|
|
* - *{prefix}*\ ___024root\ *{__DepSet_hash__n}*\ .cpp
|
|
|
|
- Infrequent cold routines (hashed to reduce build times)
|
|
|
|
* - *{prefix}*\ ___024root__Trace\ *{__n}*\ .cpp
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
- Wave file generation code (from --trace)
|
2022-07-28 12:41:01 +00:00
|
|
|
* - *{prefix}*\ ___024root__Trace__Slow\ *{__n}*\ .cpp
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
- Wave file generation code (from --trace)
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}*\ __Dpi.h
|
|
|
|
- DPI import and export declarations (from --dpi)
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
* - *{prefix}*\ __Dpi.cpp
|
|
|
|
- Global DPI export wrappers (from --dpi)
|
2021-09-21 22:15:56 +00:00
|
|
|
* - *{prefix}*\ __Dpi_Export\ *{__n}*\ .cpp
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
- DPI export wrappers scoped to this particular model (from --dpi)
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}*\ __Inlines.h
|
|
|
|
- Inline support functions
|
|
|
|
* - *{prefix}*\ __Syms.h
|
|
|
|
- Global symbol table header
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
* - *{prefix}*\ __Syms.cpp
|
|
|
|
- Global symbol table C++
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}{each_verilog_module}*\ .h
|
|
|
|
- Lower level internal header files
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 14:30:20 +00:00
|
|
|
* - *{prefix}{each_verilog_module}*\ .cpp
|
|
|
|
- Lower level internal C++ files
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}{each_verilog_module}{__n}*\ .cpp
|
2022-07-28 12:41:01 +00:00
|
|
|
- Additional lower C++ files
|
|
|
|
* - *{prefix}{each_verilog_module}{__DepSet_hash__n}*\ .cpp
|
2022-10-16 15:10:41 +00:00
|
|
|
- Additional lower C++ files (hashed to reduce build times)
|
2021-04-11 22:55:06 +00:00
|
|
|
|
2024-08-21 09:30:59 +00:00
|
|
|
For --hierarchical mode, it creates:
|
2021-04-11 22:55:06 +00:00
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
|
|
|
* - V\ *{hier_block}*\ /
|
2024-08-21 09:30:59 +00:00
|
|
|
- Directory to Verilate each hierarchical block (from --hierarchical)
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}*\ __hierVer.d
|
2024-08-21 09:30:59 +00:00
|
|
|
- Make dependencies of the top module (from --hierarchical)
|
|
|
|
* - *{prefix}*\ _hier.mk
|
|
|
|
- Make file for hierarchical blocks (from --make gmake)
|
|
|
|
* - *{prefix}*\ __hierCMakeArgs.f
|
|
|
|
- Arguments for hierarchical Verilation (from --make cmake)
|
|
|
|
* - *{prefix}*\ __hierMkArgs.f
|
|
|
|
- Arguments for hierarchical Verilation (from --make gmake)
|
|
|
|
* - *{prefix}*\ __hierParameters.v
|
|
|
|
- Module parameters for hierarchical blocks
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}*\ __hier.dir
|
2024-08-21 09:30:59 +00:00
|
|
|
- Directory to store .dot, .vpp, .tree of top module (from --hierarchical)
|
2021-04-11 22:55:06 +00:00
|
|
|
|
2022-12-11 01:09:47 +00:00
|
|
|
In specific debug and other modes, it also creates:
|
2021-04-11 22:55:06 +00:00
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
|
|
|
* - *{prefix}*\ .xml
|
|
|
|
- XML tree information (from --xml)
|
2024-02-09 22:50:09 +00:00
|
|
|
* - *{prefix}*\ .tree.json
|
|
|
|
- JSON tree information (from --json-only)
|
|
|
|
* - *{prefix}*\ .tree.meta.json
|
|
|
|
- JSON tree metadata (from --json-only)
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}*\ __cdc.txt
|
|
|
|
- Clock Domain Crossing checks (from --cdc)
|
|
|
|
* - *{prefix}*\ __stats.txt
|
|
|
|
- Statistics (from --stats)
|
|
|
|
* - *{prefix}*\ __idmap.txt
|
|
|
|
- Symbol demangling (from --protect-ids)
|
|
|
|
* - *{prefix}*\ __ver.d
|
|
|
|
- Make dependencies (from -MMD)
|
|
|
|
* - *{prefix}*\ __verFiles.dat
|
|
|
|
- Timestamps (from --skip-identical)
|
|
|
|
* - *{prefix}{misc}*\ .dot
|
|
|
|
- Debugging graph files (from --debug)
|
|
|
|
* - *{prefix}{misc}*\ .tree
|
|
|
|
- Debugging files (from --debug)
|
2023-05-07 21:58:14 +00:00
|
|
|
* - *{prefix}*\ __inputs\ .vpp
|
|
|
|
- Pre-processed verilog for all files (from --debug)
|
|
|
|
* - *{prefix}*\ _ *{each_verilog_base_filename}*\ .vpp
|
|
|
|
- Pre-processed verilog for each file (from --debug)
|
2021-04-11 22:55:06 +00:00
|
|
|
|
|
|
|
After running Make, the C++ compiler may produce the following:
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
|
|
|
* - verilated{misc}*\ .d
|
|
|
|
- Intermediate dependencies
|
|
|
|
* - verilated{misc}*\ .o
|
|
|
|
- Intermediate objects
|
|
|
|
* - {mod_prefix}{misc}*\ .d
|
|
|
|
- Intermediate dependencies
|
|
|
|
* - {mod_prefix}{misc}*\ .o
|
|
|
|
- Intermediate objects
|
|
|
|
* - *{prefix}*\
|
|
|
|
- Final executable (from --exe)
|
2023-12-23 14:31:10 +00:00
|
|
|
* - lib\ *{prefix}*\ .a
|
|
|
|
- Final archive (default lib mode)
|
|
|
|
* - libverilated.a
|
|
|
|
- Runtime for verilated model (default lib mode)
|
2021-04-11 22:55:06 +00:00
|
|
|
* - *{prefix}*\ __ALL.a
|
|
|
|
- Library of all Verilated objects
|
|
|
|
* - *{prefix}*\ __ALL.cpp
|
|
|
|
- Include of all code for single compile
|
|
|
|
* - *{prefix}{misc}*\ .d
|
|
|
|
- Intermediate dependencies
|
|
|
|
* - *{prefix}{misc}*\ .o
|
|
|
|
- Intermediate objects
|
2021-09-27 02:51:11 +00:00
|
|
|
|
|
|
|
The Verilated executable may produce the following:
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
|
|
|
* - coverage.dat
|
|
|
|
- Code coverage output, and default input filename for :command:`verilator_coverage`
|
|
|
|
* - gmon.out
|
|
|
|
- GCC/clang code profiler output, often fed into :command:`verilator_profcfunc`
|
|
|
|
* - profile.vlt
|
2022-03-25 19:46:50 +00:00
|
|
|
- --prof-pgo data file for :ref:`Thread PGO`
|
|
|
|
* - profile_exec.dat
|
|
|
|
- --prof-exec data file for :command:`verilator_gantt`
|
2021-09-27 02:51:11 +00:00
|
|
|
|
|
|
|
Verilator_gantt may produce the following:
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
2022-03-25 19:46:50 +00:00
|
|
|
* - profile_exec.vcd
|
2021-09-27 02:51:11 +00:00
|
|
|
- Gantt report waveform output
|