mirror of
https://github.com/fpganinja/taxi.git
synced 2026-01-18 01:30:36 -08:00
Testbench cleanup for cocotb 2.0
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
@@ -171,7 +171,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
data_width = len(cocotb.top.s_axi.wdata)
|
||||
byte_lanes = data_width // 8
|
||||
|
||||
@@ -171,7 +171,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
data_width = len(cocotb.top.s_axi.wdata)
|
||||
byte_lanes = data_width // 8
|
||||
|
||||
@@ -172,7 +172,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
data_width = len(cocotb.top.s_axi.wdata)
|
||||
byte_lanes = data_width // 8
|
||||
|
||||
@@ -163,7 +163,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
data_width = len(cocotb.top.s_axi.wdata)
|
||||
byte_lanes = data_width // 8
|
||||
|
||||
@@ -171,7 +171,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
data_width = len(cocotb.top.s_axi.wdata)
|
||||
byte_lanes = data_width // 8
|
||||
|
||||
@@ -163,7 +163,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
for test in [run_test_write, run_test_read]:
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
for test in [run_test_write, run_test_read]:
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
for test in [run_test_write, run_test_read]:
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
for test in [run_test_write, run_test_read, run_stress_test]:
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ def cycle_pause():
|
||||
return itertools.cycle([1, 1, 1, 0])
|
||||
|
||||
|
||||
if cocotb.SIM_NAME:
|
||||
if getattr(cocotb, 'top', None) is not None:
|
||||
|
||||
for test in [run_test_write, run_test_read, run_stress_test]:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user