Standard Support Packet v1.0 extension to Efficient Trace for RISC-V v2.0

Standard Support Packet v1.0 extension to Efficient Trace for RISC-V v2.0

This chapter is in the Ratified state.

No changes are allowed. Any desired or needed changes can be the subject of a follow-on new extension. Ratified extensions are never revised.

The Efficient Trace for RISC-V v2.0 specification defines a support packet (see Format 3 Subformat 3) and when it must be sent. The general requirements for the content of this packet are described, but the exact details of the payload is left to the implementor. The original thinking was that this left flexibility for different encoder implementations to provide support information best suited to their specific capabilities, as well as allowing implementation-specific customizations.

However, this flexibility presents difficulties for applications such as Self-hosted Trace, where the operating system and decoding software need a single, consistent, standardized format. Furthermore, correct trace decoding is dependent on several discoverable attributes of the trace encoder. But in a Self-hosted context, the decoder will not be aware of which physical encoder instance is producing the trace it is decoding, and so will be unable to discover these attributes. This issue can be addressed by including these attributes directly in the support packet.

Additionally, the fully orthogonal Implicit Return and Multi-Memory Access and Compare and Swap extensions introduce revised te_inst and te_data packet formats, but the monotonically increasing protocol version does not provide a mechansim to indicate independent presence or absence of these extentions (see trTeImpl.trTeProtocolMajor and trTeImpl.trTeProtocolMinor in RISC-V Trace Control Interface Specification). This can resolved by indicating the presence of thes extensions directly in the support packet.

If this extension is implemented, the protocol version must be 2.1 or higher; if the protocol version is 2.1 or higher, this extension must be implemented.

This extension is required by the following extensions:

Standard Support Packet format

Table 1. Packet format 3, subformat 3 suitable for self-hosted applications
Field name Bits Description

format

2

11 (sync): synchronisation

subformat

2

11 (support): Supporting information for the decoder

ienable

1

Indicates if the instruction trace encoder is enabled

encoder_mode

2

Identifies trace algorithm. Currently Branch trace is the only mode defined, indicated by the value 0.

qual_status

2

00 (no_change): No change to filter qualification
01 (ended_rep): Qualification ended, preceding te_inst sent explicitly to indicate final qualification instruction
10 (trace_lost): One or more instruction trace packets lost.
11 (ended_ntr): Qualification ended, preceding te_inst would have been sent anyway due to an updiscon, even if it wasn’t the final qualified instruction

sijump

1

When 1, targets of sequentially inferrable jumps not reported (see Sequentially Inferrable Jumps).

implicit_return

1

When 1, implicit return mode enabled (see Implicit Return).

branch_predictor

1

When 1, branch predictor enabled (see Branch Prediction).

jump_target_cache

1

When 1, jump target cache enabled (see Jump Target Cache).

implicit_except

1

When 1, implicit exception mode enabled (see Implicit Exception).

full_iaddress

1

When 1, te_inst packets always contain full (i.e. non-differential) addresses (see Full Address).

resync_disabled

1

When 1 indicates that resynchronization is disabled (trTeControl.trTeInstSyncMode == 0).

iret_ext

1

When 1, Implicit Return extension to E-trace v2.0 implemented. [Add link when extensions merged]

time_width

3

The width of the time field in sync-start and sync-trap packets (time_width_p) is 16 * time_width bits.

f0s_width

2

The value of f0s_width_p

return_stack_size

3

The number of entries in the return address stack is 2return_stack_size (no stack if 0).

call_counter_size

4

The number of bits in the call counter is 2call_counter_size (no counter if 0).

bpred_size

3

The number of entries in the branch predictor is 2bpred_size (no predictor if 0).

cache_size

3

The number of entries in the jump target cache is 2cache_size (no cache if 0).

denable

1

Indicates if data trace is enabled (if supported).

dloss

1

One of more data trace packets lost (if supported).

mmacas_ext

1

When 1, Multi-Memory Access and Compare & Swap extension to E-trace v2.0 implemented. [Add link when extensions merged]

noaddr

1

When 1, te_data packets exclude addresses (just report data).

