| # Copyright lowRISC contributors. |
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| load("@lowrisc_opentitan//rules:autogen.bzl", "autogen_hjson_header") |
| load("//rules:autogen.bzl", "autogen_top_gen_hjson") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| autogen_hjson_header( |
| name = "rv_plic_regs", |
| srcs = [ |
| "ip_autogen/rv_plic/data/rv_plic.hjson", |
| ], |
| ) |
| |
| autogen_hjson_header( |
| name = "rv_plic_smc_regs", |
| srcs = [ |
| "ip_autogen/rv_plic_smc/data/rv_plic_smc.hjson", |
| ], |
| ) |
| |
| autogen_hjson_header( |
| name = "alert_handler_regs", |
| srcs = [ |
| "ip_autogen/alert_handler/data/alert_handler.hjson", |
| ], |
| ) |
| |
| # Need to add the template and hjson files to the data to support topgen_matcha. |
| # This rule assumes all the top_matcha hjson files are already up-to-date. |
| autogen_top_gen_hjson( |
| name = "top_gen_rom_ctrl_hjson", |
| srcs = "//hw/top_matcha/data:top_matcha.hjson", |
| data = [ |
| ":all_hjson_files", |
| "@lowrisc_opentitan//hw:all_files", |
| ], |
| output = "data/autogen/top_matcha.gen.rom_ctrl.hjson", |
| ) |
| |
| filegroup( |
| name = "all_files", |
| srcs = glob(["**"]) + [ |
| "//hw/top_matcha/data:all_files", |
| "//hw/top_matcha/dv:all_files", |
| "//hw/top_matcha/ip:all_files", |
| "//hw/top_matcha/sw:all_files", |
| ], |
| ) |
| |
| filegroup( |
| name = "all_hjson_files", |
| srcs = glob(["ip_autogen/**/*.hjson"]) + [ |
| "//hw/top_matcha/data:all_hjson_files", |
| "//hw/top_matcha/ip:all_hjson_files", |
| ], |
| ) |