clash-shockwaves
Copyright(C) 2025-2026 QBayLogic B.V.
LicenseBSD2 (see the file LICENSE)
MaintainerQBayLogic B.V. <devops@qbaylogic.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Shockwaves.Internal.Trace.CRE

Description

Some functions for creating signals for clocks and reset and enable signals.

Synopsis

Documentation

data ClockWave Source #

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.

Constructors

ClockWave Bool 
ClockInit 

Instances

Instances details
BitPack ClockWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

NFDataX ClockWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Waveform ClockWave Source #

Control the styles of the clock wave through style variables clk_pre, clk_a and clk_b.

Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Generic ClockWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Associated Types

type Rep ClockWave 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep ClockWave = D1 ('MetaData "ClockWave" "Clash.Shockwaves.Internal.Trace.CRE" "clash-shockwaves-1.1.0-inplace" 'False) (C1 ('MetaCons "ClockWave" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "ClockInit" 'PrefixI 'False) (U1 :: Type -> Type))
type BitSize ClockWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep ClockWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep ClockWave = D1 ('MetaData "ClockWave" "Clash.Shockwaves.Internal.Trace.CRE" "clash-shockwaves-1.1.0-inplace" 'False) (C1 ('MetaCons "ClockWave" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "ClockInit" 'PrefixI 'False) (U1 :: Type -> Type))

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.

Constructors

ResetWave Bool 

Instances

Instances details
BitPack (ResetWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Associated Types

type BitSize (ResetWave dom) 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

NFDataX (ResetWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Methods

deepErrorX :: String -> ResetWave dom #

hasUndefined :: ResetWave dom -> Bool #

ensureSpine :: ResetWave dom -> ResetWave dom #

rnfX :: ResetWave dom -> () #

KnownDomain dom => Waveform (ResetWave dom) Source #

Control the styles of the reset wave through style variables reset_on and reset_off.

Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Generic (ResetWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Associated Types

type Rep (ResetWave dom) 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep (ResetWave dom) = D1 ('MetaData "ResetWave" "Clash.Shockwaves.Internal.Trace.CRE" "clash-shockwaves-1.1.0-inplace" 'True) (C1 ('MetaCons "ResetWave" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

Methods

from :: ResetWave dom -> Rep (ResetWave dom) x #

to :: Rep (ResetWave dom) x -> ResetWave dom #

type BitSize (ResetWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep (ResetWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep (ResetWave dom) = D1 ('MetaData "ResetWave" "Clash.Shockwaves.Internal.Trace.CRE" "clash-shockwaves-1.1.0-inplace" 'True) (C1 ('MetaCons "ResetWave" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

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

Instances details
BitPack EnableWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

NFDataX EnableWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Waveform EnableWave Source #

Control the styles of the enable wave through style variables enable_on and enable_off.

Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Generic EnableWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Associated Types

type Rep EnableWave 
Instance details

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)))
type BitSize EnableWave Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep EnableWave Source # 
Instance details

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.

Constructors

CREWave 

Instances

Instances details
BitPack (CREWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Associated Types

type BitSize (CREWave dom) 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Methods

pack :: CREWave dom -> BitVector (BitSize (CREWave dom)) #

unpack :: BitVector (BitSize (CREWave dom)) -> CREWave dom #

NFDataX (CREWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Methods

deepErrorX :: String -> CREWave dom #

hasUndefined :: CREWave dom -> Bool #

ensureSpine :: CREWave dom -> CREWave dom #

rnfX :: CREWave dom -> () #

KnownDomain dom => Waveform (CREWave dom) Source # 
Instance details

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

Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Generic (CREWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

Associated Types

type Rep (CREWave dom) 
Instance details

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))))

Methods

from :: CREWave dom -> Rep (CREWave dom) x #

to :: Rep (CREWave dom) x -> CREWave dom #

type BitSize (CREWave dom) Source # 
Instance details

Defined in Clash.Shockwaves.Internal.Trace.CRE

type Rep (CREWave dom) Source # 
Instance details

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))))

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.