1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef _NRF_HW_MODEL_CRACEN_RNG_H
8 #define _NRF_HW_MODEL_CRACEN_RNG_H
9 
10 #include <stdint.h>
11 
12 #ifdef __cplusplus
13 extern "C"{
14 #endif
15 
16 void nhw_CRACEN_RNG_init(void);
17 void nhw_CRACEN_RNG_regw_sideeffects_CONTROL(void);
18 void nhw_CRACEN_RNG_regw_sideeffects_FIFOLEVEL(void);
19 uint32_t nhw_CRACEN_RNG_regr_sideeffects_FIFO(void);
20 void nhw_CRACEN_RNG_timer_triggered(void);
21 
22 #define CRACEN_RNG_FAKE_AIS31_NOISE_ERROR 0x1
23 #define CRACEN_RNG_FAKE_AIS31_PRENOISE_ERROR 0x2
24 #define CRACEN_RNG_FAKE_PROP_TEST_ERROR 0x4
25 #define CRACEN_RNG_FAKE_REP_TEST_ERROR 0x8
26 #define CRACEN_RNG_FAKE_STARTUP_ERROR 0x10
27 /*
28  * Trigger (or queue) errors in the CRACEN RNG
29  * If an error cannot occur now, it will be "pended", and whenever the FSM
30  * is in a state in which it can happen it will be triggered
31  *
32  * Note: pended or triggered errors can only be cleared with a softreset of the RNG
33  */
34 void nhw_CRACEN_RNG_fake_test_error(uint32_t mask);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif
41