接入TL2CDR
This commit is contained in:
@@ -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 )
|
||||||
|
|||||||
@@ -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)) )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user