写完编解码模块
This commit is contained in:
@@ -63,3 +63,23 @@ object Dualb4b5Decoder{
|
||||
Cat( b4b5Decoder(enq(9,5)), b4b5Decoder(enq(4,0)) )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class b4b5DualEncode extends Module with RequireAsyncReset{
|
||||
val io = IO(new Bundle{
|
||||
val dataIn = Input(UInt(8.W))
|
||||
val isEnable = Input(Bool())
|
||||
val dataOut = Output(UInt(10.W))
|
||||
})
|
||||
|
||||
io.dataOut := Dualb4b5Encoder(io.dataIn)
|
||||
}
|
||||
|
||||
class b8b10Decode extends Module with RequireAsyncReset{
|
||||
val io = IO(new Bundle{
|
||||
val dataIn = Input(UInt(10.W))
|
||||
val dataOut = Output(UInt(8.W))
|
||||
})
|
||||
|
||||
io.dataOut := Dualb4b5Decoder(io.dataIn)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user