opentitan
opentitan copied to clipboard
[dv/common] incorrect `has_unmapped_addr` calculation
This is a followup issue to #6594.
Currently inside of cip_base_vseq__tl_errors.svh, we determine whether a given RAL model has unmapped addresses by doing the following calculation:
has_unmapped_addr = csr_addr_mask[ral_name] > cfg.ral_models[ral_name].get_max_offset();
This calculation assumes that the CSRs and memories inside of the RAL model are all contiguous (which is incorrect) and does not take internal address "holes" into account.
e.g. KMAC has two memory address ranges of 0x400-0x5ff and 0x800-0xfff with an address mask of 0xfff, but the above calculation will indicate that KMAC does not have any unmapped addresses, which is clearly incorrect.
Proposed solution is as follows:
- Make
has_unmapped_addra field inside ofdv_base_reg_block, which is a more sensible place for this sort of information - Perform a one-time calculation as the reg block is being built to create a queue of
addr_range_tstructs that contain information about all unmapped address ranges in the reg block (if any even exist), and use this information to sethas_unmapped_addr
This issue is resolved by #6626, closing.