更新慢速qspi
This commit is contained in:
@@ -163,15 +163,10 @@ class QSpiInterface(edge: Boolean) extends SpiInterfaceBase{
|
||||
qspi.isDirIn := ~isSpiRead
|
||||
|
||||
|
||||
io.isEnR :=
|
||||
(
|
||||
if(edge){
|
||||
io.isEnR :=
|
||||
(isSckPosedge & ~shiftCSn(1) & bitSel === 0.U & shiftMOSI(1) === "b1000".U & byteSel === 2.U ) |
|
||||
(isSckPosedge & ~shiftCSn(1) & bitSel === 0.U & isSpiRead & byteSel >= 3.U)
|
||||
} else {
|
||||
(isSckNegedge & ~shiftCSn(1) & bitSel === 0.U & isSpiRead & byteSel >= 2.U)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -203,8 +198,8 @@ class QSpiInterface(edge: Boolean) extends SpiInterfaceBase{
|
||||
(if( edge ) {isSckPosedge} else {isSckNegedge})
|
||||
& ~shiftCSn(1)
|
||||
){
|
||||
when( bitSel.andR ){
|
||||
when((byteSel === 0.U || byteSel === 1.U) ){
|
||||
when( (if( edge ) { bitSel.andR } else { bitSel === 0.U }) ){
|
||||
when((byteSel === 0.U || byteSel === 1.U || byteSel === 2.U) ){
|
||||
exRego := 0.U //地址1,cmd
|
||||
} .elsewhen( isSpiRead ){
|
||||
exRego := io.datar
|
||||
|
||||
Reference in New Issue
Block a user