| Copyright | (C) 2025-2026 QBayLogic B.V. |
|---|---|
| License | BSD2 (see the file LICENSE) |
| Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Clash.Shockwaves.Internal.Trace.CRE
Description
Some functions for creating signals for clocks and reset and enable signals.
Synopsis
- data ClockWave
- newtype ResetWave (dom :: Domain) = ResetWave Bool
- newtype EnableWave = EnableWave Bool
- data CREWave (dom :: Domain) = CREWave {}
- vConst :: Render -> Translator
- tConst :: Render -> Translation
- clkI :: Render
- clkA :: Render
- clkB :: Render
- rstOff :: Render
- rstOn :: Render
- rstOn' :: Render
- enOn :: Render
- enOff :: Render
- rstAndDis :: Render
- clkSignal :: forall (dom :: Domain). KnownDomain dom => Clock dom -> Signal dom ClockWave
- traceClock :: forall (dom :: Domain). KnownDomain dom => String -> Clock dom -> Clock dom
- traceReset :: forall (dom :: Domain). KnownDomain dom => String -> Reset dom -> Reset dom
- traceEnable :: forall (dom :: Domain). KnownDomain dom => String -> Enable dom -> Enable dom
- traceClockResetEnable :: forall (dom :: Domain) a. KnownDomain dom => String -> (Clock dom -> Reset dom -> Enable dom -> a) -> Clock dom -> Reset dom -> Enable dom -> a
- traceHiddenClock :: forall (dom :: Domain) r. (KnownDomain dom, HiddenClock dom) => String -> r -> r
- traceHiddenReset :: forall (dom :: Domain) r. (KnownDomain dom, HiddenReset dom) => String -> r -> r
- traceHiddenEnable :: forall (dom :: Domain) r. (KnownDomain dom, HiddenEnable dom) => String -> r -> r
- traceHiddenClockResetEnable :: forall (dom :: Domain) r. (KnownDomain dom, HiddenClockResetEnable dom) => String -> r -> r
Documentation
A type for displaying clock cycles.
The styles can be configured through style variables clk_pre, clk_a and clk_b.
NB: This is not a traditional clock wave! The clock signal alternates every cycle, rather than going high and low within a cycle.
Instances
newtype ResetWave (dom :: Domain) Source #
A type for displaying a reset signal.
The styles can be configured through style variables reset_off and reset_on.
Instances
| BitPack (ResetWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Associated Types
| |||||
| NFDataX (ResetWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Methods deepErrorX :: String -> ResetWave dom # hasUndefined :: ResetWave dom -> Bool # ensureSpine :: ResetWave dom -> ResetWave dom # | |||||
| KnownDomain dom => Waveform (ResetWave dom) Source # | Control the styles of the reset wave through style variables
| ||||
Defined in Clash.Shockwaves.Internal.Trace.CRE | |||||
| Generic (ResetWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Associated Types
| |||||
| type BitSize (ResetWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE type BitSize (ResetWave dom) = CLog 2 (GConstructorCount (Rep (ResetWave dom))) + GFieldSize (Rep (ResetWave dom)) | |||||
| type Rep (ResetWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE | |||||
newtype EnableWave Source #
A type for displaying an enable signal.
The styles can be configured through style variables enable_off and enable_on.
Constructors
| EnableWave Bool |
Instances
| BitPack EnableWave Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Associated Types
Methods pack :: EnableWave -> BitVector (BitSize EnableWave) # unpack :: BitVector (BitSize EnableWave) -> EnableWave # | |||||
| NFDataX EnableWave Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Methods deepErrorX :: String -> EnableWave # hasUndefined :: EnableWave -> Bool # ensureSpine :: EnableWave -> EnableWave # rnfX :: EnableWave -> () # | |||||
| Waveform EnableWave Source # | Control the styles of the enable wave through style variables
| ||||
Defined in Clash.Shockwaves.Internal.Trace.CRE | |||||
| Generic EnableWave Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Associated Types
| |||||
| type BitSize EnableWave Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE | |||||
| type Rep EnableWave Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE type Rep EnableWave = D1 ('MetaData "EnableWave" "Clash.Shockwaves.Internal.Trace.CRE" "clash-shockwaves-1.1.0-inplace" 'True) (C1 ('MetaCons "EnableWave" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) | |||||
data CREWave (dom :: Domain) Source #
A type for displaying clock, reset and enable signals.
See ClockWave, ResetWave and EnableWave.
It contains these signals as subsignals. The toplevel signal displays the clock
during normal operation, reset when it is active, and enable when it is low.
The combined style of both being active can be configured through the style
vairable reset_on_enable_off.
Instances
| BitPack (CREWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Associated Types
| |||||
| NFDataX (CREWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Methods deepErrorX :: String -> CREWave dom # hasUndefined :: CREWave dom -> Bool # ensureSpine :: CREWave dom -> CREWave dom # | |||||
| KnownDomain dom => Waveform (CREWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE | |||||
| KnownDomain dom => WaveformLUT (CREWave dom) Source # | Control the style of a combined disable and reset through style variable
| ||||
Defined in Clash.Shockwaves.Internal.Trace.CRE | |||||
| Generic (CREWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE Associated Types
| |||||
| type BitSize (CREWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE type BitSize (CREWave dom) = CLog 2 (GConstructorCount (Rep (CREWave dom))) + GFieldSize (Rep (CREWave dom)) | |||||
| type Rep (CREWave dom) Source # | |||||
Defined in Clash.Shockwaves.Internal.Trace.CRE type Rep (CREWave dom) = D1 ('MetaData "CREWave" "Clash.Shockwaves.Internal.Trace.CRE" "clash-shockwaves-1.1.0-inplace" 'False) (C1 ('MetaCons "CREWave" 'PrefixI 'True) (S1 ('MetaSel ('Just "clock") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClockWave) :*: (S1 ('MetaSel ('Just "reset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ResetWave dom)) :*: S1 ('MetaSel ('Just "enable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EnableWave)))) | |||||
vConst :: Render -> Translator Source #
tConst :: Render -> Translation Source #
clkSignal :: forall (dom :: Domain). KnownDomain dom => Clock dom -> Signal dom ClockWave Source #
Produce an alternating signal for a clock.
traceClock :: forall (dom :: Domain). KnownDomain dom => String -> Clock dom -> Clock dom Source #
Trace a clock signal. Keep in mind that the clock has to be evaluated in order for
the signal to show up. Alternatively, use seq to force evaluation.
The styles can be configured through style variables clk_pre, clk_a and clk_b.
NB: This is not a traditional clock wave! The clock signal alternates every cycle, rather than going high and low within a cycle.
traceReset :: forall (dom :: Domain). KnownDomain dom => String -> Reset dom -> Reset dom Source #
Trace a reset signal. Keep in mind that the reset has to be evaluated in order for
the signal to show up. Alternatively, use seq to force evaluation.
The styles can be configured through style variables reset_off and reset_on.
traceEnable :: forall (dom :: Domain). KnownDomain dom => String -> Enable dom -> Enable dom Source #
Trace an enable signal. Keep in mind that the enable has to be evaluated in order for
the signal to show up. Alternatively, use seq to force evaluation.
The styles can be configured through style variables enable_off and enable_on.
traceClockResetEnable :: forall (dom :: Domain) a. KnownDomain dom => String -> (Clock dom -> Reset dom -> Enable dom -> a) -> Clock dom -> Reset dom -> Enable dom -> a Source #
Create a signal displaying the clock, reset and enable signals.
Example:
traceClockResetEnable "cre" myDesign clockGen resetGen enableGen
The style of a combined disable and reset can be configured through style variable
reset_on_enable_off. For other options, see traceClock, traceReset and
traceEnable.
NB: This does not contain a traditional clock wave! The clock signal alternates every cycle, rather than going high and low within a cycle.
traceHiddenClock :: forall (dom :: Domain) r. (KnownDomain dom, HiddenClock dom) => String -> r -> r Source #
Trace a hidden clock signal. See traceClock.
traceHiddenReset :: forall (dom :: Domain) r. (KnownDomain dom, HiddenReset dom) => String -> r -> r Source #
Trace a hidden reset signal. See traceReset.
traceHiddenEnable :: forall (dom :: Domain) r. (KnownDomain dom, HiddenEnable dom) => String -> r -> r Source #
Trace a hidden enable signal. See traceEnable.
traceHiddenClockResetEnable :: forall (dom :: Domain) r. (KnownDomain dom, HiddenClockResetEnable dom) => String -> r -> r Source #
Trace hidden clock, reset and enable signals. See traceClockResetEnable.