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. sampleWithReset :: forall (dom :: Domain) a (m :: Natural) . (KnownDomain dom, NFDataX a, 1 <= m) => SNat m -> (HiddenClockResetEnable dom => Signal dom a) -> [a]

    clash-prelude Clash.Signal

    Get an infinite list of samples from a Signal, while asserting the reset line for m clock cycles. sampleWithReset does not return the first m cycles, i.e., when the reset is asserted. NB: This function is not synthesizable

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

    clash-prelude Clash.Signal

    Get a list of n samples from a Signal, while asserting the reset line for m clock cycles. sampleWithReset does not return the first m cycles, i.e., while the reset is asserted. NB: This function is not synthesizable

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

    clash-prelude Clash.Signal

    Same as simulate, but with the reset line asserted for n cycles. Similar to simulate, simulateWithReset will drop the output values produced while the reset is asserted. While the reset is asserted, the reset value a is supplied to the circuit.

  4. 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.Signal

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

  5. systemResetGen :: Reset System

    clash-prelude Clash.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
    

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

    clash-prelude Clash.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.

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

    clash-prelude Clash.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.

  8. vResetKind :: VDomainConfiguration -> ResetKind

    clash-prelude Clash.Signal

    Corresponds to _resetKind on DomainConfiguration

  9. vResetPolarity :: VDomainConfiguration -> ResetPolarity

    clash-prelude Clash.Signal

    Corresponds to _resetPolarity on DomainConfiguration

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

    clash-prelude Clash.Signal

    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]
    

Page 1661 of many | Previous | Next