blob: ce52fd9eede21caa5b2273b24ba0151a40058a9e [file] [log] [blame]
# Copyright Google LLC 2023
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
load(
"//rules:matcha.bzl",
"NEXUS_CORE_TARGETS",
"sec_flash_binary",
"smc_flash_binary",
)
# At the moment, this is only set up to run on the fpga_nexus target.
sec_flash_binary(
name = "isp_simple_irq_test",
srcs = [
"simple_sc.c",
"//sw/device/tests/smc:smc_isp_wrapper_irq_test_fpga_nexus_bin_c.h",
],
copts = [
"-nostdlib",
"-ffreestanding",
],
defines = [
"ISP_WRAPPER_IRQ",
],
per_device_deps = {
"fpga_nexus": [NEXUS_CORE_TARGETS.get("secure_core")],
},
deps = [
"//hw/top_matcha/sw:top_matcha",
"//sw/device/lib/dif:smc_ctrl",
"//sw/device/lib/testing/test_framework:ottf_start",
"//sw/device/lib/testing/test_framework:test_util",
"@lowrisc_opentitan//sw/device/lib/testing/test_framework:check",
"@lowrisc_opentitan//sw/device/lib/testing/test_framework:ottf_test_config",
"@lowrisc_opentitan//sw/device/silicon_creator/lib:manifest_def",
],
)
sec_flash_binary(
name = "isp_tpg_128_64_test",
srcs = [
"simple_sc.c",
"//sw/device/tests/smc:smc_isp_wrapper_tpg_128_64_test_fpga_nexus_bin_c.h",
],
copts = [
"-nostdlib",
"-ffreestanding",
],
defines = [
"ISP_WRAPPER_TPG_128_64",
],
per_device_deps = {
"fpga_nexus": [NEXUS_CORE_TARGETS.get("secure_core")],
},
deps = [
"//hw/top_matcha/sw:top_matcha",
"//sw/device/lib/dif:smc_ctrl",
"//sw/device/lib/testing/test_framework:ottf_start",
"//sw/device/lib/testing/test_framework:test_util",
"@lowrisc_opentitan//sw/device/lib/testing/test_framework:check",
"@lowrisc_opentitan//sw/device/lib/testing/test_framework:ottf_test_config",
"@lowrisc_opentitan//sw/device/silicon_creator/lib:manifest_def",
],
)
sec_flash_binary(
name = "isp_live_cam_test",
srcs = [
"isp_live_cam_test_smc_fpga_nexus_bin_c.h",
"simple_sc.c",
],
copts = [
"-nostdlib",
"-ffreestanding",
],
defines = [
"ISP_LIVE_CAM",
],
per_device_deps = {
"fpga_nexus": [NEXUS_CORE_TARGETS.get("secure_core")],
},
deps = [
"//hw/top_matcha/sw:top_matcha",
"//sw/device/lib/dif:smc_ctrl",
"//sw/device/lib/testing/test_framework:ottf_start",
"//sw/device/lib/testing/test_framework:test_util",
"@lowrisc_opentitan//sw/device/lib/testing/test_framework:check",
"@lowrisc_opentitan//sw/device/lib/testing/test_framework:ottf_test_config",
"@lowrisc_opentitan//sw/device/silicon_creator/lib:manifest_def",
],
)
smc_flash_binary(
name = "isp_live_cam_test_smc",
srcs = [
"isp_live_cam_test_smc.c",
],
copts = [
"-nostdlib",
"-ffreestanding",
],
per_device_deps = {
"fpga_nexus": [NEXUS_CORE_TARGETS.get("smc")],
},
deps = [
"//sw/device/lib:camera_hm01b0",
"//sw/device/lib/dif:cam_ctrl",
"//sw/device/lib/dif:isp_wrapper",
"//sw/device/lib/dif:rv_plic_smc",
"//sw/device/lib/testing/test_framework:test_util",
"//sw/device/tests:test_lib_smc",
"@lowrisc_opentitan//sw/device/lib/base:mmio",
"@lowrisc_opentitan//sw/device/lib/runtime:irq",
"@lowrisc_opentitan//sw/device/silicon_creator/lib:manifest_def",
],
)