-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtestplan_hci.hjson
227 lines (212 loc) · 8.99 KB
/
testplan_hci.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
// SPDX-License-Identifier: Apache-2.0
{
testpoints: [
{
name: hc_bus_enable
desc: '''
Verify core behavior to the bus_enable bit.
- When bit is cleared, core should not execute commands
in the command queue
- When bit is set, core should fetch commands from
the command queue and execute them normally
- When SW clears BUS_ENABLE bit while a command is in
progress, core should keep executing commands until
command with `TOC` filed is set
- Core should return to IDLE state after processing
command with `TOC` set
'''
stage: ""
tests: ["hc_bus_enable"]
}
{
name: hc_resume
desc: '''
Verify core behavior to the bus error detection.
- Core should process commands while this value is 0
- After detecting transaction error on I3C bus, core
should set this bit and stop processing command queue
- Writing 1 should clear this bit and resume command
processing
'''
stage: ""
tests: ["hc_resume"]
}
{
name: hc_abort
desc: '''
Verify I3C core behavior on SW HC_ABORT request.
- Core should abort ongoing transaction on the nearest
opportunity and refrain from executing any other
scheduled command
- Core should enter abort state
- Core should set all other abort registers, as HC_CONTROL
acts as global abort request
- Response queue entry for aborted command should have
ERR_STATUS field set to 0x8
- If interrupts are enabled, ABORT should trigger
TRANSFER_ABORT_STAT
- ABORT should trigger HC_SEQ_CANCEL_STAT when last command
had `TOC` unset
'''
stage: ""
tests: ["hc_abort"]
}
{
name: hc_halt_on_timeout
desc: '''
Verify I3C core behavior to the sequence timeout.
- Core should raise HC_WARN_CMD_SEQ_STALL_STAT when command
queue is empty and last command had `TOC` unset
- When HC_HALT_ON_CMD_SEQ_TIMEOUT is set core should raise,
HC_ERR_CMD_SEQ_TIMEOUT_STAT after prolonged stall condition
- When HC_HALT_ON_CMD_SEQ_TIMEOUT is set prolonged stall
should trigger HALT state, which is read through HC_RESUME field
- Response to the last command should have its ERR_STATUS
field set to 0x8
'''
stage: ""
tests: ["hc_halt_on_timeout"]
}
{
name: hc_hot_join
desc: '''
Verify I3C core behavior to the hot join IBI request.
- I3C core should NACK request and send broadcast CCC that
disables Hot-Join IBIs when HOT_JOIN_CTRL is set
- I3C core should ACK request and proceed to assign dynamic
address if the HOT_JOIN_CTRL is unset
'''
stage: ""
tests: ["hc_hot_join"]
}
{
name: soft_reset
desc: '''
Verify I3C core behavior to the reset register.
- Writing 1 to the SOFT_RST field should trigger I3C core
reset to the same state as would system level reset
- CSRs should be in default states
'''
stage: ""
tests: ["soft_rst"]
}
{
name: queue_reset
desc: '''
Verify I3C core behavior to the reset register.
- Writing 1 to any of queue reset fields should cause
queue to flush
- This operation shouldn't trigger threshold interrupts
'''
stage: ""
tests: ["cmd_queue_rst", "resp_queue_rst",
"tx_fifo_rst", "rx_queue_rst", "ibi_queue_rst"]
}
{
name: notify_interrupt_rejected
desc: '''
Verify I3C core configurable behavior to the rejected
interrupt.
- I3C core should enqueue IBI Status Descriptor in the IBI
Data queue on the rejected IBI when correct bit in the
IBI_NOTIFY_CTRL is selected
'''
stage: ""
tests: ["notify_hj_rejected", "notify_crr_rejected",
"notify_ibi_rejected"]
}
{
name: ibi_splitting
desc: '''
Verify I3C core behavior to the IBI_DATA_SEGMENT_SIZE field.
- I3C core should create new IBI status descriptor every
4*IBI_DATA_SEGMENT_SIZE bytes
- I3C core should mark if status descriptor is a last
descriptor for this IBI or if more descriptors are to follow
'''
stage: ""
tests: ["ibi_data_split"]
}
{
name: ibi_data_abort
desc: '''
Verify I3C core behavior to the IBI data abort.
- I3C core should enable IBI monitoring only when
IBI_DATA_ABORT_MON is set
- I3C core must be able to cancel ongoing IBI if this
register is updated with current IBI's IBI_ID and STATUS_TYPE
after N chucks, where N is provided in the AFTER_N_CHUNKS field
'''
stage: ""
tests: ["ibi_data_abort"]
}
{
name: pio_queue_intr
desc: '''
Verify I3C core behavior to the PIO queue threshold settings.
- I3C core should trigger interrupt when queue has threshold
free entries or has at least threshold entires
'''
stage: ""
tests: ["cmd_empty_intr", "resp_fill_intr", "ibi_status_intr",
"tx_empty_intr", "rx_fill_intr"]
}
{
name: pio_control
desc: '''
Verify I3C core behavior to PIO control registers.
- Setting ABORT should abort ongoing transaction on the nearest
opportunity and refrain from executing any other
scheduled command
- Disabling ENABLE should disable Sw accesses to
the PIO queue registers for reading and writing
- Disabling RS should stop CMD queue execution, already
started command should be completed normally
'''
stage: ""
tests: ["pio_abort", "pio_enable", "pio_rs"]
}
{
name: status_monitoring
desc: '''
Verify I3C core status monitoring enabling/disabling using
CSRs.
- Disable status fields shouldn't change when trigger
condition is true
- Enabling status monitoring, while I3C core is in the set
condition, should update status register
'''
stage: ""
tests: ["hc_internal_err_stat_en", "hc_seq_cancel_stat_en",
"hc_warn_cmd_seq_stall_stat_en",
"hc_err_cmd_seq_timeout_stat_en",
"sched_cmd_missed_tick_stat_en",
"tx_thld_stat_en", "rx_thld_stat_en",
"ibi_status_thld_stat_en",
"cmd_queue_ready_stat_en",
"resp_ready_stat_en",
"transfer_abort_stat_en", "transfer_err_stat_en"]
}
{
name: interrupt_enable
desc: '''
Verify I3C core status interrupt enabling/disabling using
CSRs.
- Disable interrupts shouldn't trigger external interrupt
when status field is set
- Enabling interrupt signal, while status register is set,
should trigger external interrupt
'''
stage: ""
tests: ["hc_internal_err_signal_en", "hc_seq_cancel_signal_en",
"hc_warn_cmd_seq_stall_signal_en",
"hc_err_cmd_seq_timeout_signal_en",
"sched_cmd_missed_tick_signal_en",
"tx_thld_signal_en", "rx_thld_signal_en",
"ibi_status_thld_signal_en",
"cmd_queue_ready_signal_en",
"resp_ready_signal_en",
"transfer_abort_signal_en", "transfer_err_signal_en"]
}
]
}