clash-protocols
Safe HaskellNone
LanguageGHC2021

Protocols.Idle

Description

Utilities to easily create idle circuits for protocols.

Synopsis

Type classes

class Protocol p => IdleCircuit p where Source #

Idle state of a Circuit. Aims to provide no data for both the forward and backward direction. Transactions are not acknowledged.

Methods

idleFwd :: Proxy p -> Fwd p Source #

idleBwd :: Proxy p -> Bwd p Source #

Instances

Instances details
IdleCircuit () Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy () -> Fwd () Source #

idleBwd :: Proxy () -> Bwd () Source #

(IdleCircuit a, KnownNat n) => IdleCircuit (Vec n a) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (Vec n a) -> Fwd (Vec n a) Source #

idleBwd :: Proxy (Vec n a) -> Bwd (Vec n a) Source #

IdleCircuit (Df dom a) Source # 
Instance details

Defined in Protocols.Df

Methods

idleFwd :: Proxy (Df dom a) -> Fwd (Df dom a) Source #

idleBwd :: Proxy (Df dom a) -> Bwd (Df dom a) Source #

KnownManagerConfig config => IdleCircuit (AvalonMmManager dom config) Source # 
Instance details

Defined in Protocols.Experimental.Avalon.MemMap

Methods

idleFwd :: Proxy (AvalonMmManager dom config) -> Fwd (AvalonMmManager dom config) Source #

idleBwd :: Proxy (AvalonMmManager dom config) -> Bwd (AvalonMmManager dom config) Source #

(IdleCircuit a, IdleCircuit b) => IdleCircuit (a, b) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (a, b) -> Fwd (a, b) Source #

idleBwd :: Proxy (a, b) -> Bwd (a, b) Source #

KnownSubordinateConfig config => IdleCircuit (AvalonMmSubordinate dom fixedWaitTime config) Source # 
Instance details

Defined in Protocols.Experimental.Avalon.MemMap

Methods

idleFwd :: Proxy (AvalonMmSubordinate dom fixedWaitTime config) -> Fwd (AvalonMmSubordinate dom fixedWaitTime config) Source #

idleBwd :: Proxy (AvalonMmSubordinate dom fixedWaitTime config) -> Bwd (AvalonMmSubordinate dom fixedWaitTime config) Source #

IdleCircuit (AvalonStream dom conf dataType) Source # 
Instance details

Defined in Protocols.Experimental.Avalon.Stream

Methods

idleFwd :: Proxy (AvalonStream dom conf dataType) -> Fwd (AvalonStream dom conf dataType) Source #

idleBwd :: Proxy (AvalonStream dom conf dataType) -> Bwd (AvalonStream dom conf dataType) Source #

IdleCircuit (Axi4ReadAddress dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.ReadAddress

Methods

idleFwd :: Proxy (Axi4ReadAddress dom conf userType) -> Fwd (Axi4ReadAddress dom conf userType) Source #

idleBwd :: Proxy (Axi4ReadAddress dom conf userType) -> Bwd (Axi4ReadAddress dom conf userType) Source #

IdleCircuit (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

idleFwd :: Proxy (Axi4Stream dom conf userType) -> Fwd (Axi4Stream dom conf userType) Source #

idleBwd :: Proxy (Axi4Stream dom conf userType) -> Bwd (Axi4Stream dom conf userType) Source #

IdleCircuit (Axi4WriteAddress dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.WriteAddress

Methods

idleFwd :: Proxy (Axi4WriteAddress dom conf userType) -> Fwd (Axi4WriteAddress dom conf userType) Source #

idleBwd :: Proxy (Axi4WriteAddress dom conf userType) -> Bwd (Axi4WriteAddress dom conf userType) Source #

IdleCircuit (Axi4WriteData dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.WriteData

Methods

idleFwd :: Proxy (Axi4WriteData dom conf userType) -> Fwd (Axi4WriteData dom conf userType) Source #

idleBwd :: Proxy (Axi4WriteData dom conf userType) -> Bwd (Axi4WriteData dom conf userType) Source #

IdleCircuit (Axi4WriteResponse dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.WriteResponse

Methods

idleFwd :: Proxy (Axi4WriteResponse dom conf userType) -> Fwd (Axi4WriteResponse dom conf userType) Source #

idleBwd :: Proxy (Axi4WriteResponse dom conf userType) -> Bwd (Axi4WriteResponse dom conf userType) Source #

IdleCircuit (PacketStream dom dataWidth meta) Source # 
Instance details

Defined in Protocols.PacketStream.Base

Methods

idleFwd :: Proxy (PacketStream dom dataWidth meta) -> Fwd (PacketStream dom dataWidth meta) Source #

idleBwd :: Proxy (PacketStream dom dataWidth meta) -> Bwd (PacketStream dom dataWidth meta) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3) => IdleCircuit (c1, c2, c3) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3) -> Fwd (c1, c2, c3) Source #

idleBwd :: Proxy (c1, c2, c3) -> Bwd (c1, c2, c3) Source #

IdleCircuit (Axi4ReadData dom conf userType dataType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.ReadData

Methods

idleFwd :: Proxy (Axi4ReadData dom conf userType dataType) -> Fwd (Axi4ReadData dom conf userType dataType) Source #

idleBwd :: Proxy (Axi4ReadData dom conf userType dataType) -> Bwd (Axi4ReadData dom conf userType dataType) Source #

(KnownNat aw, KnownNat dw) => IdleCircuit (Wishbone dom mode aw dw) Source # 
Instance details

Defined in Protocols.Experimental.Wishbone

Methods

idleFwd :: Proxy (Wishbone dom mode aw dw) -> Fwd (Wishbone dom mode aw dw) Source #

idleBwd :: Proxy (Wishbone dom mode aw dw) -> Bwd (Wishbone dom mode aw dw) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4) => IdleCircuit (c1, c2, c3, c4) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4) -> Fwd (c1, c2, c3, c4) Source #

idleBwd :: Proxy (c1, c2, c3, c4) -> Bwd (c1, c2, c3, c4) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5) => IdleCircuit (c1, c2, c3, c4, c5) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5) -> Fwd (c1, c2, c3, c4, c5) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5) -> Bwd (c1, c2, c3, c4, c5) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6) => IdleCircuit (c1, c2, c3, c4, c5, c6) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6) -> Fwd (c1, c2, c3, c4, c5, c6) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6) -> Bwd (c1, c2, c3, c4, c5, c6) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7) -> Fwd (c1, c2, c3, c4, c5, c6, c7) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7) -> Bwd (c1, c2, c3, c4, c5, c6, c7) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9, IdleCircuit c10) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9, IdleCircuit c10, IdleCircuit c11) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9, IdleCircuit c10, IdleCircuit c11, IdleCircuit c12) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) Source # 
Instance details

