{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE Safe #-}
{-# OPTIONS_HADDOCK show-extensions, not-home #-}
module Clash.Prelude.Safe
(
mealy
, mealyB
, (<^>)
, moore
, mooreB
, registerB
, asyncRom
, asyncRomPow2
, rom
, romPow2
, asyncRam
, asyncRamPow2
, blockRam
, blockRamPow2
, readNew
, isRising
, isFalling
, riseEvery
, oscillate
, module Clash.Signal
, module Clash.Signal.Delayed
, module Clash.Prelude.DataFlow
, module Clash.Sized.BitVector
, module Clash.Prelude.BitIndex
, module Clash.Prelude.BitReduction
, module Clash.Sized.Signed
, module Clash.Sized.Unsigned
, module Clash.Sized.Index
, module Clash.Sized.Fixed
, module Clash.Sized.Vector
, module Clash.Sized.RTree
, module Clash.Annotations.TopEntity
, Generic
, Generic1
, module GHC.TypeLits
, module GHC.TypeLits.Extra
, module Clash.Promoted.Nat
, module Clash.Promoted.Nat.Literals
, module Clash.Promoted.Nat.TH
, module Clash.Promoted.Symbol
, module Clash.Class.BitPack
, module Clash.Class.Num
, module Clash.Class.Resize
, module Control.Applicative
, module Data.Bits
, module Clash.XException
, module Clash.NamedTypes
, module Clash.Hidden
, module Clash.HaskellPrelude
)
where
import Control.Applicative
import Data.Bits
import GHC.Generics (Generic, Generic1)
import GHC.TypeLits
import GHC.TypeLits.Extra
import Clash.HaskellPrelude
import Clash.Annotations.TopEntity
import Clash.Class.BitPack
import Clash.Class.Num
import Clash.Class.Resize
import Clash.Hidden
import Clash.NamedTypes
import Clash.Prelude.BitIndex
import Clash.Prelude.BitReduction
import Clash.Prelude.BlockRam
import qualified Clash.Explicit.Prelude.Safe as E
import Clash.Prelude.Mealy (mealy, mealyB, (<^>))
import Clash.Prelude.Moore (moore, mooreB)
import Clash.Prelude.RAM (asyncRam,asyncRamPow2)
import Clash.Prelude.ROM (asyncRom,asyncRomPow2,rom,romPow2)
import Clash.Prelude.DataFlow
import Clash.Promoted.Nat
import Clash.Promoted.Nat.TH
import Clash.Promoted.Nat.Literals
import Clash.Promoted.Symbol
import Clash.Sized.BitVector
import Clash.Sized.Fixed
import Clash.Sized.Index
import Clash.Sized.RTree
import Clash.Sized.Signed
import Clash.Sized.Unsigned
import Clash.Sized.Vector
import Clash.Signal
import Clash.Signal.Delayed
import Clash.XException
registerB
:: ( HiddenClockResetEnable dom
, NFDataX a
, Bundle a )
=> a
-> Unbundled dom a
-> Unbundled dom a
registerB :: a -> Unbundled dom a -> Unbundled dom a
registerB = (KnownDomain dom =>
Clock dom
-> Reset dom
-> Enable dom
-> a
-> Unbundled dom a
-> Unbundled dom a)
-> a -> Unbundled dom a -> Unbundled dom a
forall (dom :: Domain) r.
HiddenClockResetEnable dom =>
(KnownDomain dom => Clock dom -> Reset dom -> Enable dom -> r) -> r
hideClockResetEnable KnownDomain dom =>
Clock dom
-> Reset dom
-> Enable dom
-> a
-> Unbundled dom a
-> Unbundled dom a
forall (dom :: Domain) a.
(KnownDomain dom, NFDataX a, Bundle a) =>
Clock dom
-> Reset dom
-> Enable dom
-> a
-> Unbundled dom a
-> Unbundled dom a
E.registerB
infixr 3 `registerB`
{-# INLINE registerB #-}
isRising
:: ( HiddenClockResetEnable dom
, NFDataX a
, Bounded a
, Eq a )
=> a
-> Signal dom a
-> Signal dom Bool
isRising :: a -> Signal dom a -> Signal dom Bool
isRising = (KnownDomain dom =>
Clock dom
-> Reset dom -> Enable dom -> a -> Signal dom a -> Signal dom Bool)
-> a -> Signal dom a -> Signal dom Bool
forall (dom :: Domain) r.
HiddenClockResetEnable dom =>
(KnownDomain dom => Clock dom -> Reset dom -> Enable dom -> r) -> r
hideClockResetEnable KnownDomain dom =>
Clock dom
-> Reset dom -> Enable dom -> a -> Signal dom a -> Signal dom Bool
forall (dom :: Domain) a.
(KnownDomain dom, NFDataX a, Bounded a, Eq a) =>
Clock dom
-> Reset dom -> Enable dom -> a -> Signal dom a -> Signal dom Bool
E.isRising
{-# INLINE isRising #-}
isFalling
:: ( HiddenClockResetEnable dom
, NFDataX a
, Bounded a
, Eq a )
=> a
-> Signal dom a
-> Signal dom Bool
isFalling :: a -> Signal dom a -> Signal dom Bool
isFalling = (KnownDomain dom =>
Clock dom
-> Reset dom -> Enable dom -> a -> Signal dom a -> Signal dom Bool)
-> a -> Signal dom a -> Signal dom Bool
forall (dom :: Domain) r.
HiddenClockResetEnable dom =>
(KnownDomain dom => Clock dom -> Reset dom -> Enable dom -> r) -> r
hideClockResetEnable KnownDomain dom =>
Clock dom
-> Reset dom -> Enable dom -> a -> Signal dom a -> Signal dom Bool
forall (dom :: Domain) a.
(KnownDomain dom, NFDataX a, Bounded a, Eq a) =>
Clock dom
-> Reset dom -> Enable dom -> a -> Signal dom a -> Signal dom Bool
E.isFalling
{-# INLINE isFalling #-}
riseEvery
:: HiddenClockResetEnable dom
=> SNat n
-> Signal dom Bool
riseEvery :: SNat n -> Signal dom Bool
riseEvery = (KnownDomain dom =>
Clock dom -> Reset dom -> Enable dom -> SNat n -> Signal dom Bool)
-> SNat n -> Signal dom Bool
forall (dom :: Domain) r.
HiddenClockResetEnable dom =>
(KnownDomain dom => Clock dom -> Reset dom -> Enable dom -> r) -> r
hideClockResetEnable KnownDomain dom =>
Clock dom -> Reset dom -> Enable dom -> SNat n -> Signal dom Bool
forall (dom :: Domain) (n :: Nat).
KnownDomain dom =>
Clock dom -> Reset dom -> Enable dom -> SNat n -> Signal dom Bool
E.riseEvery
{-# INLINE riseEvery #-}
oscillate
:: HiddenClockResetEnable dom
=> Bool
-> SNat n
-> Signal dom Bool
oscillate :: Bool -> SNat n -> Signal dom Bool
oscillate = (KnownDomain dom =>
Clock dom
-> Reset dom -> Enable dom -> Bool -> SNat n -> Signal dom Bool)
-> Bool -> SNat n -> Signal dom Bool
forall (dom :: Domain) r.
HiddenClockResetEnable dom =>
(KnownDomain dom => Clock dom -> Reset dom -> Enable dom -> r) -> r
hideClockResetEnable KnownDomain dom =>
Clock dom
-> Reset dom -> Enable dom -> Bool -> SNat n -> Signal dom Bool
forall (dom :: Domain) (n :: Nat).
KnownDomain dom =>
Clock dom
-> Reset dom -> Enable dom -> Bool -> SNat n -> Signal dom Bool
E.oscillate
{-# INLINE oscillate #-}