forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aon_timer_testplan.hjson
98 lines (90 loc) · 3.62 KB
/
aon_timer_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
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
name: "aon_timer"
import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson",
"hw/dv/tools/dvsim/testplans/mem_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",
"aon_timer_sec_cm_testplan.hjson"]
testpoints: [
{
name: smoke
desc: '''
Smoke test initializes and starts AON Timer according to
the programmers guide.
**Stimulus**:
- Register writes to Watchdog/Wakeup COUNT, CTRL and THOLD registers
**Checks**:
- If we are changing WDOG_BARK_THOLD to be lower than the current WDOG_COUNT
watchdog timer should raise the interrupt `wdog_timer_bark`.
- If we are changing WDOG_BITE_THOLD to be lower than the current WDOG_COUNT
watchdog timer should trigger a reset request.
- If we are changing WKUP_THOLD to be lower than the current WKUP_COUNT
wakeup timer should raise the interrupt `wkup_timer_expired`.
'''
stage: V1
tests: ["aon_timer_smoke"]
}
{
name: prescaler
desc: '''
Switch prescaler value at random times without locking configuration registers
of watchdog timer.
**Stimulus**:
- Register writes to WKUP_CTRL while running.
**Checks**:
- WKUP_COUNT should reflect expected -and changed- passing of real time
regardless of its changing prescaler value.
'''
stage: V2
tests: ["aon_timer_prescaler"]
}
{
name: jump
desc: '''
Change threshold values and prescaler value on random times without locking
configuration registers of watchdog timer.
**Stimulus**:
- Register writes to WDOG_BARK_THOLD, WDOG_BITE_THOLD, WKUP_THOLD, WKUP_CTRL
**Checks**:
- If we are changing WDOG_BARK_THOLD to be lower than the current WDOG_COUNT
watchdog timer should raise the interrupt `wdog_timer_bark`.
- If we are changing WDOG_BITE_THOLD to be lower than the current WDOG_COUNT
watchdog timer should trigger a reset request.
- If we are changing WKUP_THOLD to be lower than the current WKUP_COUNT
wakeup timer should raise the interrupt `wkup_timer_expired`.
- WKUP_COUNT should reflect expected passing of real time regardless of
prescaler value.
'''
stage: V2
tests: ["aon_timer_jump"]
}
{
name: stress_all
desc: '''
This runs random sequences in succession.
Randomly chooses from the following sequences:
- aon_timer_intr_test
- aon_timer_jump
- aon_timer_prescaler
- aon_timer_smoke
'''
stage: V2
tests: ["aon_timer_stress_all"]
}
]
covergroups: [
{
name: timer_cfg_cg
desc: '''
Includes possible values of all registers of AON timer. For 32b registers, bins are
introduced in order to simplfy coverage. Maximum and minimum values are collected in
a separate bin to guarantee that they are checked. 32 separate bins are auto-generated
in order to distrubute values evenly.
'''
}
]
}