forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gpio_testplan.hjson
149 lines (149 loc) · 7.84 KB
/
gpio_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
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
name: "gpio"
import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson",
"hw/dv/tools/dvsim/testplans/alert_test_testplan.hjson",
"hw/dv/tools/dvsim/testplans/intr_test_testplan.hjson",
"hw/dv/tools/dvsim/testplans/stress_all_with_reset_testplan.hjson",
"hw/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson",
"gpio_sec_cm_testplan.hjson"]
testpoints: [
{
name: smoke
desc: '''GPIO smoke test that exercises gpio pins as inputs or outputs, and performs
data integrity checks by triggering scoreboard checks by reading data_in register.
This test repeats following steps are random no. of times:
- Configures all gpio pins as inputs, drives random value on cio_gpio_i signal and
reads data_in register after random delay
- Configures all gpio pins as outputs, programs direct_out and direct_oe registers to
random values and reads data_in register after random delay
The test is also run in a second build mode that enables the input synchronizers in
order to cover the input paths through these primitives.
'''
stage: V1
tests: ["gpio_smoke",
"gpio_smoke_no_pullup_pulldown",
"gpio_smoke_en_cdc_prim",
"gpio_smoke_no_pullup_pulldown_en_cdc_prim"]
}
{
name: direct_and_masked_out
desc: '''GPIO test that programs `DIRECT_OUT`, `DIRECT_OE`, `MASKED_OUT_LOWER`,
`MASKED_OE_LOWER`, `MASKED_OUT_UPPER` and `MASKED_OE_UPPER` registers and checks their
effect on GPIO pins as well as DATA_IN register value.
Every random iteration in this test would either:
- Program one or more of `\*OUT\*` and `\*OE\*` registers, or
- Drive new random value on GPIO pins'''
stage: V2
tests: ["gpio_random_dout_din",
"gpio_random_dout_din_no_pullup_pulldown"]
}
{
name: out_in_regs_read_write
desc: '''GPIO test that exercises functionality of DATA_OUT and DATA_OE internal registers,
and `DATA_IN` register by programming any of `\*OUT\` and `\*OE\*` registers,
respectively.
Every random iteration in this test would perform one out of following operations:
- Drive new random value on GPIO pins
- Write random value to any one of `\*OUT\*`, `\*OE\*` or `DATA_IN` registers
- Read any one of `\*OUT\*`, `\*OE\*` or `DATA_IN` registers'''
stage: V2
tests: ["gpio_dout_din_regs_random_rw"]
}
{
name: gpio_interrupt_programming
desc: '''GPIO test which programs one or multiple interrupt registers to check GPIO interrupt
functionality
Every random iteration in this test would do either of following steps, and then read
`INTR_STATE` register value:
- Drive new random value on GPIO pins (and thereby generate random interrupt event)
- Write random value to one or more interrupt registers that include `INTR_ENABLE`,
`INTR_CTRL_EN_FALLING`, `INTR_CTRL_EN_LVL_LOW`, `INTR_CTRL_EN_LVL_HIGH` and
`INTR_STATE`'''
stage: V2
tests: ["gpio_intr_rand_pgm"]
}
{
name: random_interrupt_trigger
desc: '''GPIO test that randomly generates and clears multiple GPIO interrupts for each
random programming of interrupt registers, and performs checks by reading `DATA_IN`
and `INTR_STATE` registers.
Each random iteration of this test performs following operations:
1. Programs one more interrupt registers to random values
2. Following two operations are performed in parallel:
- Drive random value on GPIO pins multiple times, every time at a random time
intervals (random number of clock cycles)
- Randomize random time interval (random number of clock cycles) and read either
`DATA_IN` or `INTR_STATE` register value at randomized time interval
After every read, optionally perform random interrupt clearing operation by
writing to `INTR_STATE` register'''
stage: V2
tests: ["gpio_rand_intr_trigger"]
}
{
name: interrupt_and_noise_filter
desc: '''GPIO test that exercise GPIO noise filter functionaliy along with random interrupt
programming and randomly toggling each GPIO pin value, independently of other GPIO pins.
Each random iteration performs following operations:
1. programs random values in one or more interrupt registers
2. optionally, programs new random value in `CTRL_EN_INPUT_FILTER` register
3. performs following operations in parallel:
- drives each GPIO pin independently such that each pin has stable value for random
number of clock cycles within the range `[1:FILTER_CYCLES]`, and also predicts
updates in values of `DATA_IN` and `INTR_STATE` registers
- multiple registers reads, each for either `DATA_IN` or `INTR_STATE`'''
stage: V2
tests: ["gpio_intr_with_filter_rand_intr_event"]
}
{
name: noise_filter_stress
desc: '''GPIO test that stresses noise filter functionality by driving each GPIO pin such
independently of other pins, and driving could be either synchronous to clock or
asynchronous.
Each iteration in test does following:
1. Programs one or more interrupt registers with random values
2. Programs noise filter register with random value
3. Drives each GPIO pin with the mix of both synchronous and asynchronous driving,
and each pin is driven independently of others'''
stage: V2
tests: ["gpio_filter_stress"]
}
{
name: regs_long_reads_and_writes
desc: '''GPIO test that performs back-to-back register writes and back-to-back register reads
on randomly selected GPIO registers.
Each iteration in this test performs one out of following operations:
- Drive new random value on GPIO pins
- Perform multiple random writes on randomly selected GPIO registers
- Perform multiple random reads on randomly selected GPIO registers'''
stage: V2
tests: ["gpio_random_long_reg_writes_reg_reads"]
}
{
name: full_random
desc: '''GPIO full random test that performs any of following in each iteration:
- Drive new random value on GPIO pins such that GPIO inputs and GPIO outputs shall not
result in unknown value on any pin
- Write to one or more of `DIRECT_OUT`, `DIRECT_OE`, `MASKED_OUT_UPPER`,
`MASKED_OE_UPPER`, `MASKED_OE_LOWER` and `MASKED_OE_LOWER` registers such that GPIO
inputs and GPIO outputs shall not result in unknown value on any pin
- Write to one or more of GPIO interrupt registers that include `INTR_ENABLE`,
`INTR_CTRL_EN_FALLING`, `INTR_CTRL_EN_RISING`, `INTR_CTRL_EN_LVL_HIGH`,
`INTR_CTRL_EN_LVL_LOW` and `INTR_STATE`
- Write to other GPIO registers `DATA_IN`, `INTR_TEST`, `CTRL_EN_INPUT_FILTER`
- Read any one of the GPIO registers
- Apply hard reset'''
stage: V2
tests: ["gpio_full_random"]
}
{
name: stress_all
desc: '''Stress_all test is a random mix of all the test above except csr tests, gpio full
random, intr_test and other gpio test that disabled scoreboard'''
stage: V2
tests: ["gpio_stress_all"]
}
]
}