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. _resetKind :: DomainConfiguration -> ResetKind

    clash-prelude Clash.Explicit.Signal

    Whether resets are synchronous (edge-sensitive) or asynchronous (level-sensitive)

  2. _resetPolarity :: DomainConfiguration -> ResetPolarity

    clash-prelude Clash.Explicit.Signal

    Whether resets are active high or active low

  3. fromListWithReset :: forall (dom :: Domain) a . (KnownDomain dom, NFDataX a) => Reset dom -> a -> [a] -> Signal dom a

    clash-prelude Clash.Explicit.Signal

    Like fromList, but resets on reset and has a defined reset value.

    >>> let rst = unsafeFromActiveHigh (fromList [True, True, False, False, True, False])
    
    >>> let res = fromListWithReset @System rst Nothing [Just 'a', Just 'b', Just 'c']
    
    >>> sampleN 6 res
    [Nothing,Nothing,Just 'a',Just 'b',Nothing,Just 'a']
    
    NB: This function is not synthesizable

  4. resetGen :: forall (dom :: Domain) . KnownDomain dom => Reset dom

    clash-prelude Clash.Explicit.Signal

    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.

  5. resetGenN :: forall (dom :: Domain) (n :: Natural) . (KnownDomain dom, 1 <= n) => SNat n -> Reset dom

    clash-prelude Clash.Explicit.Signal

    Reset generator for simulation purposes. Asserts the reset for the first n cycles. To be used like:

    rstSystem5 = resetGen @System d5
    
    Example usage:
    >>> sampleN 7 (unsafeToActiveHigh (resetGenN @System d3))
    [True,True,True,False,False,False,False]
    
    NB: While this can be used in the testBench function, it cannot be synthesized to hardware.

  6. resetKind :: forall (dom :: Domain) (sync :: ResetKind) . (KnownDomain dom, DomainResetKind dom ~ sync) => SResetKind sync

    clash-prelude Clash.Explicit.Signal

    Get ResetKind from a KnownDomain context. Example usage:

    f :: forall dom . KnownDomain dom => ....
    f a b c =
    case resetKind @dom of
    SAsynchronous -> foo
    SSynchronous -> bar
    

  7. resetPolarity :: forall (dom :: Domain) (polarity :: ResetPolarity) . (KnownDomain dom, DomainResetPolarity dom ~ polarity) => SResetPolarity polarity

    clash-prelude Clash.Explicit.Signal

    Get ResetPolarity from a KnownDomain context. Example usage:

    f :: forall dom . KnownDomain dom => ....
    f a b c =
    case resetPolarity @dom of
    SActiveHigh -> foo
    SActiveLow -> bar
    

  8. sampleWithReset :: forall (dom :: Domain) a (m :: Natural) . (KnownDomain dom, NFDataX a, 1 <= m) => SNat m -> (KnownDomain dom => Clock dom -> Reset dom -> Enable dom -> Signal dom a) -> [a]

    clash-prelude Clash.Explicit.Signal

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

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

    clash-prelude Clash.Explicit.Signal

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

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

    clash-prelude Clash.Explicit.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 first value from [a] is fed to the circuit.

Page 1652 of many | Previous | Next