forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
alert_handler.hjson
1971 lines (1948 loc) · 67.1 KB
/
alert_handler.hjson
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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
# ALERT_HANDLER register template
{
name: "alert_handler",
// Unique comportable IP identifier defined under KNOWN_CIP_IDS in the regtool.
cip_id: "32",
design_spec: "../doc",
dv_doc: "../doc/dv",
hw_checklist: "../doc/checklist",
sw_checklist: "/sw/device/lib/dif/dif_alert_handler"
version: "1.0.1",
life_stage: "L1",
design_stage: "D3",
verification_stage: "V2S",
dif_stage: "S2",
notes: "Use both FPV and DV to perform block level verification.",
clocking: [
{clock: "clk_i", reset: "rst_ni", primary: true},
{clock: "clk_edn_i", reset: "rst_edn_ni"}
]
bus_interfaces: [
{ protocol: "tlul", direction: "device", hier_path: "u_reg_wrap.u_reg" }
],
regwidth: "32",
param_list: [
// Random netlist constants
{ name: "RndCnstLfsrSeed",
desc: "Compile-time random bits for initial LFSR seed",
type: "alert_pkg::lfsr_seed_t"
randcount: "32",
randtype: "data", // randomize randcount databits
}
{ name: "RndCnstLfsrPerm",
desc: "Compile-time random permutation for LFSR output",
type: "alert_pkg::lfsr_perm_t"
randcount: "32",
randtype: "perm", // random permutation for randcount elements
}
// Normal parameters
{ name: "NAlerts",
desc: "Number of alert channels.",
type: "int",
default: "65",
local: "true"
},
{ name: "NLpg",
desc: "Number of LPGs.",
type: "int",
default: "24",
local: "true"
},
{ name: "NLpgWidth",
desc: "Width of LPG ID.",
type: "int",
default: "5",
local: "true"
},
{ name: "LpgMap",
desc: '''
Defines a mapping from alerts to LPGs.
'''
type: "logic [NAlerts-1:0][NLpgWidth-1:0]",
default: '''
{
5'd17,
5'd17,
5'd17,
5'd17,
5'd17,
5'd17,
5'd19,
5'd19,
5'd19,
5'd19,
5'd19,
5'd19,
5'd19,
5'd19,
5'd19,
5'd19,
5'd23,
5'd23,
5'd22,
5'd22,
5'd21,
5'd20,
5'd20,
5'd19,
5'd18,
5'd17,
5'd17,
5'd17,
5'd17,
5'd17,
5'd16,
5'd12,
5'd12,
5'd14,
5'd11,
5'd13,
5'd13,
5'd12,
5'd11,
5'd11,
5'd11,
5'd11,
5'd10,
5'd9,
5'd8,
5'd7,
5'd6,
5'd6,
5'd6,
5'd6,
5'd6,
5'd6,
5'd6,
5'd6,
5'd5,
5'd0,
5'd4,
5'd3,
5'd2,
5'd1,
5'd0,
5'd0,
5'd0,
5'd0,
5'd0
}
''',
local: "true"
},
{ name: "EscCntDw",
desc: "Width of the escalation timer.",
type: "int",
default: "32",
local: "true"
},
{ name: "AccuCntDw",
desc: "Width of the accumulation counter.",
type: "int",
default: "16",
local: "true"
},
{ name: "AsyncOn",
desc: '''
Each bit of this parameter corresponds to an escalation channel and
defines whether the protocol is synchronous (0) or asynchronous (1).
'''
type: "logic [NAlerts-1:0]",
default: '''
{
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1,
1'b1
}
'''
local: "true"
},
{ name: "N_CLASSES",
desc: "Number of classes",
type: "int",
default: "4",
local: "true"
},
{ name: "N_ESC_SEV",
desc: "Number of escalation severities",
type: "int",
default: "4",
local: "true"
},
{ name: "N_PHASES",
desc: "Number of escalation phases",
type: "int",
default: "4",
local: "true"
},
{ name: "N_LOC_ALERT",
desc: "Number of local alerts",
type: "int",
default: "7",
local: "true"
},
{ name: "PING_CNT_DW",
desc: "Width of ping counter",
type: "int",
default: "16",
local: "true"
},
{ name: "PHASE_DW",
desc: "Width of phase ID",
type: "int",
default: "2",
local: "true"
},
{ name: "CLASS_DW",
desc: "Width of class ID",
type: "int",
default: "2",
local: "true"
},
{ name: "LOCAL_ALERT_ID_ALERT_PINGFAIL",
desc: "Local alert ID for alert ping failure.",
type: "int",
default: "0",
local: "true"
},
{ name: "LOCAL_ALERT_ID_ESC_PINGFAIL",
desc: "Local alert ID for escalation ping failure.",
type: "int",
default: "1",
local: "true"
},
{ name: "LOCAL_ALERT_ID_ALERT_INTEGFAIL",
desc: "Local alert ID for alert integrity failure.",
type: "int",
default: "2",
local: "true"
},
{ name: "LOCAL_ALERT_ID_ESC_INTEGFAIL",
desc: "Local alert ID for escalation integrity failure.",
type: "int",
default: "3",
local: "true"
},
{ name: "LOCAL_ALERT_ID_BUS_INTEGFAIL",
desc: "Local alert ID for bus integrity failure.",
type: "int",
default: "4",
local: "true"
},
{ name: "LOCAL_ALERT_ID_SHADOW_REG_UPDATE_ERROR",
desc: "Local alert ID for shadow register update error.",
type: "int",
default: "5",
local: "true"
},
{ name: "LOCAL_ALERT_ID_SHADOW_REG_STORAGE_ERROR",
desc: "Local alert ID for shadow register storage error.",
type: "int",
default: "6",
local: "true"
},
{ name: "LOCAL_ALERT_ID_LAST",
desc: "Last local alert ID.",
type: "int",
default: "6",
local: "true"
},
],
inter_signal_list: [
{ struct: "alert_crashdump",
type: "uni",
name: "crashdump",
act: "req",
package: "alert_pkg"
},
{ struct: "edn"
type: "req_rsp"
name: "edn"
act: "req"
width: "1"
package: "edn_pkg"
},
{ struct: "esc_rx"
type: "uni"
name: "esc_rx"
act: "rcv"
width: "4", // N_ESC_SEV
package: "prim_esc_pkg"
},
{ struct: "esc_tx"
type: "uni"
name: "esc_tx"
act: "req"
width: "4", // N_ESC_SEV
package: "prim_esc_pkg"
},
]
features: [
{ name: "ALERT_HANDLER.ALERT.OBSERVE",
desc: '''
All incoming alerts can be observed by the alert handler.
'''
}
{ name: "ALERT_HANDLER.ALERT.INTERRUPT",
desc: '''
All alert classes can raise an interrupt when an alert that is
allocated to them is raised.
'''
}
{ name: "ALERT_HANDLER.ALERT.ESCALATE",
desc: '''
All incoming alerts can trigger the alert escalation mechanisms
of the classes they are allocated to
'''
}
{
name: "ALERT_HANDLER.PING_TIMER",
desc: '''
The alert handler periodically pings all alert receivers and
will raise an alert if the ping isn't responded to in good time
'''
}
{ name: "ALERT_HANDLER.ESCALATION.COUNT",
desc: '''
An escalation can be triggered when the number of alerts seen in
a particular class exceeds a software programmable threshold
'''
}
{ name: "ALERT_HANDLER.ESCALATION.TIMEOUT",
desc: '''
An escalation can be triggered when an interrupt from a class
isn't acknowledged after a software programmable timeout
'''
}
{ name: "ALERT_HANDLER.ESCALATION.PHASES",
desc: '''
Each alert class can trigger the same 4 escalation phases. A
programmable timer specifies the delay between each of the
escalation phases. The actions taken on each of the escalation
signals are specific to the top-level integration.
'''
}
{
name: "ALERT_HANDLER.CRASH_DUMP",
desc: '''
A crashdump with the state of CSRs and alert handler state bits
is made available. When a programmable latching trigger condition
is met the crashdump is held constant at its value on that
trigger condition so it can be recorded and made available for
later analysis
'''
}
]
countermeasures: [
{ name: "BUS.INTEGRITY",
desc: "End-to-end bus integrity scheme."
}
{ name: "CONFIG.SHADOW",
desc: "Important CSRs are shadowed."
}
{ name: "PING_TIMER.CONFIG.REGWEN",
desc: "The ping timer configuration registers are REGWEN protected."
}
{ name: "ALERT.CONFIG.REGWEN",
desc: "The individual alert enables are REGWEN protected."
}
{ name: "ALERT_LOC.CONFIG.REGWEN",
desc: "The individual local alert enables are REGWEN protected."
}
{ name: "CLASS.CONFIG.REGWEN",
desc: "The class configuration registers are REGWEN protected."
}
{ name: "ALERT.INTERSIG.DIFF",
desc: "Differentially encoded alert channels."
}
{ name: "LPG.INTERSIG.MUBI",
desc: "LPG signals are encoded with MUBI types."
}
{ name: "ESC.INTERSIG.DIFF",
desc: "Differentially encoded escalation channels."
}
{ name: "ALERT_RX.INTERSIG.BKGN_CHK",
desc: "Periodic background checks on alert channels (ping mechanism)."
}
{ name: "ESC_TX.INTERSIG.BKGN_CHK",
desc: "Periodic background checks on escalation channels (ping mechanism)."
}
{ name: "ESC_RX.INTERSIG.BKGN_CHK",
desc: "Escalation receivers can detect absence of periodic ping requests."
}
{ name: "ESC_TIMER.FSM.SPARSE",
desc: "Escalation timer FSMs are sparsely encoded."
}
{ name: "PING_TIMER.FSM.SPARSE",
desc: "Ping timer FSM is sparsely encoded."
}
{ name: "ESC_TIMER.FSM.LOCAL_ESC",
desc: "Escalation timer FSMs move into an invalid state upon local escalation."
}
{ name: "PING_TIMER.FSM.LOCAL_ESC",
desc: "Ping timer FSM moves into an invalid state upon local escalation."
}
{ name: "ESC_TIMER.FSM.GLOBAL_ESC",
desc: '''
The escalation timer FSMs are the root of global escalation,
hence if any of them moves into an invalid state by virtue of
ESC_TIMER.FSM.LOCAL_ESC, this will trigger all escalation actions
and thereby global escalation as well.
'''
}
{ name: "ACCU.CTR.REDUN",
desc: "Accumulator counters employ a cross-counter implementation."
}
{ name: "ESC_TIMER.CTR.REDUN",
desc: "Escalation timer counters employ a duplicated counter implementation."
}
{ name: "PING_TIMER.CTR.REDUN",
desc: "Ping timer counters employ a duplicated counter implementation."
}
{ name: "PING_TIMER.LFSR.REDUN",
desc: "Ping timer LFSR is redundant."
}
]
# interrupt registers for the classes
interrupt_list: [
{ name: "classa",
desc: '''
Interrupt state bit of Class A. Set by HW in case an alert within this class triggered. Defaults true, write one to clear.
''',
},
{ name: "classb",
desc: '''
Interrupt state bit of Class B. Set by HW in case an alert within this class triggered. Defaults true, write one to clear.
''',
},
{ name: "classc",
desc: '''
Interrupt state bit of Class C. Set by HW in case an alert within this class triggered. Defaults true, write one to clear.
''',
},
{ name: "classd",
desc: '''
Interrupt state bit of Class D. Set by HW in case an alert within this class triggered. Defaults true, write one to clear.
''',
},
],
registers: [
# register lock for ping timeout counter
{ name: "PING_TIMER_REGWEN",
desc: '''
Register write enable for !!PING_TIMEOUT_CYC_SHADOWED and !!PING_TIMER_EN_SHADOWED.
''',
swaccess: "rw0c",
hwaccess: "none",
fields: [
{
bits: "0",
desc: '''
When true, the !!PING_TIMEOUT_CYC_SHADOWED and !!PING_TIMER_EN_SHADOWED registers can be modified.
When false, they become read-only. Defaults true, write one to clear.
This should be cleared once the alert handler has been configured and the ping
timer mechanism has been kicked off.
'''
resval: 1,
},
]
},
{ name: "PING_TIMEOUT_CYC_SHADOWED",
desc: '''
Ping timeout cycle count.
'''
shadowed: "true",
swaccess: "rw",
hwaccess: "hro",
regwen: "PING_TIMER_REGWEN",
fields: [
{
bits: "PING_CNT_DW-1:0",
resval: 256,
desc: '''
Timeout value in cycles.
If an alert receiver or an escalation sender does not respond to a ping within this timeout window, a pingfail alert will be raised.
It is recommended to set this value to the equivalent of 256 cycles of the slowest alert sender clock domain in the system (or greater).
'''
}
]
}
{ name: "PING_TIMER_EN_SHADOWED",
desc: '''
Ping timer enable.
'''
shadowed: "true",
swaccess: "rw1s",
hwaccess: "hro",
regwen: "PING_TIMER_REGWEN",
fields: [
{
bits: "0",
resval: 0,
desc: '''
Setting this to 1 enables the ping timer mechanism.
This bit cannot be cleared to 0 once it has been set to 1.
Note that the alert pinging mechanism will only ping alerts that have been enabled and locked.
'''
}
]
}
# all alerts
{ multireg: { name: "ALERT_REGWEN",
desc: "Register write enable for alert enable bits.",
count: "NAlerts",
compact: "false",
swaccess: "rw0c",
hwaccess: "hro",
hwqe: "false",
cname: "alert",
fields: [
{ bits: "0",
name: "EN",
desc: '''
Alert configuration write enable bit.
If this is cleared to 0, the corresponding !!ALERT_EN_SHADOWED
and !!ALERT_CLASS_SHADOWED bits are not writable anymore.
Note that the alert pinging mechanism will only ping alerts that have been enabled and locked.
''',
resval: "1",
}
]
}
},
{ multireg: { name: "ALERT_EN_SHADOWED",
desc: '''Enable register for alerts.
''',
count: "NAlerts",
shadowed: "true",
swaccess: "rw",
hwaccess: "hro",
regwen: "ALERT_REGWEN",
regwen_multi: "true",
cname: "alert",
tags: [// Enable `alert_en` might cause top-level escalators to trigger
// unexpected reset
"excl:CsrAllTests:CsrExclWrite"]
fields: [
{ bits: "0",
name: "EN_A",
resval: 0
desc: '''
Alert enable bit.
Note that the alert pinging mechanism will only ping alerts that have been enabled and locked.
'''
}
]
}
},
{ multireg: { name: "ALERT_CLASS_SHADOWED",
desc: '''Class assignment of alerts.
''',
count: "NAlerts",
shadowed: "true",
swaccess: "rw",
hwaccess: "hro",
regwen: "ALERT_REGWEN",
regwen_multi: "true",
cname: "alert",
fields: [
{
bits: "CLASS_DW-1:0",
name: "CLASS_A",
resval: 0
desc: "Classification ",
enum: [
{ value: "0", name: "ClassA", desc: "" },
{ value: "1", name: "ClassB", desc: "" },
{ value: "2", name: "ClassC", desc: "" },
{ value: "3", name: "ClassD", desc: "" },
]
}
]
}
},
{ multireg: {
name: "ALERT_CAUSE",
desc: "Alert Cause Register",
count: "NAlerts",
compact: "false",
cname: "ALERT",
swaccess: "rw1c",
hwaccess: "hrw",
fields: [
{ bits: "0", name: "A", desc: "Cause bit ", resval: 0}
],
}
},
# local alerts
{ multireg: { name: "LOC_ALERT_REGWEN",
desc: "Register write enable for alert enable bits.",
count: "N_LOC_ALERT",
compact: "false",
swaccess: "rw0c",
hwaccess: "none",
cname: "LOC_ALERT",
fields: [
{ bits: "0",
name: "EN",
desc: '''
Alert configuration write enable bit.
If this is cleared to 0, the corresponding !!LOC_ALERT_EN_SHADOWED
and !!LOC_ALERT_CLASS_SHADOWED bits are not writable anymore.
Note that the alert pinging mechanism will only ping alerts that have been enabled and locked.
''',
resval: "1",
}
]
}
},
{ multireg: { name: "LOC_ALERT_EN_SHADOWED",
desc:
'''
Enable register for the local alerts
"alert pingfail" (0), "escalation pingfail" (1),
"alert integfail" (2), "escalation integfail" (3),
"bus integrity failure" (4), "shadow reg update error" (5)
and "shadow reg storage error" (6).
''',
count: "N_LOC_ALERT",
shadowed: "true",
swaccess: "rw",
hwaccess: "hro",
regwen: "LOC_ALERT_REGWEN",
regwen_multi: "true",
cname: "LOC_ALERT",
fields: [
{ bits: "0",
name: "EN_LA",
resval: 0
desc: '''
Alert enable bit.
Note that the alert pinging mechanism will only ping alerts that have been enabled and locked.
'''
}
]
}
},
{ multireg: { name: "LOC_ALERT_CLASS_SHADOWED",
desc: '''
Class assignment of the local alerts
"alert pingfail" (0), "escalation pingfail" (1),
"alert integfail" (2), "escalation integfail" (3),
"bus integrity failure" (4), "shadow reg update error" (5)
and "shadow reg storage error" (6).
''',
count: "N_LOC_ALERT",
shadowed: "true",
swaccess: "rw",
hwaccess: "hro",
regwen: "LOC_ALERT_REGWEN",
regwen_multi: "true",
cname: "LOC_ALERT",
fields: [
{
bits: "CLASS_DW-1:0",
name: "CLASS_LA",
resval: 0
desc: "Classification ",
enum: [
{ value: "0", name: "ClassA", desc: "" },
{ value: "1", name: "ClassB", desc: "" },
{ value: "2", name: "ClassC", desc: "" },
{ value: "3", name: "ClassD", desc: "" },
]
}
]
}
},
{ multireg: {
name: "LOC_ALERT_CAUSE",
desc: '''Alert Cause Register for the local alerts
"alert pingfail" (0), "escalation pingfail" (1),
"alert integfail" (2), "escalation integfail" (3),
"bus integrity failure" (4), "shadow reg update error" (5)
and "shadow reg storage error" (6).
''',
count: "N_LOC_ALERT",
compact: "false",
cname: "LOC_ALERT",
swaccess: "rw1c",
hwaccess: "hrw",
tags: [// Top level CSR automation test, CPU clock is disabled, so escalation response will
// not send back to alert handler. This will set loc_alert_cause and could not predict
// automatically.
"excl:CsrNonInitTests:CsrExclCheck"],
fields: [
{ bits: "0", name: "LA", desc: "Cause bit ", resval: 0}
]
}
},
# classes
{ name: "CLASSA_REGWEN",
desc: '''
Lock bit for Class A configuration.
'''
swaccess: "rw0c",
hwaccess: "none",
fields: [
{ bits: "0",
desc: '''
Class configuration enable bit.
If this is cleared to 0, the corresponding class configuration
registers cannot be written anymore.
''',
resval: 1,
}
]
},
{ name: "CLASSA_CTRL_SHADOWED",
desc: "Escalation control register for alert Class A. Can not be modified if !!CLASSA_REGWEN is false."
swaccess: "rw",
hwaccess: "hro",
regwen: "CLASSA_REGWEN",
shadowed: "true",
fields: [
{ bits: "0",
name: "EN",
desc: '''
Enable escalation mechanisms (accumulation and
interrupt timeout) for Class A. Note that interrupts can fire
regardless of whether the escalation mechanisms are enabled for
this class or not.
''',
}
{ bits: "1",
name: "LOCK",
desc: '''
Enable automatic locking of escalation counter for class A.
If true, there is no way to stop the escalation protocol for class A
once it has been triggered.
'''
}
{ bits: "2",
name: "EN_E0",
resval: 1,
desc: "Enable escalation signal 0 for Class A",
}
{ bits: "3",
name: "EN_E1",
resval: 1,
desc: "Enable escalation signal 1 for Class A",
}
{ bits: "4",
name: "EN_E2",
resval: 1,
desc: "Enable escalation signal 2 for Class A",
}
{ bits: "5",
name: "EN_E3",
resval: 1,
desc: "Enable escalation signal 3 for Class A",
}
{ bits: "7:6",
name: "MAP_E0",
resval: 0,
desc: "Determines in which escalation phase escalation signal 0 shall be asserted.",
}
{ bits: "9:8",
name: "MAP_E1",
resval: 1,
desc: "Determines in which escalation phase escalation signal 1 shall be asserted.",
}
{ bits: "11:10",
name: "MAP_E2",
resval: 2,
desc: "Determines in which escalation phase escalation signal 2 shall be asserted.",
}
{ bits: "13:12",
name: "MAP_E3",
resval: 3,
desc: "Determines in which escalation phase escalation signal 3 shall be asserted.",
}
]
},
{ name: "CLASSA_CLR_REGWEN",
desc: '''
Clear enable for escalation protocol of Class A alerts.
'''
swaccess: "rw0c",
hwaccess: "hwo",
fields: [
{ bits: "0",
desc: '''Register defaults to true, can only be cleared. This register is set
to false by the hardware if the escalation protocol has been triggered and the bit
!!CLASSA_CTRL_SHADOWED.LOCK is true.
''',
resval: 1,
}
],
tags: [// The value of this register is set to false only by hardware, under the condition
// that escalation is triggered and the corresponding lock bit is true
// Cannot not be auto-predicted so it is excluded from read check
"excl:CsrNonInitTests:CsrExclWriteCheck"]
},
{ name: "CLASSA_CLR_SHADOWED",
desc: '''
Clear for escalation protocol of Class A.
'''
swaccess: "rw",
hwaccess: "hro",
hwqe: "true",
shadowed: "true",
regwen: "CLASSA_CLR_REGWEN",
fields: [
{ bits: "0",
desc: '''Writing 1 to this register clears the accumulator and aborts escalation
(if it has been triggered). This clear is disabled if !!CLASSA_CLR_REGWEN is false.
'''
}
]
},
{ name: "CLASSA_ACCUM_CNT",
desc: '''
Current accumulation value for alert Class A. Software can clear this register
with a write to !!CLASSA_CLR_SHADOWED register unless !!CLASSA_CLR_REGWEN is false.
'''
swaccess: "ro",
hwaccess: "hwo",
hwext: "true",
fields: [
{ bits: "AccuCntDw-1:0" }
],
tags: [// The value of this register is determined by how many alerts have been triggered
// Cannot be auto-predicted so it is excluded from read check
"excl:CsrNonInitTests:CsrExclWriteCheck"]
},
{ name: "CLASSA_ACCUM_THRESH_SHADOWED",
desc: '''
Accumulation threshold value for alert Class A.
'''
swaccess: "rw",
hwaccess: "hro",
shadowed: "true",
regwen: "CLASSA_REGWEN",
fields: [
{ bits: "AccuCntDw-1:0",
desc: '''Once the accumulation value register is equal to the threshold escalation will
be triggered on the next alert occurrence within this class A begins. Note that this
register can not be modified if !!CLASSA_REGWEN is false.
'''
}
]
},
{ name: "CLASSA_TIMEOUT_CYC_SHADOWED",
desc: '''
Interrupt timeout in cycles.
'''
swaccess: "rw",
hwaccess: "hro",
shadowed: "true",
regwen: "CLASSA_REGWEN",
fields: [
{ bits: "EscCntDw-1:0",
desc: '''If the interrupt corresponding to this class is not
handled within the specified amount of cycles, escalation will be triggered.
Set to a positive value to enable the interrupt timeout for Class A. The timeout is set to zero
by default, which disables this feature. Note that this register can not be modified if
!!CLASSA_REGWEN is false.
'''
}
]
},
{ name: "CLASSA_CRASHDUMP_TRIGGER_SHADOWED",
desc: '''
Crashdump trigger configuration for Class A.
'''
swaccess: "rw",
hwaccess: "hro",
shadowed: "true",
regwen: "CLASSA_REGWEN",
resval: "0",
fields: [
{ bits: "PHASE_DW-1:0",
desc: '''
Determine in which escalation phase to capture the crashdump containing all alert cause CSRs and escalation
timer states. It is recommended to capture the crashdump upon entering the first escalation phase
that activates a countermeasure with many side-effects (e.g. life cycle state scrapping) in order
to prevent spurious alert events from masking the original alert causes.
Note that this register can not be modified if !!CLASSA_REGWEN is false.
'''
}
]
},
{ name: "CLASSA_PHASE0_CYC_SHADOWED",
desc: '''
Duration of escalation phase 0 for Class A.
'''
swaccess: "rw",
hwaccess: "hro",
shadowed: "true",
regwen: "CLASSA_REGWEN",
fields: [
{ bits: "EscCntDw-1:0" ,
desc: '''Escalation phase duration in cycles. Note that this register can not be
modified if !!CLASSA_REGWEN is false.'''
}
]
}
{ name: "CLASSA_PHASE1_CYC_SHADOWED",
desc: '''
Duration of escalation phase 1 for Class A.
'''
swaccess: "rw",
hwaccess: "hro",
shadowed: "true",
regwen: "CLASSA_REGWEN",
fields: [
{ bits: "EscCntDw-1:0" ,
desc: '''Escalation phase duration in cycles. Note that this register can not be
modified if !!CLASSA_REGWEN is false.'''
}
]
}
{ name: "CLASSA_PHASE2_CYC_SHADOWED",
desc: '''
Duration of escalation phase 2 for Class A.
'''
swaccess: "rw",
hwaccess: "hro",
shadowed: "true",
regwen: "CLASSA_REGWEN",
fields: [
{ bits: "EscCntDw-1:0" ,
desc: '''Escalation phase duration in cycles. Note that this register can not be
modified if !!CLASSA_REGWEN is false.'''
}
]
}
{ name: "CLASSA_PHASE3_CYC_SHADOWED",
desc: '''
Duration of escalation phase 3 for Class A.
'''
swaccess: "rw",