Exemple #1
0
def module_top(dut):
    #  my_env topenv
    uvm_default_printer = uvm_default_table_printer
    uvm_top.enable_print_topology = 1

    # set configuration prior to creating the environment
    UVMConfigDb.set(None, "topenv.*.u1", "v", 30)
    UVMConfigDb.set(None, "topenv.inst2.u1", "v", 10)
    UVMConfigDb.set(None, "topenv.*", "debug", 1)
    UVMConfigDb.set(None, "*", "myaa[foo]", "hi")
    UVMConfigDb.set(None, "*", "myaa[bar]", "bye")
    UVMConfigDb.set(None, "*", "myaa[foobar]", "howdy")
    UVMConfigDb.set(None, "topenv.inst1.u1", "myaa[foo]", "boo")
    UVMConfigDb.set(None, "topenv.inst1.u1", "myaa[foobar]", "boobah")

    topenv = my_env("topenv", uvm_top)
    UVMConfigDb.set(topenv, "*.u1", "v", 30)
    UVMConfigDb.set(topenv, "inst2.u1", "v", 10)
    UVMConfigDb.set(topenv, "*", "debug", 1)
    UVMConfigDb.set(topenv, "*", "myaa[foo]", "hi")
    UVMConfigDb.set(topenv, "*", "myaa[bar]", "bye")
    UVMConfigDb.set(topenv, "*", "myaa[foobar]", "howdy")
    UVMConfigDb.set(topenv, "inst1.u1", "myaa[foo]", "boo")
    UVMConfigDb.set(topenv, "inst1.u1", "myaa[foobar]", "boobah")

    UVMConfigDb.set(uvm_top, "topenv", "should_match", 1234)

    yield run_test()
Exemple #2
0
def initial(dut):
    env = tb_env("env", None)
    vif = apb_if(dut)
    UVMConfigDb.set(env, "apb", "vif", vif)
    UVMConfigDb.set(None, "", "dut", dut)
    #UVMConfigDb.set(env, "apb", "vif", tb_top.apb0)
    cocotb.fork(Clock(vif.clk, 10, "NS").start())
    yield run_test()
Exemple #3
0
async def module_top(dut):
    prod = producer("prod", None)
    cons = consumer("cons", None)
    fifo = UVMTLMFIFO("fifo", None, 10)

    prod.data_out.connect(fifo.put_export)
    cons.data_in.connect(fifo.get_export)

    proc1 = cocotb.fork(run_test("test"))
    proc2 = cocotb.fork(print_proc(fifo))
    await sv.fork_join([proc1, proc2])
Exemple #4
0
def module_top(dut):

    pif = pin_if(dut) #  pin_if pif(clk)
    ck_proc = cocotb.fork(module_clkgen(pif.clk))
    #ck = clkgen(pif.clk) #  clkgen ck(clk)

    #d = dut(pif.slave_mp)

    e = env("e_env")
    UVMResourceDb.set("env.driver", "pif", pif)
    UVMResourceDb.dump()
    yield run_test()
Exemple #5
0
def initial_begin(dut):
    t = top("top", None)
    # Randomize all of the delays
    t.randomize()  # cast to 'void' removed
    yield run_test()
    if sv.realtime("NS") != test_duration:
        uvm_fatal("TIME_ERR",
                  "Exp: {}, Got: {}".format(test_duration, sv.realtime("NS")))
    svr = UVMCoreService.get().get_report_server()
    num_errors = svr.get_severity_count(UVM_ERROR)
    if num_errors > 0:
        uvm_fatal("SERVER_HAD_ERRORS", "Num UVM_ERRORS: {}".format(num_errors))
Exemple #6
0
async def initial(dut):
    env = blk_env("env")
    vif = apb_if(dut)
    UVMConfigDb.set(env, "apb", "vif", vif)
    c = Clock(dut.apb_pclk, 10, 'ns')
    cocotb.fork(c.start())
    cocotb.fork(run_test())
    await Timer(1000, "NS")

    if env.all_ok is False:
        uvm_fatal("ALL_NOT_OK", "env.all_ok == False, something went wrong!")
    else:
        uvm_info("ALL_OK", "*** TEST PASSED ***", UVM_NONE)
Exemple #7
0
def initial(dut):
    print("dut parameter NUM_BLKS: " + str(dut.NUM_BLKS))
    env = sys_env("env")
    vif = apb_if(dut)
    UVMConfigDb.set(env, "apb", "vif", vif)
    c = Clock(dut.apb_pclk, 10, 'ns')
    cocotb.fork(c.start())
    yield run_test()

    if env.all_ok is False:
        uvm_fatal("ALL_NOT_OK", "env.all_ok == False, something went wrong!")
    else:
        uvm_info("ALL_OK", "*** TEST PASSED ***", UVM_NONE)
Exemple #8
0
def module_top(dut):
    obj = UVMObject("my_conf_obj")

    # set configuration prior to creating the environment
    UVMConfigDb.set(None, "topenv.*.u1", "v", 30)
    UVMConfigDb.set(None, "topenv.inst2.u1", "v", 10)
    UVMConfigDb.set(None, "*", "recording_detail", 0)
    UVMConfigDb.set(None, "*", "myaa[foo]", "hi")
    UVMConfigDb.set(None, "*", "myaa[bar]", "bye")
    UVMConfigDb.set(None, "*", "myaa[foobar]", "howdy")
    UVMConfigDb.set(None, "topenv.inst1.u1", "myaa[foo]", "boo")
    UVMConfigDb.set(None, "topenv.inst1.u1", "myaa[foobar]", "boobah")
    UVMConfigDb.set(None, "topenv.inst1.u1", "my_conf_obj", obj)
    UVMConfigDb.set(None, "topenv.inst1.u1", "tag", 'I am tagged')
    topenv = my_env("topenv", None)
    yield run_test()
Exemple #9
0
def initial_begin(dut):
    env = tb_env("env_for_tlm2_test")
    yield run_test()
Exemple #10
0
def initial_begin(dut):
    env = tb_env("env")
    yield run_test("test_comp")
def master_slave_top(dut):
    yield run_test()