nodata

1

When 1, te_data packets exclude data (just report addresses).

full_daddress

1

When 1, addresses in te_data packets are always full (i.e non-differential).

full_data

1

When 1, data values in te_data packets are always full (i.e non-differential).

other

>=0

Any other implementation specific information

Implicit Return v1.0 extension to Efficient Trace for RISC-V v2.0

This chapter is in the Ratified state.

No changes are allowed. Any desired or needed changes can be the subject of a follow-on new extension. Ratified extensions are never revised.

The Implicit Return mode information in the format 0, 1 and 2 packets defined in the Efficient Trace for RISC-V 2.0 specification does not produce correct trace decoding in some cases. This extension corrects this by replacing the irdepth field with irets.

If this extension is implemented, the Standard Support Packet extention to Efficient Trace for RISC-V v2.0 (see Standard Support Packet v1.0 extension to Efficient Trace for RISC-V v2.0) must also be implemented.

Background

As described in Implicit Return, when Implict Return mode is enabled, the target address of function returns is not usually reported. When it is reported (for example because it’s the last instruction retired before a trap), there are some circumstances where the decoder cannot determine precisely which return target it is without some additional information from the encoder.

One such circumstance occurs when decoding recursive functions. Each recursively called function will have the same return target address, and including the depth of the return address stack allowed the decoder to determine which one has been reported. However, it is now known that providing the stack depth results in incorrect decoding in other cases unrelated to recursive functions. Consider the following illustration:

A function is executed, and returns normally to the predicted target, so nothing is reported. Execution continues without any branches or uninferrable calls/jumps to a second function which also contains no branches or uninferrable calls/jumps. The return address of this 2nd function is reported for some reason (e.g. it is followed by a trap). Note that the stack depth is the same after the 1st function returns and after the 2nd function returns. This means that when the decoder reconstructed the execution path based on irdepth, it encountered the 1st return and because the stack depth in the te_inst packet matched the current stack depth it stopped decoding at this point, rather than carrying on to the second return.

Had there been any branches between the two functions or inside the 2nd function, decoding would have continued until all branches were processed (the 1st return would have been correctly treated as inferred), and stopped at the right place: the return target of the 2nd function. Similarly if there were uninferrable calls/jumps.

So in summary, the decoder needs additional information to correctly determine which return target has been reported when there have been multiple returns without any branches or uninferrable calls/jumps between them. This is true for all cases, including recursive functions.

Revised packet formats

The following packet definitions replace those detailed in Packet Formats. All formats and fields are the same, except irdepth is replaced by irets throughout.

Table 2. Packet format 2
Field name Bits Description

format

2

10 (addr-only): differential address and no branch information

address

iaddress_width_p - iaddress_lsb_p

Differential instruction address.

notify

1

If the value of this bit is different from the MSB of address, it indicates that this packet is reporting an instruction that is not the target of an uninferable discontinuity because a notification was requested via trigger[2].

updiscon

1

If the value of this bit is different from notify, it indicates that this packet is reporting the instruction following an uninferable discontinuity and is also the instruction before an exception, privilege change or resync (i.e. it will be followed immediately by a format 3 te_inst).

irreport

1

If the value of this bit is different from updiscon, it indicates that this packet is reporting an instruction that is either: following a return because its address differs from the predicted return address at the top of the implicit return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the implicit return count.

irets

8

If the value of irreport is different from updiscon, this field indicates the number of implicit returns that have occurred since the last branch, or te_inst packet if there have been no branches since then. If irreport is the same value as updiscon, all bits in this field will also be the same value as updiscon.

Format 2 irreport and irets

These bits are encoded so that most of the time they will take the same value as the updiscon field, and will therefore compress away, having no impact on the encoding efficiency. If Implicit Return mode is enabled, the encoder keeps track of function calls and returns, and does not generate te_inst packets for return target addresses that can be inferred by the decoder, as described in Implicit Return.

