| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Protocols.Experimental.Axi4.Common
Description
Shared types and helpers for the experimental AXI4-family channel definitions.
Synopsis
- type BurstType (keep :: Bool) = KeepType keep BurstMode
- type BurstLengthType (keep :: Bool) = KeepType keep (Index (2 ^ 8))
- type AwCacheType (keep :: Bool) = KeepType keep AwCache
- type ArCacheType (keep :: Bool) = KeepType keep ArCache
- type LastType (keep :: Bool) = KeepType keep Bool
- type LockType (keep :: Bool) = KeepType keep AtomicAccess
- type PermissionsType (keep :: Bool) = KeepType keep Permissions
- type QosType (keep :: Bool) = KeepType keep Qos
- type RegionType (keep :: Bool) = KeepType keep (BitVector 4)
- type ResponseType (keep :: Bool) = KeepType keep Resp
- type SizeType (keep :: Bool) = KeepType keep BurstSize
- type StrictStrobeType (byteSize :: Nat) (keepStrobe :: Bool) = Vec byteSize (StrobeDataType keepStrobe)
- type family StrobeDataType (keepStrobe :: Bool) = (t :: Type) | t -> keepStrobe where ...
- class KeepStrobeClass (keepStrobe :: Bool) where
- getKeepStrobe :: StrobeDataType keepStrobe -> Bool
- toStrobeDataType :: Bool -> BitVector 8 -> StrobeDataType keepStrobe
- fromStrobeDataType :: StrobeDataType keepStrobe -> Maybe (BitVector 8)
- type Qos = Index ((2 ^ 4) - 1)
- data BurstMode
- data BurstSize
- burstSizeToNum :: Num a => BurstSize -> a
- data Bufferable
- data Allocate
- data OtherAllocate
- type AwCache = (Bufferable, Modifiable, OtherAllocate, Allocate)
- type ArCache = (Bufferable, Modifiable, Allocate, OtherAllocate)
- data Resp
- data AtomicAccess
- data Modifiable
- data Secure
- data Privileged
- data InstructionOrData
- = Data
- | Instruction
- type Permissions = (Privileged, Secure, InstructionOrData)
Documentation
type BurstLengthType (keep :: Bool) = KeepType keep (Index (2 ^ 8)) Source #
Enables or disables burst length
type AwCacheType (keep :: Bool) = KeepType keep AwCache Source #
Enables or disables the AwCache for Write Address operations
type ArCacheType (keep :: Bool) = KeepType keep ArCache Source #
Enables or disables the ArCache for Read Address operations
type LastType (keep :: Bool) = KeepType keep Bool Source #
Enables or disables a boolean indicating whether a transaction is done
type LockType (keep :: Bool) = KeepType keep AtomicAccess Source #
Enables or disables AtomicAccess
type PermissionsType (keep :: Bool) = KeepType keep Permissions Source #
Enables or disables Permissions
type RegionType (keep :: Bool) = KeepType keep (BitVector 4) Source #
Enables or disables region type
type StrictStrobeType (byteSize :: Nat) (keepStrobe :: Bool) = Vec byteSize (StrobeDataType keepStrobe) Source #
byteSize bytes of data,
with keepStrobe determining whether to include a strobe value or not.
type family StrobeDataType (keepStrobe :: Bool) = (t :: Type) | t -> keepStrobe where ... Source #
Enable or disable a strobe value.
Equations
| StrobeDataType 'True = Maybe (BitVector 8) | |
| StrobeDataType 'False = BitVector 8 |
class KeepStrobeClass (keepStrobe :: Bool) where Source #
We want to define operations on StrobeDataType that work for both possibilities
(keepStrobe = 'True and keepStrobe = 'False), but we can't pattern match directly.
Instead we need to define a class and instantiate
the class for both 'True and 'False.
Methods
getKeepStrobe :: StrobeDataType keepStrobe -> Bool Source #
Get the value of keepStrobe at the term level.
toStrobeDataType :: Bool -> BitVector 8 -> StrobeDataType keepStrobe Source #
Convert a byte into a possibly-strobed byte.
The Bool value determines the strobe value
if strobe is enabled.
fromStrobeDataType :: StrobeDataType keepStrobe -> Maybe (BitVector 8) Source #
Convert a possibly-strobed byte into a byte,
or Nothing if strobe is enabled and strobe = false.
Instances
| KeepStrobeClass 'False Source # | |
Defined in Protocols.Experimental.Axi4.Common Methods getKeepStrobe :: StrobeDataType 'False -> Bool Source # toStrobeDataType :: Bool -> BitVector 8 -> StrobeDataType 'False Source # fromStrobeDataType :: StrobeDataType 'False -> Maybe (BitVector 8) Source # | |
| KeepStrobeClass 'True Source # | |
Defined in Protocols.Experimental.Axi4.Common Methods getKeepStrobe :: StrobeDataType 'True -> Bool Source # toStrobeDataType :: Bool -> BitVector 8 -> StrobeDataType 'True Source # fromStrobeDataType :: StrobeDataType 'True -> Maybe (BitVector 8) Source # | |
type Qos = Index ((2 ^ 4) - 1) Source #
The protocol does not specify the exact use of the QoS identifier. This AXI specification recommends that AxQOS is used as a priority indicator for the associated write or read transaction. A higher value indicates a higher priority transaction.
A default value of 0 indicates that the interface is not participating in any QoS scheme.
The burst type and the size information, determine how the address for each transfer within the burst is calculated.
Constructors
| BmFixed | In a fixed burst, the address is the same for every transfer in the burst. This burst type is used for repeated accesses to the same location such as when loading or emptying a FIFO |
| BmIncr | Incrementing. In an incrementing burst, the address for each transfer in the burst is an increment of the address for the previous transfer. The increment value depends on the size of the transfer. For example, the address for each transfer in a burst with a size of four bytes is the previous address plus four. This burst type is used for accesses to normal sequential memory. |
| BmWrap | A wrapping burst is similar to an incrementing burst, except that the address wraps around to a lower address if an upper address limit is reached. The following restrictions apply to wrapping bursts:
The behavior of a wrapping burst is:
This burst type is used for cache line accesses. |
Instances
The maximum number of bytes to transfer in each data transfer, or beat, in a burst.
Instances
| BitPack BurstSize Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| NFDataX BurstSize Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> BurstSize # hasUndefined :: BurstSize -> Bool # ensureSpine :: BurstSize -> BurstSize # | |||||
| ShowX BurstSize Source # | |||||
| NFData BurstSize Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| Generic BurstSize Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show BurstSize Source # | |||||
| Eq BurstSize Source # | |||||
| type BitSize BurstSize Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type Rep BurstSize Source # | |||||
Defined in Protocols.Experimental.Axi4.Common type Rep BurstSize = D1 ('MetaData "BurstSize" "Protocols.Experimental.Axi4.Common" "clash-protocols-0.1-inplace" 'False) (((C1 ('MetaCons "Bs1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Bs2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Bs4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Bs8" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Bs16" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Bs32" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Bs64" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Bs128" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
burstSizeToNum :: Num a => BurstSize -> a Source #
Convert burst size to a numeric value
data Bufferable Source #
Whether a transaction is bufferable
Constructors
| NonBufferable | |
| Bufferable |
Instances
| BitPack Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
Methods pack :: Bufferable -> BitVector (BitSize Bufferable) # unpack :: BitVector (BitSize Bufferable) -> Bufferable # | |||||
| NFDataX Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> Bufferable # hasUndefined :: Bufferable -> Bool # ensureSpine :: Bufferable -> Bufferable # rnfX :: Bufferable -> () # | |||||
| ShowX Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrecX :: Int -> Bufferable -> ShowS # showX :: Bufferable -> String # showListX :: [Bufferable] -> ShowS # | |||||
| NFData Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods rnf :: Bufferable -> () # | |||||
| Generic Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrec :: Int -> Bufferable -> ShowS # show :: Bufferable -> String # showList :: [Bufferable] -> ShowS # | |||||
| Eq Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type BitSize Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type Rep Bufferable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
When set to LookupCache, it is recommended that this transaction is allocated in the cache for performance reasons.
Constructors
| NoLookupCache | |
| LookupCache |
Instances
| BitPack Allocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| NFDataX Allocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> Allocate # hasUndefined :: Allocate -> Bool # ensureSpine :: Allocate -> Allocate # | |||||
| ShowX Allocate Source # | |||||
| NFData Allocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| Generic Allocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show Allocate Source # | |||||
| Eq Allocate Source # | |||||
| type BitSize Allocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type Rep Allocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
data OtherAllocate Source #
When set to OtherLookupCache, it is recommended that this transaction is allocated in the cache for performance reasons.
Constructors
| OtherNoLookupCache | |
| OtherLookupCache |
Instances
| BitPack OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
Methods pack :: OtherAllocate -> BitVector (BitSize OtherAllocate) # unpack :: BitVector (BitSize OtherAllocate) -> OtherAllocate # | |||||
| NFDataX OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> OtherAllocate # hasUndefined :: OtherAllocate -> Bool # ensureSpine :: OtherAllocate -> OtherAllocate # rnfX :: OtherAllocate -> () # | |||||
| ShowX OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrecX :: Int -> OtherAllocate -> ShowS # showX :: OtherAllocate -> String # showListX :: [OtherAllocate] -> ShowS # | |||||
| NFData OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods rnf :: OtherAllocate -> () # | |||||
| Generic OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrec :: Int -> OtherAllocate -> ShowS # show :: OtherAllocate -> String # showList :: [OtherAllocate] -> ShowS # | |||||
| Eq OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods (==) :: OtherAllocate -> OtherAllocate -> Bool # (/=) :: OtherAllocate -> OtherAllocate -> Bool # | |||||
| type BitSize OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common type BitSize OtherAllocate = CLog 2 (GConstructorCount (Rep OtherAllocate)) + GFieldSize (Rep OtherAllocate) | |||||
| type Rep OtherAllocate Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
type AwCache = (Bufferable, Modifiable, OtherAllocate, Allocate) Source #
Memory attributes. Note that the Allocate and OtherAllocate bits are
in different positions for read and write requests.
type ArCache = (Bufferable, Modifiable, Allocate, OtherAllocate) Source #
Memory attributes. Note that the Allocate and OtherAllocate bits are
in different positions for read and write requests.
Status of the write transaction.
Constructors
| ROkay | Normal access success. Indicates that a normal access has been successful. Can also indicate an exclusive access has failed. |
| RExclusiveOkay | Exclusive access okay. Indicates that either the read or write portion of an exclusive access has been successful. |
| RSlaveError | Slave error. Used when the access has reached the slave successfully, but the slave wishes to return an error condition to the originating master. |
| RDecodeError | Decode error. Generated, typically by an interconnect component, to indicate that there is no slave at the transaction address. |
Instances
| BitPack Resp Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| NFDataX Resp Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| ShowX Resp Source # | |||||
| NFData Resp Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| Generic Resp Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show Resp Source # | |||||
| Eq Resp Source # | |||||
| type BitSize Resp Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type Rep Resp Source # | |||||
Defined in Protocols.Experimental.Axi4.Common type Rep Resp = D1 ('MetaData "Resp" "Protocols.Experimental.Axi4.Common" "clash-protocols-0.1-inplace" 'False) ((C1 ('MetaCons "ROkay" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RExclusiveOkay" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RSlaveError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RDecodeError" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data AtomicAccess Source #
Whether a resource is accessed with exclusive access or not
Constructors
| NonExclusiveAccess | |
| ExclusiveAccess |
Instances
| BitPack AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
Methods pack :: AtomicAccess -> BitVector (BitSize AtomicAccess) # unpack :: BitVector (BitSize AtomicAccess) -> AtomicAccess # | |||||
| NFDataX AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> AtomicAccess # hasUndefined :: AtomicAccess -> Bool # ensureSpine :: AtomicAccess -> AtomicAccess # rnfX :: AtomicAccess -> () # | |||||
| ShowX AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrecX :: Int -> AtomicAccess -> ShowS # showX :: AtomicAccess -> String # showListX :: [AtomicAccess] -> ShowS # | |||||
| NFData AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods rnf :: AtomicAccess -> () # | |||||
| Generic AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrec :: Int -> AtomicAccess -> ShowS # show :: AtomicAccess -> String # showList :: [AtomicAccess] -> ShowS # | |||||
| Eq AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type BitSize AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common type BitSize AtomicAccess = CLog 2 (GConstructorCount (Rep AtomicAccess)) + GFieldSize (Rep AtomicAccess) | |||||
| type Rep AtomicAccess Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
data Modifiable Source #
Whether transaction can be modified
Constructors
| Modifiable | |
| NonModifiable |
Instances
| BitPack Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
Methods pack :: Modifiable -> BitVector (BitSize Modifiable) # unpack :: BitVector (BitSize Modifiable) -> Modifiable # | |||||
| NFDataX Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> Modifiable # hasUndefined :: Modifiable -> Bool # ensureSpine :: Modifiable -> Modifiable # rnfX :: Modifiable -> () # | |||||
| ShowX Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrecX :: Int -> Modifiable -> ShowS # showX :: Modifiable -> String # showListX :: [Modifiable] -> ShowS # | |||||
| NFData Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods rnf :: Modifiable -> () # | |||||
| Generic Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrec :: Int -> Modifiable -> ShowS # show :: Modifiable -> String # showList :: [Modifiable] -> ShowS # | |||||
| Eq Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type BitSize Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type Rep Modifiable Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
An AXI master might support Secure and Non-secure operating states, and extend this concept of security to memory access.
Instances
| BitPack Secure Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| NFDataX Secure Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> Secure # hasUndefined :: Secure -> Bool # ensureSpine :: Secure -> Secure # | |||||
| ShowX Secure Source # | |||||
| NFData Secure Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| Generic Secure Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| Show Secure Source # | |||||
| Eq Secure Source # | |||||
| type BitSize Secure Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type Rep Secure Source # | |||||
data Privileged Source #
An AXI master might support more than one level of operating privilege, and extend this concept of privilege to memory access.
Constructors
| NotPrivileged | |
| Privileged |
Instances
| BitPack Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
Methods pack :: Privileged -> BitVector (BitSize Privileged) # unpack :: BitVector (BitSize Privileged) -> Privileged # | |||||
| NFDataX Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> Privileged # hasUndefined :: Privileged -> Bool # ensureSpine :: Privileged -> Privileged # rnfX :: Privileged -> () # | |||||
| ShowX Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrecX :: Int -> Privileged -> ShowS # showX :: Privileged -> String # showListX :: [Privileged] -> ShowS # | |||||
| NFData Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods rnf :: Privileged -> () # | |||||
| Generic Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
| |||||
| Show Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrec :: Int -> Privileged -> ShowS # show :: Privileged -> String # showList :: [Privileged] -> ShowS # | |||||
| Eq Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type BitSize Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
| type Rep Privileged Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
data InstructionOrData Source #
Whether the transaction is an instruction access or a data access. The AXI protocol defines this indication as a hint. It is not accurate in all cases, for example, where a transaction contains a mix of instruction and data items. This specification recommends that a master sets it to Data, to indicate a data access unless the access is specifically known to be an instruction access.
Constructors
| Data | |
| Instruction |
Instances
| BitPack InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
Methods pack :: InstructionOrData -> BitVector (BitSize InstructionOrData) # unpack :: BitVector (BitSize InstructionOrData) -> InstructionOrData # | |||||
| NFDataX InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods deepErrorX :: String -> InstructionOrData # hasUndefined :: InstructionOrData -> Bool # ensureSpine :: InstructionOrData -> InstructionOrData # rnfX :: InstructionOrData -> () # | |||||
| ShowX InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrecX :: Int -> InstructionOrData -> ShowS # showX :: InstructionOrData -> String # showListX :: [InstructionOrData] -> ShowS # | |||||
| NFData InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods rnf :: InstructionOrData -> () # | |||||
| Generic InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Associated Types
Methods from :: InstructionOrData -> Rep InstructionOrData x # to :: Rep InstructionOrData x -> InstructionOrData # | |||||
| Show InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods showsPrec :: Int -> InstructionOrData -> ShowS # show :: InstructionOrData -> String # showList :: [InstructionOrData] -> ShowS # | |||||
| Eq InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common Methods (==) :: InstructionOrData -> InstructionOrData -> Bool # (/=) :: InstructionOrData -> InstructionOrData -> Bool # | |||||
| type BitSize InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common type BitSize InstructionOrData = CLog 2 (GConstructorCount (Rep InstructionOrData)) + GFieldSize (Rep InstructionOrData) | |||||
| type Rep InstructionOrData Source # | |||||
Defined in Protocols.Experimental.Axi4.Common | |||||
type Permissions = (Privileged, Secure, InstructionOrData) Source #
Enables or disables Privileged, Secure, and InstructionOrData