-
Notifications
You must be signed in to change notification settings - Fork 0
/
stm32_svd-hash.ads
356 lines (336 loc) · 11.7 KB
/
stm32_svd-hash.ads
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32L4R9.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.HASH is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_DATATYPE_Field is HAL.UInt2;
subtype CR_NBW_Field is HAL.UInt4;
-- control register
type CR_Register is record
Reserved_0_1 : HAL.UInt2 := 16#0#;
-- unspecified
INIT : Boolean := False;
-- Write-only. Initialize message digest calculation
DMAE : Boolean := False;
-- DMA enable
DATATYPE : CR_DATATYPE_Field := 16#0#;
-- Data type selection
MODE : Boolean := False;
-- Mode selection
ALGO0 : Boolean := False;
-- Algorithm selection
NBW : CR_NBW_Field := 16#0#;
-- Read-only. Number of words already pushed
DINNE : Boolean := False;
-- Read-only. DIN not empty
MDMAT : Boolean := False;
-- Multiple DMA Transfers
Reserved_14_15 : HAL.UInt2 := 16#0#;
-- unspecified
LKEY : Boolean := False;
-- Long key selection
Reserved_17_17 : HAL.Bit := 16#0#;
-- unspecified
ALGO1 : Boolean := False;
-- ALGO
Reserved_19_31 : HAL.UInt13 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
Reserved_0_1 at 0 range 0 .. 1;
INIT at 0 range 2 .. 2;
DMAE at 0 range 3 .. 3;
DATATYPE at 0 range 4 .. 5;
MODE at 0 range 6 .. 6;
ALGO0 at 0 range 7 .. 7;
NBW at 0 range 8 .. 11;
DINNE at 0 range 12 .. 12;
MDMAT at 0 range 13 .. 13;
Reserved_14_15 at 0 range 14 .. 15;
LKEY at 0 range 16 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
ALGO1 at 0 range 18 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
subtype STR_NBLW_Field is HAL.UInt5;
-- start register
type STR_Register is record
NBLW : STR_NBLW_Field := 16#0#;
-- Number of valid bits in the last word of the message
Reserved_5_7 : HAL.UInt3 := 16#0#;
-- unspecified
DCAL : Boolean := False;
-- Write-only. Digest calculation
Reserved_9_31 : HAL.UInt23 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for STR_Register use record
NBLW at 0 range 0 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
DCAL at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-- interrupt enable register
type IMR_Register is record
DINIE : Boolean := False;
-- Data input interrupt enable
DCIE : Boolean := False;
-- Digest calculation completion interrupt enable
Reserved_2_31 : HAL.UInt30 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for IMR_Register use record
DINIE at 0 range 0 .. 0;
DCIE at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- status register
type SR_Register is record
DINIS : Boolean := True;
-- Data input interrupt status
DCIS : Boolean := False;
-- Digest calculation completion interrupt status
DMAS : Boolean := False;
-- Read-only. DMA Status
BUSY : Boolean := False;
-- Read-only. Busy bit
Reserved_4_31 : HAL.UInt28 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
DINIS at 0 range 0 .. 0;
DCIS at 0 range 1 .. 1;
DMAS at 0 range 2 .. 2;
BUSY at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Hash processor
type HASH_Peripheral is record
CR : aliased CR_Register;
-- control register
DIN : aliased HAL.UInt32;
-- data input register
STR : aliased STR_Register;
-- start register
HR0 : aliased HAL.UInt32;
-- digest registers
IMR : aliased IMR_Register;
-- interrupt enable register
SR : aliased SR_Register;
-- status register
CSR0 : aliased HAL.UInt32;
-- context swap registers
CSR1 : aliased HAL.UInt32;
-- context swap registers
CSR2 : aliased HAL.UInt32;
-- context swap registers
CSR3 : aliased HAL.UInt32;
-- context swap registers
CSR4 : aliased HAL.UInt32;
-- context swap registers
CSR5 : aliased HAL.UInt32;
-- context swap registers
CSR6 : aliased HAL.UInt32;
-- context swap registers
CSR7 : aliased HAL.UInt32;
-- context swap registers
CSR8 : aliased HAL.UInt32;
-- context swap registers
CSR9 : aliased HAL.UInt32;
-- context swap registers
CSR10 : aliased HAL.UInt32;
-- context swap registers
CSR11 : aliased HAL.UInt32;
-- context swap registers
CSR12 : aliased HAL.UInt32;
-- context swap registers
CSR13 : aliased HAL.UInt32;
-- context swap registers
CSR14 : aliased HAL.UInt32;
-- context swap registers
CSR15 : aliased HAL.UInt32;
-- context swap registers
CSR16 : aliased HAL.UInt32;
-- context swap registers
CSR17 : aliased HAL.UInt32;
-- context swap registers
CSR18 : aliased HAL.UInt32;
-- context swap registers
CSR19 : aliased HAL.UInt32;
-- context swap registers
CSR20 : aliased HAL.UInt32;
-- context swap registers
CSR21 : aliased HAL.UInt32;
-- context swap registers
CSR22 : aliased HAL.UInt32;
-- context swap registers
CSR23 : aliased HAL.UInt32;
-- context swap registers
CSR24 : aliased HAL.UInt32;
-- context swap registers
CSR25 : aliased HAL.UInt32;
-- context swap registers
CSR26 : aliased HAL.UInt32;
-- context swap registers
CSR27 : aliased HAL.UInt32;
-- context swap registers
CSR28 : aliased HAL.UInt32;
-- context swap registers
CSR29 : aliased HAL.UInt32;
-- context swap registers
CSR30 : aliased HAL.UInt32;
-- context swap registers
CSR31 : aliased HAL.UInt32;
-- context swap registers
CSR32 : aliased HAL.UInt32;
-- context swap registers
CSR33 : aliased HAL.UInt32;
-- context swap registers
CSR34 : aliased HAL.UInt32;
-- context swap registers
CSR35 : aliased HAL.UInt32;
-- context swap registers
CSR36 : aliased HAL.UInt32;
-- context swap registers
CSR37 : aliased HAL.UInt32;
-- context swap registers
CSR38 : aliased HAL.UInt32;
-- context swap registers
CSR39 : aliased HAL.UInt32;
-- context swap registers
CSR40 : aliased HAL.UInt32;
-- context swap registers
CSR41 : aliased HAL.UInt32;
-- context swap registers
CSR42 : aliased HAL.UInt32;
-- context swap registers
CSR43 : aliased HAL.UInt32;
-- context swap registers
CSR44 : aliased HAL.UInt32;
-- context swap registers
CSR45 : aliased HAL.UInt32;
-- context swap registers
CSR46 : aliased HAL.UInt32;
-- context swap registers
CSR47 : aliased HAL.UInt32;
-- context swap registers
CSR48 : aliased HAL.UInt32;
-- context swap registers
CSR49 : aliased HAL.UInt32;
-- context swap registers
CSR50 : aliased HAL.UInt32;
-- context swap registers
CSR51 : aliased HAL.UInt32;
-- context swap registers
CSR52 : aliased HAL.UInt32;
-- context swap registers
CSR53 : aliased HAL.UInt32;
-- context swap registers
HASH_HR0 : aliased HAL.UInt32;
-- HASH digest register
HASH_HR1 : aliased HAL.UInt32;
-- read-only
HASH_HR2 : aliased HAL.UInt32;
-- read-only
HASH_HR3 : aliased HAL.UInt32;
-- read-only
HASH_HR4 : aliased HAL.UInt32;
-- read-only
HASH_HR5 : aliased HAL.UInt32;
-- read-only
HASH_HR6 : aliased HAL.UInt32;
-- read-only
HASH_HR7 : aliased HAL.UInt32;
-- read-only
end record
with Volatile;
for HASH_Peripheral use record
CR at 16#0# range 0 .. 31;
DIN at 16#4# range 0 .. 31;
STR at 16#8# range 0 .. 31;
HR0 at 16#C# range 0 .. 31;
IMR at 16#20# range 0 .. 31;
SR at 16#24# range 0 .. 31;
CSR0 at 16#F8# range 0 .. 31;
CSR1 at 16#FC# range 0 .. 31;
CSR2 at 16#100# range 0 .. 31;
CSR3 at 16#104# range 0 .. 31;
CSR4 at 16#108# range 0 .. 31;
CSR5 at 16#10C# range 0 .. 31;
CSR6 at 16#110# range 0 .. 31;
CSR7 at 16#114# range 0 .. 31;
CSR8 at 16#118# range 0 .. 31;
CSR9 at 16#11C# range 0 .. 31;
CSR10 at 16#120# range 0 .. 31;
CSR11 at 16#124# range 0 .. 31;
CSR12 at 16#128# range 0 .. 31;
CSR13 at 16#12C# range 0 .. 31;
CSR14 at 16#130# range 0 .. 31;
CSR15 at 16#134# range 0 .. 31;
CSR16 at 16#138# range 0 .. 31;
CSR17 at 16#13C# range 0 .. 31;
CSR18 at 16#140# range 0 .. 31;
CSR19 at 16#144# range 0 .. 31;
CSR20 at 16#148# range 0 .. 31;
CSR21 at 16#14C# range 0 .. 31;
CSR22 at 16#150# range 0 .. 31;
CSR23 at 16#154# range 0 .. 31;
CSR24 at 16#158# range 0 .. 31;
CSR25 at 16#15C# range 0 .. 31;
CSR26 at 16#160# range 0 .. 31;
CSR27 at 16#164# range 0 .. 31;
CSR28 at 16#168# range 0 .. 31;
CSR29 at 16#16C# range 0 .. 31;
CSR30 at 16#170# range 0 .. 31;
CSR31 at 16#174# range 0 .. 31;
CSR32 at 16#178# range 0 .. 31;
CSR33 at 16#17C# range 0 .. 31;
CSR34 at 16#180# range 0 .. 31;
CSR35 at 16#184# range 0 .. 31;
CSR36 at 16#188# range 0 .. 31;
CSR37 at 16#18C# range 0 .. 31;
CSR38 at 16#190# range 0 .. 31;
CSR39 at 16#194# range 0 .. 31;
CSR40 at 16#198# range 0 .. 31;
CSR41 at 16#19C# range 0 .. 31;
CSR42 at 16#1A0# range 0 .. 31;
CSR43 at 16#1A4# range 0 .. 31;
CSR44 at 16#1A8# range 0 .. 31;
CSR45 at 16#1AC# range 0 .. 31;
CSR46 at 16#1B0# range 0 .. 31;
CSR47 at 16#1B4# range 0 .. 31;
CSR48 at 16#1B8# range 0 .. 31;
CSR49 at 16#1BC# range 0 .. 31;
CSR50 at 16#1C0# range 0 .. 31;
CSR51 at 16#1C4# range 0 .. 31;
CSR52 at 16#1C8# range 0 .. 31;
CSR53 at 16#1CC# range 0 .. 31;
HASH_HR0 at 16#310# range 0 .. 31;
HASH_HR1 at 16#314# range 0 .. 31;
HASH_HR2 at 16#318# range 0 .. 31;
HASH_HR3 at 16#31C# range 0 .. 31;
HASH_HR4 at 16#320# range 0 .. 31;
HASH_HR5 at 16#324# range 0 .. 31;
HASH_HR6 at 16#328# range 0 .. 31;
HASH_HR7 at 16#32C# range 0 .. 31;
end record;
-- Hash processor
HASH_Periph : aliased HASH_Peripheral
with Import, Address => HASH_Base;
end STM32_SVD.HASH;