Hoogle Search
Within LTS Haskell 24.70 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
data
ResetStrategy (r :: Bool)clash-prelude Clash.Explicit.Prelude No documentation available.
-
Utilities to deal with resets.
-
clash-prelude Clash.Explicit.Reset A reset signal belonging to a domain called dom. The underlying representation of resets is Bool.
andReset :: forall (dom :: Domain) . HasSynchronousReset dom => Reset dom -> Reset dom -> Reset domclash-prelude Clash.Explicit.Reset Output reset will be asserted when both input resets are asserted
-
clash-prelude Clash.Explicit.Reset Convert between different types of reset, adding a synchronizer when the domains are not the same. See resetSynchronizer for further details about reset synchronization. If domA has Synchronous resets, a flip-flop is inserted in domA to filter glitches. This adds one domA clock cycle delay.
-
clash-prelude Clash.Explicit.Reset Hold reset for a number of cycles relative to an incoming reset signal. NB: The output of this function is combinational for n > 0 on domains with a synchronous reset. Use registerSyncReset to add an output register if desired. Example:
>>> let sampleReset = sampleN 8 . unsafeToActiveHigh >>> sampleReset (holdReset @System clockGen enableGen (SNat @2) (resetGenN (SNat @3))) [True,True,True,True,True,False,False,False]
holdReset holds the reset for an additional 2 clock cycles for a total of 5 clock cycles where the reset is asserted. holdReset also works on intermediate assertions of the reset signal:>>> let rst = fromList [True, False, False, False, True, False, False, False] >>> sampleReset (holdReset @System clockGen enableGen (SNat @2) (unsafeFromActiveHigh rst)) [True,True,True,False,True,True,True,False]
noReset :: forall (dom :: Domain) . KnownDomain dom => Reset domclash-prelude Clash.Explicit.Reset A reset that is never asserted
orReset :: forall (dom :: Domain) . HasSynchronousReset dom => Reset dom -> Reset dom -> Reset domclash-prelude Clash.Explicit.Reset Output reset will be asserted when either one of the input resets is asserted
-
clash-prelude Clash.Explicit.Reset Register a synchronous reset signal. registerSyncReset delays an incoming reset by one clock cycle using a register. This can be useful to break combinational paths involving reset logic. NB: This is not a synchronizer. Use resetSynchronizer to synchronize a reset. Example:
>>> let sampleReset = sampleN 7 . unsafeToActiveHigh >>> let rst = unsafeFromActiveHigh (fromList [False, True, False, False, True, False]) >>> sampleReset (registerSyncReset @XilinxSystem clockGen rst enableGen True) [True,False,True,False,False,True,False]
resetGen :: forall (dom :: Domain) . KnownDomain dom => Reset domclash-prelude Clash.Explicit.Reset Reset generator for simulation purposes. Asserts the reset for a single cycle. To be used like:
rstSystem = resetGen @System
See tbClockGen for example usage. NB: While this can be used in the testBench function, it cannot be synthesized to hardware.