bug修复,异步aqspi的读操作相关byteSel以及补充读取结果pingpong选择寄存器isAsyncRead

This commit is contained in:
RuigeLee
2026-02-02 17:44:25 +08:00
parent 2071c89ea0
commit d3177164a9

View File

@@ -73,14 +73,18 @@ trait SyncSpiAsync{ this: SyncSpiInterfaceBase =>
} }
} }
val isAsyncRead = withClockAndReset(negedge_sck, qspi.csn.asAsyncReset){RegInit(false.B)}
when( bitSel.andR ){ //4线操作 when( bitSel.andR ){ //4线操作
when( isSpiRead ){ when((byteSel === 0.U || byteSel === 1.U || byteSel === 2.U ) ){
when( isPing_async ){ //取巧//应该增强约束 exRego := 0.U //地址0, 地址1cmd
} .elsewhen( isSpiRead ){
when( ~isAsyncRead ){ //取巧//应该增强约束
exRego := datar_sync(0) exRego := datar_sync(0)
isAsyncRead := ~isAsyncRead
} .otherwise{ } .otherwise{
exRego := datar_sync(1) exRego := datar_sync(1)
isAsyncRead := ~isAsyncRead
} }
} }
} .otherwise{ //4线操作 } .otherwise{ //4线操作
@@ -160,7 +164,7 @@ trait SyncSpiAsync{ this: SyncSpiInterfaceBase =>
} .otherwise{ } .otherwise{
isEnR_async(1) := true.B isEnR_async(1) := true.B
} }
} .elsewhen( bitSel.andR ){ } .elsewhen( bitSel =/= 0.U ){
isEnR_async(0) := false.B isEnR_async(0) := false.B
isEnR_async(1) := false.B isEnR_async(1) := false.B
} }