mirror of
https://github.com/fpganinja/taxi.git
synced 2025-12-12 18:18:39 -08:00
Testbench cleanup for cocotb 2.0
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
@@ -149,7 +149,7 @@ async def run_test_prbs(dut, ref_prbs):
|
||||
await Timer(10, 'ns')
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
if cocotb.top.LFSR_POLY.value == 0x4c11db7:
|
||||
factory = TestFactory(run_test_crc)
|
||||
|
||||
@@ -112,7 +112,7 @@ async def run_test_crc(dut, ref_crc):
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
if int(cocotb.top.LFSR_POLY.value) == 0x4c11db7:
|
||||
factory = TestFactory(run_test_crc)
|
||||
|
||||
@@ -145,7 +145,7 @@ async def run_test_descramble(dut, ref_scramble, ref_descramble):
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
# if cocotb.top.LFSR_POLY.value == 0x8000000001:
|
||||
if int(cocotb.top.LFSR_W.value) == 58:
|
||||
|
||||
@@ -146,7 +146,7 @@ async def run_test_prbs(dut, ref_prbs):
|
||||
assert err_cnt == 3
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
if int(cocotb.top.LFSR_POLY.value) == 0x021:
|
||||
factory = TestFactory(run_test_prbs)
|
||||
|
||||
@@ -150,7 +150,7 @@ async def run_test_scramble(dut, ref_scramble):
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
if int(cocotb.top.LFSR_POLY.value) == 0x021:
|
||||
factory = TestFactory(run_test_prbs)
|
||||
|
||||
@@ -128,7 +128,7 @@ async def run_test_scramble(dut, ref_scramble):
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
# if cocotb.top.LFSR_POLY.value == 0x8000000001:
|
||||
if int(cocotb.top.LFSR_W.value) == 58:
|
||||
|
||||
Reference in New Issue
Block a user