RegFilePlugin project X0 against boot glitches if no x0Init but zeroBoot
This commit is contained in:
parent
b4c75d4898
commit
bd2787b562
|
@ -96,6 +96,11 @@ class RegFilePlugin(regFileReadyKind : RegFileReadKind,
|
||||||
regFileWrite.address := U(shadowPrefix(output(INSTRUCTION)(rdRange)))
|
regFileWrite.address := U(shadowPrefix(output(INSTRUCTION)(rdRange)))
|
||||||
regFileWrite.data := output(REGFILE_WRITE_DATA)
|
regFileWrite.data := output(REGFILE_WRITE_DATA)
|
||||||
|
|
||||||
|
//Ensure no boot glitches modify X0
|
||||||
|
if(!x0Init && zeroBoot) when(regFileWrite.address === 0){
|
||||||
|
regFileWrite.valid := False
|
||||||
|
}
|
||||||
|
|
||||||
//CPU will initialise constant register zero in the first cycle
|
//CPU will initialise constant register zero in the first cycle
|
||||||
if(x0Init) {
|
if(x0Init) {
|
||||||
val boot = RegNext(False) init (True)
|
val boot = RegNext(False) init (True)
|
||||||
|
|
Loading…
Reference in New Issue