Software APIs
dif_rv_core_ibex_autogen.h
Go to the documentation of this file.
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RV_CORE_IBEX_AUTOGEN_H_
6 #define OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RV_CORE_IBEX_AUTOGEN_H_
7 
8 // THIS FILE HAS BEEN GENERATED, DO NOT EDIT MANUALLY. COMMAND:
9 // util/make_new_dif.py --mode=regen --only=autogen
10 
11 /**
12  * @file
13  * @brief <a href="/book/hw/ip/rv_core_ibex/">RV_CORE_IBEX</a> Device Interface
14  * Functions
15  */
16 
17 #include <stdbool.h>
18 #include <stdint.h>
19 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif // __cplusplus
27 
28 /**
29  * A handle to rv_core_ibex.
30  *
31  * This type should be treated as opaque by users.
32  */
33 typedef struct dif_rv_core_ibex {
34  /**
35  * The base address for the rv_core_ibex hardware registers.
36  */
39 
40 /**
41  * Creates a new handle for a(n) rv_core_ibex peripheral.
42  *
43  * This function does not actuate the hardware.
44  *
45  * @param base_addr The MMIO base address of the rv_core_ibex peripheral.
46  * @param[out] rv_core_ibex Out param for the initialized handle.
47  * @return The result of the operation.
48  */
51  dif_rv_core_ibex_t *rv_core_ibex);
52 
53 /**
54  * A rv_core_ibex alert type.
55  */
56 typedef enum dif_rv_core_ibex_alert {
57  /**
58  * Software triggered alert for fatal faults
59  */
61  /**
62  * Software triggered Alert for recoverable faults
63  */
65  /**
66  * Triggered when - Ibex raises `alert_major_internal_o` - Ibex raises
67  * `alert_major_bus_o` - A double fault is seen (Ibex raises
68  * `double_fault_seen_o`) - A bus integrity error is seen
69  */
71  /**
72  * Triggered when Ibex raises `alert_minor_o`
73  */
76 
77 /**
78  * Forces a particular alert, causing it to be escalated as if the hardware
79  * had raised it.
80  *
81  * @param rv_core_ibex A rv_core_ibex handle.
82  * @param alert The alert to force.
83  * @return The result of the operation.
84  */
87  const dif_rv_core_ibex_t *rv_core_ibex, dif_rv_core_ibex_alert_t alert);
88 
89 #ifdef __cplusplus
90 } // extern "C"
91 #endif // __cplusplus
92 
93 #endif // OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RV_CORE_IBEX_AUTOGEN_H_