Skip to main content

cocotb

cocotb(IP_LIB **kwargs)

Create a target for invoking simulation on IP_LIB using the cocotb Python verification framework.

The function is a wrapper around supported simulators by cocotb. It is based on the cocotb Makefiles.

Parameters

NameTypeDescription
IP_LIBstringThe target IP library.

Keyword Arguments

NameTypeDescription
NO_RUN_TARGETboolDo not create a run target.
GUIboolRun simulation in GUI mode.
OUTDIRstringOutput directory for the cocotb simulation build files.
RUN_TARGET_NAMEstringReplace the default name of the run target.
TOP_MODULEstringTop module name to be used for elaboration and simulation.
COCOTB_MODULEstringSimulator executable name. Defaults to <IP_LIB>_iverilog_tb.
COCOTB_TESTCASEintegerCocotb number of test cases to run (from 1 to N). All test cases are run sequentially if not provided.
SIMstringSimulator to use. Supported simulators is: icarus (cocotb also support verilator, xcelium, vcs and questasim, not yet supported by SoCMake).
TIMESCALEstringSimulation timescale. Default is 1ns/1ps.
PYTHONPATHstringList of paths to be added to the PYTHONPATH environment variable to include python modules needed for the simulation.
SV_COMPILE_ARGSstringExtra arguments to be passed to the SystemVerilog / Verilog compilation step.
RUN_ARGSstringExtra arguments to be passed to the simulation step.