cva6
cva6 copied to clipboard
[Bug Report] Issue with memory access
Hi, We found that cva6 allows LOAD instructions to load value from an address that is outside the DRAM space. According to RISC-V Unprivileged ISA V20190608, page 7, "if an instruction attempts to access memory at an inaccessible address, an exception is raised for the instruction. Vacant locations in the address space are never accessible". However, cva6 did not throw an exception for this case. We have the triggering test case (.mem file), the RTL trace log, and the spike trace log attached below. We can see that we are trying to load from an address outside DRAM space to register x10 (lbu a0, -302(sp)). CVA6 is not throwing any exception for this instruction whereas spike is throwing load access fault exception.
Is this a bug in cva6? bug_report.zip
I wouldn't say a bug, but rather an unsupported feature. Initially, there was some push to get this feature in but I think that never came to fruition. Adding @JeanRochCoulon to see whether this is something that could be interesting to add (I would think this is a very useful feature).
Hello @JeanRochCoulon, it seems the ball is in your court for this issue. If you decide to not to support this feature, then please close this issue and create a task to clarify the behaviour in the User Manual. Otherwise, and maybe this is better, you could decide to support this feature and so change the label from Type:Enhancement to Type:Bug.
Indeed @MikeOpenHWGroup It is interesting to support this feature. WANTED VOLUNTEER !! I changed this Issue as Type:bug.
@ASintzoff As the topic is related to TRAPs you are verifying, I assign you the issue. Before fixing it in RTL, the first goal is to well describe what CVA6 does in specification.