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.
-
clash-prelude Clash.Explicit.Signal Same as simulateWithReset, but only sample the first Int output values.
systemResetGen :: Reset Systemclash-prelude Clash.Explicit.Signal Reset generator for use in simulation, for the System clock domain. Asserts the reset for a single cycle. NB: While this can be used in the testBench function, it cannot be synthesized to hardware.
Example
topEntity :: Vec 2 (Vec 3 (Unsigned 8)) -> Vec 6 (Unsigned 8) topEntity = concat testBench :: Signal System Bool testBench = done where testInput = pure ((1 :> 2 :> 3 :> Nil) :> (4 :> 5 :> 6 :> Nil) :> Nil) expectedOutput = outputVerifier' ((1:>2:>3:>4:>5:>6:>Nil):>Nil) done = exposeClockResetEnable (expectedOutput (topEntity <$> testInput)) clk rst clk = tbSystemClockGen (not <$> done) rst = systemResetGen
unsafeFromReset :: forall (dom :: Domain) . Reset dom -> Signal dom Boolclash-prelude Clash.Explicit.Signal unsafeFromReset is unsafe because it can introduce:
For asynchronous resets it is unsafe because it can cause combinatorial loops. In case of synchronous resets it can lead to meta-stability in the presence of asynchronous resets. NB: You probably want to use unsafeToActiveLow or unsafeToActiveHigh.unsafeToReset :: forall (dom :: Domain) . KnownDomain dom => Signal dom Bool -> Reset domclash-prelude Clash.Explicit.Signal unsafeToReset is unsafe. For asynchronous resets it is unsafe because it can introduce combinatorial loops. In case of synchronous resets it can lead to meta-stability issues in the presence of asynchronous resets. NB: You probably want to use unsafeFromActiveLow or unsafeFromActiveHigh.
vResetKind :: VDomainConfiguration -> ResetKindclash-prelude Clash.Explicit.Signal Corresponds to _resetKind on DomainConfiguration
vResetPolarity :: VDomainConfiguration -> ResetPolarityclash-prelude Clash.Explicit.Signal Corresponds to _resetPolarity on DomainConfiguration
ClearOnReset :: ResetStrategy 'Trueclash-prelude Clash.Prelude No documentation available.
type
DomainResetKind (dom :: Domain) = DomainConfigurationResetKind KnownConf domclash-prelude Clash.Prelude Convenience type to help to extract the reset synchronicity from a domain. Example usage:
myFunc :: (KnownDomain dom, DomainResetKind dom ~ 'Synchronous) => ...
type
DomainResetPolarity (dom :: Domain) = DomainConfigurationResetPolarity KnownConf domclash-prelude Clash.Prelude Convenience type to help to extract the reset polarity from a domain. Example usage:
myFunc :: (KnownDomain dom, DomainResetPolarity dom ~ 'ActiveHigh) => ...
type
HasAsynchronousReset (dom :: Domain) = (KnownDomain dom, DomainResetKind dom ~ 'Asynchronous)clash-prelude Clash.Prelude Convenience type to constrain a domain to have asynchronous resets. Example usage:
myFunc :: HasAsynchronousReset dom => ...
Using this type implies KnownDomain. Click here for usage hints