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 W attribute: the field inside the module is cleared automatically.

  • Without the W attribute: a clr signal 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 clr signal 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 W class attributes.

RW1C

Readable by software; clear on write of 1. After the field is written with 1, a clr signal 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 W class 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_we acts on the write logic. Bus data is actually written to the field only when A_we is high.

WPD

Write pulse (delayed by one cycle). When any value is written to the field, a one-cycle pulse signal A_wpd is generated and output together with A.

Note: A_wpd is 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_wp is generated and output together with A.

A_wp is 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_w1p is generated and output together with A, 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_set and A_val: when A_set is high, A_val is assigned to A.

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).