Skip to content

Commit

Permalink
Add ok signal to outputs of Sgmii
Browse files Browse the repository at this point in the history
  • Loading branch information
jvnknvlgl committed Jul 1, 2024
1 parent 0db48a9 commit 4144c79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions clash-cores/src/Clash/Cores/Sgmii.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sgmiiCdc ::
Signal txDom Bool ->
Signal txDom (BitVector 8) ->
Signal rxDom (BitVector 10) ->
( Signal rxDom (Bool, Bool, BitVector 8, BitVector 8, BitVector 10)
( Signal rxDom (Bool, Bool, BitVector 8, BitVector 8, BitVector 10, Bool)
, Signal txDom (BitVector 10)
)
sgmiiCdc autoNegCdc rxClk txClk rxRst txRst txEn txEr dw1 cg1 =
Expand All @@ -38,6 +38,7 @@ sgmiiCdc autoNegCdc rxClk txClk rxRst txRst txEn txEr dw1 cg1 =
, exposeClockResetEnable regMaybe rxClk rxRst enableGen 0 dw4
, fromDw . head <$> dw2
, cg2
, ok
)
, cg4
)
Expand Down Expand Up @@ -69,7 +70,7 @@ sgmiiCdc autoNegCdc rxClk txClk rxRst txRst txEn txEr dw1 cg1 =
where
sync' = exposeClockResetEnable sync

(cg2, _) = unbundle $ bitSlip' rxClk rxRst enableGen cg1
(cg2, ok) = unbundle $ bitSlip' rxClk rxRst enableGen cg1
where
bitSlip' = exposeClockResetEnable bitSlip

Expand Down
2 changes: 1 addition & 1 deletion clash-cores/src/Clash/Cores/Sgmii/BitSlip.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bitSlipO ::
(BitSlipState 10, BitVector 10, Bool)
bitSlipO self@BSFail{..} = out
where
out = (self, resize $ rotateR _s (10 - fromEnum (last _ns)), False)
out = (self, resize _s, False)
bitSlipO self@BSOk{..} = out
where
out = (self, resize $ rotateR _s (10 - fromEnum _n), True)
Expand Down

0 comments on commit 4144c79

Please sign in to comment.