From 9a93481b68f2d557e0e8ff12886b563742837ba2 Mon Sep 17 00:00:00 2001 From: RuigeLee Date: Fri, 19 Sep 2025 17:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Daqspi=E8=AF=BB=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=B6=E9=97=B4=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/scala/backBoard/shin/NSpiInterface.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/scala/backBoard/shin/NSpiInterface.scala b/src/main/scala/backBoard/shin/NSpiInterface.scala index c2e38d6..08ebe9f 100644 --- a/src/main/scala/backBoard/shin/NSpiInterface.scala +++ b/src/main/scala/backBoard/shin/NSpiInterface.scala @@ -138,13 +138,16 @@ trait SyncSpiAsync{ this: SyncSpiInterfaceBase => } } - when( byteSel >= 2.U & bitSel.andR & (spiCnt < spiLen) & isSpiRead ){ + when( + (byteSel === 2.U & bitSel === 0.U & (spiCnt <= spiLen) & qspi.mosi === "h8".U) || + (byteSel > 2.U & bitSel === 0.U & (spiCnt <= spiLen) & isSpiRead) + ){ when( ~isPing_async ){ isEnR_async(0) := true.B } .otherwise{ isEnR_async(1) := true.B } - } .elsewhen( bitSel === 0.U ){ + } .elsewhen( bitSel.andR ){ isEnR_async(0) := false.B isEnR_async(1) := false.B }