MmuPlugin: fix generation without writeBack stage
If there is no writeBack stage, the elaboration step would hit a NullPointerException when trying to insert into the writeBack stage. Instead, pull from the most recent stage, which is where MMU access should reside. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
6fc5406901
commit
b2f387ccac
|
@ -250,8 +250,9 @@ class MmuPlugin(ioRange : UInt => Bool,
|
|||
}
|
||||
}
|
||||
|
||||
writeBack plug new Area{
|
||||
import writeBack._
|
||||
val fenceStage = stages.last
|
||||
fenceStage plug new Area{
|
||||
import fenceStage._
|
||||
when(arbitration.isValid && input(IS_SFENCE_VMA)){ // || csrService.isWriting(CSR.SATP)
|
||||
for(port <- core.ports; line <- port.cache) line.valid := False //Assume that the instruction already fetched into the pipeline are ok
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue