Skip to content

ocr_mib: Register Map

Generated by tools/regmap.py from hdl/ocr_mib/regs/ocr_regs.yml, do not edit. The same description generates the VHDL package ocr_regs_pkg and the C header sw/ocr_regs.h.

Byte addresses of 32-bit registers on the AXI4-Lite port (8-bit address); unused addresses and bits read as zero. The ID register reads 0x4F435201.

Access Meaning
RO Read only
RW Read and write
W1 Write one: command; reads as zero
W1C Sticky flag; write one to clear
WO Write only; reads as zero
RC Read only; any write to the register clears it

Registers

Address Register Description
0x000 ID Identification of the core and version of the register map
0x004 GENERICS Generics of the core (product characteristics)
0x008 GENERICS2 Generics of the core (product characteristics)
0x00C RELEASE_BYTES Size of the release buffer
0x010 CTRL Commands
0x014 STATUS Status of the key table
0x018 EVENTS Event flags (status codes of the messages, EDAC, key load)
0x01C IRQ_EN Interrupt enable of the event flags
0x020 IRQ_STATUS Interrupt output
0x060 IV_FIXED Fixed field of the IV generation unit for the next key load (GCM 8.2.1); cleared by the load
0x064 IV_COUNT_LO First invocation counter of the next key load, bits 31:0; cleared by the load
0x068 IV_COUNT_HI First invocation counter of the next key load, bits 63:32; cleared by the load
0x06C KEY_LOAD Load of the staged key into a key slot; the load computes the hash subkey and clears the key staging registers, IV_FIXED and IV_COUNT
0x070 SLOT_QUERY Key slot of SLOT_STATUS; a write reads the slot (never its key or hash subkey)
0x074 SLOT_STATUS State of the queried key slot
0x078 SLOT_FIXED Fixed field of the queried key slot
0x07C SLOT_COUNT_LO Next invocation counter of the queried key slot, bits 31:0 (for its backup in non-volatile memory, GCM 9.1)
0x080 SLOT_COUNT_HI Next invocation counter of the queried key slot, bits 63:32
0x090 ENCRYPTIONS Encryptions with status OK
0x094 DECRYPTIONS Decryptions with status OK (tag verified)
0x098 ERR_AUTH Messages with status AUTH (code 1)
0x09C ERR_FORMAT Messages with status FORMAT (code 2)
0x0A0 ERR_KEY Messages with status KEY (code 3)
0x0A4 ERR_IV_MODE Messages with status IV_MODE (code 4)
0x0A8 ERR_IV_EXHAUSTED Messages with status IV_EXHAUSTED (code 5)
0x0AC ERR_LENGTH Messages with status LENGTH (code 6)
0x0B0 ERR_ECC Messages with status ECC (code 7)
0x0B4 ERR_OVERFLOW Messages with status OVERFLOW (code 8)
0x0C0 ECC_STATUS EDAC status of the buffers and memories
0x0C4 ECC_SELECT Channel shown in ECC_COUNT
0x0C8 ECC_COUNT SEC and DED counters of the selected channel
0x0CC ECC_INJECT Error injection into the next word written to a buffer or memory (tests)
0x040 + 0x4 n KEY Key word n

Key staging registers: KEY n holds bytes 4 n to 4 n + 3 of the key (byte 4 n in bits 31:24); 4, 6 or 8 words for 128, 192 or 256 bits; cleared by the load, for 8 instances.

Fields

ID

Address 0x000: Identification of the core and version of the register map.

Bits Field Access Reset Description
31:0 ID RO 0x4F435201 0x4F4352 (OCR) and register map version 1

GENERICS

Address 0x004: Generics of the core (product characteristics).

Bits Field Access Reset Description
28 DENSE RO DenseOutput_g Dense output: the output messages are gapless byte streams
27:24 AES_UNITS RO AesUnits_g Round units of the AES engine
23 RELEASE RO ReleaseBuffer_g Release buffer implemented: decrypted messages leave only after the verification (GCM 7.2 step 8)
22:14 NUM_KEYS RO NumKeys_g Number of key slots
13:5 KEY_BITS RO KeyBits_g Key length: 128, 192 or 256 bits (CCSDS 3.2)
4:0 DATA_BYTES RO DataWidth_g / 8 Bytes per beat of the message streams

GENERICS2

Address 0x008: Generics of the core (product characteristics).

Bits Field Access Reset Description
13:8 LEN_BITS RO LenBits_g Width of the byte counts: AAD and DATA of up to 2^LEN_BITS - 1 bytes
7:0 GHASH_DIGIT RO GhashDigit_g Bits per cycle of the GHASH multiplier

RELEASE_BYTES

Address 0x00C: Size of the release buffer.

Bits Field Access Reset Description
31:0 BYTES RO ReleaseBytes_g Bytes; 0 without release buffer

CTRL

Address 0x010: Commands.

Bits Field Access Reset Description
1 CLEAR W1 0 Clear all message counters
0 ZEROIZE W1 0 Erase all key slots and the key staging registers

STATUS

Address 0x014: Status of the key table.

Bits Field Access Reset Description
0 BUSY RO Erasure after the reset, zeroize or key load in progress; contexts wait during an erasure

EVENTS

Address 0x018: Event flags (status codes of the messages, EDAC, key load).

