Closed autley closed 1 year ago
It looks like this test case passes on spike (1.0.1-dev). But the test condition doesn't match the testcase description, and I don't believe throwing the illegal instruction exception is the architecturally correct behavior.
@autley Just a small correction: the test was checking for an illegal instruction exception, not a virtual instruction exception. Nevertheless, I agree with your overall assessment. However, this seems to be heavily implementation-defined. The spec states that "Implementations can convert reads of the time and timeh CSRs into loads to the memory mapped mtime register, or emulate this functionality in M-mode software.". This is probably the case for spike, so the test should probably allow for both implementations, i.e., either there is no exception or it is an illegal instruction exception.
The test for 'VS-mode access to time succeeds with mcounteren.tm and hcounteren.tm set' should PASS when no exception is triggered. It was previously checking for a virtual instruction exception and FAILING on the correct behavior (no exception).
on-behalf-of: @ventanamicro autley@ventanamicro.com