Writes reg(31) on x31 when running on the board
This commit is contained in:
@@ -34,12 +34,14 @@ class RegFile(sim: Boolean = false) extends Module {
|
|||||||
// Simulation stuff
|
// Simulation stuff
|
||||||
if (sim) {
|
if (sim) {
|
||||||
io.valid_x31.get := false.B
|
io.valid_x31.get := false.B
|
||||||
}
|
io.x31 := "hDEADC0DE".U
|
||||||
io.x31 := "hDEADC0DE".U
|
when(io.we && io.rd_addr === 31.U) {
|
||||||
when(io.we && io.rd_addr === 31.U) {
|
io.x31 := io.rd_data
|
||||||
io.x31 := io.rd_data
|
if (sim) {
|
||||||
if (sim) {
|
io.valid_x31.get := true.B
|
||||||
io.valid_x31.get := true.B
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
io.x31 := regs(31.U)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user