[sw/testing] move smoke tests and condense their names
This partially addresses #7976, specifically the tasks that states:
1. "The smoke tests subfolder will be deprecated, and all smoke tests
will move to sw/device/tests."
2. "The prefix "dif_", will be removed from smoke test file names."
Additionally, all build and test configuration files were updated to
match the above the changes.
Signed-off-by: Timothy Trippel <ttrippel@google.com>
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 7a0fa3f..d945423 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -214,7 +214,7 @@
ninja -C "$OBJ_DIR" sw/device/sca/aes_serial_export_fpga_nexysvideo
# Build binaries for Verilator simulation.
ninja -C "$OBJ_DIR" sw/device/boot_rom/boot_rom_export_sim_verilator
- ninja -C "$OBJ_DIR" sw/device/tests/dif_aes_smoketest_export_sim_verilator
+ ninja -C "$OBJ_DIR" sw/device/tests/aes_smoketest_export_sim_verilator
ninja -C "$OBJ_DIR" sw/device/examples/hello_world/hello_world_export_sim_verilator
displayName: Build embedded targets
- template: ci/upload-artifacts-template.yml
@@ -396,7 +396,7 @@
. util/build_consts.sh
pytest --version
pytest test/systemtest/earlgrey/test_sim_verilator.py \
- -k test_apps_selfchecking_silicon_creator[dif_uart_smoketest] \
+ -k test_apps_selfchecking_silicon_creator[uart_smoketest] \
--log-cli-level=DEBUG \
--test-run-title="Run silicon_creator system test with Verilator simulation" \
--napoleon-docstrings
diff --git a/doc/project/checklist.md b/doc/project/checklist.md
index b3c06d1..69facce 100644
--- a/doc/project/checklist.md
+++ b/doc/project/checklist.md
@@ -499,7 +499,7 @@
### DIF_TEST_SMOKE
-Smoke tests exist for the DIF in `sw/device/tests/dif` named `dif_<ip>_smoketest.c`.
+Smoke tests exist for the DIF in `sw/device/tests` named `<ip>_smoketest.c`.
This should perform a basic test of the main datapath of the hardware module by the embedded core, via the DIF, and should be able to be run on all OpenTitan platforms (including FPGA, simulation, and DV).
This test will be shared with DV.
diff --git a/doc/ug/getting_started_build_sw.md b/doc/ug/getting_started_build_sw.md
index 8f83731..4e4a14b 100644
--- a/doc/ug/getting_started_build_sw.md
+++ b/doc/ug/getting_started_build_sw.md
@@ -106,7 +106,7 @@
For example the following command shows how to disassemble all sections of the UART DIF smoke test interleaved with the actual source code.
```console
-$ riscv32-unknown-elf-objdump --disassemble-all --headers --line-numbers --source build-bin/sw/device/tests/dif_uart_smoketest_sim_verilator.elf
+$ riscv32-unknown-elf-objdump --disassemble-all --headers --line-numbers --source build-bin/sw/device/tests/uart_smoketest_sim_verilator.elf
```
Refer to the output of `riscv32-unknown-elf-objdump --help` for a full list of options.
diff --git a/hw/ip/otbn/README.md b/hw/ip/otbn/README.md
index 20a9b86..7dbcbdb 100644
--- a/hw/ip/otbn/README.md
+++ b/hw/ip/otbn/README.md
@@ -106,7 +106,7 @@
```sh
build/lowrisc_systems_chip_earlgrey_verilator_0.1/sim-verilator/Vchip_earlgrey_verilator \
--meminit=rom,build-bin/sw/device/boot_rom/boot_rom_sim_verilator.scr.39.vmem \
- --meminit=flash,build-bin/sw/device/tests/dif_otbn_smoketest_sim_verilator.elf \
+ --meminit=flash,build-bin/sw/device/tests/otbn_smoketest_sim_verilator.elf \
--meminit=otp,build-bin/sw/device/otp_img/otp_img_sim_verilator.vmem \
+UARTDPI_LOG_uart0=- \
+OTBN_USE_MODEL=1
diff --git a/hw/top_earlgrey/data/chip_testplan.hjson b/hw/top_earlgrey/data/chip_testplan.hjson
index 793a8a1..5a428d6 100644
--- a/hw/top_earlgrey/data/chip_testplan.hjson
+++ b/hw/top_earlgrey/data/chip_testplan.hjson
@@ -785,7 +785,7 @@
chip_pwrmgr_sleep_all_wake_ups, except `control.main_pd_n` is set to 0.
'''
milestone: V2
- tests: ["chip_dif_pwrmgr_smoketest",
+ tests: ["chip_pwrmgr_smoketest",
"chip_sw_pwrmgr_usbdev_wakeup"]
}
{
@@ -2403,30 +2403,31 @@
////////////////////////////
{
- name: chip_sw_dif_smoketest
- desc: '''Run smoke tests developed for each DIF.
+ name: chip_sw_smoketest
+ desc: '''Run smoke tests developed for each IP.
- The DIF smoke tests are developed by the SW team to test each block's DIF
- implementation. We need to ensure that they work in DV as well.
+ The smoke tests are developed by the SW team to test each IP is
+ alive, and can be actuated by the DIF. We need to ensure that they
+ work in DV as well.
'''
milestone: V2
- tests: ["chip_dif_aes_smoketest",
- "chip_dif_aon_timer_smoketest",
- "chip_dif_clkmgr_smoketest",
+ tests: ["chip_aes_smoketest",
+ "chip_aon_timer_smoketest",
+ "chip_clkmgr_smoketest",
// TODO(lowrisc/opentitan#7505): Debug CSRNG generate bits mismatch.
- // "chip_dif_csrng_smoketest",
- "chip_dif_entropy_src_smoketest",
- "chip_dif_gpio_smoketest",
- "chip_dif_hmac_smoketest",
- "chip_dif_kmac_smoketest",
- "chip_dif_kmac_cshake_smoketest",
- "chip_dif_otbn_smoketest",
- "chip_dif_otp_ctrl_smoketest",
- "chip_dif_rv_plic_smoketest",
- "chip_dif_pwrmgr_smoketest",
- "chip_dif_rv_timer_smoketest",
- "chip_dif_rstmgr_smoketest",
- "chip_dif_uart_smoketest",
+ // "chip_csrng_smoketest",
+ "chip_entropy_src_smoketest",
+ "chip_gpio_smoketest",
+ "chip_hmac_smoketest",
+ "chip_kmac_smoketest",
+ "chip_kmac_cshake_smoketest",
+ "chip_otbn_smoketest",
+ "chip_otp_ctrl_smoketest",
+ "chip_rv_plic_smoketest",
+ "chip_pwrmgr_smoketest",
+ "chip_rv_timer_smoketest",
+ "chip_rstmgr_smoketest",
+ "chip_uart_smoketest",
]
}
{
diff --git a/hw/top_earlgrey/dv/chip_dif_tests.hjson b/hw/top_earlgrey/dv/chip_dif_tests.hjson
index 8019a37..b58778a 100644
--- a/hw/top_earlgrey/dv/chip_dif_tests.hjson
+++ b/hw/top_earlgrey/dv/chip_dif_tests.hjson
@@ -2,135 +2,135 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
- # This auxiliary chip sim cfg specification focuses on chip level DIF smoke tests.
+ # This auxiliary chip sim cfg specification focuses on chip level smoke tests.
# Please see chip_sim_cfg.hjson for full setup details.
# Note: Please maintain alphabetical order.
tests: [
{
- name: chip_dif_aes_smoketest
+ name: chip_aes_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_aes_smoketest:1"]
+ sw_images: ["sw/device/tests/aes_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_aon_timer_smoketest
+ name: chip_aon_timer_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_aon_timer_smoketest:1"]
+ sw_images: ["sw/device/tests/aon_timer_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_clkmgr_smoketest
+ name: chip_clkmgr_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_clkmgr_smoketest:1"]
+ sw_images: ["sw/device/tests/clkmgr_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
// TODO(lowrisc/opentitan#7505): Debug CSRNG generate bits mismatch.
// {
- // name: chip_dif_csrng_smoketest
+ // name: chip_csrng_smoketest
// uvm_test_seq: chip_sw_base_vseq
- // sw_images: ["sw/device/tests/dif_csrng_smoketest:1"]
+ // sw_images: ["sw/device/tests/csrng_smoketest:1"]
// en_run_modes: ["sw_test_mode"]
// }
{
- name: chip_dif_entropy_src_smoketest
+ name: chip_entropy_src_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_entropy_src_smoketest:1"]
+ sw_images: ["sw/device/tests/entropy_src_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_gpio_smoketest
+ name: chip_gpio_smoketest
uvm_test_seq: chip_sw_gpio_smoke_vseq
- sw_images: ["sw/device/tests/dif_gpio_smoketest:1"]
+ sw_images: ["sw/device/tests/gpio_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_hmac_smoketest
+ name: chip_hmac_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_hmac_smoketest:1"]
+ sw_images: ["sw/device/tests/hmac_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_kmac_smoketest
+ name: chip_kmac_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_kmac_smoketest:1"]
+ sw_images: ["sw/device/tests/kmac_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_kmac_cshake_smoketest
+ name: chip_kmac_cshake_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_kmac_cshake_smoketest:1"]
+ sw_images: ["sw/device/tests/kmac_cshake_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_kmac_kmac_smoketest
+ name: chip_kmac_kmac_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_kmac_kmac_smoketest:1"]
+ sw_images: ["sw/device/tests/kmac_kmac_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_otbn_smoketest
+ name: chip_otbn_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_otbn_smoketest:1"]
+ sw_images: ["sw/device/tests/otbn_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_otp_ctrl_smoketest
+ name: chip_otp_ctrl_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_otp_ctrl_smoketest:1"]
+ sw_images: ["sw/device/tests/otp_ctrl_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_rv_plic_smoketest
+ name: chip_rv_plic_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_rv_plic_smoketest:1"]
+ sw_images: ["sw/device/tests/rv_plic_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_pwrmgr_smoketest
+ name: chip_pwrmgr_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_pwrmgr_smoketest:1"]
+ sw_images: ["sw/device/tests/pwrmgr_smoketest:1"]
en_run_modes: ["sw_test_mode"]
run_opts: ["+sw_test_timeout_ns=3000000"]
}
{
- name: chip_dif_rv_timer_smoketest
+ name: chip_rv_timer_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_rv_timer_smoketest:1"]
+ sw_images: ["sw/device/tests/rv_timer_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_rstmgr_smoketest
+ name: chip_rstmgr_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_rstmgr_smoketest:1"]
+ sw_images: ["sw/device/tests/rstmgr_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
{
- name: chip_dif_uart_smoketest
+ name: chip_uart_smoketest
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_uart_smoketest:1"]
+ sw_images: ["sw/device/tests/uart_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
]
regressions: [
{
name: dif
- tests: ["chip_dif_aes_smoketest",
- "chip_dif_aon_timer_smoketest",
- "chip_dif_clkmgr_smoketest",
+ tests: ["chip_aes_smoketest",
+ "chip_aon_timer_smoketest",
+ "chip_clkmgr_smoketest",
// TODO(lowrisc/opentitan#7505): Debug CSRNG generate bits mismatch.
- // "chip_dif_csrng_smoketest",
- "chip_dif_entropy_src_smoketest",
- "chip_dif_gpio_smoketest",
- "chip_dif_hmac_smoketest",
- "chip_dif_kmac_smoketest",
- "chip_dif_otbn_smoketest",
- "chip_dif_otp_ctrl_smoketest",
- "chip_dif_rv_plic_smoketest",
- "chip_dif_pwrmgr_smoketest",
- "chip_dif_rv_timer_smoketest",
- "chip_dif_rstmgr_smoketest",
- "chip_dif_uart_smoketest",
+ // "chip_csrng_smoketest",
+ "chip_entropy_src_smoketest",
+ "chip_gpio_smoketest",
+ "chip_hmac_smoketest",
+ "chip_kmac_smoketest",
+ "chip_otbn_smoketest",
+ "chip_otp_ctrl_smoketest",
+ "chip_rv_plic_smoketest",
+ "chip_pwrmgr_smoketest",
+ "chip_rv_timer_smoketest",
+ "chip_rstmgr_smoketest",
+ "chip_uart_smoketest",
]
}
]
diff --git a/hw/top_earlgrey/dv/chip_sim_cfg.hjson b/hw/top_earlgrey/dv/chip_sim_cfg.hjson
index dca0e2d..dafe6c4 100644
--- a/hw/top_earlgrey/dv/chip_sim_cfg.hjson
+++ b/hw/top_earlgrey/dv/chip_sim_cfg.hjson
@@ -148,9 +148,9 @@
// dictionary declared in `sw/device/tests/meson.build`, the `sw_images` list
// below should contain `sw/device/tests/<sw_test_name>` (without any more
// subdirectories) because that is where the meson target is created. For
- // example `dif_rv_plic_smoketest` is added to `sw_tests` in
- // `sw/device/tests/dif/meson.build`, but the final meson targets all start
- // `sw/device/tests/dif_rv_plic_smoketest_`.
+ // example `gpio_test` is added to `sw_tests` in
+ // `sw/device/tests/sim_dv/meson.build`, but the final meson targets all
+ // start with `sw/device/tests/gpio_test_`.
//
// Each entry in `sw_images` is followed by an index separated with ':' which
// is used by the testbench to know what type of image is it:
@@ -238,7 +238,7 @@
{
name: chip_sw_rv_timer_irq
uvm_test_seq: chip_sw_base_vseq
- sw_images: ["sw/device/tests/dif_rv_timer_smoketest:1"]
+ sw_images: ["sw/device/tests/rv_timer_smoketest:1"]
en_run_modes: ["sw_test_mode"]
}
diff --git a/hw/top_earlgrey/dv/env/seq_lib/chip_sw_gpio_smoke_vseq.sv b/hw/top_earlgrey/dv/env/seq_lib/chip_sw_gpio_smoke_vseq.sv
index d31bb34..e827332 100644
--- a/hw/top_earlgrey/dv/env/seq_lib/chip_sw_gpio_smoke_vseq.sv
+++ b/hw/top_earlgrey/dv/env/seq_lib/chip_sw_gpio_smoke_vseq.sv
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
-// This test vseq is paired with SW test `sw/device/tests/dif_gpio_smoketest.c`.
+// This test vseq is paired with SW test `sw/device/tests/gpio_smoketest.c`.
class chip_sw_gpio_smoke_vseq extends chip_sw_base_vseq;
`uvm_object_utils(chip_sw_gpio_smoke_vseq)
diff --git a/hw/top_earlgrey/dv/verilator/verilator_sim_cfg.hjson b/hw/top_earlgrey/dv/verilator/verilator_sim_cfg.hjson
index c59f66a..c224204 100644
--- a/hw/top_earlgrey/dv/verilator/verilator_sim_cfg.hjson
+++ b/hw/top_earlgrey/dv/verilator/verilator_sim_cfg.hjson
@@ -85,9 +85,9 @@
// dictionary declared in `sw/device/tests/meson.build`, the `sw_images` list
// below should contain `sw/device/tests/<sw_test_name>` (without any more
// subdirectories) because that is where the meson target is created. For
- // example `dif_rv_plic_smoketest` is added to `sw_tests` in
- // `sw/device/tests/dif/meson.build`, but the final meson targets all start
- // `sw/device/tests/dif_rv_plic_smoketest_`.
+ // example `gpio_test` is added to `sw_tests` in
+ // `sw/device/tests/sim_div/meson.build`, but the final meson targets all
+ // start with `sw/device/tests/gpio_test_`.
//
// Each entry in `sw_images` is followed by an index separated with ':' which
// is used by the testbench to know what type of image is it:
@@ -98,85 +98,85 @@
// This allows an arbitrary number of SW images to be supplied to the TB.
tests: [
{
- name: dif_aes_smoketest
- sw_images: ["sw/device/tests/dif_aes_smoketest:1"]
+ name: aes_smoketest
+ sw_images: ["sw/device/tests/aes_smoketest:1"]
}
{
- name: dif_aon_timer_smoketest
- sw_images: ["sw/device/tests/dif_aon_timer_smoketest:1"]
+ name: aon_timer_smoketest
+ sw_images: ["sw/device/tests/aon_timer_smoketest:1"]
}
{
- name: dif_clkmgr_smoketest
- sw_images: ["sw/device/tests/dif_clkmgr_smoketest:1"]
+ name: clkmgr_smoketest
+ sw_images: ["sw/device/tests/clkmgr_smoketest:1"]
}
// TODO(lowrisc/opentitan#7505): Debug CSRNG generate bits mismatch.
// {
- // name: dif_csrng_smoketest
- // sw_images: ["sw/device/tests/dif_csrng_smoketest:1"]
+ // name: csrng_smoketest
+ // sw_images: ["sw/device/tests/csrng_smoketest:1"]
// }
{
- name: dif_entropy_src_smoketest
- sw_images: ["sw/device/tests/dif_entropy_src_smoketest:1"]
+ name: entropy_src_smoketest
+ sw_images: ["sw/device/tests/entropy_src_smoketest:1"]
}
{
- name: dif_gpio_smoketest
- sw_images: ["sw/device/tests/dif_gpio_smoketest:1"]
+ name: gpio_smoketest
+ sw_images: ["sw/device/tests/gpio_smoketest:1"]
}
{
- name: dif_hmac_smoketest
- sw_images: ["sw/device/tests/dif_hmac_smoketest:1"]
+ name: hmac_smoketest
+ sw_images: ["sw/device/tests/hmac_smoketest:1"]
}
{
- name: dif_kmac_smoketest
- sw_images: ["sw/device/tests/dif_kmac_smoketest:1"]
+ name: kmac_smoketest
+ sw_images: ["sw/device/tests/kmac_smoketest:1"]
}
{
- name: dif_kmac_cshake_smoketest
- sw_images: ["sw/device/tests/dif_kmac_cshake_smoketest:1"]
+ name: kmac_cshake_smoketest
+ sw_images: ["sw/device/tests/kmac_cshake_smoketest:1"]
}
{
- name: dif_kmac_kmac_smoketest
- sw_images: ["sw/device/tests/dif_kmac_kmac_smoketest:1"]
+ name: kmac_kmac_smoketest
+ sw_images: ["sw/device/tests/kmac_kmac_smoketest:1"]
}
{
name: crt_test
sw_images: ["sw/device/tests/crt_test:1"]
}
{
- name: dif_otbn_smoketest_rtl
- sw_images: ["sw/device/tests/dif_otbn_smoketest:1"]
+ name: otbn_smoketest_rtl
+ sw_images: ["sw/device/tests/otbn_smoketest:1"]
run_opts: ["+OTBN_USE_MODEL=0"]
}
// TODO: Needs to be debugged.
// {
- // name: dif_otbn_smoketest_model
- // sw_images: ["sw/device/tests/dif_otbn_smoketest:1"]
+ // name: otbn_smoketest_model
+ // sw_images: ["sw/device/tests/otbn_smoketest:1"]
// run_opts: ["+OTBN_USE_MODEL=1"]
// }
{
- name: dif_otp_ctrl_smoketest
- sw_images: ["sw/device/tests/dif_otp_ctrl_smoketest:1"]
+ name: otp_ctrl_smoketest
+ sw_images: ["sw/device/tests/otp_ctrl_smoketest:1"]
}
{
- name: dif_rv_plic_smoketest
- sw_images: ["sw/device/tests/dif_rv_plic_smoketest:1"]
+ name: rv_plic_smoketest
+ sw_images: ["sw/device/tests/rv_plic_smoketest:1"]
}
// TODO(#6656): AST is not instantiated in chip_earlgrey_verilator.
// {
- // name: dif_pwrmgr_smoketest
- // sw_images: ["sw/device/tests/dif_pwrmgr_smoketest:1"]
+ // name: pwrmgr_smoketest
+ // sw_images: ["sw/device/tests/pwrmgr_smoketest:1"]
// }
{
- name: dif_rstmgr_smoketest
- sw_images: ["sw/device/tests/dif_rstmgr_smoketest:1"]
+ name: rstmgr_smoketest
+ sw_images: ["sw/device/tests/rstmgr_smoketest:1"]
}
{
- name: dif_rv_timer_smoketest
- sw_images: ["sw/device/tests/dif_rv_timer_smoketest:1"]
+ name: rv_timer_smoketest
+ sw_images: ["sw/device/tests/rv_timer_smoketest:1"]
}
{
- name: dif_uart_smoketest
- sw_images: ["sw/device/tests/dif_uart_smoketest:1"]
+ name: uart_smoketest
+ sw_images: ["sw/device/tests/uart_smoketest:1"]
}
{
name: flash_ctrl_test
diff --git a/hw/top_englishbreakfast/util/prepare_sw.py b/hw/top_englishbreakfast/util/prepare_sw.py
index b89ec7f..6ed6273 100755
--- a/hw/top_englishbreakfast/util/prepare_sw.py
+++ b/hw/top_englishbreakfast/util/prepare_sw.py
@@ -145,7 +145,7 @@
'sw/device/boot_rom/boot_rom_export_fpga_nexysvideo',
'sw/device/sca/aes_serial_export_fpga_nexysvideo',
'sw/device/boot_rom/boot_rom_export_sim_verilator',
- 'sw/device/tests/dif_aes_smoketest_export_sim_verilator',
+ 'sw/device/tests/aes_smoketest_export_sim_verilator',
'sw/device/examples/hello_world/hello_world_export_sim_verilator',
]
for binary in binaries:
diff --git a/hw/top_englishbreakfast/util/sw_sources.patch b/hw/top_englishbreakfast/util/sw_sources.patch
index 499b59c..3e94097 100644
--- a/hw/top_englishbreakfast/util/sw_sources.patch
+++ b/hw/top_englishbreakfast/util/sw_sources.patch
@@ -1,11 +1,11 @@
diff --git a/sw/device/boot_rom/rom_crt.S b/sw/device/boot_rom/rom_crt.S
-index 538712db1..1c8e29d86 100644
+index 8c61ec4d7..1c8e29d86 100644
--- a/sw/device/boot_rom/rom_crt.S
+++ b/sw/device/boot_rom/rom_crt.S
@@ -81,19 +81,6 @@ _reset_start:
_start:
.globl _start
-
+
- // Enable entropy complex - this is not the full enable
- li a0, TOP_EARLGREY_ENTROPY_SRC_BASE_ADDR
- li t0, 0x2
@@ -52,13 +52,13 @@
- mmio_region_write32(reg32, reg_offset, reg_value & mask);
}
diff --git a/sw/device/sca/aes_serial.c b/sw/device/sca/aes_serial.c
-index 50bee15fa..8f5976a83 100644
+index 901eba868..b19979b89 100644
--- a/sw/device/sca/aes_serial.c
+++ b/sw/device/sca/aes_serial.c
@@ -203,18 +203,13 @@ int main(void) {
sca_init(kScaTriggerSourceAes, kScaPeripheralAes);
sca_get_uart(&uart1);
-
+
- LOG_INFO("Running AES serial");
-
- LOG_INFO("Initializing simple serial interface to capture board.");
@@ -66,22 +66,22 @@
simple_serial_register_handler('k', aes_serial_set_key);
simple_serial_register_handler('p', aes_serial_single_encrypt);
simple_serial_register_handler('b', aes_serial_batch_encrypt);
-
+
- LOG_INFO("Initializing AES unit.");
init_aes();
-
+
- LOG_INFO("Starting simple serial packet handling.");
while (true) {
simple_serial_process_packet();
}
diff --git a/sw/device/sca/lib/sca.c b/sw/device/sca/lib/sca.c
-index 1c74eb0ee..cc087c4b9 100644
+index 9210f4529..81fd2a223 100644
--- a/sw/device/sca/lib/sca.c
+++ b/sw/device/sca/lib/sca.c
@@ -56,7 +56,6 @@ enum {
kRvTimerHart = kTopEarlgreyPlicTargetIbex0,
};
-
+
-static dif_uart_t uart0;
static dif_uart_t uart1;
static dif_gpio_t gpio;
@@ -102,9 +102,9 @@
IGNORE_RESULT(dif_uart_configure(&uart1, uart_config));
+ base_uart_stdout(&uart1);
}
-
+
/**
-@@ -147,32 +147,11 @@ void handler_irq_timer(void) {
+@@ -155,32 +147,11 @@ void handler_irq_timer(void) {
* @param disable Set of peripherals to disable.
*/
void sca_disable_peripherals(sca_peripherals_t disable) {
@@ -137,8 +137,8 @@
+ .last_hintable_clock = CLKMGR_CLK_HINTS_CLK_MAIN_HMAC_HINT_BIT};
dif_clkmgr_t clkmgr;
IGNORE_RESULT(dif_clkmgr_init(clkmgr_params, &clkmgr));
-
-@@ -182,19 +165,6 @@ void sca_disable_peripherals(sca_peripherals_t disable) {
+
+@@ -194,19 +165,6 @@ void sca_disable_peripherals(sca_peripherals_t disable) {
&clkmgr, CLKMGR_CLK_HINTS_CLK_MAIN_HMAC_HINT_BIT,
kDifClkmgrToggleDisabled));
}
@@ -158,33 +158,33 @@
if (disable & kScaPeripheralUsb) {
IGNORE_RESULT(dif_clkmgr_gateable_clock_set_enabled(
&clkmgr, CLKMGR_CLK_ENABLES_CLK_USB_PERI_EN_BIT,
-diff --git a/sw/device/tests/dif/dif_aes_smoketest.c b/sw/device/tests/dif/dif_aes_smoketest.c
+diff --git a/sw/device/tests/aes_smoketest.c b/sw/device/tests/aes_smoketest.c
index 5b995c27f..0ce27b2f1 100644
---- a/sw/device/tests/dif/dif_aes_smoketest.c
-+++ b/sw/device/tests/dif/dif_aes_smoketest.c
+--- a/sw/device/tests/aes_smoketest.c
++++ b/sw/device/tests/aes_smoketest.c
@@ -7,7 +7,6 @@
#include "sw/device/lib/dif/dif_aes.h"
#include "sw/device/lib/runtime/log.h"
#include "sw/device/lib/testing/check.h"
-#include "sw/device/lib/testing/entropy_testutils.h"
#include "sw/device/lib/testing/test_framework/test_main.h"
-
+
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
@@ -67,9 +66,6 @@ bool test_main(void) {
-
+
LOG_INFO("Running AES test");
-
+
- // First of all, we need to get the entropy complex up and running.
- entropy_testutils_boot_mode_init();
-
// Initialise AES.
dif_aes_params_t params = {
.base_addr = mmio_region_from_addr(TOP_EARLGREY_AES_BASE_ADDR),
-diff --git a/sw/device/tests/dif/meson.build b/sw/device/tests/dif/meson.build
-index b1fd4acce..96cee10c6 100644
---- a/sw/device/tests/dif/meson.build
-+++ b/sw/device/tests/dif/meson.build
-@@ -217,7 +217,6 @@ dif_aes_smoketest_lib = declare_dependency(
+diff --git a/sw/device/tests/meson.build b/sw/device/tests/meson.build
+index b52efb47d..c8ba0060b 100644
+--- a/sw/device/tests/meson.build
++++ b/sw/device/tests/meson.build
+@@ -243,7 +243,6 @@ aes_smoketest_lib = declare_dependency(
sw_lib_dif_aes,
sw_lib_mmio,
sw_lib_runtime_log,
diff --git a/sw/device/lib/testing/meson.build b/sw/device/lib/testing/meson.build
index 49a6b90..8472180 100644
--- a/sw/device/lib/testing/meson.build
+++ b/sw/device/lib/testing/meson.build
@@ -24,7 +24,7 @@
# Random number generator.
sw_lib_testing_rand_testutils = declare_dependency(
link_with: static_library(
- 'sw_lib_rand_testutils',
+ 'sw_lib_testing_rand_testutils',
sources: ['rand_testutils.c'],
)
)
diff --git a/sw/device/lib/testing/test_framework/index.md b/sw/device/lib/testing/test_framework/index.md
index ff3c21f..1794627 100644
--- a/sw/device/lib/testing/test_framework/index.md
+++ b/sw/device/lib/testing/test_framework/index.md
@@ -23,4 +23,4 @@
}
```
-Check out the [rv\_timer smoke test](https://cs.opensource.google/opentitan/opentitan/+/master:sw/device/tests/dif/dif_rv_timer_smoketest.c) for an example chip-level test that uses the current test framework.
+Check out the [rv\_timer smoke test](https://cs.opensource.google/opentitan/opentitan/+/master:sw/device/tests/rv_timer_smoketest.c) for an example chip-level test that uses the current test framework.
diff --git a/sw/device/tests/dif/dif_aes_smoketest.c b/sw/device/tests/aes_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_aes_smoketest.c
rename to sw/device/tests/aes_smoketest.c
diff --git a/sw/device/tests/dif/dif_aon_timer_smoketest.c b/sw/device/tests/aon_timer_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_aon_timer_smoketest.c
rename to sw/device/tests/aon_timer_smoketest.c
diff --git a/sw/device/tests/dif/dif_clkmgr_smoketest.c b/sw/device/tests/clkmgr_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_clkmgr_smoketest.c
rename to sw/device/tests/clkmgr_smoketest.c
diff --git a/sw/device/tests/dif/dif_csrng_smoketest.c b/sw/device/tests/csrng_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_csrng_smoketest.c
rename to sw/device/tests/csrng_smoketest.c
diff --git a/sw/device/tests/dif/meson.build b/sw/device/tests/dif/meson.build
deleted file mode 100644
index b1fd4ac..0000000
--- a/sw/device/tests/dif/meson.build
+++ /dev/null
@@ -1,315 +0,0 @@
-# Copyright lowRISC contributors.
-# Licensed under the Apache License, Version 2.0, see LICENSE for details.
-# SPDX-License-Identifier: Apache-2.0
-
-dif_rv_plic_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_rv_plic_smoketest_lib',
- sources: ['dif_rv_plic_smoketest.c'],
- dependencies: [
- sw_lib_dif_uart,
- sw_lib_dif_rv_plic,
- sw_lib_irq,
- sw_lib_mmio,
- sw_lib_runtime_log,
- sw_lib_runtime_hart,
- sw_lib_testing_test_status,
- ],
- ),
-)
-sw_tests += {
- 'dif_rv_plic_smoketest': {
- 'library': dif_rv_plic_smoketest_lib,
- }
-}
-
-dif_uart_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_uart_smoketest_lib',
- sources: ['dif_uart_smoketest.c'],
- dependencies: [
- sw_lib_dif_uart,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- ],
- ),
-)
-sw_tests += {
- 'dif_uart_smoketest': {
- 'library': dif_uart_smoketest_lib,
- }
-}
-sw_rom_ext_tests += {
- 'dif_uart_smoketest': {
- 'library': dif_uart_smoketest_lib,
- }
-}
-
-dif_rv_timer_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_rv_timer_smoketest_lib',
- sources: ['dif_rv_timer_smoketest.c'],
- dependencies: [
- sw_lib_dif_rv_timer,
- sw_lib_runtime_log,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- sw_lib_irq,
- ],
- ),
-)
-sw_tests += {
- 'dif_rv_timer_smoketest': {
- 'library': dif_rv_timer_smoketest_lib,
- }
-}
-
-dif_hmac_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_hmac_smoketest_lib',
- sources: ['dif_hmac_smoketest.c'],
- dependencies: [
- sw_lib_dif_hmac,
- sw_lib_runtime_log,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- ],
- ),
-)
-sw_tests += {
- 'dif_hmac_smoketest': {
- 'library': dif_hmac_smoketest_lib,
- }
-}
-
-dif_kmac_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_kmac_smoketest_lib',
- sources: ['dif_kmac_smoketest.c'],
- dependencies: [
- sw_lib_dif_kmac,
- sw_lib_runtime_log,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- ],
- ),
-)
-sw_tests += {
- 'dif_kmac_smoketest': {
- 'library': dif_kmac_smoketest_lib,
- }
-}
-
-dif_kmac_cshake_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_kmac_cshake_smoketest_lib',
- sources: ['dif_kmac_cshake_smoketest.c'],
- dependencies: [
- sw_lib_dif_kmac,
- sw_lib_runtime_log,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- ],
- ),
-)
-sw_tests += {
- 'dif_kmac_cshake_smoketest': {
- 'library': dif_kmac_cshake_smoketest_lib,
- }
-}
-
-dif_kmac_kmac_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_kmac_kmac_smoketest_lib',
- sources: ['dif_kmac_kmac_smoketest.c'],
- dependencies: [
- sw_lib_dif_kmac,
- sw_lib_runtime_log,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- ],
- ),
-)
-sw_tests += {
- 'dif_kmac_kmac_smoketest': {
- 'library': dif_kmac_kmac_smoketest_lib,
- }
-}
-
-dif_rstmgr_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_rstmgr_smoketest_lib',
- sources: ['dif_rstmgr_smoketest.c'],
- dependencies: [
- sw_lib_dif_rstmgr,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- ],
- ),
-)
-sw_tests += {
- 'dif_rstmgr_smoketest': {
- 'library': dif_rstmgr_smoketest_lib,
- }
-}
-
-dif_otbn_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_otbn_smoketest_lib',
- sources: ['dif_otbn_smoketest.c'],
- dependencies: [
- sw_lib_testing_entropy_testutils,
- sw_lib_dif_otbn,
- sw_lib_runtime_hart,
- sw_lib_runtime_otbn,
- top_earlgrey,
- sw_otbn['barrett384']['rv32embed_dependency'],
- sw_otbn['err_test']['rv32embed_dependency'],
- ],
- ),
-)
-sw_tests += {
- 'dif_otbn_smoketest': {
- 'library': dif_otbn_smoketest_lib,
- }
-}
-
-dif_otp_ctrl_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_otp_ctrl_smoketest_lib',
- sources: ['dif_otp_ctrl_smoketest.c'],
- dependencies: [
- sw_lib_dif_otp_ctrl,
- sw_lib_runtime_log,
- sw_lib_mmio,
- sw_lib_runtime_hart,
- ],
- ),
-)
-sw_tests += {
- 'dif_otp_ctrl_smoketest': {
- 'library': dif_otp_ctrl_smoketest_lib,
- }
-}
-
-dif_gpio_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_gpio_smoketest_lib',
- sources: ['dif_gpio_smoketest.c'],
- dependencies: [
- sw_lib_dif_gpio,
- sw_lib_mmio,
- sw_lib_runtime_log,
- ],
- ),
-)
-sw_tests += {
- 'dif_gpio_smoketest': {
- 'library': dif_gpio_smoketest_lib,
- }
-}
-
-dif_aes_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_aes_smoketest_lib',
- sources: ['dif_aes_smoketest.c'],
- dependencies: [
- sw_lib_dif_aes,
- sw_lib_mmio,
- sw_lib_runtime_log,
- sw_lib_testing_entropy_testutils,
- sw_lib_testing_test_status,
- ],
- ),
-)
-sw_tests += {
- 'dif_aes_smoketest': {
- 'library': dif_aes_smoketest_lib,
- }
-}
-
-dif_clkmgr_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_clkmgr_smoketest_lib',
- sources: ['dif_clkmgr_smoketest.c'],
- dependencies: [
- sw_lib_dif_clkmgr,
- sw_lib_mmio,
- sw_lib_runtime_log,
- ],
- ),
-)
-sw_tests += {
- 'dif_clkmgr_smoketest': {
- 'library': dif_clkmgr_smoketest_lib,
- }
-}
-
-dif_csrng_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_csrng_smoketest_lib',
- sources: ['dif_csrng_smoketest.c'],
- dependencies: [
- sw_lib_dif_csrng,
- sw_lib_mmio,
- sw_lib_runtime_log,
- ],
- ),
-)
-sw_tests += {
- 'dif_csrng_smoketest': {
- 'library': dif_csrng_smoketest_lib,
- }
-}
-
-dif_entropy_src_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_entropy_src_smoketest_lib',
- sources: ['dif_entropy_src_smoketest.c'],
- dependencies: [
- sw_lib_dif_entropy_src,
- sw_lib_mmio,
- sw_lib_runtime_log,
- ],
- ),
-)
-sw_tests += {
- 'dif_entropy_src_smoketest': {
- 'library': dif_entropy_src_smoketest_lib,
- }
-}
-
-dif_aon_timer_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_aon_timer_smoketest_lib',
- sources: ['dif_aon_timer_smoketest.c'],
- dependencies: [
- sw_lib_dif_aon_timer,
- sw_lib_mmio,
- sw_lib_runtime_log,
- ],
- ),
-)
-sw_tests += {
- 'dif_aon_timer_smoketest': {
- 'library': dif_aon_timer_smoketest_lib,
- }
-}
-
-dif_pwrmgr_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'dif_pwrmgr_smoketest_lib',
- sources: ['dif_pwrmgr_smoketest.c'],
- dependencies: [
- sw_lib_dif_pwrmgr,
- sw_lib_dif_aon_timer,
- sw_lib_mmio,
- sw_lib_runtime_log,
- ],
- ),
-)
-sw_tests += {
- 'dif_pwrmgr_smoketest': {
- 'library': dif_pwrmgr_smoketest_lib,
- }
-}
diff --git a/sw/device/tests/dif/dif_entropy_src_smoketest.c b/sw/device/tests/entropy_src_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_entropy_src_smoketest.c
rename to sw/device/tests/entropy_src_smoketest.c
diff --git a/sw/device/tests/dif/dif_gpio_smoketest.c b/sw/device/tests/gpio_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_gpio_smoketest.c
rename to sw/device/tests/gpio_smoketest.c
diff --git a/sw/device/tests/dif/dif_hmac_smoketest.c b/sw/device/tests/hmac_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_hmac_smoketest.c
rename to sw/device/tests/hmac_smoketest.c
diff --git a/sw/device/tests/dif/dif_kmac_cshake_smoketest.c b/sw/device/tests/kmac_cshake_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_kmac_cshake_smoketest.c
rename to sw/device/tests/kmac_cshake_smoketest.c
diff --git a/sw/device/tests/dif/dif_kmac_kmac_smoketest.c b/sw/device/tests/kmac_kmac_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_kmac_kmac_smoketest.c
rename to sw/device/tests/kmac_kmac_smoketest.c
diff --git a/sw/device/tests/dif/dif_kmac_smoketest.c b/sw/device/tests/kmac_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_kmac_smoketest.c
rename to sw/device/tests/kmac_smoketest.c
diff --git a/sw/device/tests/meson.build b/sw/device/tests/meson.build
index 9cd3ea9..b52efb4 100644
--- a/sw/device/tests/meson.build
+++ b/sw/device/tests/meson.build
@@ -25,10 +25,362 @@
# },
}
-subdir('dif')
-subdir('sim_dv')
-subdir('otbn')
+###############################################################################
+# Smoke Tests
+###############################################################################
+rv_plic_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'rv_plic_smoketest_lib',
+ sources: ['rv_plic_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_uart,
+ sw_lib_dif_rv_plic,
+ sw_lib_irq,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ sw_lib_runtime_hart,
+ sw_lib_testing_test_status,
+ ],
+ ),
+)
+sw_tests += {
+ 'rv_plic_smoketest': {
+ 'library': rv_plic_smoketest_lib,
+ }
+}
+uart_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'uart_smoketest_lib',
+ sources: ['uart_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_uart,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ ],
+ ),
+)
+sw_tests += {
+ 'uart_smoketest': {
+ 'library': uart_smoketest_lib,
+ }
+}
+sw_rom_ext_tests += {
+ 'uart_smoketest': {
+ 'library': uart_smoketest_lib,
+ }
+}
+
+rv_timer_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'rv_timer_smoketest_lib',
+ sources: ['rv_timer_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_rv_timer,
+ sw_lib_runtime_log,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ sw_lib_irq,
+ ],
+ ),
+)
+sw_tests += {
+ 'rv_timer_smoketest': {
+ 'library': rv_timer_smoketest_lib,
+ }
+}
+
+hmac_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'hmac_smoketest_lib',
+ sources: ['hmac_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_hmac,
+ sw_lib_runtime_log,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ ],
+ ),
+)
+sw_tests += {
+ 'hmac_smoketest': {
+ 'library': hmac_smoketest_lib,
+ }
+}
+
+kmac_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'kmac_smoketest_lib',
+ sources: ['kmac_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_kmac,
+ sw_lib_runtime_log,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ ],
+ ),
+)
+sw_tests += {
+ 'kmac_smoketest': {
+ 'library': kmac_smoketest_lib,
+ }
+}
+
+kmac_cshake_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'kmac_cshake_smoketest_lib',
+ sources: ['kmac_cshake_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_kmac,
+ sw_lib_runtime_log,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ ],
+ ),
+)
+sw_tests += {
+ 'kmac_cshake_smoketest': {
+ 'library': kmac_cshake_smoketest_lib,
+ }
+}
+
+kmac_kmac_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'kmac_kmac_smoketest_lib',
+ sources: ['kmac_kmac_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_kmac,
+ sw_lib_runtime_log,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ ],
+ ),
+)
+sw_tests += {
+ 'kmac_kmac_smoketest': {
+ 'library': kmac_kmac_smoketest_lib,
+ }
+}
+
+rstmgr_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'rstmgr_smoketest_lib',
+ sources: ['rstmgr_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_rstmgr,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ ],
+ ),
+)
+sw_tests += {
+ 'rstmgr_smoketest': {
+ 'library': rstmgr_smoketest_lib,
+ }
+}
+
+otbn_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'otbn_smoketest_lib',
+ sources: ['otbn_smoketest.c'],
+ dependencies: [
+ sw_lib_testing_entropy_testutils,
+ sw_lib_dif_otbn,
+ sw_lib_runtime_hart,
+ sw_lib_runtime_otbn,
+ top_earlgrey,
+ sw_otbn['barrett384']['rv32embed_dependency'],
+ sw_otbn['err_test']['rv32embed_dependency'],
+ ],
+ ),
+)
+sw_tests += {
+ 'otbn_smoketest': {
+ 'library': otbn_smoketest_lib,
+ }
+}
+
+otp_ctrl_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'otp_ctrl_smoketest_lib',
+ sources: ['otp_ctrl_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_otp_ctrl,
+ sw_lib_runtime_log,
+ sw_lib_mmio,
+ sw_lib_runtime_hart,
+ ],
+ ),
+)
+sw_tests += {
+ 'otp_ctrl_smoketest': {
+ 'library': otp_ctrl_smoketest_lib,
+ }
+}
+
+gpio_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'gpio_smoketest_lib',
+ sources: ['gpio_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_gpio,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ ],
+ ),
+)
+sw_tests += {
+ 'gpio_smoketest': {
+ 'library': gpio_smoketest_lib,
+ }
+}
+
+aes_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'aes_smoketest_lib',
+ sources: ['aes_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_aes,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ sw_lib_testing_entropy_testutils,
+ sw_lib_testing_test_status,
+ ],
+ ),
+)
+sw_tests += {
+ 'aes_smoketest': {
+ 'library': aes_smoketest_lib,
+ }
+}
+
+clkmgr_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'clkmgr_smoketest_lib',
+ sources: ['clkmgr_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_clkmgr,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ ],
+ ),
+)
+sw_tests += {
+ 'clkmgr_smoketest': {
+ 'library': clkmgr_smoketest_lib,
+ }
+}
+
+csrng_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'csrng_smoketest_lib',
+ sources: ['csrng_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_csrng,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ ],
+ ),
+)
+sw_tests += {
+ 'csrng_smoketest': {
+ 'library': csrng_smoketest_lib,
+ }
+}
+
+entropy_src_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'entropy_src_smoketest_lib',
+ sources: ['entropy_src_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_entropy_src,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ ],
+ ),
+)
+sw_tests += {
+ 'entropy_src_smoketest': {
+ 'library': entropy_src_smoketest_lib,
+ }
+}
+
+aon_timer_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'aon_timer_smoketest_lib',
+ sources: ['aon_timer_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_aon_timer,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ ],
+ ),
+)
+sw_tests += {
+ 'aon_timer_smoketest': {
+ 'library': aon_timer_smoketest_lib,
+ }
+}
+
+pwrmgr_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'pwrmgr_smoketest_lib',
+ sources: ['pwrmgr_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_pwrmgr,
+ sw_lib_dif_aon_timer,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ ],
+ ),
+)
+sw_tests += {
+ 'pwrmgr_smoketest': {
+ 'library': pwrmgr_smoketest_lib,
+ }
+}
+
+pmp_smoketest_napot_lib = declare_dependency(
+ link_with: static_library(
+ 'pmp_smoketest_napot_lib',
+ sources: ['pmp_smoketest_napot.c'],
+ dependencies: [
+ sw_lib_irq,
+ sw_lib_runtime_log,
+ sw_lib_runtime_hart,
+ sw_lib_runtime_pmp,
+ sw_lib_testing_test_status,
+ ],
+ ),
+)
+sw_tests += {
+ 'pmp_smoketest_napot': {
+ 'library': pmp_smoketest_napot_lib,
+ }
+}
+
+pmp_smoketest_tor_lib = declare_dependency(
+ link_with: static_library(
+ 'pmp_smoketest_tor_lib',
+ sources: ['pmp_smoketest_tor.c'],
+ dependencies: [
+ sw_lib_irq,
+ sw_lib_runtime_log,
+ sw_lib_runtime_hart,
+ sw_lib_runtime_pmp,
+ sw_lib_testing_test_status,
+ ],
+ ),
+)
+sw_tests += {
+ 'pmp_smoketest_tor': {
+ 'library': pmp_smoketest_tor_lib,
+ }
+}
+
+###############################################################################
+# IP Integration Tests
+###############################################################################
flash_ctrl_test_lib = declare_dependency(
link_with: static_library(
'flash_ctrl_test_lib',
@@ -84,6 +436,17 @@
}
}
+###############################################################################
+# DV Simulation (target-specific) Tests
+###############################################################################
+subdir('sim_dv')
+
+###############################################################################
+# Other Tests
+###############################################################################
+# TODO: un-subfolder these
+subdir('otbn')
+
coverage_test_lib = declare_dependency(
link_with: static_library(
'coverage_test_lib',
@@ -99,44 +462,10 @@
}
}
-pmp_smoketest_napot_lib = declare_dependency(
- link_with: static_library(
- 'pmp_smoketest_napot_lib',
- sources: ['pmp_smoketest_napot.c'],
- dependencies: [
- sw_lib_irq,
- sw_lib_runtime_log,
- sw_lib_runtime_hart,
- sw_lib_runtime_pmp,
- sw_lib_testing_test_status,
- ],
- ),
-)
-sw_tests += {
- 'pmp_smoketest_napot': {
- 'library': pmp_smoketest_napot_lib,
- }
-}
-
-pmp_smoketest_tor_lib = declare_dependency(
- link_with: static_library(
- 'pmp_smoketest_tor_lib',
- sources: ['pmp_smoketest_tor.c'],
- dependencies: [
- sw_lib_irq,
- sw_lib_runtime_log,
- sw_lib_runtime_hart,
- sw_lib_runtime_pmp,
- sw_lib_testing_test_status,
- ],
- ),
-)
-sw_tests += {
- 'pmp_smoketest_tor': {
- 'library': pmp_smoketest_tor_lib,
- }
-}
-
+###############################################################################
+# Build Targets
+###############################################################################
+# (unsigned) test binaries loaded with ROM from sw/device/boot_rom/
foreach sw_test_name, sw_test_info : sw_tests
foreach device_name, device_lib : sw_lib_arch_core_devices
sw_test_elf = executable(
@@ -256,6 +585,7 @@
},
}
+# (signed) test binaries loaded with ROM from sw/device/silicon_creator/
foreach sw_test_name, sw_test_info : sw_rom_ext_tests
foreach device_name, device_lib : sw_lib_arch_core_devices
sw_test_elf = executable(
diff --git a/sw/device/tests/dif/dif_otbn_smoketest.c b/sw/device/tests/otbn_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_otbn_smoketest.c
rename to sw/device/tests/otbn_smoketest.c
diff --git a/sw/device/tests/dif/dif_otp_ctrl_smoketest.c b/sw/device/tests/otp_ctrl_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_otp_ctrl_smoketest.c
rename to sw/device/tests/otp_ctrl_smoketest.c
diff --git a/sw/device/tests/dif/dif_pwrmgr_smoketest.c b/sw/device/tests/pwrmgr_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_pwrmgr_smoketest.c
rename to sw/device/tests/pwrmgr_smoketest.c
diff --git a/sw/device/tests/dif/dif_rstmgr_smoketest.c b/sw/device/tests/rstmgr_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_rstmgr_smoketest.c
rename to sw/device/tests/rstmgr_smoketest.c
diff --git a/sw/device/tests/dif/dif_rv_plic_smoketest.c b/sw/device/tests/rv_plic_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_rv_plic_smoketest.c
rename to sw/device/tests/rv_plic_smoketest.c
diff --git a/sw/device/tests/dif/dif_rv_timer_smoketest.c b/sw/device/tests/rv_timer_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_rv_timer_smoketest.c
rename to sw/device/tests/rv_timer_smoketest.c
diff --git a/sw/device/tests/sim_dv/meson.build b/sw/device/tests/sim_dv/meson.build
index 1924685..2a41817 100644
--- a/sw/device/tests/sim_dv/meson.build
+++ b/sw/device/tests/sim_dv/meson.build
@@ -2,6 +2,30 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
+###############################################################################
+# Smoke Tests
+###############################################################################
+pwrmgr_usbdev_smoketest_lib = declare_dependency(
+ link_with: static_library(
+ 'pwrmgr_usbdev_smoketest_lib',
+ sources: ['pwrmgr_usbdev_smoketest.c'],
+ dependencies: [
+ sw_lib_dif_pwrmgr,
+ sw_lib_usb,
+ sw_lib_mmio,
+ sw_lib_runtime_log,
+ ],
+ ),
+)
+sw_tests += {
+ 'pwrmgr_usbdev_smoketest': {
+ 'library': pwrmgr_usbdev_smoketest_lib,
+ }
+}
+
+###############################################################################
+# IP Integration Tests
+###############################################################################
uart_tx_rx_test_lib = declare_dependency(
link_with: static_library(
'uart_tx_rx_test_lib',
@@ -92,21 +116,3 @@
'library': spi_tx_rx_test_lib,
}
}
-
-pwrmgr_usbdev_smoketest_lib = declare_dependency(
- link_with: static_library(
- 'pwrmgr_usbdev_smoketest_lib',
- sources: ['pwrmgr_usbdev_smoketest.c'],
- dependencies: [
- sw_lib_dif_pwrmgr,
- sw_lib_usb,
- sw_lib_mmio,
- sw_lib_runtime_log,
- ],
- ),
-)
-sw_tests += {
- 'pwrmgr_usbdev_smoketest': {
- 'library': pwrmgr_usbdev_smoketest_lib,
- }
-}
diff --git a/sw/device/tests/dif/dif_uart_smoketest.c b/sw/device/tests/uart_smoketest.c
similarity index 100%
rename from sw/device/tests/dif/dif_uart_smoketest.c
rename to sw/device/tests/uart_smoketest.c
diff --git a/test/systemtest/earlgrey/config.py b/test/systemtest/earlgrey/config.py
index 63f2c64..461874e 100644
--- a/test/systemtest/earlgrey/config.py
+++ b/test/systemtest/earlgrey/config.py
@@ -22,14 +22,14 @@
"name": "crt_test",
},
{
- "name": "dif_otbn_smoketest_rtl",
- "binary_name": "dif_otbn_smoketest",
+ "name": "otbn_smoketest_rtl",
+ "binary_name": "otbn_smoketest",
"verilator_extra_args": ['+OTBN_USE_MODEL=0'],
"targets": ["sim_verilator"],
},
{
- "name": "dif_otbn_smoketest_model",
- "binary_name": "dif_otbn_smoketest",
+ "name": "otbn_smoketest_model",
+ "binary_name": "otbn_smoketest",
"verilator_extra_args": ['+OTBN_USE_MODEL=1'],
"targets": ["sim_verilator"],
},
@@ -50,59 +50,59 @@
"targets": ["fpga_cw310"],
},
{
- "name": "dif_aes_smoketest",
+ "name": "aes_smoketest",
"targets": ["sim_verilator", "fpga_cw310", "fpga_nexysvideo"],
},
{
- "name": "dif_aon_timer_smoketest",
+ "name": "aon_timer_smoketest",
"targets": ["sim_verilator", "fpga_cw310"],
},
{
- "name": "dif_otp_ctrl_smoketest",
+ "name": "otp_ctrl_smoketest",
"targets": ["sim_verilator", "fpga_cw310"],
},
{
- "name": "dif_rv_plic_smoketest",
+ "name": "rv_plic_smoketest",
"targets": ["sim_verilator", "fpga_cw310"],
},
# TODO(#6656): AST is not instantiated in chip_earlgrey_verilator.
# {
- # "name": "dif_pwrmgr_smoketest",
+ # "name": "pwrmgr_smoketest",
# },
{
- "name": "dif_rstmgr_smoketest",
+ "name": "rstmgr_smoketest",
"targets": ["sim_verilator", "fpga_cw310", "fpga_nexysvideo"],
},
{
- "name": "dif_rv_timer_smoketest",
+ "name": "rv_timer_smoketest",
"targets": ["sim_verilator", "fpga_cw310"],
},
{
- "name": "dif_uart_smoketest",
+ "name": "uart_smoketest",
"targets": ["sim_verilator", "fpga_cw310", "fpga_nexysvideo"],
},
{
- "name": "dif_clkmgr_smoketest",
+ "name": "clkmgr_smoketest",
"targets": ["sim_verilator", "fpga_cw310", "fpga_nexysvideo"],
},
# TODO(lowrisc/opentitan#7505): Debug CSRNG generate bits mismatch.
# {
- # "name": "dif_csrng_smoketest",
+ # "name": "csrng_smoketest",
# "targets": ["sim_verilator", "fpga_cw310"],
# },
{
- "name": "dif_entropy_src_smoketest",
+ "name": "entropy_src_smoketest",
"targets": ["sim_verilator", "fpga_cw310"],
},
{
- "name": "dif_kmac_smoketest",
+ "name": "kmac_smoketest",
"targets": ["sim_verilator", "fpga_cw310"],
},
{
- "name": "dif_kmac_cshake_smoketest",
+ "name": "kmac_cshake_smoketest",
},
{
- "name": "dif_kmac_kmac_smoketest",
+ "name": "kmac_kmac_smoketest",
},
{
"name": "flash_ctrl_test",
@@ -122,7 +122,7 @@
},
# Cannot run on sim_verilator due to the differences in the top level.
{
- "name": "dif_gpio_smoketest",
+ "name": "gpio_smoketest",
"targets": ["fpga_cw310", "fpga_nexysvideo"],
},
{
diff --git a/test/systemtest/earlgrey/silicon_creator_config.py b/test/systemtest/earlgrey/silicon_creator_config.py
index 92da071..3b09b2c 100644
--- a/test/systemtest/earlgrey/silicon_creator_config.py
+++ b/test/systemtest/earlgrey/silicon_creator_config.py
@@ -19,7 +19,7 @@
# on all targets if not given (optional).
TEST_SILICON_CREATOR_APPS_SELFCHECKING = [
{
- "name": "dif_uart_smoketest",
+ "name": "uart_smoketest",
"signing_key": "fpga_key_1",
},
]
diff --git a/test/systemtest/earlgrey/test_sim_verilator.py b/test/systemtest/earlgrey/test_sim_verilator.py
index deffa62..cd2f711 100644
--- a/test/systemtest/earlgrey/test_sim_verilator.py
+++ b/test/systemtest/earlgrey/test_sim_verilator.py
@@ -224,7 +224,7 @@
assert sim.find_in_uart0(spiwait_msg, timeout=120)
log.debug("SPI is ready, continuing with spiload")
- app_bin = bin_dir / 'sw/device/tests/dif_uart_smoketest_sim_verilator.bin'
+ app_bin = bin_dir / 'sw/device/tests/uart_smoketest_sim_verilator.bin'
spiflash = bin_dir / 'sw/host/spiflash/spiflash'
utils.load_sw_over_spi(tmp_path, spiflash, app_bin,
['--verilator', sim.spi0_device_path])
diff --git a/test/systemtest/englishbreakfast/config.py b/test/systemtest/englishbreakfast/config.py
index 0244de4..86aec13 100644
--- a/test/systemtest/englishbreakfast/config.py
+++ b/test/systemtest/englishbreakfast/config.py
@@ -19,7 +19,7 @@
# on all targets if not given (optional).
TEST_APPS_SELFCHECKING = [
{
- "name": "dif_aes_smoketest",
+ "name": "aes_smoketest",
"targets": ["sim_verilator"],
},
]