The TRNG of JH-7110 has the
following control registers.
Summary
The following table shows an overview of the TRNG register memory map.
Base address: 0x0
Address Offset
Bits31-0
Access
0x0000
CTRL
R/W
0x0004
STAT
R
0x0008
MODE
R/W
0x000C
SMODE
R/W
0x0010
IE
R/W
0x0014
ISTAT
R/W1C
0x001C
FEATURES
R
0x0020
RAND0
R
0x0024
RAND1
R
0x0028
RAND2
R
0x002C
RAND3
R
0x0030
RAND4
R
0x0034
RAND5
R
0x0038
RAND6
R
0x003C
RAND7
R
0x0040
SEED0
R
0x0044
SEED1
R
0x0048
SEED2
R
0x004C
SEED3
R
0x0050
SEED4
R
0x0054
SEED5
R
0x0058
SEED6
R
0x005C
SEED7
R
0x0060
AUTO_RQSTS
R/W
0x0064
AUTO_AGE
R/W
0x0068
BUILD_CONFIG
R
Control Register
This register causes the TRNG to execute one of a number of actions. There are 3
commands available.Figure 1. TRNG Control Register Description
CMD - Execute a command
0x0 Execute a NOP
0x1 Generate a random number
0x2 Execute a random reseed
0x3 Execute a nonce reseed
Status Register
Figure 2. TRNG Status Register Description
RAND_RESEEDING - Current state of random seed generation operations
0 = No random reseed generation process in progress
1 = Random reseed generation process in progress
RAND_GENERATING - Current state of random number generation operations
0 = No random number generation process in progress
1 = Random number generation process in progress
SRVC_RQST - Current state of unacknowledged request indicator
0 = No unacknowledged service request
1 = Unacknowledged service request
LAST_RESEED - Action which loaded current seed. Enumerated values not listed are
'reserved’
0x0 = Reseeded by host random reseed command
0x3 = Reseeded by nonce
0x4 = Reseeded by I_reseed driven to 1 or internal auto-reseed
0x7 = Unseeded (zeroized state)
SEEDED — Current SEEDED state
0= PRNG core is not seeded
1 = PRNG core is seeded
MISSION_MODE - Reflects state of SMODE.MISSION_MODE
R256 - Reflects state of MODE.R256
NONCE_MODE — Current state of NONCE mode
0 = Nonce mode disabled
1 = Nonce mode enabled
Mode Register
This register is used to set the length of the PRNG output register.Figure 3. TRNG Mode Register Description
R256 - Current length for PRNG RANDx registers
0 = PRNG set up for 128-bit maximum
1 = PRNG set up for256-bit maximum
Status Mode Register
This register is used to enable or disable certain mission-mode run-time features
within the core.Figure 4. TRNG Status Mode Register Description
MAX_REJECTS - Maximum number of consecutive bit rejections before issuing ring
tweak
MISSION_MODE - Sets the operating mode to TEST or MISSION
0 = Test mode (access to internal state and test fields)
1 = Mission mode (no access to internal state)
NONCE_MODE - Sets the reseed mode to nonce or random
0 = Disable nonce mode
1 = Enable nonce mode
Interrupt Register
This register is used to enable or disable interrupts within the TRNG. When both one
of the individual enable bits and GLBL_EN bit are set to 1, an occurrence of that
event drives the IRQ port to 1.Figure 5. TRNG Interrupt Register Description
GLBL_EN - Global interrupt enable
0= Globally disable interrupts
1 = Globally enable interrupts
LFSR_LOCKUP_EN - Include or exclude LFSR_LOCKUP interrupt contribution
0 = Disable LFSR_LOCKUP interrupt contribution
1 = Enable LFSR_LOCKUP interrupt contribution
RQST_ALARM_EN - Include or exclude RQST_ALARM interrupt contribution
0 = Disable RQST_ALARM interrupt contribution
1 = Enable RQST_ALARM interrupt contribution
AGE_ALARM_EN - Include or exclude AGE_ALARM interrupt contribution.
0 = Disable AGE_ALARM interrupt contribution
1 = Enable AGE_ALARM interrupt contribution
SEED_DONE_EN — Include or exclude SEED_DONE interrupt contribution
0 = Disable SEED_DONE interrupt contribution
1 = Enable SEED_DONE interrupt contribution
RAND_RDY_EN — Include or exclude RAND_RDY interrupt contribution
0 = Disable RAND_RDY interrupt contribution
1 = Enable RAND_RDY interrupt contribution
Interrupt Status Register
This register allows the user to monitor the interrupt and/or status contributions of
the TRNG. Figure 6. TRNG Interrupt Status Register Description
LFSR_LOCKUP_EN - Status and acknowledgment (clearing) of LFSR_LOCKUP indicator
0 = No unacknowledged
1 = Unacknowledged
RQST_ALARM_EN - Status and acknowledgment (clearing) of RQST_ALARM indicator
0 = No unacknowledged
1 = Unacknowledged
AGE_ALARM_EN - Status and acknowledgment (clearing) of AGE_ALARM
0 = No unacknowledged
1 = Unacknowledged
SEED_DONE_EN - Status and acknowledgment (clearing) of SEED_DONE
0 = No unacknowledged
1 = Unacknowledged
RAND_RDY_EN - Status and acknowledgment (clearing) of RAND_RDY
0 = No unacknowledged
1 = Unacknowledged
Features Register
This register contains the build-time parameter enumerations.Figure 7. TRNG Features Register Description
MISSION_MODE_RESET_STATE - Indicates state of SMODE.MISSION_MODE reset state
0 = Resets to TEST_MODE
1 = Resets to MISSION_MODE
RAND_SEED_AVAIL - Indicates the ring-oscillator sub-section is present.
0 = This build-time configuration parameter is not customer modifiable.
No
ring-oscillator seed generator present
1 = Ring-oscillator seed generator present
MAX_RAND_LENGTH — Maximum length of the PRNG RANDx register set
0 = PRNG setup for 128-bit maximum
1 = PRNG setup for 256-bit maximum
RAND0 - RAND7 Registers
The RAND0 - RAND7register set which are used by the host to read the newly generated
random number.Figure 8. TRNG RANDx Register Description
RANDx - Random data word.
SEED0 - SEED7 Registers
The SEEDx register sets are used to load a host generated nonce seed into the TRNG.
These registers are also used in several test modes to access internal data.Figure 9. TRNG SEEDx Register Description
SEEDx - Seed data word.
Auto Request Register
This register allows the TRNG to generate a reseed reminder alarm after a specified
number of random numbers have been requested by the host. If the RQSTS field holds a
value of 0, this feature is disabled and no AUTO_RQSTS alarms are generated.Figure 10. TRNG Auto Request Register Description
RQSTS - Request Counter
0 = disable the AUTO_RQSTS alarm feature
other = reload value for internal AUTO_RQSTS counter
Auto Age Register
This register allows the TRNG to generate a reseed reminder alarm after a specified
number of random numbers have been requested by the host. If the AGE field holds a
value of 0, this feature is disabled and no AUTO_AGE alarms are generated.Figure 11. TRNG Auto Age Register Description
AGE — Age Counter
0 = disable the AUTO_AGE alarm feature
other = reload value for internal AUTO_AGE counter
Build Configure Register
This register contains the Build-time parameter enumerations.Figure 12. TRNG Build Configure Register Description