riscvarchive / riscv-fesvr

RISC-V Frontend Server
Other
62 stars 83 forks source link

DTM: Leverage WARLness of hartsel to skip nonexistent harts #64

Closed aswaterman closed 5 years ago

aswaterman commented 5 years ago

The old code relies upon hartsel being able to hold invalid values, so that dmstatus.anynonexistent will go high. But if hartsel is incapable of holding invalid values (e.g. because it is hardwired to 0), then this code will try to enumerate up to 1K harts (and might not terminate). Fix by seeing how many bits of hartsel are implemented.