Skip to content

Commit 0365a22

Browse files
committed
[csrng/doc] Clarify application interface handshaking signals section
Previously, it wasn't clear that between the command request handshake and the command response, the application interface wouldn't accept any further commands including also uninstantiate commands. Signed-off-by: Pirmin Vogel <[email protected]> (cherry picked from commit 143c8e8)
1 parent d5c7f6e commit 0365a22

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

hw/ip/csrng/doc/theory_of_operation.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,16 +308,18 @@ This initial seed is tested to ensure some minimum quality for obfuscation use-
308308

309309
#### Handshaking signals
310310

311-
The application command signal `csrng_req_bus` is accompanied by a `csrng_valid_signal`, which is asserted by the requester when the command is valid.
312-
CSRNG may stall incoming commands by de-asserting the `csrng_req_ready` signal.
311+
The application interface signal `csrng_req_t` comprises a `csrng_req_valid` bit, which is asserted by the requester when the command request on `csrng_req_bus` is valid.
312+
CSRNG may stall incoming commands by de-asserting the `csrng_req_ready` bit of the `csrng_rsp_t` signal.
313313
A command is considered received whenever both `csrng_req_valid` and `csrng_req_ready` are asserted in the same clock cycle.
314314

315-
Likewise a requester must only consider data on the `genbits` bus to be valid when the `genbits_valid` signal is asserted, and should assert `genbits_ready` whenever it is ready to accept the `genbits` data.
316-
The `genbits` data is considered successfully transmitted whenever `genbits_valid` and `genbits_ready` are asserted in the same clock cycle.
315+
Likewise a requester must only consider data on the `genbits_bus` signal to be valid when the `genbits_valid` signal is asserted, and should assert `genbits_ready` whenever it is ready to accept the data on `genbits_bus`.
316+
The `genbits_bus` data is considered successfully transmitted whenever `genbits_valid` and `genbits_ready` are asserted in the same clock cycle.
317317

318-
A requester must always be ready to receive `csrng_req_sts` signals.
318+
A requester must always be ready to receive `csrng_rsp_ack` and `csrng_rsp_sts` signals.
319319
(There is no "ready" signal for command response messages sent to hardware.)
320320

321+
**NOTE**: Between the command request handshake involving `csrng_req_valid/ready` and between signaling the command response on `csrng_rsp_ack/sts`, the application interface does not accept further commands.
322+
321323
#### Waveforms
322324

323325
##### Application Interface: Instantiate Request
@@ -365,6 +367,11 @@ A requester must always be ready to receive `csrng_req_sts` signals.
365367
]}
366368
```
367369

370+
**NOTE**: Between the command request handshake involving `csrng_req_valid/ready` and between signaling the command response on `csrng_rsp_ack/sts`, the application interface does not accept further commands including `uninstantiate` commands.
371+
For `generate` commands, this means the requestor has to first consume all entropy generated from the current command.
372+
Depending on the configuration of the system, this may take a very long time.
373+
For details on how to accelerate this process, refer to [Uninstantiating CSRNG through EDN](../../edn/doc/programmers_guide.md#uninstantiating-csrng-through-edn).
374+
368375
##### Application Interface: Update Request
369376

370377
```wavejson

0 commit comments

Comments
 (0)