尝试修复读取数据错位问题

This commit is contained in:
Ruige Lee
2025-05-22 10:16:00 +08:00
parent 5723b4f127
commit 5e03cc4146
2 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ abstract class SpiInterfaceBase extends Module{
io.addrw := addrw
// io.addrSel :=
// Mux( isSpiRead, addrSel + 1.U, addrSel )//覆盖三种情况
val readData = RegEnable(io.datar, io.isEnR)
// val readData = RegEnable(io.datar, io.isEnR)
when( shiftCSn(2) & ~shiftCSn(1) ){
@@ -152,7 +152,7 @@ class SSpiInterface extends SpiInterfaceBase{
when((byteSel === 1.U || byteSel === 2.U) ){
exRego := 0.U //地址1cmd
} .elsewhen( isSpiRead ){
exRego := readData
exRego := io.datar
}
}.otherwise{
exRego := exRego << 1
@@ -195,7 +195,7 @@ class QSpiInterface extends SpiInterfaceBase{
when((byteSel === 1.U || byteSel === 2.U) ){
exRego := 0.U //地址1cmd
} .elsewhen( isSpiRead ){
exRego := readData
exRego := io.datar
}
}.otherwise{
exRego := exRego << 4