1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Update testbenches

This commit is contained in:
Alex Forencich 2021-04-12 22:55:38 -07:00
parent bf2a779e48
commit a45c36e802
18 changed files with 123 additions and 123 deletions

View File

@ -82,7 +82,7 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -93,8 +93,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -117,7 +117,7 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -128,8 +128,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+[4096-byte_width]:
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+[4096-byte_lanes]:
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -187,8 +187,8 @@ def cycle_pause():
if cocotb.SIM_NAME:
data_width = len(cocotb.top.s_axi_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -82,8 +82,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
max_burst_size = (byte_width-1).bit_length()
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = (byte_lanes-1).bit_length()
if size is None:
size = max_burst_size
@ -93,8 +93,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -117,8 +117,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
max_burst_size = (byte_width-1).bit_length()
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = (byte_lanes-1).bit_length()
if size is None:
size = max_burst_size
@ -128,8 +128,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -187,8 +187,8 @@ def cycle_pause():
if cocotb.SIM_NAME:
data_width = len(cocotb.top.s_axi_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -92,8 +92,8 @@ async def run_test(dut, data_in=None, idle_inserter=None, backpressure_inserter=
tb = TB(dut)
byte_width = tb.axi_ram.write_if.byte_width
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_width
byte_lanes = tb.axi_ram.write_if.byte_lanes
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_lanes
tag_count = 2**len(tb.desc_source.bus.tag)
cur_tag = 1
@ -105,9 +105,9 @@ async def run_test(dut, data_in=None, idle_inserter=None, backpressure_inserter=
dut.enable <= 1
for length in list(range(1, byte_width*4+1))+[128]:
for read_offset in list(range(8, 8+byte_width*2, step_size))+list(range(4096-byte_width*2, 4096, step_size)):
for write_offset in list(range(8, 8+byte_width*2, step_size))+list(range(4096-byte_width*2, 4096, step_size)):
for length in list(range(1, byte_lanes*4+1))+[128]:
for read_offset in list(range(8, 8+byte_lanes*2, step_size))+list(range(4096-byte_lanes*2, 4096, step_size)):
for write_offset in list(range(8, 8+byte_lanes*2, step_size))+list(range(4096-byte_lanes*2, 4096, step_size)):
tb.log.info("length %d, read_offset %d, write_offset %d", length, read_offset, write_offset)
read_addr = read_offset+0x1000
write_addr = 0x00008000+write_offset+0x1000

View File

@ -96,7 +96,7 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_master[s].write_if.byte_width
byte_lanes = tb.axi_master[s].write_if.byte_lanes
max_burst_size = tb.axi_master[s].write_if.max_burst_size
if size is None:
@ -107,8 +107,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
ram_addr = offset+0x1000
addr = ram_addr + m*0x1000000
@ -132,7 +132,7 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_master[s].write_if.byte_width
byte_lanes = tb.axi_master[s].write_if.byte_lanes
max_burst_size = tb.axi_master[s].write_if.max_burst_size
if size is None:
@ -143,8 +143,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
ram_addr = offset+0x1000
addr = ram_addr + m*0x1000000
@ -207,8 +207,8 @@ if cocotb.SIM_NAME:
m_count = int(os.getenv("PARAM_M_COUNT"))
data_width = len(cocotb.top.s00_axi_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -107,8 +107,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_ram.write_if.byte_width
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_width
byte_lanes = tb.axi_ram.write_if.byte_lanes
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_lanes
tag_count = 2**len(tb.write_desc_source.bus.tag)
cur_tag = 1
@ -120,8 +120,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
dut.write_enable <= 1
for length in list(range(1, byte_width*4+1))+[128]:
for offset in list(range(0, byte_width*2, step_size))+list(range(4096-byte_width*2, 4096, step_size)):
for length in list(range(1, byte_lanes*4+1))+[128]:
for offset in list(range(0, byte_lanes*2, step_size))+list(range(4096-byte_lanes*2, 4096, step_size)):
for diff in [-8, -2, -1, 0, 1, 2, 8]:
if length+diff < 1:
continue
@ -162,8 +162,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_ram.read_if.byte_width
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_width
byte_lanes = tb.axi_ram.read_if.byte_lanes
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_lanes
tag_count = 2**len(tb.read_desc_source.bus.tag)
cur_tag = 1
@ -175,8 +175,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
dut.read_enable <= 1
for length in list(range(1, byte_width*4+1))+[128]:
for offset in list(range(0, byte_width*2, step_size))+list(range(4096-byte_width*2, 4096, step_size)):
for length in list(range(1, byte_lanes*4+1))+[128]:
for offset in list(range(0, byte_lanes*2, step_size))+list(range(4096-byte_lanes*2, 4096, step_size)):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])

View File

@ -94,8 +94,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_ram.byte_width
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_width
byte_lanes = tb.axi_ram.byte_lanes
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_lanes
tag_count = 2**len(tb.read_desc_source.bus.tag)
cur_tag = 1
@ -107,8 +107,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
dut.enable <= 1
for length in list(range(1, byte_width*4+1))+[128]:
for offset in list(range(0, byte_width*2, step_size))+list(range(4096-byte_width*2, 4096, step_size)):
for length in list(range(1, byte_lanes*4+1))+[128]:
for offset in list(range(0, byte_lanes*2, step_size))+list(range(4096-byte_lanes*2, 4096, step_size)):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])

View File

@ -95,8 +95,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_ram.byte_width
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_width
byte_lanes = tb.axi_ram.byte_lanes
step_size = 1 if int(os.getenv("PARAM_ENABLE_UNALIGNED")) else byte_lanes
tag_count = 2**len(tb.write_desc_source.bus.tag)
cur_tag = 1
@ -108,8 +108,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
dut.enable <= 1
for length in list(range(1, byte_width*4+1))+[128]:
for offset in list(range(0, byte_width*2, step_size))+list(range(4096-byte_width*2, 4096, step_size)):
for length in list(range(1, byte_lanes*4+1))+[128]:
for offset in list(range(0, byte_lanes*2, step_size))+list(range(4096-byte_lanes*2, 4096, step_size)):
for diff in [-8, -2, -1, 0, 1, 2, 8]:
if length+diff < 1:
continue

View File

@ -87,7 +87,7 @@ async def run_test_write(dut, port=0, data_in=None, idle_inserter=None, backpres
tb = TB(dut)
axi_master = tb.axi_master[port]
byte_width = axi_master.write_if.byte_width
byte_lanes = axi_master.write_if.byte_lanes
max_burst_size = axi_master.write_if.max_burst_size
if size is None:
@ -98,8 +98,8 @@ async def run_test_write(dut, port=0, data_in=None, idle_inserter=None, backpres
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -121,7 +121,7 @@ async def run_test_read(dut, port=0, data_in=None, idle_inserter=None, backpress
tb = TB(dut)
axi_master = tb.axi_master[port]
byte_width = axi_master.write_if.byte_width
byte_lanes = axi_master.write_if.byte_lanes
max_burst_size = axi_master.write_if.max_burst_size
if size is None:
@ -132,8 +132,8 @@ async def run_test_read(dut, port=0, data_in=None, idle_inserter=None, backpress
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -220,8 +220,8 @@ def cycle_pause():
if cocotb.SIM_NAME:
data_width = len(cocotb.top.s_axi_a_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -82,7 +82,7 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -93,8 +93,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -117,7 +117,7 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -128,8 +128,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -188,8 +188,8 @@ def cycle_pause():
if cocotb.SIM_NAME:
data_width = len(cocotb.top.s_axi_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -90,7 +90,7 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_master[s].write_if.byte_width
byte_lanes = tb.axi_master[s].write_if.byte_lanes
max_burst_size = tb.axi_master[s].write_if.max_burst_size
if size is None:
@ -101,8 +101,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
ram_addr = offset+0x1000
addr = ram_addr + m*0x1000000
@ -126,7 +126,7 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_master[s].write_if.byte_width
byte_lanes = tb.axi_master[s].write_if.byte_lanes
max_burst_size = tb.axi_master[s].write_if.max_burst_size
if size is None:
@ -137,8 +137,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
ram_addr = offset+0x1000
addr = ram_addr + m*0x1000000
@ -201,8 +201,8 @@ if cocotb.SIM_NAME:
m_count = int(os.getenv("PARAM_M_COUNT"))
data_width = len(cocotb.top.s00_axi_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -76,7 +76,7 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -87,8 +87,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -109,7 +109,7 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -120,8 +120,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -179,8 +179,8 @@ def cycle_pause():
if cocotb.SIM_NAME:
data_width = len(cocotb.top.s_axi_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -82,7 +82,7 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -93,8 +93,8 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -117,7 +117,7 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axi_master.write_if.byte_width
byte_lanes = tb.axi_master.write_if.byte_lanes
max_burst_size = tb.axi_master.write_if.max_burst_size
if size is None:
@ -128,8 +128,8 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in list(range(1, byte_width*2))+[1024]:
for offset in list(range(byte_width, byte_width*2))+list(range(4096-byte_width, 4096)):
for length in list(range(1, byte_lanes*2))+[1024]:
for offset in list(range(byte_lanes, byte_lanes*2))+list(range(4096-byte_lanes, 4096)):
tb.log.info("length %d, offset %d, size %d", length, offset, size)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -187,8 +187,8 @@ def cycle_pause():
if cocotb.SIM_NAME:
data_width = len(cocotb.top.s_axi_wdata)
byte_width = data_width // 8
max_burst_size = (byte_width-1).bit_length()
byte_lanes = data_width // 8
max_burst_size = (byte_lanes-1).bit_length()
for test in [run_test_write, run_test_read]:

View File

@ -82,15 +82,15 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -113,15 +113,15 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])

View File

@ -87,15 +87,15 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -118,15 +118,15 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])

View File

@ -87,15 +87,15 @@ async def run_test_write(dut, port=0, data_in=None, idle_inserter=None, backpres
tb = TB(dut)
axil_master = tb.axil_master[port]
byte_width = axil_master.write_if.byte_width
byte_lanes = axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -117,15 +117,15 @@ async def run_test_read(dut, port=0, data_in=None, idle_inserter=None, backpress
tb = TB(dut)
axil_master = tb.axil_master[port]
byte_width = axil_master.write_if.byte_width
byte_lanes = axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])

View File

@ -90,15 +90,15 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axil_master[s].write_if.byte_width
byte_lanes = tb.axil_master[s].write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
ram_addr = offset+0x1000
addr = ram_addr + m*0x1000000
@ -122,15 +122,15 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axil_master[s].write_if.byte_width
byte_lanes = tb.axil_master[s].write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
ram_addr = offset+0x1000
addr = ram_addr + m*0x1000000

View File

@ -76,15 +76,15 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -105,15 +105,15 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])

View File

@ -82,15 +82,15 @@ async def run_test_write(dut, data_in=None, idle_inserter=None, backpressure_ins
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])
@ -113,15 +113,15 @@ async def run_test_read(dut, data_in=None, idle_inserter=None, backpressure_inse
tb = TB(dut)
byte_width = tb.axil_master.write_if.byte_width
byte_lanes = tb.axil_master.write_if.byte_lanes
await tb.cycle_reset()
tb.set_idle_generator(idle_inserter)
tb.set_backpressure_generator(backpressure_inserter)
for length in range(1, byte_width*2):
for offset in range(byte_width):
for length in range(1, byte_lanes*2):
for offset in range(byte_lanes):
tb.log.info("length %d, offset %d", length, offset)
addr = offset+0x1000
test_data = bytearray([x % 256 for x in range(length)])