When reporting an address via te_inst when Implicit Return mode is enabled, the packet will include details of the number of implicit returns (i.e. return targets that have not been reported explicitly) since the last branch or te_inst packet under the following conditions:

  • If the reported address is the instruction following a return, and:

    • it is mispredicted, or;

    • there have been 255 unreported returns, or;

    • it is correctly predicted but is being reported for some other reason (e.g. it is the instruction before a trap, privilege change, resync or is the final qualified instruction), or;

    • the return stack is empty, but the number of implicit returns is non-zero.

  • If the address is not the instruction following an updiscon but is being reported for some other reason (as listed above), and the number of implicit returns is non-zero.

Under the above conditions, irreport is set to the oppositive value to updiscon.

Table 3. Packet format 1 - address, branch map
Field name Bits Description

format

2

01 (diff-delta): includes branch information and may include differential address

branches

5

Number of valid bits branch_map. The number of bits of branch_map is determined as follows:
0: (cannot occur for this format)
1: 1 bit
2-3: 3 bits
4-7: 7 bits
8-15: 15 bits
16-31: 31 bits
For example if branches = 12, branch_map is 15 bits long, and the 12 LSBs are valid.

branch_map

Determined by branches field.

An array of bits indicating whether branches are taken or not. Bit 0 represents the oldest branch instruction executed. For each bit:
0 : branch taken
1 : branch not taken

address

iaddress_width_p - iaddress_lsb_p

Differential instruction address.

notify

1

If the value of this bit is different from the MSB of address, it indicates that this packet is reporting an instruction that is not the target of an uninferable discontinuity because a notification was requested via trigger[2].

updiscon

1

If the value of this bit is different from the MSB of notify, it indicates that this packet is reporting the instruction following an uninferable discontinuity and is also the instruction before an exception, privilege change or resync (i.e. it will be followed immediately by a format 3 te_inst).

irreport

1

If the value of this bit is different from updiscon, it indicates that this packet is reporting an instruction that is either: following a return because its address differs from the predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the implicit return count.

irets

8

If the value of irreport is different from updiscon, this field indicates the number of implicit returns that have occurred since the last branch, or te_inst packet if there have been no branches since then. If irreport is the same value as updiscon, all bits in this field will also be the same value as updiscon.

Table 4. Packet format 1 - no address, branch map
Field name Bits Description

format

2

01 (diff-delta): includes branch information and may include differential address

branches

5

Number of valid bits in branch_map. The length of branch_map is determined as follows:
0: 31 bits, no address in packet
1-31: (cannot occur for this format)

branch_map

31

An array of bits indicating whether branches are taken or not. Bit 0 represents the oldest branch instruction executed. For each bit:
0 : branch taken
1 : branch not taken

Format 1 irreport and irets fields

Table 5. Packet format 0, subformat 0 - address, branch count
Field name Bits Description

format

2

00 (opt-ext): formats for optional efficiency extensions

subformat

See Format 0 Subformat

0 (correctly predicted branches)

branch_count

32

Count of the number of correctly predicted branches, minus 31.

branch_fmt

2

10 (addr): Packet contains an address. If this points to a branch instruction, then the branch was predicted correctly.
11 (addr-fail): Packet contains an address that points to a branch which failed the prediction.
00, 01: (cannot occur for this format)

address

iaddress_width_p - iaddress_lsb_p

Differential instruction address.

notify

1

If the value of this bit is different from the MSB of address, it indicates that this packet is reporting an instruction that is not the target of an uninferable discontinuity because a notification was requested via trigger[2].

updiscon

1

If the value of this bit is different from notify, it indicates that this packet is reporting the instruction following an uninferable discontinuity and is also the instruction before an exception, privilege change or resync (i.e. it will be followed immediately by a format 3 te_inst).

irreport

1

If the value of this bit is different from updiscon, it indicates that this packet is reporting an instruction that is either: following a return because its address differs from the predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the implicit return count.

irets

8

If the value of irreport is different from updiscon, this field indicates the number of implicit returns that have occurred since the last branch, or te_inst packet if there have been no branches since then. If irreport is the same value as updiscon, all bits in this field will also be the same value as updiscon.

Table 6. Packet format 0, subformat 1 - jump target index, branch map
Field name Bits Description

