Issue: When the memory-mapped flash region is accessed while the flash
read mode is disabled (fctrl.en flag is clear), the SPI flash controller
generates an invalid response on the D channel.
This may cause the TileLink bus to deadlock.
Workaround: Software should avoid accessing the memory-mapped flash
region when the SPI controller is not in the flash read mode.
}
}
- val (s_idle :: s_cmd :: s_addr :: s_pad :: s_data_pre :: s_data_post :: Nil) = Enum(UInt(), 6)
+ val (s_idle :: s_cmd :: s_addr :: s_pad :: s_data_pre :: s_data_post :: s_off :: Nil) = Enum(UInt(), 7)
val state = Reg(init = s_idle)
switch (state) {
io.link.lock := Bool(false)
}
} .otherwise {
- io.data.valid := io.addr.valid
- io.addr.ready := io.data.ready
- io.data.bits := UInt(0)
+ io.addr.ready := Bool(true)
io.link.lock := Bool(false)
+ when (io.addr.valid) {
+ state := s_off
+ }
}
}
state := s_idle
}
}
+
+ is (s_off) {
+ io.data.valid := Bool(true)
+ io.data.bits := UInt(0)
+ when (io.data.ready) {
+ state := s_idle
+ }
+ }
}
}