Dev/downsize apb paddr (#27)
* Downsize paddr bits * Updated Test suite to use offset aligned address * fix for apb3 and axi4lite * modified structure to pass hierarchy information --------- Co-authored-by: Byron Lathi <bslathi19@gmail.com>
This commit is contained in:
@@ -84,6 +84,8 @@ def _build_master_table(dut, masters_cfg: list[dict[str, Any]]) -> dict[str, dic
|
||||
"RDATA": SignalHandle(dut, f"{prefix}_RDATA"),
|
||||
"RRESP": SignalHandle(dut, f"{prefix}_RRESP"),
|
||||
},
|
||||
"inst_size": master["inst_size"],
|
||||
"inst_address": master["inst_address"],
|
||||
}
|
||||
table[master["inst_name"]] = entry
|
||||
return table
|
||||
@@ -156,10 +158,17 @@ async def test_axi4lite_address_decoding(dut) -> None:
|
||||
slave.WVALID.value = 1
|
||||
slave.BREADY.value = 1
|
||||
|
||||
dut._log.info(
|
||||
f"Starting transaction {txn['label']} to {master_name}{index} at address 0x{address:08X}"
|
||||
)
|
||||
master_address = (address - entry["inst_address"]) % entry["inst_size"]
|
||||
|
||||
await Timer(1, units="ns")
|
||||
|
||||
assert _get_int(entry["outputs"]["AWVALID"], index) == 1, f"{master_name} should see AWVALID asserted"
|
||||
assert _get_int(entry["outputs"]["AWADDR"], index) == address, f"{master_name} must receive AWADDR"
|
||||
assert _get_int(entry["outputs"]["AWADDR"], index) == master_address, (
|
||||
f"{master_name} must receive AWADDR"
|
||||
)
|
||||
assert _get_int(entry["outputs"]["WVALID"], index) == 1, f"{master_name} should see WVALID asserted"
|
||||
assert _get_int(entry["outputs"]["WDATA"], index) == write_data, f"{master_name} must receive WDATA"
|
||||
assert _get_int(entry["outputs"]["WSTRB"], index) == strobe_mask, f"{master_name} must receive WSTRB"
|
||||
@@ -193,7 +202,9 @@ async def test_axi4lite_address_decoding(dut) -> None:
|
||||
await Timer(1, units="ns")
|
||||
|
||||
assert _get_int(entry["outputs"]["ARVALID"], index) == 1, f"{master_name} should assert ARVALID"
|
||||
assert _get_int(entry["outputs"]["ARADDR"], index) == address, f"{master_name} must receive ARADDR"
|
||||
assert _get_int(entry["outputs"]["ARADDR"], index) == master_address, (
|
||||
f"{master_name} must receive ARADDR"
|
||||
)
|
||||
|
||||
for other_name, other_idx in _all_index_pairs(masters):
|
||||
if other_name == master_name and other_idx == index:
|
||||
|
||||
Reference in New Issue
Block a user