forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
edn_testplan.hjson
152 lines (151 loc) · 4.79 KB
/
edn_testplan.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
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
name: "edn"
import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson",
"hw/dv/tools/dvsim/testplans/intr_test_testplan.hjson",
"hw/dv/tools/dvsim/testplans/alert_test_testplan.hjson",
"hw/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson",
"hw/dv/tools/dvsim/testplans/stress_all_with_reset_testplan.hjson",
"edn_sec_cm_testplan.hjson"]
testpoints: [
{
name: smoke
desc: '''
Verify send instantiate/generate command
Verify single endpoint requests
Verify endpoint data = genbits data
'''
stage: V1
tests: ["edn_smoke"]
}
{
name: firmware
desc: '''
Verify SW_CMD_REQ/SW_CMD_STS registers/bits behave as predicted.
Verify software mode behaves as predicted.
Verify INSTANTIATE/GENERATE software cmds.
Verify cmd_fifo_reset bit causes fifos to reset.
'''
stage: V2
tests: ["edn_genbits"]
}
{
name: csrng_commands
desc: '''
Verify when no/some/all endpoints requesting (test arbiter).
Verify boot request mode behaves as predicted.
Verify BOOT_INS_CMD/BOOT_GEN_CMD registers.
Verify auto request mode behaves as predicted.
Verify RESEED_CMD/GENERATE_CMD/MAX_NUM_REQS_BETWEEN_RESEEDS registers.
Verify MAIN_SM_STATE register bits behave as predicted.
Verify all csrng commands (clen = 0-12, sw_mode, boot/auto_req_mode).
Verify with ready randomly asserting/deasserting
'''
stage: V2
tests: ["edn_genbits"]
}
{
name: genbits
desc: '''
Verify genbits input is transferred to endpoint(s) as predicted.
Verify fips bit(s) are properly transferred to endpoint.
'''
stage: V2
tests: ["edn_genbits"]
}
{
name: interrupts
desc: '''
Verify intr_edn_cmd_req_done interrupt asserts/clears as predicted.
Verify intr_edn_fatal_err interrupt asserts/clears as predicted.
'''
stage: V2
tests: ["edn_intr"]
}
{
name: alerts
desc: '''
Verify recov_alert_sts asserts/clears as predicted.
'''
stage: V2
tests: ["edn_alert"]
}
{
name: errs
desc: '''
Verify ERR_CODE asserts as predicted.
Verify ERR_CODE all reg bits via ERR_CODE_TEST.
'''
stage: V2
tests: ["edn_err"]
}
{
name: disable
desc: '''
Disable EDN in all states and verify proper operation when re-enabled.
'''
stage: V2
tests: ["edn_disable", "edn_disable_auto_req_mode"]
}
{
name: stress_all
desc: '''
Combine the other individual testpoints while injecting TL errors and running CSR tests
in parallel.
'''
stage: V2
tests: ["edn_stress_all"]
}
]
covergroups: [
{
name: edn_cfg_cg
desc: '''
Covers that all edn configuration options have been tested.
Individual config settings that will be covered include:
- boot_req_mode
- auto_req_mode
- sw_mode (neither boot_req_mode/auto_req_mode)
- num_endpoints
- num_boot_reqs
Cross between num_endpoints and mode.
'''
}
{
name: edn_endpoints_cg
desc: '''
Covers none/some/all endpoints requesting
'''
}
{
name: edn_cs_cmds_cg
desc: '''
Covers the following:
- csrng_commands vs clen, flags, glen
- sw, auto_req_mode commands (boot_req_mode cmds have no additional data)
- ready deasserts during command
Crosses between above coverpoints
'''
}
{
name: edn_error_cg
desc: '''
Covers that all fatal errors, all fifo errors and all error codes of edn have been tested.
Individual config settings that will be covered include:
- 3 different FIFOs: rescmd, gencmd and output
- 3 other error codes: ack state machine, main state machine and counter
- 3 types of FIFO errors: write/read/state errors
'''
}
{
name: edn_alert_cg
desc: '''
Cover all the recoverable alerts:
- Invalid MUBI values: enable field, boot request mode, auto request mode and command FIFO reset
- EDN bus comparison
'''
}
]
}