Skip to content

Commit

Permalink
Previous errors may have been caused by attempting to transmit to nod…
Browse files Browse the repository at this point in the history
…es that weren't ready.
  • Loading branch information
rslawson committed Oct 23, 2024
1 parent abed8a4 commit d420ced
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions bittide-instances/src/Bittide/Instances/Hitl/SwCcTopologies.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,12 @@ topologyTest refClk sysClk sysRst IlaControl{syncRst = rst, ..} rxNs rxPs miso c
withClockResetEnable sysClk syncRst enableGen
$ si539xSpi commonSpiConfig (SNat @(Microseconds 10)) (pure Nothing) miso

-- Transceiver setup
gthAllReset = unsafeFromActiveLow clocksAdjusted

txReady = unsafeSynchronizer sysClk (head transceivers.txClocks) notInCCReset
txReady0 :: Vec LinkCount (Signal Basic125 Bool)
txReady0 = fmap go transceivers.linkReadys
where
go lR = lR .&&. notInCCReset -- if lR then notInCCReset else False
txReady1 :: Vec LinkCount (Signal GthTx Bool)
txReady1 = zipWith (unsafeSynchronizer sysClk) transceivers.txClocks txReady0

transceivers =
transceiverPrbsN
Expand All @@ -277,7 +279,7 @@ topologyTest refClk sysClk sysRst IlaControl{syncRst = rst, ..} rxNs rxPs miso c
Transceiver.defConfig
Transceiver.Inputs
{ clock = sysClk
, reset = gthAllReset
, reset = syncRst
, refClock = refClk
, channelNames
, clockPaths
Expand All @@ -287,7 +289,7 @@ topologyTest refClk sysClk sysRst IlaControl{syncRst = rst, ..} rxNs rxPs miso c
-- , txReadys = txAllStables
-- , rxReadys = repeat (pure True)
, txDatas = repeat (pure 0)
, txReadys = repeat txReady
, txReadys = txReady1
, rxReadys = repeat (pure True)
}

Expand Down Expand Up @@ -393,7 +395,7 @@ topologyTest refClk sysClk sysRst IlaControl{syncRst = rst, ..} rxNs rxPs miso c
:> "probe_dDiff5"
:> "probe_dDiff6"
:> "probe_syncRst"
:> "probe_gthAllReset"
-- :> "probe_gthAllReset"
:> "probe_startupDelayRst"
:> "probe_clockControlReset"
:> "probe_notInCCReset"
Expand Down Expand Up @@ -464,7 +466,7 @@ topologyTest refClk sysClk sysRst IlaControl{syncRst = rst, ..} rxNs rxPs miso c
dDiff5
dDiff6
(unsafeFromReset syncRst)
(unsafeFromReset gthAllReset)
-- (unsafeFromReset gthAllReset)
(unsafeFromReset startupDelayRst)
(unsafeFromReset clockControlReset)
notInCCReset
Expand Down

0 comments on commit d420ced

Please sign in to comment.