Access Types for Registers
This section describes the access types of registers and their fields.
An access type consists of one or more attributes joined by /, for example, R/W or R/WP. Detailed descriptions of all attributes are listed below by category.
Note
In the following descriptions, A stands for the field name. For example, for a field named A, A_we and A_wp are external signals associated with that field.
Read Attributes
- R
Readable by software. A field that is not readable does not carry this attribute.
- RC
Clear on read. After the whole register is read, the field is automatically cleared to 0 in the next cycle. There are two cases:
With the
Wattribute: the field inside the module is cleared automatically.Without the
Wattribute: aclrsignal is output to clear the externally input signal that has been read. It is typically used for clear-on-read of counters and interrupts.
- RWC
Readable by software; clear on write. After the field is written with 0 or 1, a
clrsignal is output to clear the externally input signal that has been read. It is typically used for clear-on-write of counters and interrupts.This attribute cannot coexist with the
Wclass attributes.- RW1C
Readable by software; clear on write of 1. After the field is written with 1, a
clrsignal is output to clear the externally input signal that has been read. It is typically used for clear-on-write of counters and interrupts.This attribute cannot coexist with the
Wclass attributes.- RP
Read pulse. When the field is read (that is, when the register is read), a pulse signal is output.
Write Attributes
- W
Writable by software. A field that is not writable does not carry this attribute, which means it is read-only.
- WH
After writing 1, the field is set and stays high (sticky High). It cannot be written back to 0.
- WA0
After writing 1, the field is automatically cleared to 0 in the next cycle, which is equivalent to generating a pulse.
- WE
Write enable. An external input signal
A_weacts on the write logic. Bus data is actually written to the field only whenA_weis high.- WPD
Write pulse (delayed by one cycle). When any value is written to the field, a one-cycle pulse signal
A_wpdis generated and output together withA.Note:
A_wpdis one cycle later than the write signal on the bus.- WP
Write pulse. When any value is written to the field, a one-cycle pulse signal
A_wpis generated and output together withA.A_wpis generated at the same time as the write signal on the bus.- W1P
Write-1 pulse. When 1 is written to the field, a one-cycle pulse signal
A_w1pis generated and output together withA, at the same time as the write signal on the bus.- WO
Write only. The value read back is given externally. The external input signal is named
A_wo.
External Attributes
- ES
The field is set when an external signal is valid, with the highest priority. For a field named
A, the generated RTL has two additional input signals,A_setandA_val: whenA_setis high,A_valis assigned toA.
Protection Attributes
- PROT
Generally used for keys that are mapped from the physical addresses of OTP. It is used as a flip-flop in the circuit and cannot be read or written by software.
Attribute Combinations
Multiple attributes can be combined. The following lists only some of the combinations:
- R/W
Readable and writable.
- R/W/ES
Readable, writable, and can be set externally.
- R/WP
Readable; a pulse is generated on write (at the same time as the write signal).
- R/WPD
Readable; a pulse is generated on write (delayed by one cycle).
- R/WA0
Readable; after writing 1, automatically cleared to 0 in the next cycle.
- R/WH
Readable; after writing 1, set and stays high.
- R/WE
Readable; write is controlled by an external write enable.
- R/W1P
Readable; a pulse is generated when 1 is written.
- PROT/R
Protection attribute and readable.
- RW1C
Reads external status; writing 1 clears the external source (does not coexist with
W).