riscv-non-isa / riscv-iommu

RISC-V IOMMU Specification
https://jira.riscv.org/browse/RVG-55
Creative Commons Attribution 4.0 International
98 stars 17 forks source link

Question about updating reserved encoding in iohpmevt.eventid in the model #375

Closed viktoryou closed 4 months ago

viktoryou commented 4 months ago

From the Table.17 in the spec, eventID value that greater than 8 is reserved. Since the field eventID in iohpmevt1-31 register is WARL, the illegal value from 9 to 16383 should be invisible. However I found that it is not guaranteed in the model and I guess it does not strictly follow with the spec.

ved-rivos commented 4 months ago

The range of eventIDs that the model supports is configured using the eventID_mask input to the reset_iommu function. However it's current definition as a mask needs the legal encoding to be a power of 2. Its better to model it as a limit. Update in #376