接入TL2CDR

This commit is contained in:
Ruige Lee
2025-01-10 15:25:10 +08:00
parent 134440812b
commit 981b492a8b
2 changed files with 4 additions and 4 deletions

View File

@@ -28,8 +28,8 @@ class CDROut extends Module{
def STATE_FCS = 3.U def STATE_FCS = 3.U
val ETH_PRE = "h55".U val ETH_PRE = "h55".U(8.W)
val ETH_SFD = "hD5".U val ETH_SFD = "hD5".U(8.W)
val stateNext = Wire(UInt(2.W)) val stateNext = Wire(UInt(2.W))
val stateCurr = RegNext( stateNext, 0.U ) val stateCurr = RegNext( stateNext, 0.U )

View File

@@ -52,14 +52,14 @@ object b4b5Decoder{
object Dualb4b5Encoder{ object Dualb4b5Encoder{
def apply( enq: UInt ): UInt = { def apply( enq: UInt ): UInt = {
require( enq.getWidth == 8 ) require( enq.getWidth == 8, "Require Failed @ Dualb4b5Encoder!" )
Cat( b4b5Encoder(enq(7,4)), b4b5Encoder(enq(3,0)) ) Cat( b4b5Encoder(enq(7,4)), b4b5Encoder(enq(3,0)) )
} }
} }
object Dualb4b5Decoder{ object Dualb4b5Decoder{
def apply( enq: UInt ): UInt = { def apply( enq: UInt ): UInt = {
require( enq.getWidth == 10 ) require( enq.getWidth == 10, "Require Failed @ Dualb4b5Decoder!" )
Cat( b4b5Decoder(enq(9,5)), b4b5Decoder(enq(5,0)) ) Cat( b4b5Decoder(enq(9,5)), b4b5Decoder(enq(5,0)) )
} }
} }