clash-protocols
Safe HaskellNone
LanguageGHC2021

Protocols.Experimental.Axi4.Stream

Description

Types and instance declarations for the AXI4-stream protocol.

Synopsis

Documentation

data Axi4StreamConfig Source #

Configuration for AXI4 Stream protocol. Determines the width of some fields in Axi4StreamM2S.

Constructors

Axi4StreamConfig 

type family DataWidth (conf :: Axi4StreamConfig) :: Nat where ... Source #

Grab _dataWidth at the type level.

Equations

DataWidth ('Axi4StreamConfig a _1 _2) = a 

type family IdWidth (conf :: Axi4StreamConfig) :: Nat where ... Source #

Grab _idWidth at the type level.

Equations

IdWidth ('Axi4StreamConfig _1 a _2) = a 

type family DestWidth (conf :: Axi4StreamConfig) :: Nat where ... Source #

Grab _destWidth at the type level.

Equations

DestWidth ('Axi4StreamConfig _1 _2 a) = a 

type KnownAxi4StreamConfig (conf :: Axi4StreamConfig) = (KnownNat (DataWidth conf), KnownNat (IdWidth conf), KnownNat (DestWidth conf)) Source #

Shorthand for a "well-behaved" config, so that we don't need to write out a bunch of type constraints later. Holds for every configuration; don't worry about implementing this class.

data Axi4StreamM2S (conf :: Axi4StreamConfig) userType Source #

Data sent from manager to subordinate. The tvalid field is left out: messages with tvalid = False should be sent as a Nothing.

Constructors

Axi4StreamM2S 

Fields

Instances

Instances details
Bundle (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

bundle :: forall (dom :: Domain). Unbundled dom (Axi4StreamM2S conf userType) -> Signal dom (Axi4StreamM2S conf userType) #

unbundle :: forall (dom :: Domain). Signal dom (Axi4StreamM2S conf userType) -> Unbundled dom (Axi4StreamM2S conf userType) #

(KnownAxi4StreamConfig conf, NFDataX userType) => NFDataX (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

deepErrorX :: String -> Axi4StreamM2S conf userType #

hasUndefined :: Axi4StreamM2S conf userType -> Bool #

ensureSpine :: Axi4StreamM2S conf userType -> Axi4StreamM2S conf userType #

rnfX :: Axi4StreamM2S conf userType -> () #

ShowX userType => ShowX (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

showsPrecX :: Int -> Axi4StreamM2S conf userType -> ShowS #

showX :: Axi4StreamM2S conf userType -> String #

showListX :: [Axi4StreamM2S conf userType] -> ShowS #

NFData userType => NFData (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

rnf :: Axi4StreamM2S conf userType -> () #

Generic (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Associated Types

type Rep (Axi4StreamM2S conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Rep (Axi4StreamM2S conf userType) = D1 ('MetaData "Axi4StreamM2S" "Protocols.Experimental.Axi4.Stream" "clash-protocols-0.1-inplace" 'False) (C1 ('MetaCons "Axi4StreamM2S" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_tdata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vec (DataWidth conf) (Unsigned 8))) :*: (S1 ('MetaSel ('Just "_tkeep") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vec (DataWidth conf) Bool)) :*: S1 ('MetaSel ('Just "_tstrb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vec (DataWidth conf) Bool)))) :*: ((S1 ('MetaSel ('Just "_tlast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_tid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Unsigned (IdWidth conf)))) :*: (S1 ('MetaSel ('Just "_tdest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Unsigned (DestWidth conf))) :*: S1 ('MetaSel ('Just "_tuser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 userType)))))

Methods

from :: Axi4StreamM2S conf userType -> Rep (Axi4StreamM2S conf userType) x #

to :: Rep (Axi4StreamM2S conf userType) x -> Axi4StreamM2S conf userType #

Show userType => Show (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

showsPrec :: Int -> Axi4StreamM2S conf userType -> ShowS #

show :: Axi4StreamM2S conf userType -> String #

showList :: [Axi4StreamM2S conf userType] -> ShowS #

(KnownAxi4StreamConfig conf, Eq userType) => Eq (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

(==) :: Axi4StreamM2S conf userType -> Axi4StreamM2S conf userType -> Bool #

(/=) :: Axi4StreamM2S conf userType -> Axi4StreamM2S conf userType -> Bool #

(KnownAxi4StreamConfig conf, Hashable userType) => Hashable (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

hashWithSalt :: Int -> Axi4StreamM2S conf userType -> Int #

hash :: Axi4StreamM2S conf userType -> Int #

type Unbundled dom (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Unbundled dom (Axi4StreamM2S conf userType) = Signal dom (Axi4StreamM2S conf userType)
type Rep (Axi4StreamM2S conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Rep (Axi4StreamM2S conf userType) = D1 ('MetaData "Axi4StreamM2S" "Protocols.Experimental.Axi4.Stream" "clash-protocols-0.1-inplace" 'False) (C1 ('MetaCons "Axi4StreamM2S" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_tdata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vec (DataWidth conf) (Unsigned 8))) :*: (S1 ('MetaSel ('Just "_tkeep") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vec (DataWidth conf) Bool)) :*: S1 ('MetaSel ('Just "_tstrb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vec (DataWidth conf) Bool)))) :*: ((S1 ('MetaSel ('Just "_tlast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_tid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Unsigned (IdWidth conf)))) :*: (S1 ('MetaSel ('Just "_tdest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Unsigned (DestWidth conf))) :*: S1 ('MetaSel ('Just "_tuser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 userType)))))

newtype Axi4StreamS2M Source #

Data sent from subordinate to manager. A simple acknowledge message. _tready may be on even when manager is sending Nothing. Manager may not decide whether or not to send Nothing based on the _tready signal.

Constructors

Axi4StreamS2M 

Fields

Instances

Instances details
Bundle Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Associated Types

type Unbundled dom Axi4StreamS2M 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

bundle :: forall (dom :: Domain). Unbundled dom Axi4StreamS2M -> Signal dom Axi4StreamS2M #

unbundle :: forall (dom :: Domain). Signal dom Axi4StreamS2M -> Unbundled dom Axi4StreamS2M #

NFDataX Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

ShowX Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

NFData Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

rnf :: Axi4StreamS2M -> () #

Generic Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Associated Types

type Rep Axi4StreamS2M 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Rep Axi4StreamS2M = D1 ('MetaData "Axi4StreamS2M" "Protocols.Experimental.Axi4.Stream" "clash-protocols-0.1-inplace" 'True) (C1 ('MetaCons "Axi4StreamS2M" 'PrefixI 'True) (S1 ('MetaSel ('Just "_tready") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
Show Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Eq Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Rep Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Rep Axi4StreamS2M = D1 ('MetaData "Axi4StreamS2M" "Protocols.Experimental.Axi4.Stream" "clash-protocols-0.1-inplace" 'True) (C1 ('MetaCons "Axi4StreamS2M" 'PrefixI 'True) (S1 ('MetaSel ('Just "_tready") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
type Unbundled dom Axi4StreamS2M Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

data Axi4Stream (dom :: Domain) (conf :: Axi4StreamConfig) userType Source #

Type for AXI4 Stream protocol.

Instances

Instances details
(KnownAxi4StreamConfig conf, NFDataX userType) => DfConv (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Associated Types

type Dom (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Dom (Axi4Stream dom conf userType) = dom
type BwdPayload (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type BwdPayload (Axi4Stream dom conf userType) = ()
type FwdPayload (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type FwdPayload (Axi4Stream dom conf userType) = Axi4StreamM2S conf userType

Methods

toDfCircuit :: Proxy (Axi4Stream dom conf userType) -> Circuit (Df (Dom (Axi4Stream dom conf userType)) (FwdPayload (Axi4Stream dom conf userType)), Reverse (Df (Dom (Axi4Stream dom conf userType)) (BwdPayload (Axi4Stream dom conf userType)))) (Axi4Stream dom conf userType) Source #

fromDfCircuit :: Proxy (Axi4Stream dom conf userType) -> Circuit (Axi4Stream dom conf userType) (Df (Dom (Axi4Stream dom conf userType)) (FwdPayload (Axi4Stream dom conf userType)), Reverse (Df (Dom (Axi4Stream dom conf userType)) (BwdPayload (Axi4Stream dom conf userType)))) Source #

(KnownAxi4StreamConfig conf, NFDataX userType, NFData userType, ShowX userType, Show userType, Eq userType, KnownDomain dom) => Test (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

expectN :: (HasCallStack, MonadTest m) => Proxy (Axi4Stream dom conf userType) -> ExpectOptions -> SimulateFwdType (Axi4Stream dom conf userType) -> m (ExpectType (Axi4Stream dom conf userType)) Source #

Backpressure (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Methods

boolsToBwd :: Proxy (Axi4Stream dom conf userType) -> [Bool] -> Bwd (Axi4Stream dom conf userType) Source #

(KnownAxi4StreamConfig conf, NFDataX userType, KnownDomain dom) => Drivable (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Associated Types

type ExpectType (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type ExpectType (Axi4Stream dom conf userType) = [Axi4StreamM2S conf userType]

Methods

toSimulateType :: Proxy (Axi4Stream dom conf userType) -> ExpectType (Axi4Stream dom conf userType) -> SimulateFwdType (Axi4Stream dom conf userType) Source #

fromSimulateType :: Proxy (Axi4Stream dom conf userType) -> SimulateFwdType (Axi4Stream dom conf userType) -> ExpectType (Axi4Stream dom conf userType) Source #

driveC :: SimulationConfig -> SimulateFwdType (Axi4Stream dom conf userType) -> Circuit () (Axi4Stream dom conf userType) Source #

sampleC :: SimulationConfig -> Circuit () (Axi4Stream dom conf userType) -> SimulateFwdType (Axi4Stream dom conf userType) Source #

(KnownAxi4StreamConfig conf, NFDataX userType, KnownDomain dom) => Simulate (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Associated Types

type SimulateFwdType (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type SimulateFwdType (Axi4Stream dom conf userType) = [Maybe (Axi4StreamM2S conf userType)]
type SimulateBwdType (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type SimulateBwdType (Axi4Stream dom conf userType) = [Axi4StreamS2M]
type SimulateChannels (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type SimulateChannels (Axi4Stream dom conf userType) = 1

Methods

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

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

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

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

stallC :: SimulationConfig -> Vec (SimulateChannels (Axi4Stream dom conf userType)) (StallAck, [Int]) -> Circuit (Axi4Stream dom conf userType) (Axi4Stream 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 #

Protocol (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

Associated Types

type Fwd (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Fwd (Axi4Stream dom conf userType) = Signal dom (Maybe (Axi4StreamM2S conf userType))
type Bwd (Axi4Stream dom conf userType) 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Bwd (Axi4Stream dom conf userType) = Signal dom Axi4StreamS2M
type BwdPayload (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type BwdPayload (Axi4Stream dom conf userType) = ()
type Dom (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Dom (Axi4Stream dom conf userType) = dom
type FwdPayload (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type FwdPayload (Axi4Stream dom conf userType) = Axi4StreamM2S conf userType
type ExpectType (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type ExpectType (Axi4Stream dom conf userType) = [Axi4StreamM2S conf userType]
type SimulateBwdType (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type SimulateBwdType (Axi4Stream dom conf userType) = [Axi4StreamS2M]
type SimulateChannels (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type SimulateChannels (Axi4Stream dom conf userType) = 1
type SimulateFwdType (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type SimulateFwdType (Axi4Stream dom conf userType) = [Maybe (Axi4StreamM2S conf userType)]
type Bwd (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Bwd (Axi4Stream dom conf userType) = Signal dom Axi4StreamS2M
type Fwd (Axi4Stream dom conf userType) Source # 
Instance details

Defined in Protocols.Experimental.Axi4.Stream

type Fwd (Axi4Stream dom conf userType) = Signal dom (Maybe (Axi4StreamM2S conf userType))

forceResetSanity :: forall (dom :: Domain) (conf :: Axi4StreamConfig) userType. (KnownDomain dom, HiddenReset dom) => Circuit (Axi4Stream dom conf userType) (Axi4Stream dom conf userType) Source #

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

Orphan instances

KnownNat n => Hashable (Unsigned n) Source # 
Instance details

Methods

hashWithSalt :: Int -> Unsigned n -> Int #

hash :: Unsigned n -> Int #

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

Methods

hashWithSalt :: Int -> Vec n a -> Int #

hash :: Vec n a -> Int #