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