blob: be941d342037022dced8876a3a24e4ede6e806f8 [file] [log] [blame]
Chris Frantz2f78a002022-04-15 14:45:54 -07001# Copyright lowRISC contributors.
2# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3# SPDX-License-Identifier: Apache-2.0
4
5package(default_visibility = ["//visibility:public"])
6
Chris Frantz2f78a002022-04-15 14:45:54 -07007# Use a bitstream from the GCP bucket (this is also the default condition).
8# You can control the GCP bitstream selection via the BITSTREAM environment
9# variable. See //rules/bitstreams.bzl for more information.
10#
11# Example:
12# bazel test //sw/device/silicon_creator/lib/drivers:fpga_cw310_hmac_functest --define bitstream=gcp
13config_setting(
14 name = "bitstream_gcp",
15 define_values = {
16 "bitstream": "gcp",
17 },
18)
19
20# Skip loading a bitstream in to the FPGA. This is useful if you already
21# have a bitstream loaded into the FPGA and you don't want the GCP cache
22# manager to do anything unexpected.
23#
24# Example:
25# bazel test //sw/device/silicon_creator/lib/drivers:fpga_cw310_hmac_functest --define bitstream=skip
26config_setting(
27 name = "bitstream_skip",
28 define_values = {
29 "bitstream": "skip",
30 },
31)
32
Chris Frantz74f90952022-04-18 20:57:01 -070033# Use a bitstream built by Vivado. You'll need to have Xilinx Vivado
34# installed and have properly configured access to a license or license
35# server.
36#
37# Example:
38# bazel test //sw/device/silicon_creator/lib/drivers:fpga_cw310_hmac_functest --define bitstream=vivado
39config_setting(
40 name = "bitstream_vivado",
41 define_values = {
42 "bitstream": "vivado",
43 },
44)
45
Chris Frantz2f78a002022-04-15 14:45:54 -070046filegroup(
47 name = "test_rom",
48 srcs = select({
49 "bitstream_skip": ["skip.bit"],
Chris Frantz74f90952022-04-18 20:57:01 -070050 "bitstream_vivado": ["//hw/bitstream/vivado:fpga_cw310_test_rom"],
Chris Frantz2f78a002022-04-15 14:45:54 -070051 "bitstream_gcp": ["@bitstreams//:bitstream_test_rom"],
52 "//conditions:default": ["@bitstreams//:bitstream_test_rom"],
53 }),
54)
55
56filegroup(
57 name = "mask_rom",
58 srcs = select({
59 "bitstream_skip": ["skip.bit"],
Chris Frantz74f90952022-04-18 20:57:01 -070060 "bitstream_vivado": ["//hw/bitstream/vivado:fpga_cw310_mask_rom"],
Chris Frantz2f78a002022-04-15 14:45:54 -070061 "bitstream_gcp": ["@bitstreams//:bitstream_mask_rom"],
62 "//conditions:default": ["@bitstreams//:bitstream_mask_rom"],
63 }),
64)