minor tweaks to python file

This commit is contained in:
James Stine 2024-06-05 19:02:41 -05:00
parent e8f0616068
commit 4156c5aee7
2 changed files with 37 additions and 35 deletions

View File

@ -393,5 +393,5 @@ nonstandard_register_lengths = {
"INSTRM" : 32,
"MEMRWM" : 2,
"INSTRVALIDM" : 1,
#"READDATAM" : P.LLEN # TODO: find LLEN
"READDATAM" : 64
}

View File

@ -99,7 +99,7 @@ def main():
if rdata != test_reg_data[r]:
print(f"Error: register {r} read did not return correct data: {rdata} != {test_reg_data[r]}")
else:
print(f"Read {rdata} from {r}")
print(f"Reading {rdata} from {r}")
# Return all registers to original state
reg_addrs = list(registers.keys())
@ -131,6 +131,8 @@ def random_hex(reg_name):
else:
size = XLEN
// Reset ReadDataM to a value
nonstandard_register_lengths["READDATAM"] = XLEN
if random_stimulus:
return "0x" + f"{random.getrandbits(size):x}".rjust(pad, "0")
else: