Skip to content

Commit

Permalink
SQUASHME: spi_device: Remove generic mode TLTs
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Williams <[email protected]>
  • Loading branch information
a-will committed Jan 17, 2024
1 parent fc6ae7a commit 8549e5b
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 785 deletions.
35 changes: 0 additions & 35 deletions hw/top_earlgrey/data/ip/chip_spi_device_testplan.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,6 @@
name: chip_spi_device
testpoints: [
// 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 generic mode.

- The testbench sends a known payload over the chip's SPI device input port.
- At the same time, the SW test 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 the following interrupts:
- RX fifo full
- RX fifo over level
- TX fifo under level
- RX overflow
- TX underflow
- Run with min (6MHz), typical (24Mhz) and max(30MHz) SPI clk frequencies.
- Ensure that the spi_device does not receive transactions when the csb is high.
'''
stage: V2
// Can function as a smoketest, but also may be useful as part of a bootloader for early bring-up.
si_stage: SV2
lc_states: [
"TEST_UNLOCKED",
"DEV",
"PROD",
"PROD_END",
"RMA",
]
features: [
"SPI_DEVICE.MODE.GENERIC",
"SPI_DEVICE.MODE.GENERIC.ASYNC_FIFOS",
"SPI_DEVICE.MODE.GENERIC.DPSRAM_TXF_RXF",
]
tests: ["chip_sw_spi_device_tx_rx"]
bazel: ["//sw/device/tests:spi_device_smoketest"]
}
{
name: chip_sw_spi_device_flash_mode
desc: '''Verify the SPI device in flash mode.
Expand Down
8 changes: 1 addition & 7 deletions hw/top_earlgrey/dv/chip_sim_cfg.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,6 @@
sw_images: ["//sw/device/tests/sim_dv:i2c_device_tx_rx_test:1:new_rules"]
en_run_modes: ["sw_test_mode_test_rom"]
}
{
name: chip_sw_spi_device_tx_rx
uvm_test_seq: chip_sw_spi_device_tx_rx_vseq
sw_images: ["//sw/device/tests/sim_dv:spi_tx_rx_test:1:new_rules"]
en_run_modes: ["sw_test_mode_test_rom"]
}
{
name: chip_sw_spi_device_tpm
uvm_test_seq: chip_sw_spi_device_tpm_vseq
Expand Down Expand Up @@ -2159,7 +2153,7 @@
name: xcelium_ci_1
tests: ["chip_sw_rv_core_ibex_address_translation",
"chip_sw_rv_timer_irq",
"chip_sw_spi_device_tx_rx",
"chip_sw_spi_device_tpm",
"chip_sw_usb_ast_clk_calib",
"chip_sw_plic_sw_irq",
"chip_sw_aes_enc",
Expand Down
1 change: 0 additions & 1 deletion hw/top_earlgrey/dv/env/chip_env.core
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ filesets:
- seq_lib/chip_sw_lc_ctrl_program_error_vseq.sv: {is_include_file: true}
- seq_lib/chip_sw_otp_ctrl_vendor_test_csr_access_vseq.sv: {is_include_file: true}
- seq_lib/chip_sw_otp_ctrl_escalation_vseq.sv: {is_include_file: true}
- seq_lib/chip_sw_spi_device_tx_rx_vseq.sv: {is_include_file: true}
- seq_lib/chip_sw_spi_host_tx_rx_vseq.sv: {is_include_file: true}
- seq_lib/chip_sw_spi_passthrough_collision_vseq.sv: {is_include_file: true}
- seq_lib/chip_sw_spi_passthrough_vseq.sv: {is_include_file: true}
Expand Down
79 changes: 0 additions & 79 deletions hw/top_earlgrey/dv/env/seq_lib/chip_sw_spi_device_tx_rx_vseq.sv

This file was deleted.

1 change: 0 additions & 1 deletion hw/top_earlgrey/dv/env/seq_lib/chip_vseq_list.sv
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
`include "chip_sw_lc_walkthrough_testunlocks_vseq.sv"
`include "chip_sw_otp_ctrl_vendor_test_csr_access_vseq.sv"
`include "chip_sw_otp_ctrl_escalation_vseq.sv"
`include "chip_sw_spi_device_tx_rx_vseq.sv"
`include "chip_sw_spi_host_tx_rx_vseq.sv"
`include "chip_sw_spi_passthrough_vseq.sv"
`include "chip_sw_spi_passthrough_collision_vseq.sv"
Expand Down
19 changes: 0 additions & 19 deletions sw/device/tests/sim_dv/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -652,25 +652,6 @@ opentitan_test(
],
)

opentitan_test(
name = "spi_tx_rx_test",
srcs = ["spi_tx_rx_test.c"],
exec_env = {"//hw/top_earlgrey:sim_dv": None},
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
"//sw/device/lib/arch:device",
"//sw/device/lib/base:mmio",
"//sw/device/lib/dif:base",
"//sw/device/lib/dif:rv_plic",
"//sw/device/lib/dif:spi_device",
"//sw/device/lib/runtime:hart",
"//sw/device/lib/runtime:irq",
"//sw/device/lib/runtime:log",
"//sw/device/lib/testing/test_framework:ottf_main",
"//sw/device/lib/testing/test_framework:status",
],
)

opentitan_test(
name = "spi_device_tpm_tx_rx_test",
srcs = ["spi_device_tpm_tx_rx_test.c"],
Expand Down
8 changes: 1 addition & 7 deletions sw/device/tests/sim_dv/spi_device_tpm_tx_rx_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ static void en_plic_irqs(dif_rv_plic_t *plic) {

static void en_spi_device_irqs(dif_spi_device_t *spi_device) {
dif_spi_device_irq_t spi_device_irqs[] = {
kDifSpiDeviceIrqGenericRxFull,
kDifSpiDeviceIrqGenericRxWatermark,
kDifSpiDeviceIrqGenericTxWatermark,
kDifSpiDeviceIrqGenericRxError,
kDifSpiDeviceIrqGenericRxOverflow,
kDifSpiDeviceIrqGenericTxUnderflow,
kDifSpiDeviceIrqUploadCmdfifoNotEmpty,
kDifSpiDeviceIrqUploadPayloadNotEmpty,
kDifSpiDeviceIrqUploadPayloadOverflow,
Expand All @@ -96,7 +90,7 @@ void ottf_external_isr(uint32_t *exc_info) {
spi_device_isr_ctx_t spi_device_ctx = {
.spi_device = &spi_device.dev,
.plic_spi_device_start_irq_id =
kTopEarlgreyPlicIrqIdSpiDeviceGenericRxFull,
kTopEarlgreyPlicIrqIdSpiDeviceUploadCmdfifoNotEmpty,
.expected_irq = kDifSpiDeviceIrqTpmHeaderNotEmpty,
.is_only_irq = true};

Expand Down
6 changes: 4 additions & 2 deletions sw/device/tests/sim_dv/spi_passthrough_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,10 @@ bool test_main(void) {
// Enable all spi_device and spi_host interrupts, and check that they do not
// trigger unless command upload is enabled.
dif_spi_device_irq_t all_spi_device_irqs[] = {
kDifSpiDeviceIrqUploadCmdfifoNotEmpty, kDifSpiDeviceIrqReadbufWatermark,
kDifSpiDeviceIrqReadbufFlip, kDifSpiDeviceIrqTpmHeaderNotEmpty,
kDifSpiDeviceIrqUploadCmdfifoNotEmpty,
kDifSpiDeviceIrqReadbufWatermark,
kDifSpiDeviceIrqReadbufFlip,
kDifSpiDeviceIrqTpmHeaderNotEmpty,
};
for (int i = 0; i < ARRAYSIZE(all_spi_device_irqs); ++i) {
dif_spi_device_irq_t irq = all_spi_device_irqs[i];
Expand Down
Loading

0 comments on commit 8549e5b

Please sign in to comment.