Add special-case signature for test_done in riscv_csr_test

This test is generated differently to all the others, as it exclusively uses a
python script.
The easiest way to make this work with the new test_done signature address is to
detect it as a special case and pass it the new address. The handshaking is only
used for ending the test, so the original address does not matter.
This commit is contained in:
Harry Callahan 2022-08-09 14:29:13 +01:00 committed by hcallahan-lowrisc
parent b8c6a343cb
commit 3c1502c979

View file

@ -41,10 +41,17 @@ def main() -> int:
'ibex_asm_program_gen',
'uvm_test_top.asm_gen'
]
# Special-case for riscv_csr_test -> fixup the handshake addr.
# Currently use (signature_addr - 0x4) for test_done channel.
sig = ((args.end_signature_addr) if ('riscv_csr_test' not in testname)
else
f'{(int(args.end_signature_addr, 16) - 4):x}') # (signature_addr - 0x4)
sim_opts_dict = {
'uvm_set_inst_override': ','.join(inst_overrides),
'require_signature_addr': '1',
'signature_addr': args.end_signature_addr,
'signature_addr': sig,
'pmp_num_regions': str(cfg.pmp_num_regions),
'pmp_granularity': str(cfg.pmp_granularity),
'tvec_alignment': '8'
@ -71,7 +78,7 @@ def main() -> int:
'--test', testname,
'--start_seed', str(seed),
'--iterations', '1',
'--end_signature_addr', args.end_signature_addr,
'--end_signature_addr', sig,
'--sim_opts', sim_opts_str,
'--debug', orig_list])