format

2

00 (opt-ext): formats for optional efficiency extensions

subformat

See Format 0 Subformat

1 (jump target cache)

index

cache_size_p

Jump target cache index of entry containing target address.

branches

5

Number of valid bits in branch_map. The length of branch_map is determined as follows:+ 0: (cannot occur for this format)
1: 1 bit
2-3: 3 bits
4-7: 7 bits
8-15: 15 bits
16-31: 31 bits
For example if branches = 12, branch_map is 15 bits long, and the 12 LSBs are valid.

branch_map

Determined by branches field.

An array of bits indicating whether branches are taken or not. Bit 0 represents the oldest branch instruction executed. For each bit: : branch taken : branch not taken

irreport

1

If the value of this bit is different from branch_map[MSB], it indicates that this packet is reporting an instruction that is either: following a return because its address differs from the predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the implicit return count.

irets

8

If the value of irreport is different from branch_map[MSB], this field indicates the number of implicit returns that have occurred since the last branch, or te_inst packet if there have been no branches since then. If irreport is the same value as branch_map[MSB], all bits in this field will also be the same value as branch_map[MSB].

Table 7. Packet format 0, subformat 1 - jump target index, no branch map
Field name Bits Description

format

2

00 (opt-ext): formats for optional efficiency extensions

subformat

See Format 0 Subformat

1 (jump target cache)

index

cache_size_p

Jump target cache index of entry containing target address.

branches

5

Number of valid bits in branch_map. The length of branch_map is determined as follows: : no branch_map in packet -31: (cannot occur for this format)

irreport

1

If the value of this bit is different from branches[MSB], it indicates that this packet is reporting an instruction that is either: following a return because its address differs from the predicted return address at the top of the implicit_return return address stack, or the last retired before an exception, interrupt, privilege change or resync because it is necessary to report the implicit return count.

irets

8

If the value of irreport is different from branches[MSB], this field indicates the number of implicit returns that have occurred since the last branch, or te_inst packet if there have been no branches since then. If irreport is the same value as branches[MSB], all bits in this field will also be the same value as branches[MSB].

Format 0 irreport and irets fields

These bits are encoded so that most of the time they will take the same value as the immediately preceding bit (updiscon, branch_map[MSB] or branches[MSB] depending on the specific packet format). Purpose and behavior is as described in Format 2 irreport and irets.

For the jump target cache (subformat 1), they are included to allow return addresses that fail the implicit return prediction but which reside in the jump target cache to be reported using this format. An implementation could omit these if all implicit return failures are reported using format 1.

Data Trace of Multiple-Memory Access and Compare and Swap v1.0 extension to Efficient Trace for RISC-V v2.0

This chapter is in the Ratified state.

No changes are allowed. Any desired or needed changes can be the subject of a follow-on new extension. Ratified extensions are never revised.

The RISC-V Hart to Trace Interface (RHTI) Specification is based on chapter 4 of the Efficient Trace for RISC-V v2.0 specification. It adds dtype encodings to support data trace of multi-memory access instructions as defined by the Zcmp and Vector extensions, as well as Compare and Swap as defined by the Zacas extension. This information also needs to be included in te_data packets generated by the Trace Encoder, but there are no available unused encodings in the existing packets defined by the Efficient Trace for RISC-V v2.0 specification. This extension defines revised packet formats that address this.

If this extension is implemented, the Standard Support Packet extention to Efficient Trace for RISC-V v2.0 (see Standard Support Packet v1.0 extension to Efficient Trace for RISC-V v2.0) must also be implemented.

Revised packet formats

The following packet definitions replace those defined in Data Trace Packets. The format and subtype fields have been restructured but all other fields are the same.

format field

Data trace packets are classified by the format field. This field is a maximum of 2 bits wide, but may be omitted completely if only unified loads and stores are supported, or reduced to 1 bit if unified multi-memory access load and stores are also supported. 2 bits are only required when tracing of atomics or CSRs is required, or if loads are split.

Table 8. Packet format for Unified load or store, with address and data
Field name Bits Description

format

clog2(dtype_width_p)

Transaction class:
00: Load or store
01: Multi-memory access load or store
(other codes select other packet formats)

subformat

2

Transaction type:
00: Unified load address, aligned
01: Unified load address, unaligned
10: Store, aligned address
11: Store, unaligned address

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

diff

2

00: Full address and data (sync)
01: Differential address, XOR-compressed data
10: Differential address, full data
11: Differentail address, differential data

data_len

size

Number of bytes of data is data_len + 1

data

8 * (data_len + 1)

Data

address

daddress_width_p

Byte address if format is unaligned, otherwise shift left by size to recover byte address

The following packet format is used when the encoder is configured to omit data values from data trace packets (trTeDataControl.trTeDataNoValue is 1).

Table 9. Packet format for Unified load or store, with address only
Field name Bits Description

format

clog2(dtype_width_p)

Transaction class:
00: Load or store
01: Multi-memory access load or store
(other codes select other packet formats)

subformat

2

Transaction type:
00: Unified load address, aligned
01: Unified load address, unaligned
10: Store, aligned address
11: Store, unaligned address

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

diff

1

0: Full address (sync)
1: Differential address

address

daddress_width_p

Byte address if format is unaligned, otherwise shift left by size to recover byte address

The following packet format is used when the encoder is configured to omit address values from data trace packets (trTeDataControl.trTeDataNoAddr is 1).

Table 10. Packet format for Unified load or store, with data only
Field name Bits Description

format

clog2(dtype_width_p)

Transaction class:
00: Load or store 01: Multi-memory access load or store (other codes select other packet formats)

subformat

2

Transaction type:
00: Unified load address, aligned
01: Unified load address, unaligned
10: Store, aligned address
11: Store, unaligned address

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

diff

1 or 2

00: Full data (sync)
01: Compressed data (XOR if 2 bits)
10: reserved
11 : Differential data

data

data_width_p

Data

The following packet is used for the request phase of a split load.

Table 11. Packet format for Split load - request phase
Field name Bits Description

format

2

Transaction class:
00: Load or store 01: Multi-memory access load or store (other codes select other packet formats)

subformat

2

Transaction type:
00: Split load address, aligned
01: Split load address, unaligned

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

lrid

lrid_width_p

Load request ID

diff

1

0: Full address (sync)
1: Differential address

address

daddress_width_p

Byte address if format is unaligned, otherwise shift left by size to recover byte address

The following packet is used for the data phase of a split load and split atomic.

Table 12. Packet format for Split load or atomic - data phase
Field name Bits Description

format

2

Transaction type
11: split load data
(other codes select other packet formats)

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

lrid

lrid_width_p

Load request ID

resp

2

00: Error (no data)
01: XOR-compressed data
10: Full data
11: Differential data

data

data_width_p

Data

Table 13. Packet format for Unified atomic with address and data
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

Atomic sub-type
1000: Swap
1001: ADD
1010: AND
1011: OR
1100: XOR
1101: MAX
1110: MIN
(other codes select other packet formats)

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

diff

2

00: Full address and data (sync)
01: Differential address, XOR-compressed data/operand
10: Differential address, full data/operand
11: Differential address, differential data/operand

op_len

size

Number of bytes of operand is op_len + 1

operand

8 * (op_len + 1)

Operand. Value from rs2 before operator applied

data_len

size

Number of bytes of data is data_len + 1

data

8 * (data_len + 1)

Data

address

daddress_width_p

Address, aligned and encoded as per size

Table 14. Packet format for Unified CAS failure
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR
(other codes select other packet formats)

subformat

4

Atomic sub-type
0111: Compare and Swap failure+ (other codes select other packet formats)

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

diff

2

00: Full address and data (sync)
01: Differential address, XOR-compressed operand
10: Differential address, full operand
11: Differential address, differential operand

op_len

size

Number of bytes of operand is op_len + 1

operand

8 * (op_len + 1)

Operand. Value from rs2 before operator applied

address

daddress_width_p

Address, aligned and encoded as per size

The following packet format is used when the encoder is configured to omit data values from data trace packets (trTeDataControl.trTeDataNoValue is 1)

