CsrPlugin implement dummy pmp if no pmp is there
This commit is contained in:
parent
9c2e05cce0
commit
b4d5a315cf
|
@ -1692,11 +1692,11 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep
|
||||||
}
|
}
|
||||||
|
|
||||||
//When no PMP =>
|
//When no PMP =>
|
||||||
// if(!csrMapping.mapping.contains(0x3A0)){
|
if(!csrMapping.mapping.contains(0x3A0)){
|
||||||
// when(arbitration.isValid && input(IS_CSR) && U(csrAddress) >= 0x3A0 && U(csrAddress) <= 0x3EF){
|
when(arbitration.isValid && input(IS_CSR) && (csrAddress(11 downto 2) ## B"00" === 0x3A0 || csrAddress(11 downto 4) ## B"0000" === 0x3B0)){
|
||||||
// csrMapping.allowCsrSignal := True
|
csrMapping.allowCsrSignal := True
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
illegalAccess clearWhen(csrMapping.allowCsrSignal)
|
illegalAccess clearWhen(csrMapping.allowCsrSignal)
|
||||||
|
|
||||||
|
|
|
@ -630,7 +630,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
// if(csr >= 0x3A0 && csr <= 0x3EF) break; //PMP
|
if(csr >= 0x3A0 && csr <= 0x3A3 || csr >= 0x3B0 && csr <= 0x3BF) break; //PMP
|
||||||
return true;
|
return true;
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
|
@ -686,7 +686,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
// if(csr >= 0x3A0 && csr <= 0x3EF) break; //PMP
|
if(csr >= 0x3A0 && csr <= 0x3A3 || csr >= 0x3B0 && csr <= 0x3BF) break; //PMP
|
||||||
ilegalInstruction();
|
ilegalInstruction();
|
||||||
return true;
|
return true;
|
||||||
}break;
|
}break;
|
||||||
|
|
Loading…
Reference in New Issue