上下行交换特性

This commit is contained in:
Ruige Lee
2025-08-27 15:55:09 +08:00
parent fa3ba57f32
commit 9773752cc8
2 changed files with 36 additions and 1 deletions

View File

@@ -52,6 +52,10 @@ class CommonRegisterBundle extends Bundle{
val refTop = UInt(3.W)
val bias = UInt(2.W)
val dwupEx = UInt(16.W)
val b8b4Sel = UInt(16.W)
val cdrParam = UInt(16.W)
val softResetCode = Vec(4, UInt(8.W))
@@ -295,7 +299,20 @@ abstract class InterfaceBase extends Module with RequireAsyncReset{
(addr === ("h48".U(16.W) + i.U) ) -> cReg.xtal( 8*i+7,8*i+0 )
}) ++
((0 until 2).map{ i =>
(addr === ("h4c".U(16.W) + i.U) ) -> cReg.b8b4Sel( 8*i+7,8*i+0 )
}) ++
((0 until 2).map{ i =>
(addr === ("h4e".U(16.W) + i.U) ) -> cReg.cdrParam( 8*i+7,8*i+0 )
}) ++
Seq(
(addr === "h4a".U ) -> cReg.dwupEx.extrace(0),
(addr === "h4c".U ) -> cReg.b8b4Sel.extrace(0),
(addr === "h4e".U ) -> cReg.cdrParam(7,0),
(addr === "h50".U ) -> cReg.anamuxSel,
(addr === "h51".U ) -> cReg.ldo2p5,
(addr === "h52".U ) -> cReg.ldo1p1,
@@ -1082,6 +1099,24 @@ trait InterfaceSystem{ this: InterfaceBase =>
cReg.softResetCode(3) := RegEnable(dataw, 0.U(8.W), isEnW & addrw === "h43".U )
cReg.dwupEx :=
Cat(
RegEnable(dataw, 0.U(8.W), isEnW & addrw === "h4b".U ),
RegEnable(dataw, 0.U(8.W), isEnW & addrw === "h4a".U )
)
cReg.b8b4Sel :=
Cat(
RegEnable(dataw, 0.U(8.W), isEnW & addrw === "h4d".U ),
RegEnable(dataw, 0.U(8.W), isEnW & addrw === "h4c".U )
)
cReg.cdrParam :=
Cat(
RegEnable(dataw, 0.U(8.W), isEnW & addrw === "h4f".U ),
RegEnable(dataw, 0.U(8.W), isEnW & addrw === "h4e".U )
)
cReg.intEnable :=
Cat(
1.U(1.W), //复位中断时钟为1 //31 上电复位