Table 15. Packet format for Unified atomic with address only
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

Atomic sub-type
0111: compare and swap failure
1000: Swap
1001: ADD
1010: AND
1011: OR
1100: XOR
1101: MAX
1110: MIN
1111: conditional store failure
(other codes select other packet formats)

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

diff

1

0: Full address
1: Differential address

address

daddress_width_p

Address, aligned and encoded as per size

The following packet format is used when the encoder is configured to omit address values from data trace packets (trTeDataControl.trTeDataNoAddr is 1).

Table 16. Packet format for Unified atomic with data and operand only
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

Atomic sub-type
1000: Swap
1001: ADD
1010: AND
1011: OR
1100: XOR
1101: MAX
1110: MIN
(other codes select other packet formats)

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

diff

1 or 2

00: Full data (sync)
01: Compressed data/operand (XOR if 2 bits)
10: reserved
11: Differential data/operand

op_len

size

Number of bytes of operand is op_len + 1

operand

8 * (op_len + 1)

Operand. Value from rs2 before operator applied

data

data_width_p

Data

The following packet is used for the request phase of a split atomic:

Table 17. Packet format for Split atomic with operand and address
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

Atomic sub-type
1000: Swap
1001: ADD
1010: AND
1011: OR
1100: XOR
1101: MAX
1110: MIN
(other codes select other packet formats)

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

lrid

lrid_width_p

Load request ID

diff

2

00: Full address and operand (sync)
01: Differential address, XOR-compressed operand
10: Differential address, full operand
11: Differential address, differential operand

op_len

size

Number of bytes of operand is op_len + 1

operand

8 * (op_len + 1)

Operand. Value from rs2 before operator applied

address

daddress_width_p

Address, aligned and encoded as per size

The following packet format is used when the encoder is configured to omit address values from data trace packets (trTeDataControl.trTeDataNoAddr is 1).

Table 18. Packet format for Split atomic with operand only
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

Atomic sub-type
1000: Swap
1001: ADD
1010: AND
1011: OR
1100: XOR
1101: MAX
1110: MIN
(other codes select other packet formats)

size

max(1, clog2(clog2( data_width_p/8 + 1)))

Transfer size is 2size bytes

lrid

lrid_width_p

Load request ID

diff

2

00: Full operand (sync)
01: XOR-compressed operand (XOR if 2 bits)+ 10: reserved
11: Differential operand

operand

data_width_p

Operand. Value from rs2 before operator applied

Table 19. Packet format for Unified CSR, with address, data and operand
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

CSR sub-type
0100: RW
0101: RS
0110: RC
(other codes select other packet formats)

diff

1 or 2

00: Full data/operand (sync)
01: Compressed data/operand (XOR if 2 bits)
10: reserved
11 : Differential data/operand

data_len

2 or 3

Number of bytes of data is data_len + 1

data

8 * (data_len 1)

Data

addr_msbs

6

Address[11:6]

op_len

2 or 3

Number of bytes of operand is op_len + 1

operand

8 * (op_len + 1)

Operand. Value from rs1 before operator applied

addr_lsbs

6

Address[5:0]

Table 20. Packet format for Unified CSR, with address and read-only data (as determined by addr[11:10] = 11)
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

CSR sub-type
0100: RW
0101: RS
0110: RC
(other codes select other packet formats)

diff

1 or 2

00: Full data (sync)
01: Compressed data/operand (XOR if 2 bits)
10: reserved
11 : Differential data/operand

data_len

2 or 3

Number of bytes of data is data_len + 1

data

8 * (data_len + 1)

Data

addr_msbs

6

Address[11:6]

addr_lsbs

6

Address[5:0]

Table 21. Packet format for Unified CSR, with address only
Field name Bits Description

format

2

Transaction class:
10: Atomic or CSR (other codes select other packet formats)

subformat

4

CSR sub-type
0100: RW
0101: RS
0110: RC
(other codes select other packet formats) 11: reserved

diff

1

0: Full address
1: Differential address

addr_msbs

6

Address[11:6]

addr_lsbs

6

Address[5:0]