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.

  1. simulateWithResetN :: forall (dom :: Domain) a b (m :: Natural) . (KnownDomain dom, NFDataX a, NFDataX b, 1 <= m) => SNat m -> a -> Int -> (HiddenClockResetEnable dom => Signal dom a -> Signal dom b) -> [a] -> [b]

    clash-prelude Clash.Prelude

    Same as simulateWithReset, but only sample the first Int output values.

  2. systemResetGen :: Reset System

    clash-prelude Clash.Prelude

    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
    

  3. unsafeFromReset :: forall (dom :: Domain) . Reset dom -> Signal dom Bool

    clash-prelude Clash.Prelude

    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.

  4. unsafeToReset :: forall (dom :: Domain) . KnownDomain dom => Signal dom Bool -> Reset dom

    clash-prelude Clash.Prelude

    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.

  5. vResetKind :: VDomainConfiguration -> ResetKind

    clash-prelude Clash.Prelude

    Corresponds to _resetKind on DomainConfiguration

  6. vResetPolarity :: VDomainConfiguration -> ResetPolarity

    clash-prelude Clash.Prelude

    Corresponds to _resetPolarity on DomainConfiguration

  7. withClockResetEnable :: forall (dom :: Domain) r . KnownDomain dom => Clock dom -> Reset dom -> Enable dom -> (HiddenClockResetEnable dom => r) -> r

    clash-prelude Clash.Prelude

    Connect an explicit Clock, Reset, and Enable to a function with a hidden Clock, Reset, and Enable. # 1551 "srcClashSignal.hs" Click here to read more about hidden clocks, resets, and enables

    Example

    Usage with a polymorphic domain:
    >>> reg = register 5 (reg + 1)
    
    >>> sig = withClockResetEnable clockGen resetGen enableGen reg
    
    >>> sampleN @System 10 sig
    [5,5,6,7,8,9,10,11,12,13]
    
    Force withClockResetEnable to work on System (hence sampleN not needing an explicit domain later):
    >>> reg = register 5 (reg + 1)
    
    >>> sig = withClockResetEnable @System clockGen resetGen enableGen reg
    
    >>> sampleN 10 sig
    [5,5,6,7,8,9,10,11,12,13]
    

  8. withReset :: forall (dom :: Domain) r . KnownDomain dom => Reset dom -> (HiddenReset dom => r) -> r

    clash-prelude Clash.Prelude

    Connect an explicit Reset to a function with a hidden Reset. # 1012 "srcClashSignal.hs" === Example Usage with a polymorphic domain:

    >>> reg = register 5 (reg + 1)
    
    >>> sig = withReset resetGen reg
    
    >>> sampleN @System 10 sig
    [5,5,6,7,8,9,10,11,12,13]
    
    Force withReset to work on System (hence sampleN not needing an explicit domain later):
    >>> reg = register 5 (reg + 1)
    
    >>> sig = withReset @System resetGen reg
    
    >>> sampleN 10 sig
    [5,5,6,7,8,9,10,11,12,13]
    

  9. ClearOnReset :: ResetStrategy 'True

    clash-prelude Clash.Prelude.BlockRam

    No documentation available.

  10. NoClearOnReset :: ResetStrategy 'False

    clash-prelude Clash.Prelude.BlockRam

    No documentation available.

Page 1657 of many | Previous | Next