Defined in Protocols.Idle

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) Source #

Utility functions

idleSource :: IdleCircuit p => Circuit () p Source #

Idle state of a source, this circuit does not produce any data.

idleSink :: IdleCircuit p => Circuit p () Source #

Idle state of a sink, this circuit does not consume any data.

forceResetSanityGeneric :: forall (dom :: Domain) a fwd bwd. (KnownDomain dom, HiddenReset dom, IdleCircuit a, Fwd a ~ Signal dom fwd, Bwd a ~ Signal dom bwd) => Circuit a a Source #

Force a nack on the backward channel and no data on the forward channel if reset is asserted.

Generic helper behind protocol-specific forceResetSanity combinators such as forceResetSanity.

Orphan instances

IdleCircuit () Source # 
Instance details

Methods

idleFwd :: Proxy () -> Fwd () Source #

idleBwd :: Proxy () -> Bwd () Source #

(IdleCircuit a, KnownNat n) => IdleCircuit (Vec n a) Source # 
Instance details

Methods

idleFwd :: Proxy (Vec n a) -> Fwd (Vec n a) Source #

idleBwd :: Proxy (Vec n a) -> Bwd (Vec n a) Source #

(IdleCircuit a, IdleCircuit b) => IdleCircuit (a, b) Source # 
Instance details

Methods

idleFwd :: Proxy (a, b) -> Fwd (a, b) Source #

idleBwd :: Proxy (a, b) -> Bwd (a, b) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3) => IdleCircuit (c1, c2, c3) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3) -> Fwd (c1, c2, c3) Source #

idleBwd :: Proxy (c1, c2, c3) -> Bwd (c1, c2, c3) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4) => IdleCircuit (c1, c2, c3, c4) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4) -> Fwd (c1, c2, c3, c4) Source #

idleBwd :: Proxy (c1, c2, c3, c4) -> Bwd (c1, c2, c3, c4) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5) => IdleCircuit (c1, c2, c3, c4, c5) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5) -> Fwd (c1, c2, c3, c4, c5) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5) -> Bwd (c1, c2, c3, c4, c5) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6) => IdleCircuit (c1, c2, c3, c4, c5, c6) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6) -> Fwd (c1, c2, c3, c4, c5, c6) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6) -> Bwd (c1, c2, c3, c4, c5, c6) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7) -> Fwd (c1, c2, c3, c4, c5, c6, c7) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7) -> Bwd (c1, c2, c3, c4, c5, c6, c7) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9, IdleCircuit c10) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9, IdleCircuit c10, IdleCircuit c11) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11) Source #

(IdleCircuit c1, IdleCircuit c2, IdleCircuit c3, IdleCircuit c4, IdleCircuit c5, IdleCircuit c6, IdleCircuit c7, IdleCircuit c8, IdleCircuit c9, IdleCircuit c10, IdleCircuit c11, IdleCircuit c12) => IdleCircuit (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) Source # 
Instance details

Methods

idleFwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) -> Fwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) Source #

idleBwd :: Proxy (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) -> Bwd (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12) Source #