Go to the source code of this file.
◆ ADD_FIELD16
#define ADD_FIELD16 |
( |
|
NAME, |
|
|
|
OFFSET, |
|
|
|
BITS |
|
) |
| |
Value: inline uint16_t NAME() {
return bits(_data, OFFSET+BITS-1, OFFSET); } \
inline
void NAME(uint16_t
d) {
replaceBits(_data, OFFSET+BITS-1, OFFSET,
d); }
Definition at line 81 of file copy_engine_defs.hh.
◆ ADD_FIELD32
#define ADD_FIELD32 |
( |
|
NAME, |
|
|
|
OFFSET, |
|
|
|
BITS |
|
) |
| |
Value: inline uint32_t NAME() {
return bits(_data, OFFSET+BITS-1, OFFSET); } \
inline
void NAME(uint32_t
d) {
replaceBits(_data, OFFSET+BITS-1, OFFSET,
d); }
Definition at line 85 of file copy_engine_defs.hh.
◆ ADD_FIELD64
#define ADD_FIELD64 |
( |
|
NAME, |
|
|
|
OFFSET, |
|
|
|
BITS |
|
) |
| |
Value: inline uint64_t NAME() {
return bits(_data, OFFSET+BITS-1, OFFSET); } \
inline
void NAME(uint64_t
d) {
replaceBits(_data, OFFSET+BITS-1, OFFSET,
d); }
Definition at line 89 of file copy_engine_defs.hh.
◆ ADD_FIELD8
#define ADD_FIELD8 |
( |
|
NAME, |
|
|
|
OFFSET, |
|
|
|
BITS |
|
) |
| |
Value: inline uint8_t NAME() {
return bits(_data, OFFSET+BITS-1, OFFSET); } \
inline
void NAME(uint8_t
d) {
replaceBits(_data, OFFSET+BITS-1, OFFSET,
d); }
Definition at line 77 of file copy_engine_defs.hh.
void replaceBits(T &val, int first, int last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.