mirror of
https://github.com/Silicon1602/srdl2sv.git
synced 2024-12-22 06:58:41 +00:00
Fix test_simple_rw_reg.test_illegal_address so that it always recognizes issue #9
Before this fix, the bug would only pop up for addresses that were dividable by 4. Otherwise, the AMBA AHB 3 Lite widget would return an error response because of an illegal HSIZE/HADDR combination.
This commit is contained in:
parent
7efe7c4cea
commit
031e413d17
@ -158,7 +158,7 @@ async def test_illegal_address(dut):
|
||||
await bus.reset()
|
||||
|
||||
rand_addr = random.randint(8, 1337)
|
||||
rand_val = random.randint(0, (1 << 32)-1)
|
||||
rand_val = random.randint(0, (1 << 8)-1)
|
||||
|
||||
dut._log.info(f"Write value {rand_val} to illegal addres {rand_addr}.")
|
||||
|
||||
@ -168,8 +168,8 @@ async def test_illegal_address(dut):
|
||||
await bus.write(
|
||||
address=rand_addr,
|
||||
value=rand_val,
|
||||
nbytes=4,
|
||||
step_size=4)
|
||||
nbytes=1,
|
||||
step_size=1)
|
||||
except AMBA3AHBLiteDriver.BusErrorResponse:
|
||||
write_error = True
|
||||
|
||||
@ -180,8 +180,8 @@ async def test_illegal_address(dut):
|
||||
try:
|
||||
await bus.read(
|
||||
address=rand_addr,
|
||||
nbytes=4,
|
||||
step_size=4)
|
||||
nbytes=1,
|
||||
step_size=1)
|
||||
except AMBA3AHBLiteDriver.BusErrorResponse:
|
||||
read_error = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user