Update testbenches
This commit is contained in:
parent
852d583282
commit
bb4fa0bfa0
@ -441,8 +441,8 @@ def bench():
|
||||
print("test 3: various reads")
|
||||
current_test.next = 3
|
||||
|
||||
for length in list(range(1,19))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096)):
|
||||
for length in list(range(1,19))+list(range(128-4,128+4))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096+4)):
|
||||
for axi_offset in list(range(8,25))+list(range(4096-16,4096)):
|
||||
for pause in [False, True]:
|
||||
print("length %d, pcie_offset %d, axi_offset %d"% (length, pcie_offset, axi_offset))
|
||||
@ -469,8 +469,6 @@ def bench():
|
||||
rq_pause_toggle.next = 0
|
||||
rc_pause_toggle.next = 0
|
||||
|
||||
yield delay(100)
|
||||
|
||||
status = read_desc_status_sink.recv()
|
||||
|
||||
print(status)
|
||||
|
@ -441,11 +441,10 @@ def bench():
|
||||
print("test 3: various reads")
|
||||
current_test.next = 3
|
||||
|
||||
for length in list(range(1,35))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096)):
|
||||
for length in list(range(1,35))+list(range(128-4,128+4))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096+4)):
|
||||
for axi_offset in list(range(8,41))+list(range(4096-32,4096)):
|
||||
#for pause in [False, True]:
|
||||
for pause in [False]:
|
||||
for pause in [False, True]:
|
||||
print("length %d, pcie_offset %d, axi_offset %d"% (length, pcie_offset, axi_offset))
|
||||
#pcie_addr = length * 0x100000000 + pcie_offset * 0x10000 + offset
|
||||
pcie_addr = pcie_offset
|
||||
@ -470,8 +469,6 @@ def bench():
|
||||
rq_pause_toggle.next = 0
|
||||
rc_pause_toggle.next = 0
|
||||
|
||||
yield delay(100)
|
||||
|
||||
status = read_desc_status_sink.recv()
|
||||
|
||||
print(status)
|
||||
|
@ -441,8 +441,8 @@ def bench():
|
||||
print("test 3: various reads")
|
||||
current_test.next = 3
|
||||
|
||||
for length in list(range(1,11))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096)):
|
||||
for length in list(range(1,11))+list(range(128-4,128+4))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096+4)):
|
||||
for axi_offset in list(range(8,17))+list(range(4096-8,4096)):
|
||||
for pause in [False, True]:
|
||||
print("length %d, pcie_offset %d, axi_offset %d"% (length, pcie_offset, axi_offset))
|
||||
@ -469,8 +469,6 @@ def bench():
|
||||
rq_pause_toggle.next = 0
|
||||
rc_pause_toggle.next = 0
|
||||
|
||||
yield delay(100)
|
||||
|
||||
status = read_desc_status_sink.recv()
|
||||
|
||||
print(status)
|
||||
|
@ -393,8 +393,8 @@ def bench():
|
||||
print("test 3: various writes")
|
||||
current_test.next = 3
|
||||
|
||||
for length in list(range(1,19))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096)):
|
||||
for length in list(range(1,19))+list(range(128-4,128+4))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096+4)):
|
||||
for axi_offset in list(range(8,25))+list(range(4096-16,4096)):
|
||||
for pause in [False, True]:
|
||||
print("length %d, pcie_offset %d, axi_offset %d"% (length, pcie_offset, axi_offset))
|
||||
@ -404,7 +404,7 @@ def bench():
|
||||
test_data = bytearray([x%256 for x in range(length)])
|
||||
|
||||
axi_ram_inst.write_mem(axi_addr & 0xffff80, b'\x55'*(len(test_data)+256))
|
||||
mem_data[pcie_addr & 0xffff80:(pcie_addr & 0xffff80)+len(test_data)+256] = b'\xaa'*(len(test_data)+256)
|
||||
mem_data[(pcie_addr-1) & 0xffff80:((pcie_addr-1) & 0xffff80)+len(test_data)+256] = b'\xaa'*(len(test_data)+256)
|
||||
axi_ram_inst.write_mem(axi_addr, test_data)
|
||||
|
||||
data = axi_ram_inst.read_mem(axi_addr&0xfffff0, 64)
|
||||
|
@ -393,8 +393,8 @@ def bench():
|
||||
print("test 3: various writes")
|
||||
current_test.next = 3
|
||||
|
||||
for length in list(range(1,35))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096)):
|
||||
for length in list(range(1,35))+list(range(128-4,128+4))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096+4)):
|
||||
for axi_offset in list(range(8,41))+list(range(4096-32,4096)):
|
||||
for pause in [False, True]:
|
||||
print("length %d, pcie_offset %d, axi_offset %d"% (length, pcie_offset, axi_offset))
|
||||
@ -404,7 +404,7 @@ def bench():
|
||||
test_data = bytearray([x%256 for x in range(length)])
|
||||
|
||||
axi_ram_inst.write_mem(axi_addr & 0xffff80, b'\x55'*(len(test_data)+256))
|
||||
mem_data[pcie_addr & 0xffff80:(pcie_addr & 0xffff80)+len(test_data)+256] = b'\xaa'*(len(test_data)+256)
|
||||
mem_data[(pcie_addr-1) & 0xffff80:((pcie_addr-1) & 0xffff80)+len(test_data)+256] = b'\xaa'*(len(test_data)+256)
|
||||
axi_ram_inst.write_mem(axi_addr, test_data)
|
||||
|
||||
data = axi_ram_inst.read_mem(axi_addr&0xfffff0, 64)
|
||||
|
@ -393,8 +393,8 @@ def bench():
|
||||
print("test 3: various writes")
|
||||
current_test.next = 3
|
||||
|
||||
for length in list(range(1,11))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096)):
|
||||
for length in list(range(1,11))+list(range(128-4,128+4))+[1024]:
|
||||
for pcie_offset in list(range(8,13))+list(range(4096-4,4096+4)):
|
||||
for axi_offset in list(range(8,17))+list(range(4096-8,4096)):
|
||||
for pause in [False, True]:
|
||||
print("length %d, pcie_offset %d, axi_offset %d"% (length, pcie_offset, axi_offset))
|
||||
@ -404,7 +404,7 @@ def bench():
|
||||
test_data = bytearray([x%256 for x in range(length)])
|
||||
|
||||
axi_ram_inst.write_mem(axi_addr & 0xffff80, b'\x55'*(len(test_data)+256))
|
||||
mem_data[pcie_addr & 0xffff80:(pcie_addr & 0xffff80)+len(test_data)+256] = b'\xaa'*(len(test_data)+256)
|
||||
mem_data[(pcie_addr-1) & 0xffff80:((pcie_addr-1) & 0xffff80)+len(test_data)+256] = b'\xaa'*(len(test_data)+256)
|
||||
axi_ram_inst.write_mem(axi_addr, test_data)
|
||||
|
||||
data = axi_ram_inst.read_mem(axi_addr&0xfffff0, 64)
|
||||
@ -430,6 +430,7 @@ def bench():
|
||||
for i in range(0, len(data), 16):
|
||||
print(" ".join(("{:02x}".format(c) for c in bytearray(data[i:i+16]))))
|
||||
|
||||
print(mem_data[pcie_addr-1:pcie_addr+len(test_data)+1])
|
||||
assert mem_data[pcie_addr-1:pcie_addr+len(test_data)+1] == b'\xaa'+test_data+b'\xaa'
|
||||
|
||||
cur_tag = (cur_tag + 1) % 256
|
||||
|
Loading…
x
Reference in New Issue
Block a user