4多相位效果明显更好

This commit is contained in:
Ruige Lee
2025-08-11 19:33:56 +08:00
parent b0b221e8b0
commit 7338314c17
2 changed files with 7 additions and 7 deletions

View File

@@ -70,21 +70,21 @@ trait CDRInMultiSample{ this: CDRInBase =>
//multiCLK 需要按照滞后相位接线即0为最先到达1次先 //multiCLK 需要按照滞后相位接线即0为最先到达1次先
val multiCLK = IO(Input(Vec(16, Bool()))) val multiCLK = IO(Input(Vec(4, Bool())))
val sampleReg = Wire(Vec(23, Bool())) val sampleReg = Wire(Vec(5, Bool()))
for( i <- 0 until 16 ) { for( i <- 0 until 4 ) {
sampleReg(i) := withClockAndReset(multiCLK(i).asClock, reset.asBool){ ShiftRegister( io.serDat, 2 ) } sampleReg(i) := withClockAndReset(multiCLK(i).asClock, reset.asBool){ ShiftRegister( io.serDat, 2 ) }
} }
for( i <- 16 until 23 ){ for( i <- 4 until 5 ){
sampleReg(i) := withClockAndReset(multiCLK(i-8).asClock, reset.asBool){ RegNext(sampleReg(i-8))} sampleReg(i) := withClockAndReset(multiCLK(i-1).asClock, reset.asBool){ RegNext(sampleReg(i-1))}
} }
val asyncSerDat = PopCount(sampleReg) >= 12.U val asyncSerDat = PopCount(sampleReg) >= 3.U
// sampleReg.count( (x: Bool) => (x === true.B) ) >= 12.U // sampleReg.count( (x: Bool) => (x === true.B) ) >= 12.U

View File

@@ -11,7 +11,7 @@ class ShinTopIO extends Bundle{
val uDatIn = Input(Bool()) val uDatIn = Input(Bool())
val uDatOut = Output(Bool()) val uDatOut = Output(Bool())
val multiCLK = Input(Vec(16, Bool())) val multiCLK = Input(Vec(4, Bool()))
val iqspi = new QSPIInterfaceIO val iqspi = new QSPIInterfaceIO
val ospi = new SSPIInterfaceIO val ospi = new SSPIInterfaceIO