blob: 8740d12f099be855c97a85615544318f7df5f367 [file]
# Copyright 2023 Google LLC.
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
load("//rules:matcha_test.bzl", "matcha_dv_test")
matcha_dv_test(
name = "uart_tx_rx_test",
srcs = ["uart_tx_rx_test.c"],
targets = ["dv"],
deps = [
"//hw/top_matcha/ip/clkmgr/data/autogen:clkmgr_regs",
"//hw/top_matcha/ip/pinmux/data/autogen:pinmux_regs",
"//hw/top_matcha/sw/autogen:top_matcha",
"//sw/device/lib/dif:clkmgr",
"//sw/device/lib/dif:rv_plic_sec",
"//sw/device/lib/testing:clkmgr_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
"@lowrisc_opentitan//hw/ip/lc_ctrl/data:lc_ctrl_regs",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/dif:lc_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:uart",
"@lowrisc_opentitan//sw/device/lib/runtime:hart",
"@lowrisc_opentitan//sw/device/lib/runtime:irq",
"@lowrisc_opentitan//sw/device/lib/runtime:log",
],
)
matcha_dv_test(
name = "rv_dm_ndm_reset_req",
srcs = ["rv_dm_ndm_reset_req.c"],
targets = ["dv"],
deps = [
"//hw/top_matcha/ip/pinmux/data/autogen:pinmux_regs",
"//hw/top_matcha/sw/autogen:top_matcha",
"//sw/device/lib/dif:pinmux",
"//sw/device/lib/dif:rstmgr",
"//sw/device/tests:test_dv_lib",
"@lowrisc_opentitan//hw/ip/adc_ctrl/data:adc_ctrl_regs",
"@lowrisc_opentitan//hw/ip/flash_ctrl/data:flash_ctrl_regs",
"@lowrisc_opentitan//hw/ip/keymgr/data:keymgr_regs",
"@lowrisc_opentitan//hw/ip/otp_ctrl/data:otp_ctrl_regs",
"@lowrisc_opentitan//hw/ip/sysrst_ctrl/data:sysrst_ctrl_regs",
"@lowrisc_opentitan//sw/device/lib/dif:adc_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:flash_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:keymgr",
"@lowrisc_opentitan//sw/device/lib/dif:otp_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:sysrst_ctrl",
"@lowrisc_opentitan//sw/device/lib/testing:rstmgr_testutils",
],
)
matcha_dv_test(
name = "i2c_host_tx_rx_test",
srcs = ["i2c_host_tx_rx_test.c"],
targets = ["dv"],
deps = [
"//hw/top_matcha/ip/pinmux/data/autogen:pinmux_regs",
"//sw/device/lib/dif:pinmux",
"//sw/device/lib/dif:rstmgr",
"//sw/device/tests:test_dv_lib",
"@lowrisc_opentitan//sw/device/lib/dif:i2c",
"@lowrisc_opentitan//sw/device/lib/testing:i2c_testutils",
"//sw/device/lib/testing:isr_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:rand_testutils",
],
)
################################################################################
# Place the Opentitan-sourced DV test below. #
# Opentitan DV binary build flow does not support centOS7, so we pull the #
# source code and build them here using `matcha_dv_test` rule. #
################################################################################
matcha_dv_test(
name = "spi_tx_rx_test",
srcs = ["@lowrisc_opentitan//sw/device/tests/sim_dv:spi_tx_rx_test.c"],
targets = ["dv"],
deps = [
"//sw/device/lib/arch:device",
"//sw/device/lib/dif:rv_plic_sec",
"//sw/device/tests:test_dv_lib_opentitan",
"@lowrisc_opentitan//sw/device/lib/dif:base",
"@lowrisc_opentitan//sw/device/lib/dif:spi_device",
],
)
matcha_dv_test(
name = "rom_ctrl_integrity_check_test",
srcs = ["@lowrisc_opentitan//sw/device/tests/sim_dv:rom_ctrl_integrity_check_test.c"],
targets = ["dv"],
deps = [
"//sw/device/tests:test_dv_lib_opentitan",
"@lowrisc_opentitan//sw/device/lib/dif:lc_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:rom_ctrl",
"@lowrisc_opentitan//sw/device/lib/testing/test_framework:status",
],
)
matcha_dv_test(
name = "alert_handler_escalation_test",
srcs = ["@lowrisc_opentitan//sw/device/tests/sim_dv:alert_handler_escalation.c"],
deps = [
"//hw/top_matcha:alert_handler_regs",
"//sw/device/lib/arch:device",
"//sw/device/lib/dif:alert_handler",
"//sw/device/lib/dif:clkmgr",
"//sw/device/lib/dif:rstmgr",
"//sw/device/tests:test_dv_lib_opentitan",
"@lowrisc_opentitan//sw/device/lib/dif:keymgr",
"@lowrisc_opentitan//sw/device/lib/dif:rv_core_ibex",
"@lowrisc_opentitan//sw/device/lib/testing:alert_handler_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:keymgr_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:rstmgr_testutils",
],
)
matcha_dv_test(
name = "rv_dm_ndm_reset_req_when_cpu_halted",
srcs = ["@lowrisc_opentitan//sw/device/tests/sim_dv:rv_dm_ndm_reset_req_when_cpu_halted.c"],
deps = [
"//sw/device/lib/dif:rstmgr",
"//sw/device/tests:test_dv_lib_opentitan",
"@lowrisc_opentitan//sw/device/lib/testing:rstmgr_testutils",
],
)
matcha_dv_test(
name = "sensor_ctrl_status_test",
srcs = ["@lowrisc_opentitan//sw/device/tests/sim_dv:sensor_ctrl_status.c"],
deps = [
"//hw/top_matcha/ip/sensor_ctrl/data:sensor_ctrl_regs",
"//sw/device/lib/dif:rv_plic_sec",
"//sw/device/tests:test_dv_lib_opentitan",
"@lowrisc_opentitan//sw/device/lib/base:abs_mmio",
"@lowrisc_opentitan//sw/device/lib/dif:sensor_ctrl",
"@lowrisc_opentitan//sw/device/lib/testing:isr_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:rv_plic_testutils",
],
)
matcha_dv_test(
name = "all_escalation_resets_test",
srcs = ["@lowrisc_opentitan//sw/device/tests/sim_dv:all_escalation_resets_test.c"],
deps = [
"//sw/device/lib/dif:alert_handler",
"//sw/device/lib/dif:clkmgr",
"//sw/device/lib/dif:rstmgr",
"//sw/device/lib/dif:rv_plic_sec",
"//sw/device/tests:test_dv_lib_opentitan",
"@lowrisc_opentitan//sw/device/lib/base:abs_mmio",
"@lowrisc_opentitan//sw/device/lib/dif:aes",
"@lowrisc_opentitan//sw/device/lib/dif:aon_timer",
"@lowrisc_opentitan//sw/device/lib/dif:flash_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:kmac",
"@lowrisc_opentitan//sw/device/lib/dif:lc_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:otp_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:pwrmgr",
"@lowrisc_opentitan//sw/device/lib/dif:rom_ctrl",
"@lowrisc_opentitan//sw/device/lib/dif:rv_core_ibex",
"@lowrisc_opentitan//sw/device/lib/dif:sram_ctrl",
"@lowrisc_opentitan//sw/device/lib/testing:alert_handler_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:aon_timer_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:flash_ctrl_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:rstmgr_testutils",
"@lowrisc_opentitan//sw/device/lib/testing:rv_plic_testutils",
],
)