Bits Field Access Reset Description
10 LOAD_DONE W1C 0 A key load is complete (the slot is valid)
9 ECC_DED W1C 0 Double error detected in a buffer or memory
8 ECC_SEC W1C 0 Single error corrected in a buffer or memory
7 OVERFLOW W1C 0 A message was longer than the release buffer
6 ECC W1C 0 A message failed with an uncorrectable buffer error
5 LENGTH W1C 0 A section exceeded the supported length
4 IV_EXHAUSTED W1C 0 A context asked for an IV of an exhausted key slot (GCM 8.3)
3 IV_MODE W1C 0 A context used an IV source that its key slot does not allow (GCM 8.2)
2 KEY W1C 0 A context selected a key slot out of range or not loaded
1 FORMAT W1C 0 A message violated the message format
0 AUTH W1C 0 A decryption failed the verification of its tag (GCM 7.2 step 8)

IRQ_EN

Address 0x01C: Interrupt enable of the event flags.

Bits Field Access Reset Description
10:0 ENABLE RW 0 Bit n enables EVENTS bit n

IRQ_STATUS

Address 0x020: Interrupt output.

Bits Field Access Reset Description
0 IRQ RO Irq: OR of the enabled event flags

IV_FIXED

Address 0x060: Fixed field of the IV generation unit for the next key load (GCM 8.2.1); cleared by the load.

Bits Field Access Reset Description
31:0 FIXED WO 0 Leading 32 bits of the generated IVs

IV_COUNT_LO

Address 0x064: First invocation counter of the next key load, bits 31:0; cleared by the load.

Bits Field Access Reset Description
31:0 COUNT WO 0 Bits 31:0 of the invocation field

IV_COUNT_HI

Address 0x068: First invocation counter of the next key load, bits 63:32; cleared by the load.

Bits Field Access Reset Description
31:0 COUNT WO 0 Bits 63:32 of the invocation field

KEY_LOAD

Address 0x06C: Load of the staged key into a key slot; the load computes the hash subkey and clears the key staging registers, IV_FIXED and IV_COUNT.

Bits Field Access Reset Description
31 START W1 0 Start the load
8 IV_GEN WO 0 '1' the slot encrypts only with generated IVs (GCM 8.2.1), '0' only with IVs of the context
7:0 SLOT WO 0 Key slot

SLOT_QUERY

Address 0x070: Key slot of SLOT_STATUS; a write reads the slot (never its key or hash subkey).

Bits Field Access Reset Description
7:0 SLOT RW 0 Key slot

SLOT_STATUS

Address 0x074: State of the queried key slot.

Bits Field Access Reset Description
4 PENDING RO The query is not answered yet
3 DED RO Double error in a word of the slot
2 EXHAUSTED RO The invocation counter has reached its last value (GCM 8.3)
1 IV_GEN RO The slot uses generated IVs
0 VALID RO Key and hash subkey loaded

SLOT_FIXED

Address 0x078: Fixed field of the queried key slot.

Bits Field Access Reset Description
31:0 FIXED RO Fixed field

SLOT_COUNT_LO

Address 0x07C: Next invocation counter of the queried key slot, bits 31:0 (for its backup in non-volatile memory, GCM 9.1).

Bits Field Access Reset Description
31:0 COUNT RO Bits 31:0

SLOT_COUNT_HI

Address 0x080: Next invocation counter of the queried key slot, bits 63:32.

Bits Field Access Reset Description
31:0 COUNT RO Bits 63:32

ENCRYPTIONS

Address 0x090: Encryptions with status OK.

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

DECRYPTIONS

Address 0x094: Decryptions with status OK (tag verified).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_AUTH

Address 0x098: Messages with status AUTH (code 1).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_FORMAT

Address 0x09C: Messages with status FORMAT (code 2).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_KEY

Address 0x0A0: Messages with status KEY (code 3).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_IV_MODE

Address 0x0A4: Messages with status IV_MODE (code 4).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_IV_EXHAUSTED

Address 0x0A8: Messages with status IV_EXHAUSTED (code 5).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_LENGTH

Address 0x0AC: Messages with status LENGTH (code 6).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_ECC

Address 0x0B0: Messages with status ECC (code 7).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ERR_OVERFLOW

Address 0x0B4: Messages with status OVERFLOW (code 8).

Bits Field Access Reset Description
31:0 COUNT RC 0 Messages

ECC_STATUS

Address 0x0C0: EDAC status of the buffers and memories.

Bits Field Access Reset Description
17:0 DED RC 0 Bit n: double error detected in channel n (0 data, 1 keystream, 2 J0, 3 hash, 4 output, 5 hash subkey, 6 descriptor, 7 summary, 8 result, 9 status FIFO, 10 release buffer, 11 key, 12 H, 13 IV memory read, 14 to 16 their scrubbers, 17 job FIFO); any write clears all counters and flags

ECC_SELECT

Address 0x0C4: Channel shown in ECC_COUNT.

Bits Field Access Reset Description
4:0 CHANNEL RW 0 Channel 0 to 17

ECC_COUNT

Address 0x0C8: SEC and DED counters of the selected channel.

Bits Field Access Reset Description
31:16 DED RC 0 Double errors detected
15:0 SEC RC 0 Single errors corrected; any write clears the selected channel

ECC_INJECT

Address 0x0CC: Error injection into the next word written to a buffer or memory (tests).

Bits Field Access Reset Description
9 DOUBLE W1 0 Inject a double error
8 SINGLE W1 0 Inject a single error
4:0 TARGET WO 0 0 to 10 the buffers of ECC_STATUS channels 0 to 10; 16 key, 17 H, 18 IV word of the next key load; 19 next job

KEY

Address 0x040 + 0x4 n: Key word n.

Bits Field Access Reset Description
31:0 WORD WO 0 Key bytes 4 n to 4 n + 3