Static helpers that pack and unpack the 32-bit immediate data word: a 2-bit flags field (bits 31-30), a 6-bit source field (bits 29-24) and a 24-bit index field (bits 23-0).
More...
#include <utilities.hh>
|
| static unsigned | flg (uint32_t data) |
| | Return the 2-bit flags field (bits 31-30) of data.
|
| |
| static unsigned | src (uint32_t data) |
| | Return the 6-bit source field (bits 29-24) of data.
|
| |
| static unsigned | idx (uint32_t data) |
| | Return the 24-bit index field (bits 23-0) of data.
|
| |
| static unsigned | flg (uint32_t data, unsigned v) |
| | Return data with its flags field replaced by v (v is masked to the field width).
|
| |
| static unsigned | src (uint32_t data, unsigned v) |
| | Return data with its source field replaced by v (v is masked to the field width).
|
| |
| static unsigned | idx (uint32_t data, unsigned v) |
| | Return data with its index field replaced by v (v is masked to the field width).
|
| |
| static uint32_t | value (unsigned f, unsigned s, unsigned i) |
| | Build an immediate data word from flags f, source s and index i, each masked to its field width.
|
| |
| static unsigned | rsp (unsigned f) |
| | Return the NoResponse bit of flags f (2 if set, else 0).
|
| |
| static unsigned | buf (unsigned f) |
| | Return the Buffer bit of flags f (1 if set, else 0).
|
| |
Static helpers that pack and unpack the 32-bit immediate data word: a 2-bit flags field (bits 31-30), a 6-bit source field (bits 29-24) and a 24-bit index field (bits 23-0).
◆ anonymous enum
Mask and shifted mask of the response bit (bit 1) within the flags field.
| Enumerator |
|---|
| m_rsp | Mask of the response bit before shifting (1).
|
| s_rsp | Response bit in place (value 2); used by rsp().
|
◆ anonymous enum
Mask and shifted mask of the buffer bit (bit 0) within the flags field.
| Enumerator |
|---|
| m_buf | Mask of the buffer bit before shifting (1).
|
| s_buf | Buffer bit in place (value 1); used by buf().
|
◆ anonymous enum
The four combinations of the Flags bits.
| Enumerator |
|---|
| Response_Transition | Response | Transition (0).
|
| Response_Buffer | Response | Buffer (1).
|
| NoResponse_Transition | NoResponse | Transition (2).
|
| NoResponse_Buffer | NoResponse | Buffer (3).
|
◆ anonymous enum
Largest values that fit in the source and index fields.
| Enumerator |
|---|
| MaxSrc | Largest source value, 63 (6-bit mask).
|
| MaxIdx | Largest index value, 0xffffff (24-bit mask).
|
◆ Flags
Values for the flags field.
Bit 0 selects Transition or Buffer, bit 1 selects Response or NoResponse. The original comment notes that the word must not become zero for non-L1Accepts because the monitor request protocol depends on it.
| Enumerator |
|---|
| Transition | Bit 0 clear (0).
|
| Buffer | Bit 0 set (1).
|
| Response | Bit 1 clear (0).
|
| NoResponse | Bit 1 set (2).
|
◆ ImmData()
| Pds::Eb::ImmData::ImmData |
( |
| ) |
|
|
inline |
Does nothing; empty body.
◆ ~ImmData()
| Pds::Eb::ImmData::~ImmData |
( |
| ) |
|
|
inline |
Does nothing; empty body.
◆ buf()
| static unsigned Pds::Eb::ImmData::buf |
( |
unsigned |
f | ) |
|
|
inlinestatic |
Return the Buffer bit of flags f (1 if set, else 0).
◆ flg() [1/2]
| static unsigned Pds::Eb::ImmData::flg |
( |
uint32_t |
data | ) |
|
|
inlinestatic |
Return the 2-bit flags field (bits 31-30) of data.
◆ flg() [2/2]
| static unsigned Pds::Eb::ImmData::flg |
( |
uint32_t |
data, |
|
|
unsigned |
v |
|
) |
| |
|
inlinestatic |
Return data with its flags field replaced by v (v is masked to the field width).
◆ idx() [1/2]
| static unsigned Pds::Eb::ImmData::idx |
( |
uint32_t |
data | ) |
|
|
inlinestatic |
Return the 24-bit index field (bits 23-0) of data.
◆ idx() [2/2]
| static unsigned Pds::Eb::ImmData::idx |
( |
uint32_t |
data, |
|
|
unsigned |
v |
|
) |
| |
|
inlinestatic |
Return data with its index field replaced by v (v is masked to the field width).
◆ rsp()
| static unsigned Pds::Eb::ImmData::rsp |
( |
unsigned |
f | ) |
|
|
inlinestatic |
Return the NoResponse bit of flags f (2 if set, else 0).
◆ src() [1/2]
| static unsigned Pds::Eb::ImmData::src |
( |
uint32_t |
data | ) |
|
|
inlinestatic |
Return the 6-bit source field (bits 29-24) of data.
◆ src() [2/2]
| static unsigned Pds::Eb::ImmData::src |
( |
uint32_t |
data, |
|
|
unsigned |
v |
|
) |
| |
|
inlinestatic |
Return data with its source field replaced by v (v is masked to the field width).
◆ value()
| static uint32_t Pds::Eb::ImmData::value |
( |
unsigned |
f, |
|
|
unsigned |
s, |
|
|
unsigned |
i |
|
) |
| |
|
inlinestatic |
Build an immediate data word from flags f, source s and index i, each masked to its field width.
The documentation for this class was generated from the following file: