|
| 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 | + |
| 6 | +`ifndef UDP_RDL |
| 7 | +`define UDP_RDL |
| 8 | + |
| 9 | +/** |
| 10 | + * 4-bits boolean values |
| 11 | + */ |
| 12 | +enum MultiBitBool4 { |
| 13 | + True = 0x6; |
| 14 | + False = 0x9; |
| 15 | +}; |
| 16 | + |
| 17 | +/** |
| 18 | + * 8-bits boolean values |
| 19 | + */ |
| 20 | +enum MultiBitBool8 { |
| 21 | + True = 0x96; |
| 22 | + False = 0x69; |
| 23 | +}; |
| 24 | + |
| 25 | +/** |
| 26 | + * 12-bits boolean values |
| 27 | + */ |
| 28 | +enum MultiBitBool12 { |
| 29 | + True = 0x696; |
| 30 | + False = 0x969; |
| 31 | +}; |
| 32 | + |
| 33 | +/** |
| 34 | + * 16-bits boolean values |
| 35 | + */ |
| 36 | +enum MultiBitBool16 { |
| 37 | + True = 0x9696; |
| 38 | + False = 0x6969; |
| 39 | +}; |
| 40 | + |
| 41 | +/** |
| 42 | + * 20-bits boolean values |
| 43 | + */ |
| 44 | +enum MultiBitBool20 { |
| 45 | + True = 0x69696; |
| 46 | + False = 0x96969; |
| 47 | +}; |
| 48 | + |
| 49 | +/** |
| 50 | + * 24-bits boolean values |
| 51 | + */ |
| 52 | +enum MultiBitBool24 { |
| 53 | + True = 0x969696; |
| 54 | + False = 0x696969; |
| 55 | +}; |
| 56 | + |
| 57 | +/** |
| 58 | + * 28-bits boolean values |
| 59 | + */ |
| 60 | +enum MultiBitBool28 { |
| 61 | + True = 0x6969696; |
| 62 | + False = 0x9696969; |
| 63 | +}; |
| 64 | + |
| 65 | +/** |
| 66 | + * 32-bits boolean values |
| 67 | + */ |
| 68 | +enum MultiBitBool32 { |
| 69 | + True = 0x96969696; |
| 70 | + False = 0x69696969; |
| 71 | +}; |
| 72 | + |
| 73 | +/* |
| 74 | + * The same as swwe, but supports multibit references. |
| 75 | + */ |
| 76 | +property mubi_swwe { |
| 77 | + type = ref; |
| 78 | + component = reg|field; |
| 79 | +}; |
| 80 | + |
| 81 | +/** |
| 82 | + * true if hardware uses `re` signal, which is latched signal of software read pulse. |
| 83 | + * The standard SystemRDL property `swacc` cannot be used here because `swacc = hwre | swmod`. |
| 84 | + */ |
| 85 | +property hwre { |
| 86 | + type = boolean; |
| 87 | + component = reg; |
| 88 | + default = false; |
| 89 | +}; |
| 90 | + |
| 91 | +/** |
| 92 | + * If it is true, the register will be implemented using the prim_subreg_shadow module. |
| 93 | + * Shadow registers are a mechanism to guard sensitive registers against this specific |
| 94 | + * type of attack. They come at a cost of increased area, and a modified SW interaction. |
| 95 | + */ |
| 96 | +property shadowed { |
| 97 | + type = boolean; |
| 98 | + component = reg; |
| 99 | + default = false; |
| 100 | +}; |
| 101 | + |
| 102 | +/* |
| 103 | + * Indicates the register must cross to a different clock domain before use. |
| 104 | + * The value shown here should correspond to one of the module's clocks. |
| 105 | + */ |
| 106 | +property async_clk { |
| 107 | + type = ref; |
| 108 | + component = reg; |
| 109 | +}; |
| 110 | +property async_rst { |
| 111 | + type = ref; |
| 112 | + component = reg; |
| 113 | +}; |
| 114 | + |
| 115 | +/* |
| 116 | + * If true, integrity bits are passed through directly from the memory. |
| 117 | + */ |
| 118 | +property integrity_bypass { |
| 119 | + type = boolean; |
| 120 | + component = mem; |
| 121 | + default = false; |
| 122 | +}; |
| 123 | + |
| 124 | +/* |
| 125 | + * If true, this array was originally a compacted multi-register. |
| 126 | + */ |
| 127 | +property compacted { |
| 128 | + type = boolean; |
| 129 | + component = reg; |
| 130 | + default = false; |
| 131 | +}; |
| 132 | + |
| 133 | +/* |
| 134 | + * Defines properties to be used inside signals. |
| 135 | + * These will help to model the hjson fields: 'inter_signal_list', 'available_output_list', |
| 136 | + * 'interrupt_list' and 'alert_list' as rdl signals. |
| 137 | + */ |
| 138 | +enum SigType { |
| 139 | + None; |
| 140 | + Interrupt; // Signal is an interrupt |
| 141 | + Alert; // Signal is an alert |
| 142 | + InterModReqRsp;// Signal is an inter module, with type=req_rsp |
| 143 | + InterModReq; // Signal is an inter module, with type=uni and act=req |
| 144 | + InterModRecv; // Signal is an inter module, with type=uni and act=recv |
| 145 | + Output; // Signal is an output |
| 146 | + Input; // Signal is an input |
| 147 | + InOut; // Signal is input and/or output |
| 148 | + Sync; // Signal is used for synchonization. i.e clock, reset. |
| 149 | +}; |
| 150 | + |
| 151 | +property sigtype { |
| 152 | + type = SigType; |
| 153 | + component = signal; |
| 154 | + default = SigType::None; |
| 155 | +}; |
| 156 | + |
| 157 | +/* |
| 158 | + * Defines the Inter-module signal's data structure. It is generally bundled into `struct packed` |
| 159 | + * type. This `struct` is used with `package` for topgen tool to define the signal. |
| 160 | + */ |
| 161 | +property inter_mod_struct { |
| 162 | + type = string; |
| 163 | + component = signal; |
| 164 | + default = "logic"; |
| 165 | +}; |
| 166 | +property inter_mod_package { |
| 167 | + type = string; |
| 168 | + component = signal; |
| 169 | +}; |
| 170 | + |
| 171 | +enum BusProtocol { |
| 172 | + TlUl; |
| 173 | +}; |
| 174 | + |
| 175 | +enum BusDirection { |
| 176 | + Host; |
| 177 | + Device; |
| 178 | +}; |
| 179 | + |
| 180 | +struct BusInterfaceCfg { |
| 181 | + BusProtocol protocol; |
| 182 | + BusDirection direction; |
| 183 | + boolean racl_support; |
| 184 | + string hier_path; |
| 185 | +}; |
| 186 | + |
| 187 | +property bus_interface_cfg{ |
| 188 | + type = BusInterfaceCfg; |
| 189 | + component = addrmap; |
| 190 | +}; |
| 191 | + |
| 192 | +`endif |
0 commit comments