尝试3相位

This commit is contained in:
Ruige Lee
2025-08-13 10:52:49 +08:00
parent 495a238a26
commit c6aa7416fc
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(6, Bool()))) val multiCLK = IO(Input(Vec(3, Bool())))
val sampleReg = Wire(Vec(9, Bool())) val sampleReg = Wire(Vec(5, Bool()))
for( i <- 0 until 6 ) { for( i <- 0 until 3 ) {
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 <- 6 until 9 ){ for( i <- 3 until 5 ){
sampleReg(i) := withClockAndReset(multiCLK(i-3).asClock, reset.asBool){ RegNext(sampleReg(i-3))} sampleReg(i) := withClockAndReset(multiCLK(i-2).asClock, reset.asBool){ RegNext(sampleReg(i-2))}
} }
val asyncSerDat = PopCount(sampleReg) >= 5.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(6, Bool())) val multiCLK = Input(Vec(3, Bool()))
val iqspi = new QSPIInterfaceIO val iqspi = new QSPIInterfaceIO
val ospi = new SSPIInterfaceIO val ospi = new SSPIInterfaceIO