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. data ResetStrategy (r :: Bool)

    clash-prelude Clash.Explicit.Prelude

    No documentation available.

  2. module Clash.Explicit.Reset

    Utilities to deal with resets.

  3. data Reset (dom :: Domain)

    clash-prelude Clash.Explicit.Reset

    A reset signal belonging to a domain called dom. The underlying representation of resets is Bool.

  4. andReset :: forall (dom :: Domain) . HasSynchronousReset dom => Reset dom -> Reset dom -> Reset dom

    clash-prelude Clash.Explicit.Reset

    Output reset will be asserted when both input resets are asserted

  5. convertReset :: forall (domA :: Domain) (domB :: Domain) . (KnownDomain domA, KnownDomain domB) => Clock domA -> Clock domB -> Reset domA -> Reset domB

    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.

  6. holdReset :: forall (dom :: Domain) (n :: Nat) . KnownDomain dom => Clock dom -> Enable dom -> SNat n -> Reset dom -> Reset dom

    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]
    

  7. noReset :: forall (dom :: Domain) . KnownDomain dom => Reset dom

    clash-prelude Clash.Explicit.Reset

    A reset that is never asserted

  8. orReset :: forall (dom :: Domain) . HasSynchronousReset dom => Reset dom -> Reset dom -> Reset dom

    clash-prelude Clash.Explicit.Reset

    Output reset will be asserted when either one of the input resets is asserted

  9. registerSyncReset :: forall (dom :: Domain) . (KnownDomain dom, HasSynchronousReset dom) => Clock dom -> Reset dom -> Enable dom -> Bool -> Reset dom

    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]
    

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

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

Page 1649 of many | Previous | Next