diff --git a/bittide-instances/src/Bittide/Instances/Hitl/SwCcTopologies.hs b/bittide-instances/src/Bittide/Instances/Hitl/SwCcTopologies.hs index a7e855f05..c09aaf389 100644 --- a/bittide-instances/src/Bittide/Instances/Hitl/SwCcTopologies.hs +++ b/bittide-instances/src/Bittide/Instances/Hitl/SwCcTopologies.hs @@ -956,6 +956,7 @@ swCcTopologyTest refClkDiff sysClkDiff syncIn rxns rxps miso = (satSucc SatBound <$> testCounter) cfg = fromMaybe disabled <$> testConfig + cfg' = mux testSuccessSticky (pure disabled) cfg ( txns , txps @@ -966,7 +967,7 @@ swCcTopologyTest refClkDiff sysClkDiff syncIn rxns rxps miso = , _stats , spiDone , spiOut - , _transceiversFailedAfterUp + , transceiversFailedAfterUp , allReady , allStable , calibI @@ -981,7 +982,7 @@ swCcTopologyTest refClkDiff sysClkDiff syncIn rxns rxps miso = rxns rxps miso - cfg + cfg' captureFlag = riseEvery @@ -1061,7 +1062,7 @@ swCcTopologyTest refClkDiff sysClkDiff syncIn rxns rxps miso = calibE endSuccess startBeforeAllReady - _transceiversFailedAfterUp + transceiversFailedAfterUp testDone testSuccess testCounter @@ -1079,8 +1080,8 @@ swCcTopologyTest refClkDiff sysClkDiff syncIn rxns rxps miso = sticky sysClk syncRst - -- (syncStart .&&. ((not <$> allReady) .||. transceiversFailedAfterUp)) - (syncStart .&&. (not <$> allReady)) + (syncStart .&&. ((not <$> allReady) .||. transceiversFailedAfterUp)) + -- (syncStart .&&. (not <$> allReady)) endSuccess :: Signal Basic125 Bool endSuccess = @@ -1099,19 +1100,21 @@ swCcTopologyTest refClkDiff sysClkDiff syncIn rxns rxps miso = startTest .&&. ( skip .||. endSuccess - -- .||. transceiversFailedAfterUp + .||. transceiversFailedAfterUp .||. startBeforeAllReady ) + testDoneSticky = sticky sysClk testReset (isRising sysClk testReset enableGen False testDone) testSuccess = skip .||. ( allStable - -- .&&. (not <$> (transceiversFailedAfterUp .||. startBeforeAllReady)) - .&&. (not <$> startBeforeAllReady) + .&&. (not <$> (transceiversFailedAfterUp .||. startBeforeAllReady)) + -- .&&. (not <$> startBeforeAllReady) ) + testSuccessSticky = sticky sysClk testReset (isRising sysClk testReset enableGen False testSuccess) testConfig :: Signal Basic125 (Maybe TestConfig) - testConfig = hitlVio disabled sysClk testDone testSuccess + testConfig = hitlVio disabled sysClk testDoneSticky testSuccessSticky makeTopEntity 'swCcTopologyTest