From e258cd4a6cad1a145508dbfa113c70f8c7b440a6 Mon Sep 17 00:00:00 2001 From: RuigeLee Date: Tue, 9 Sep 2025 18:06:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96spi=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E4=B8=A5=E8=B0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/scala/backBoard/shin/SpiInterface.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/backBoard/shin/SpiInterface.scala b/src/main/scala/backBoard/shin/SpiInterface.scala index 8e6f729..d06a152 100644 --- a/src/main/scala/backBoard/shin/SpiInterface.scala +++ b/src/main/scala/backBoard/shin/SpiInterface.scala @@ -99,8 +99,8 @@ class SSpiInterface extends SpiInterfaceBase{ when( shiftCSn(2) & ~shiftCSn(1) || (~shiftCSn(2) & shiftCSn(1)) ){ //CS下跳或上跳 spiCmd := 0.U - } .elsewhen( isSckPosedgeNext(0) & ~shiftCSn(2) & byteSelNext === 2.U & bitSelNext === 0.U ){ //CS为低,且SCK上跳的第0byte - spiCmd := shiftMOSI(2) + } .elsewhen( isSckPosedge & ~shiftCSn(1) & byteSel === 2.U & bitSel === 0.U ){ //CS为低,且SCK上跳的第0byte + spiCmd := shiftMOSI(1) } @@ -178,8 +178,8 @@ class QSpiInterface extends SpiInterfaceBase{ when( (shiftCSn(2) & ~shiftCSn(1)) || (~shiftCSn(2) & shiftCSn(1)) ){ //CS下跳或上跳 spiCmd := 0.U - } .elsewhen( isSckPosedgeNext(0) & ~shiftCSn(2) & byteSelNext === 2.U & bitSelNext === 0.U ){ //CS为低,且SCK上跳的第0byte - spiCmd := shiftMOSI(2).extract(3) + } .elsewhen( isSckPosedge & ~shiftCSn(1) & byteSel === 2.U & bitSel === 0.U ){ //CS为低,且SCK上跳的第0byte + spiCmd := shiftMOSI(1).extract(3) } when( shiftCSn(2) & ~shiftCSn(1) ){