예제 #1
0
def uvm_is_sim_active():
    """
    Returns true if a simulator is active/attached. Returns False for example
    when running unit tests without cocotb Makefiles.
    """
    # return hasattr(cocotb, 'SIM_NAME')
    return simulator.is_running()
예제 #2
0
#//
#// Function: uvm_bits_to_string
#//
#// Converts an input bit-vector to its string equivalent. Max bit-vector
#// length is approximately 14000 characters.
#//----------------------------------------------------------------------------

#function string uvm_bits_to_string(logic [UVM_LARGE_STRING:0] str)
#  $swrite(uvm_bits_to_string, "%0s", str)
#endfunction

#verilator = True
verilator = False

sim_product = ''
if simulator.is_running():
    sim_product = simulator.get_simulator_product()
    print("uvm-python: Used simulator is |" + sim_product + "|")
    if sim_product == "Verilator":
        verilator = True


def uvm_has_verilator():
    return verilator


UVM_POUND_ZERO_COUNT = 1000
UVM_NO_WAIT_FOR_NBA = False

if hasattr(cocotb, 'SIM_NAME') and getattr(cocotb, 'SIM_NAME') == 'Verilator':
    UVM_POUND_ZERO_COUNT = 100
예제 #3
0
 def is_simulator_active(cls):
     return simulator.is_running()