blob: 16d9ee9961feb5c13b97ce71854545a38e68b1a7 [file] [log] [blame]
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
package(default_visibility = ["//visibility:public"])
# Use a bitstream from the GCP bucket (this is also the default condition).
# You can control the GCP bitstream selection via the BITSTREAM environment
# variable. See //rules/bitstreams.bzl for more information.
#
# Example:
# bazel test //sw/device/silicon_creator/lib/drivers:hmac_functest_fpga_cw310 --define bitstream=gcp
config_setting(
name = "bitstream_gcp",
define_values = {
"bitstream": "gcp",
},
)
# Skip loading a bitstream in to the FPGA. This is useful if you already
# have a bitstream loaded into the FPGA and you don't want the GCP cache
# manager to do anything unexpected.
#
# Example:
# bazel test //sw/device/silicon_creator/lib/drivers:hmac_functest_fpga_cw310 --define bitstream=skip
config_setting(
name = "bitstream_skip",
define_values = {
"bitstream": "skip",
},
)
# Use a bitstream built by Vivado. You'll need to have Xilinx Vivado
# installed and have properly configured access to a license or license
# server.
#
# Example:
# bazel test //sw/device/silicon_creator/lib/drivers:hmac_functest_fpga_cw310 --define bitstream=vivado
config_setting(
name = "bitstream_vivado",
define_values = {
"bitstream": "vivado",
},
)
filegroup(
name = "test_rom",
srcs = select({
"bitstream_skip": ["skip.bit"],
"bitstream_vivado": ["//hw/bitstream/vivado:fpga_cw310_test_rom"],
"bitstream_gcp": ["@bitstreams//:bitstream_test_rom"],
"//conditions:default": ["@bitstreams//:bitstream_test_rom"],
}),
)
filegroup(
name = "mask_rom",
srcs = select({
"bitstream_skip": ["skip.bit"],
"bitstream_vivado": ["//hw/bitstream/vivado:fpga_cw310_mask_rom"],
"bitstream_gcp": ["@bitstreams//:bitstream_mask_rom"],
"//conditions:default": ["@bitstreams//:bitstream_mask_rom"],
}),
)
# TODO(lowRISC/opentitan#13603): Use `select` once we're uploading these
# artifacts to GCP.
filegroup(
name = "mask_rom_otp_dev",
srcs = [
"//hw/bitstream/vivado:fpga_cw310_mask_rom_otp_dev",
],
)