verilator
verilator(IP_LIB **kwargs)
Create a target for invoking verilator (compilation, elaboration, and simulation) on IP_LIB.
It will create a target run_<IP_LIB>_verilator that will compile, elaborate, and simulate the IP_LIB design.
Parameters
| Name | Type | Description |
|---|---|---|
IP_LIB | string | The target IP library, it needs to have SOURCES property set with a list of SystemVerilog files. |
Keyword Arguments
| Name | Type | Description |
|---|---|---|
COVERAGE | bool | Enable code coverage during compilation and simulation. |
TRACE | bool | Enable waveform tracing. |
TRACE_FST | bool | Enable FST waveform tracing format. |
SYSTEMC | bool | Enable SystemC support. |
TRACE_STRUCTS | bool | Enable tracing of SystemVerilog structs. |
MAIN | bool | Generate a top-level C++ main() that parses arguments but drives no inputs. Sufficient for top-level SystemVerilog designs with no inputs. Also creates a runnable executable target. |
TIMING | bool | Enable timing support in simulation. |
NO_RUN_TARGET | bool | Do not create a run target. |
PREFIX | string | Prefix name used for generated output files and targets. |
TOP_MODULE | string | Top module name to be used for elaboration and simulation. |
THREADS | int | Number of threads to be used during compilation or simulation. |
DIRECTORY | string | Output directory for generated build and simulation files. |
EXECUTABLE_NAME | string | Replace the default name of the generated executable target. |
RUN_TARGET_NAME | string | Replace the default name of the run target. |
VERILATOR_ARGS | string | Extra arguments to be passed to the Verilator invocation. |
OPT_SLOW | bool | Enable slow but optimized compilation mode. |
OPT_FAST | bool | Enable fast compilation optimization mode. |
OPT_GLOBAL | bool | Enable global optimization mode. |
RUN_ARGS | string | Extra arguments to be passed to the simulation executable. |
FILE_SETS | list[string] | Specify list of file sets to retrieve the sources from. |
verilator_configure_cxx(**kwargs)
.. note:: This is a macro, and so does not introduce a new scope.
This macro is used to configure the C and CXX compiler to the one used by the tool. In this specific case, it won't change anything for the compiler use but will add some useful information to IP_LIB.
The only supported library by this function is DPI-C, it can be used as done in the following example :
verilator_configure_cxx(LIBRARIES DPI-C)
Keyword Arguments
| Name | Type | Description |
|---|---|---|
LIBRARIES | list[string] | Libraries that needs to be added. |
verilator_add_cxx_libs(**kwargs)
This function is called by the verilator_configure_cxx macro, you shouldn't use it directly.
It will add the needed information to IP_LIB and add some flags for the compilation and linking.
Keyword Arguments
| Name | Type | Description |
|---|---|---|
32BIT | bool | Use 32 bitness. |
LIBRARIES | list[string] | libraries that needs to be added, possible choice are DPI-C only for now. |