-
Notifications
You must be signed in to change notification settings - Fork 779
/
chip_testplan.hjson
2861 lines (2576 loc) · 121 KB
/
chip_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
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.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
name: "chip"
// TODO: remove the common testplans if not applicable
import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson",
// TODO #5484, comment these 2 lines out because spi host memory is dummy
// "hw/dv/tools/dvsim/testplans/mem_testplan.hjson",
"hw/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson",
"hw/ip/tlul/data/tlul_testplan.hjson",
"sw/device/silicon_creator/mask_rom/data/mask_rom_testplan.hjson",
"hw/top_earlgrey/data/chip_conn_testplan.hjson"]
testpoints: [
///////////////////////////////////////////////////////////////////////////
// IO Peripherals //
// UART, GPIO, I2C, SPIDEV, SPIHOST, USB, PINMUX & PADCTRL, PATTGEN, PWM //
///////////////////////////////////////////////////////////////////////////
// UART (pre-verified IP) integration tests:
{
name: chip_sw_uart_tx_rx
desc: '''Verify transmission of data over the TX and RX port.
SW test sends a known payload over the TX port. The testbench, at the same time
sends a known payload over RX. On reception, both payloads are checked for integrity.
SW validates the reception of TX watermark, RX watermark, and the TX empty interrupts.
Choosing the max supported baud rate for the UART is sufficient.
Verify each UART instance at the chip level independently. Verify there is no aliasing
on all UART ports across the instances.
'''
milestone: V1
tests: ["chip_sw_uart_tx_rx"]
tags: ["gls"]
}
{
name: chip_sw_uart_rx_overflow
desc: '''Verify the RX overflow interrupt.
The testbench sends a random payload of size greater than the RX fifo size (32). The SW
ignores the received the data to allow the RX overflow interrupt to assert.
Verify each UART instance at the chip level independently. Verify there is no aliasing
on all UART ports across the instances.
'''
milestone: V1
tests: ["chip_sw_uart_tx_rx", "chip_sw_uart_tx_rx_idx1", "chip_sw_uart_tx_rx_idx2",
"chip_sw_uart_tx_rx_idx3"]
}
{
name: chip_sw_uart_rand_baudrate
desc: '''Verify UART transmission of data at various speeds.
Randomly pick one of the UART instances and configure it to run with any of these baud
rates - 9600bps, 115200bps, 230400bps, 128Kbps, 256Kbps, 1Mkbps, 1.5Mkbps.
'''
milestone: V1
tests: ["chip_sw_uart_rand_baudrate"]
}
{
name: chip_sw_uart_tx_rx_alt_clk_freq
desc: '''Verify the transmission of UART via using external clock as uart core clock.
Extend from chip_sw_uart_rand_baudrate with following added settings.
- Configure LC to RMA state, so that it allows clkmgr to use external clock.
- Configure clkmgr to select external clock.
- Randomize `HI_SPEED_SEL`, so that uart core clock frequency can be either
ext_clk_freq / 4 or ext_clk_freq / 2.
'''
milestone: V1
tests: ["chip_sw_uart_tx_rx_alt_clk_freq", "chip_sw_uart_tx_rx_alt_clk_freq_low_speed"]
}
// GPIO (pre-verified IP) integration tests:
{
name: chip_sw_gpio_out
desc: '''Verify GPIO outputs.
SW test configures the GPIOs to be in the output mode. The test walks a 1 through the
pins. The testbench checks the value for correctness and verifies that there is no
aliasing between the pins.
'''
milestone: V1
tests: ["chip_sw_gpio"]
}
{
name: chip_sw_gpio_in
desc: '''Verify GPIO inputs.
The SW test configures the GPIOs to be in input mode. The testbench walks a 1 through
the pins. SW test ensures that the GPIO values read from the CSR is correct.
'''
milestone: V1
tests: ["chip_sw_gpio"]
}
{
name: chip_sw_gpio_irq
desc: '''Verify GPIO interrupts.
The SW test configures the GPIOs to be in input mode and enables all of them to generate
an interrupt. The testbench walks a 1 through the pins. SW test ensures that the
interrupt corresponding to the right pin is seen.
'''
milestone: V1
tests: ["chip_sw_gpio"]
}
// SPI_DEVICE (pre-verified IP) integration tests:
{
name: chip_sw_spi_device_tx_rx
desc: '''Verify the transmission of data on the chip's SPI device port in firmware mode with
single mode.
- The testbench sends a known payload over the chip's SPI device input port.
- The SW test, at the same time sends a known payload out over the chip's SPI device
output port.
- On reception, both payloads are checked for integrity.
- SW validates the reception of RX fifo full, RX fifo over level, TX fifo under level,
RX overflow and TX underflow interrupts.
- Run with min (6MHz), typical (30-48Mhz) and max(48MHz) SPI clk frequencies.
should use
- Also, ensure that the spi_device does not receive transactions when the csb is high.
- TODO, consider to test this mode with a real use case. The actual use case of this
mdoe is not clear right now.
'''
milestone: V2
tests: ["chip_sw_spi_device_tx_rx"]
}
{
name: chip_sw_spi_device_flash_mode
desc: '''Verify the SPI device in flash mode.
- SW puts the SPI device in flash mode
- Load a firmware image (bootstrap) through flash commands to the spi_device memory.
- SW verifies the integrity of the image upon reception by reading the spi_device
memory.
- Ensure the image is executed correctly
'''
milestone: V2
tests: []
}
{
name: chip_sw_spi_device_pass_through
desc: '''Verify the pass through mode from an end-to-end perspective.
- Configure the SPI device and host in pass through mode.
- Configure and enable both spi_host0 and spi_host1
- Send a random flash commands over the SPI device interface (chip IOs) from the
testbench.
- Verify the flash commands which pass through spi_host0, are received on chip IOs.
- Verify spi_host1 doesn't send out any data from spi_device
- Run with min (6MHz), typical (30-48Mhz) and max(48MHz) SPI clk frequencies.
- Run with single, dual and quad SPI modes.
- Testbench should test the following commands:
- Read Normal, Fast Read, Fast Dual, Fast Quad, Chip Erase, Program
'''
milestone: V2
tests: []
}
{
name: chip_sw_spi_device_pass_through_filter
desc: '''Verify the command filtering mechanism in passthrough mode.
- Extend the chip_spi_device_pass_through test.
- Program the cmd_filter_* CSRs to filter out certain commands. a one byte command (such
as Chip Erase) and a multi-bytes command (such as Program or Sector/Block Erase) must
be added to filter
- Verify that only the payloads that are not filtered show up on the SPI host interface
at chip IOs.
'''
milestone: V2
tests: []
}
{
name: chip_sw_spi_device_pass_through_flash_model
desc: '''Verify the command filtering mechanism in passthrough mode.
- Extend the chip_spi_device_pass_through and chip_spi_device_pass_through_filter
tests.
- Connect with a real flash model on spi_host
- Verify that the flash commands are received and interpreted correctly in the flash
model
'''
milestone: V2
tests: []
}
{
name: chip_sw_spi_device_pass_through_collision
desc: '''Verify the collisions on driving spi_host is handled properly
TODO, add detail testplan once we have a conclusion on #5134
'''
milestone: V2
tests: []
}
// SPI_HOST (pre-verified IP) integration tests:
{
name: chip_sw_spi_host_tx_rx
desc: '''Verify the transmission of data on the chip's SPI host port.
- Program the SPI host to send a known payload out of the chip on the SPI host ports.
- At the same time, the testbench transfers a known payload from device to host on the
SPI host interface.
- The SPI device monitor in the testbench grabs the host payload and verifies its
integrity.
- The SW verifies the device payload for integrity and services the SPI event interrupt.
- Run with min and max SPI clk frequencies and with single, dual and quad SPI modes.
Verify all SPI host instances in the chip.
'''
milestone: V2
tests: []
}
// I2C (pre-verified IP) integration tests:
{
name: chip_sw_i2c_host_tx_rx
desc: '''Verify the transmission of data over the chip's I2C host interface.
- Program the I2C to be in host mode.
- The SW test writes a known payload over the chip's I2C host interface, which is
received and verified by the testbench for correctness.
- SW validates the reception of FMT watermark and trans complete interrupts.
- Verify the virtual / true open drain capability.
Verify all instances of I2C in the chip.
'''
milestone: V2
tests: []
}
{
name: chip_sw_i2c_device_tx_rx
desc: '''Verify the transmission of data over the chip's I2C device interface.
- Program the I2C to be in device mode.
- The testbench writes a known payload over the chip's I2C device interface, which is
received and verified by the SW test for correctness.
- SW validates the reception of RX watermark and trans complete interrupts.
- Verify the virtual / true open drain capability.
Verify all instances of I2C in the chip.
'''
milestone: V2
tests: []
}
// USB (pre-verified IP) integration tests:
{
name: chip_sw_usb_fs_tx_rx
desc: '''Verify the transmission of single-ended data over the USB at full speed. As a part of
this test, the enablement of USB pullup is also expected to be verified.
- Set `tx_differential_mode` to single-ended and `rx_differential_mode` to
differential. The other modes are not supported in OpenTitan.
- configure Link state to `Active`.
- Send and receive packets to fill the entire buffer. Ensure all the packets are
correct.
- Check interrupts (connected, pkt_received, pkt_sent, av_empty, rx_full) are triggered
correcly.
'''
milestone: V2
tests: []
}
{
name: chip_sw_usb_vbus
desc: '''Verify that the USB device can detect the presence of VBUS from the USB host.
- This test extends from `chip_usb_fs_df_tx_rx`, add below at the end of the sequence.
- VBUS is controlled by SW, through programming CSRs (`override_pwr_sense_en` and
`override_pwr_sense_val`) to connect / disconnect the USB.
- Disconnect the USB to trigger `disconnected` interrupt.
- Then reconnect it and check the `connected` interrupt.
- Re-enable data transfer and ensure data correctness.
- Observe valid reference pulse usb_ref_val/pulse_o.
'''
milestone: V2
tests: []
}
{
name: chip_sw_usb_suspend
desc: '''Verify that the USB device can detect the presence of VBUS from the USB host.
- This test extends from `chip_usb_fs_df_tx_rx`, add below at the end of the sequence.
- Configure USB device to enter `Suspend` state and ensure `link_suspend` interrupt is
triggered.
- Test these 2 power modes.
- Normal sleep:
- Configure pwrmgr to enter normal sleep mode, then clocks are disable while powers
are kept on.
- Resume the device through pinmux and check the `link_resume` interrupt.
- Ensure that previously enumerated information is kept.
- Deep sleep:
- Before entering deep sleep, store previously enumerated information in retention
RAM. (optional)
- Configure pwrmgr to enter deep sleep mode, and powers are turned off.
- Resume the device through pinmux and check the `link_resume` interrupt.
- Ensure that previously enumerated information and configuration (non-default
values) are wiped, as USB has been reset before wakeup.
- Restore previously enumerated information (if it's stored) or re-enumerate the
USB.
- Re-enable data transfer and ensure data correctness.
'''
milestone: V2
tests: []
}
{
name: chip_usb_sof
desc: '''Verify that USB can detect SOF and respond with `usb_ref_pulse_o` and
`usb_ref_val_o`.
- Configure to enable `usb_ref_disable`.
- Send a frame with the same frame number as the USB device to trigger `frame`
interrupt.
- Ensure `usb_ref_pulse_o` and `usb_ref_val_o` behave correctly.
- Stop sending any frame and check the `host_lost` interrupt. Ensure `use_ref_*` behave
correctly.
'''
milestone: V2
tests: []
}
{
name: chip_usb_wake_debug
desc: '''Verify that `usb_state_debug_i` can be read from the CSR
- Drive random value on `usb_state_debug_i`.
- Ensure the CSR `wake_debug` returns correctly value.
'''
milestone: V2
tests: []
}
{
name: chip_usb_enumeration
desc: '''Verify USB enumeration. Details are not clear.
- TODO
'''
milestone: V2
tests: []
}
// PINMUX (pre-verified IP) integration tests:
{
name: chip_sw_pin_mux
desc: '''Verify the MIO muxing at input and output sides.
SW programs MIO INSEL and OUTSEL CSRs to connect and verify each muxed source. At the
moment, GPIOs are the only mux inputs.
'''
milestone: V2
tests: []
}
{
name: chip_sw_sleep_pin_mio_dio_val
desc: '''Verify the MIO output values in deep sleep state.
SW programs the MIO OUTSEL CSRs to to ensure that in deep sleep it randomly picks
between tie-0, tie-1 or hi-Z for all muxed outputs coming from non-AON IPs. If an AON
peripheral output is muxed, then that peripheral's output is selected to ensure in deep
sleep the peripheral can continue its signaling even in deep sleep. The testbench
verifies the correctness of the reflected values once the chip goes into deep sleep.
This is replicated for DIO pins as well.
'''
milestone: V2
tests: []
}
{
name: chip_sw_sleep_pin_wake
desc: '''Verify pin wake up from deep sleep state.
Verify one of the 8 possible MIO or DIO pad inputs (randomly configured) can cause the
chip to wake up from sleep state. Verifying wake on posedge is sufficient for the chip
level integration testing. Upon wake up, SW reads the wake cause CSR to verify
correctness.
'''
milestone: V2
tests: []
}
{
name: chip_sw_tap_strap_sampling
desc: '''Verify tap accesses in different LC states.
Verify pinmux can select the life_cycle, RISC-V, and DFT taps after reset.
Verify that in TEST_UNLOCKED* and RMA states, pinmux can switch between the three TAPs
without issuing reset.
Verify in PROD state, only the LC tap can be selected.
Verify in DEV state, only the LC tap and RISC-V taps can be selected.
Verify DFT test mode straps are sampled and output to AST via
top_earlgrey.dft_strap_test_o in TEST_UNLOCKED* and RMA states.
Verify top_earlgrey.dft_strap_test_o is always 0 in the states other than TEST_UNLOCKED*
and RMA, regardless of the value on DFT SW straps.
'''
milestone: V2
tests: ["chip_tap_straps_dev", "chip_tap_straps_prod", "chip_tap_straps_rma"]
}
// PADCTRL tests:
{
name: chip_sw_padctrl_attributes
desc: '''Verify pad attribute settings for all MIO and DIO pads.
'''
milestone: V2
tests: []
}
// PATTGEN (pre-verified IP) integration tests:
{
name: chip_sw_pattgen_ios
desc: '''Verify pattern generation to chip output pads.
- Program the pattgen to generate a known pattern in each lane.
- Program the pinmux to route the chosen output to the chip IOs.
- Verify that the correct pattern is seen on the IOs by hooking up the pattgen monitor.
- Validate the reception of the done interrupt.
- Verify both pattgen channels independently.
'''
milestone: V2
tests: []
}
// PWM (pre-verified IP) integration tests:
{
name: chip_sw_sleep_pwm_pulses
desc: '''Verify PWM signaling to chip output pads during deep sleep.
- Program each PWM output to pulse in a known pattern.
- Program the pinmux to route the chosen PWM output to the chip IOs.
- Program the pwrmgr to go to deep sleep state, with AON timer wakeup.
- Initiate the sleep state by issuing a WFI.
- Verify that in the sleep state, the PWM signals are active and pulsing correctly, by
hooking up the PWM monitor.
- Repeat the steps for all 6 PWM signals.
'''
milestone: V2
tests: ["chip_sw_sleep_pwm_pulses"]
}
//////////////////////////////////////////////////////////////////////////////////////
// System Peripherals //
// XBAR, RV_DM, RV_TIMER, AON_TIMER, PLIC, CLK/RST/PWR MGR, ALERT_HANDLER, LC_CTRL, //
// ADC_CTRL, SYSRST_CTRL //
//////////////////////////////////////////////////////////////////////////////////////
// XBAR (pre-verified IP) tests:
{
name: chip_sw_data_integrity
desc: '''
Verify the alert signaling mechanism due to data integrity violation.
An automated SW test which performs the following for each IP:
- Pick a CSR to write.
- Corrupt a random control / data / integrity bit at the CPU source using SV force.
- Verify that the device detects the integrity violation causing an alert.
- Verify the alert upto the NMI stage.
- Now pick a CSR to read.
- Corrupt a random control / data / integrity bit at the device using SV force.
- Verify that the CPU detects the integrity violation causing an alert.
- Verify the alert upto the NMI stage.
'''
milestone: V2
tests: []
}
// RV_DM (JTAG) tests:
{
name: chip_jtag_csr_rw
desc: '''
Verify accessibility of all the CSRs in the chip over JTAG.
- Shuffle the list of CSRs first to remove the effect of ordering.
- Write all CSRs via JTAG interface with a random value.
- Shuffle the list of CSRs yet again.
- Read all CSRs back and check their values for correctness while adhering to the CSR's
access policies.
- Accesses to CSRs external to `rv_dm` go through RV_DM SBA interface into the `xbar`.
'''
milestone: V2
tests: ["chip_jtag_csr_rw"]
}
{
name: chip_jtag_mem_access
desc: '''
Verify accessibility of all the memories in the chip over JTAG.
This test will target the following memories in the chip:
sram_main, sram_ret, otbn i|dmem, ROM
- Shuffle the list of memories first to remove the effect of ordering.
- Write a location in a randomly chosen set of addresses within each memory via JTAG
interface with random values.
- For read-only memories, preload the memory with random data via backdoor.
- Shuffle the list of memories again.
- Read the previously written addresses in the memories back again and check the read
value for correctness. Pick some random addresses to verify in case of read-only
memories.
'''
milestone: V2
tests: ["chip_jtag_mem_access"]
}
{
name: chip_rv_dm_cpu_debug_mem_not_accessable
desc: '''Verify that the debug mem can't be accessed from the CPU while not in the debug mode.
TODO, add stimulus and checks
'''
milestone: V2
tests: []
}
{
name: chip_rv_dm_perform_debug
desc: '''
- X-ref'ed with mask_rom_rv_dm_perform_debug from mask rom testplan
'''
milestone: V2
tests: []
}
{
name: chip_rv_dm_ndm_reset_req
desc: '''Verify non-debug reset request initiated from RV_DM when the chip is awake.
- Program some CSRs / mem that are under life cycle reset tree and system reset tree.
- Configure RV_DM to send NDM reset request to reset sytem reset tree.
- Read the programmed CSRs / mem to ensure that everything under system reset tree is
reset to the original values, while values under life cycle reset will be preserved.
- Read CSRs / mem in the debug domain to ensure that the values survive the reset.
'''
milestone: V2
tests: ["chip_rv_dm_ndm_reset_req"]
}
// TODO, this could be a block-level test. Put it here since we don't have block-level testplan.
{
name: chip_rv_dm_ndm_reset_req_when_ibex_halted
desc: '''Verify non-debug reset request initiated from RV_DM when ibex is in halted state.
- Configure ibex in halted state (dmstatus.anyhalted/dmstatus.allhalted is asserted).
- Configure RV_DM to send NDM reset request.
- Check that halted state is clear (dmstatus.anyhalted/dmstatus.allhalted should be
de-asserted).
'''
milestone: V2
tests: []
}
{
name: chip_rv_dm_access_after_wakeup
desc: '''Verify RV_DM works after wakes up from sleep.
- Put the chip into sleep mode and then wake up.
- Access some RV_DM CSRs to ensure that RV_DM doesn't need a full reset to work.
'''
milestone: V2
tests: []
}
{
name: chip_sw_rv_dm_jtag_tap_sel
desc: '''Verify ability to select all available TAPs.
- Put life cycle on Test or RMA state, so that TAPs can be selected between life cycle
RV_DM and DFT.
- Verify the TAP is selected correctly.
- TODO, X-ref'ed with the LC tests.
'''
milestone: V2
tests: []
}
{
name: chip_sw_rv_dm_lc_disabled
desc: '''Verify that the debug capabilities are disabled in certain life cycle stages.
- Put life cycle on states other than Test, RMA and DEV.
- Verify that the rv_dm bus device is inaccessible from the CPU as well as external
JTAG.
- Verify that the JTAG TAP is unavailable.
- X-ref'ed with `chip_tap_strap_sampling`
'''
milestone: V2
tests: []
}
// RV_TIMER (pre-verified IP) integration tests:
{
name: chip_sw_timer
desc: '''Verify the timeout interrupt assertion.
- Configure the RV_TIMER to generate interrupt after a set timeout.
- Issue a WFI to wait for the interrupt to trigger.
- Service the interrupt when it triggers; verify that it came from rv_timer.
- Verify that the interrupt triggered only after the timeout elapsed.
'''
milestone: V2
tests: ["chip_sw_rv_timer_irq"]
}
// AON_TIMER (pre-verified IP) integration tests:
{
name: chip_sw_aon_timer_wakeup_irq
desc: '''Verify the AON timer wake up interrupt in normal operating state.
- Program the PLIC to let the AON timer wake up interrupt the CPU.
- Program the AON timer to generate the wake up timeout interrupt after some time.
- Issue a WFI to wait for the interrupt to trigger.
- Service the interrupt when it triggers; verify that it came from AON timer.
- Verify that the interrupt triggered only after the timeout elapsed.
'''
milestone: V2
tests: ["chip_sw_aon_timer_irq"]
}
{
name: chip_sw_aon_timer_sleep_wakeup
desc: '''Verify that AON timer can wake up the chip from a deep sleep state.
- Read the reset cause register in rstmgr to confirm that the SW is in the POR reset
phase.
- Program the pwrmgr to go to deep sleep state (clocks off, power off).
- Program the AON timer to wake up the chip in a reasonable amount of time.
- Have the CPU issue WFI to signal the pwrmgr to go into sleep state.
- Verify via assertion checks, the wake up request occurs after the timeout has elapsed.
- After reset followed by AON timer wake up, read the reset cause register to confirm
the AON timer wake up phase.
- After the test sequence is complete, read the wake up threshold register - it should
not be reset.
'''
milestone: V2
tests: ["chip_sw_pwrmgr_smoketest"]
}
{
name: chip_sw_aon_timer_wdog_bark_irq
desc: '''Verify the watchdog bark reception in normal state.
- Program the PLIC to let the wdog bark signal interrupt the CPU.
- Program the AON timer wdog to 'bark' after some time and enable the bark interrupt.
- Service the bark interrupt upon reception.
'''
milestone: V2
tests: ["chip_sw_aon_timer_irq"]
}
{
name: chip_sw_aon_timer_wdog_lc_escalate
desc: '''Verify that the LC escalation signal disables the AON timer wdog.
- Program the AON timer wdog to 'bark' after some time and enable the bark interrupt.
- Start the escalation process and fail the test in the interrupt handler in case the
bark interrupt is fired.
- Program the alert handler to escalate on alerts upto phase 2 (i.e. reset) but the
phase 1 (i.e. wipe secrets) should occur and last during the time the wdog is
programed to bark and bite.
- Trigger an alert to cause an escalation condition before the bark signal asserts.
- After the reset ensure that the reset cause was due to the escalation to prove that
the wdog was disabled.
'''
milestone: V2
tests: ["chip_sw_aon_timer_wdog_lc_escalate"]
}
{
name: chip_sw_aon_timer_wdog_bite_reset
desc: '''Verify the watchdog bite causing reset in the normal state.
- Read the reset cause register in rstmgr to confirm that the SW is in the POR reset
phase.
- Program the AON timer wdog to 'bark' after some time.
- Let the bark escalate to bite, which should result in a reset request.
- After reset, read the reset cause register in rstmgr to confirm that the SW is now in
the wdog reset phase.
'''
milestone: V2
tests: ["chip_sw_aon_timer_wdog_bite_reset"]
}
{
name: chip_sw_aon_timer_sleep_wdog_bite_reset
desc: '''Verify the watchdog bite causing reset in sleep state.
- Repeat the steps in chip_aon_timer_wdog_bite_reset test, but with following changes:
- Program the pwrmgr to go to deep sleep state (clocks off, power off).
- Issue a WFI after programming the wdog, so that the reset request due to bite occurs
during deep sleep state.
- After reset, read the reset cause register in rstmgr to confirm that the SW is now in
the wdog reset phase.
'''
milestone: V2
tests: ["chip_sw_aon_timer_wdog_bite_reset"]
}
{
name: chip_sw_aon_timer_sleep_wdog_sleep_pause
desc: '''Verify that the wdog can be paused in sleep state.
- Repeat the steps in chip_aon_timer_sleep_wakeup test, but with following changes:
- Program the wdog to 'bite' a little sooner than the AON timer wake up.
- Also, program the wdog to pause during sleep.
- Issue a WFI after programming the wdog, so that the reset request occurs during deep
sleep state.
- After reset followed by AON timer wake up, read the reset cause register to confirm
that the AON timer woke up the chip, not the wdog reset.
- Un-pause the wdog and service the bark interrupt.
'''
milestone: V2
tests: ["chip_sw_aon_timer_sleep_wdog_sleep_pause"]
}
// PLIC (pre-verified IP) integration tests:
{
name: chip_sw_plic_all_irqs
desc: '''Verify all interrupts from all peripherals aggregated at the PLIC.
The automated SW test enables all interrupts at the PLIC to interrupt the core. It uses
the `intr_test` CSR in each peripheral to mock assert an interrupt, looping through all
available interrupts in that peripheral. The ISR verifies that the right interrupt
occurred. This is used as a catch-all interrupt test for all peripheral integration
testing within which functionally asserting an interrupt is hard to achieve or not of
high value.
'''
milestone: V2
tests: ["chip_plic_all_irqs"]
}
{
name: chip_sw_plic_sw_irq
desc: '''Verify the SW interrupt to the CPU.
Enable all peripheral interrupts at PLIC. Enable all types of interrupt at the CPU core.
Write to the MSIP CSR to generate a SW interrupt to the CPU. Verify that the only
interrupt that is seen is the SW interrupt.
'''
milestone: V2
tests: ["chip_sw_plic_sw_irq"]
}
// CLKMGR tests:
{
name: chip_sw_clkmgr_idle_trans
desc: '''Verify the ability to turn off the transactional clock via SW.
Ensure that the clock to transactional units will be turned off after any activity
completes in the transactional IP. Verify it is off via spinwait in hints_status CSR.
Verify that turning off this clock does not affect the other derived clocks.
'''
milestone: V2
tests: ["chip_sw_aes_idle",
"chip_sw_hmac_enc_idle",
"chip_sw_kmac_idle",
"chip_sw_otbn_randomness"]
}
{
name: chip_sw_clkmgr_off_trans
desc: '''Verify the turned off transactional units.
Verify CSR accesses do not complete in units that are off. Using the watchdog timers,
turn off a transactional unit's clock, issue a CSR access to that unit, verify a watchdog
event results, and verify the rstmgr crash dump info records the CSR address.
A stretch goal is to check the PC corresponds to the code performing
the CSR access (stretch since it could be difficult to maintain this
check).
'''
milestone: V2
tests: ["chip_sw_clkmgr_off_aes_trans",
"chip_sw_clkmgr_off_hmac_trans",
"chip_sw_clkmgr_off_kmac_trans",
"chip_sw_clkmgr_off_otbn_trans"]
}
{
name: chip_sw_clkmgr_off_peri
desc: '''Verify the ability to turn off the peripheral clock via SW.
Verify CSR accesses do not complete in peripherals that are off. Using the watchdog
timers, turn off a peripheral's clock, issue a CSR access to that peripheral, verify a
watchdog event results, and verify the rstmgr crash dump info records the CSR address.
'''
milestone: V2
tests: ["chip_sw_clkmgr_off_peri"]
}
{
name: chip_sw_clkmgr_div
desc: '''Verify clk division logic is working correctly.
The IP level checks the divided clocks via SVA, and these are also bound at chip level.
Connectivity tests check peripherals are connected to the clock they expect.
Use the clkmgr count measurement feature to verify clock division.
'''
milestone: V2
tests: ["chip_sw_clkmgr_external_clk_src_for_sw_fast",
"chip_sw_clkmgr_external_clk_src_for_sw_slow",
"chip_sw_clkmgr_external_clk_src_for_lc"]
}
{
name: chip_sw_clkmgr_external_clk_src_for_lc
desc: '''Verify the clkmgr requests ext clk src during certain LC states.
On POR lc asserts lc_clk_byp_req on some LC states, and de-asserts
it when lc_program completes. This also triggers divided clocks to step down. It may be
best to verify this via SVA, unless we implement clock cycle counters.
'''
milestone: V2
tests: ["chip_sw_clkmgr_external_clk_src_for_lc"]
}
{
name: chip_sw_clkmgr_external_clk_src_for_sw
desc: '''Verify SW causes the clkmgr requests ext clk src during certain LC states.
In RMA and TEST_UNLOCKED lc states the external clock is enabled in response to
`extclk_ctrl.sel` CSR writes. In addition `extclk_ctrl.hi_speed_sel` CSR causes the
divided clocks to step down. Verify this via SVA bound to clkmgr, and clock cycle
counters.
X-ref with chip_sw_uart_tx_rx_alt_clk_freq, which needs to deal with this as well.
'''
milestone: V2
tests: ["chip_sw_clkmgr_external_clk_src_for_sw_fast",
"chip_sw_clkmgr_external_clk_src_for_sw_slow"]
}
{
name: chip_sw_clkmgr_jitter
desc: '''Verify the clock jitter functionality.
Enable clock jitter setting the clkmgr `jitter_enable` CSR high. This causes the
jitter_o clkmgr output to toggle. Verify this output is connected to AST's
clk_src_sys_jen_i input using formal.
X-ref with various specific jitter enable tests.
'''
milestone: V2
tests: ["chip_sw_clkmgr_jitter",
"chip_sw_flash_ctrl_ops_jitter_en",
"chip_sw_flash_ctrl_access_jitter_en",
"chip_sw_otbn_ecdsa_op_irq_jitter_en",
"chip_sw_aes_enc_jitter_en",
"chip_sw_hmac_enc_jitter_en",
"chip_sw_keymgr_key_derivation_jitter_en",
"chip_sw_kmac_mode_kmac_jitter_en",
"chip_sw_sram_ctrl_main_scrambled_access_jitter_en"]
}
{
name: chip_sw_clkmgr_deep_sleep_frequency
desc: '''Verify the frequency measurement through deep sleep.
Enable clock cycle counts. Put the chip in deep sleep. Upon wakeup reset the
clock measurements should be off, but the recoverable fault status should not
be cleared.
'''
milestone: V2
tests: ["chip_sw_ast_clk_outputs"]
}
{
name: chip_sw_clkmgr_sleep_frequency
desc: '''Verify the frequency measurement through shallow sleep.
Enable clock cycle counts. Put the chip in shallow sleep with pwrmgr's CONTROL CSR
keeping some clocks disabled. Upon wakeup the clock measurements should be on, and the
recoverable fault status should show no errors for the disabled clocks.
'''
milestone: V2
tests: ["chip_sw_clkmgr_sleep_frequency"]
}
{
name: chip_sw_clkmgr_reset_frequency
desc: '''Verify the frequency measurement through reset.
Enable clock cycle counts, configured to cause errors. Trigger a chip reset via SW.
After reset the clock measurements should be off and the recoverable fault status
should be cleared.
'''
milestone: V2
tests: ["chip_sw_clkmgr_reset_frequency"]
}
{
name: chip_sw_clkmgr_escalation_reset
desc: '''Verify the clock manager resets to a clean state after an escalation reset.
Trigger an internal fatal fault (like an idle counter mismatch) and let it escalate to
reset. Upon alert escalation reset, the internal status should be clear and clkmgr
should not attempt to send out more alerts.
'''
milestone: V2
tests: []
}
// PWRMGR tests:
{
name: chip_sw_pwrmgr_external_full_reset
desc: '''Verify the cold boot sequence by wiggling of chip's `POR_N`.
This ensures that both FSMs are properly reset on the POR signal. The check is that
the processor ends up running. Also verify, the rstmgr recorded POR in `reset_info` CSR
by checking retention SRAM for reset_reason.
'''
milestone: V2
tests: ["chip_sw_pwrmgr_full_aon_reset"]
}
{
name: chip_sw_pwrmgr_normal_sleep_all_wake_ups
desc: '''Verify that the chip can go into normal sleep state and be woken up by ALL wake up
sources.
This verifies ALL wake up sources. This also verifies that the pwrmgr sequencing is
working correctly as expected. X-ref'ed with all individual IP tests. For each wakeup
source clear and enable `wake_info` CSR, enable the wakeup from that source with the
`wakeup_en` CSR, bring the chip to low power, optionally disabling the source's clock,
have the source issue a wakeup event and verify `wake_info` indicates the expected
wakeup.
'''
milestone: V2
tests: ["chip_sw_pwrmgr_normal_sleep_all_wake_ups"]
}
{
name: chip_sw_pwrmgr_sleep_all_reset_reqs
desc: '''Verify that the chip can go into normal sleep state and be reset by ALL reset req
sources.
This verifies ALL reset sources. This also verifies that the pwrmgr sequencing is
working correctly as expected. X-ref'ed with all individual IP tests. For each reset
source, enable the source and bring the chip to low power, issue a reset, and verify the
rstmgr's `reset_info` indicated the expected reset by checking retention SRAM for
reset_reason.
'''
milestone: V2
tests: ["chip_sw_aon_timer_wdog_bite_reset"]
}
{
name: chip_sw_pwrmgr_deep_sleep_all_wake_ups
desc: '''Verify that the chip can go into deep sleep state and be woken up by ALL wake up
sources.
This verifies ALL wake up sources. This also verifies that the pwrmgr sequencing is
working correctly as expected. X-ref'ed with all individual IP tests. Similar to
chip_pwrmgr_sleep_all_wake_ups, except `control.main_pd_n` is set to 0.
'''
milestone: V2
tests: ["chip_sw_pwrmgr_deep_sleep_all_wake_ups"]
}
{
name: chip_sw_pwrmgr_deep_sleep_all_reset_reqs
desc: '''Verify that the chip can go into deep sleep state and be reset up by ALL reset req
sources.
This verifies ALL reset sources.
- 7 resets are generated randomly with deep sleeps
- POR (HW PAD) reset, SW POR, sysrst, wdog timer reset, esc rst, SW req
- esc reset is followd by normal mode because it does not work with sleep mode
'''
milestone: V2
tests: ["chip_sw_pwrmgr_deep_sleep_all_reset_reqs"]
}
{
name: chip_sw_pwrmgr_normal_sleep_all_reset_reqs
desc: '''Verify that the chip can go into normal sleep state and be reset up by ALL reset req
sources.
This verifies ALL reset sources.
- 7 resets are generated randomly with normal sleeps
- POR (HW PAD) reset, SW POR, sysrst, wdog timer reset, esc rst, SW req
- esc reset is followed by normal mode and cleared by reset because it does not work with sleep mode
'''
milestone: V2
tests: ["chip_sw_pwrmgr_normal_sleep_all_reset_reqs"]
}
{
name: chip_sw_pwrmgr_wdog_reset
desc: '''Verify that the chip can be reset by watchdog timer reset source.
This verifies watchdog timer reset source. This also verifies that the pwrmgr sequencing is
working correctly as expected. X-ref'ed with all individual IP tests. Similar to
chip_pwrmgr_sleep_all_reset_reqs, except the chip is not put in low power mode.
'''
milestone: V2
tests: ["chip_sw_pwrmgr_wdog_reset"]
}
{
name: chip_sw_pwrmgr_aon_power_glitch_reset
desc: '''Verify the cold boot sequence through an AON power glitch.
Pulsing the AST vcaon_supp_i input causes an AON power glitch which becomes a POR.
This ensures that both FSMs are properly reset on the POR signal. The check is that
the processor ends up running. Also verify, the rstmgr recorded POR in `reset_info` CSR
by checking retention SRAM for reset_reason.
'''
milestone: V2
tests: ["chip_sw_pwrmgr_full_aon_reset"]
}
{
name: chip_sw_pwrmgr_main_power_glitch_reset
desc: '''Verify the effect of a glitch in main power rail.
The vcmain_supp_i AST input is forced to drop once the test is running. This triggers
a MainPwr reset request, which is checked by reading retention SRAM's reset_reason to
see that the reset_info CSR's POR bit is not set when the test restarts.
'''
milestone: V2
tests: ["chip_sw_pwrmgr_main_power_glitch_reset"]
}
{
name: chip_sw_pwrmgr_deep_sleep_power_glitch_reset
desc: '''Verify the effect of a glitch in main power rail in deep sleep.
The vcmain_supp_i AST input is forced to drop right after putting the chip in deep
sleep. This triggers a MainPwr reset request, which is checked by reading retention
SRAM's reset_reason to show that the reset_info CSR's POR bit is not set when the test