From d1345ca4d420a4a2f2f186ebe5879abae7ca737d Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 22 Nov 2024 16:08:13 +0000 Subject: [PATCH] [top_darjeeling] Move ast and sensor_ctrl to new rules Signed-off-by: Amaury Pouly --- hw/top_darjeeling/ip/ast/BUILD | 11 +++++----- hw/top_darjeeling/ip/ast/data/BUILD | 24 ++------------------- hw/top_darjeeling/ip/sensor_ctrl/BUILD | 9 ++++---- hw/top_darjeeling/ip/sensor_ctrl/data/BUILD | 24 ++------------------- 4 files changed, 14 insertions(+), 54 deletions(-) diff --git a/hw/top_darjeeling/ip/ast/BUILD b/hw/top_darjeeling/ip/ast/BUILD index bb10f42047c706..182106bca3d19e 100644 --- a/hw/top_darjeeling/ip/ast/BUILD +++ b/hw/top_darjeeling/ip/ast/BUILD @@ -2,11 +2,12 @@ # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 +load("//rules/opentitan:hw.bzl", "opentitan_ip") + package(default_visibility = ["//visibility:public"]) -filegroup( - name = "all_files", - srcs = glob(["**"]) + [ - "//hw/top_darjeeling/ip/ast/data:all_files", - ], +opentitan_ip( + name = "ast", + files = glob(["**"]), + hjson = "//hw/top_darjeeling/ip/ast/data:hjson", ) diff --git a/hw/top_darjeeling/ip/ast/data/BUILD b/hw/top_darjeeling/ip/ast/data/BUILD index d71fefb5672e5b..dc211f10842ea8 100644 --- a/hw/top_darjeeling/ip/ast/data/BUILD +++ b/hw/top_darjeeling/ip/ast/data/BUILD @@ -4,27 +4,7 @@ package(default_visibility = ["//visibility:public"]) -load( - "//rules:autogen.bzl", - "autogen_hjson_c_header", - "autogen_hjson_rust_header", -) - -autogen_hjson_c_header( - name = "ast_c_regs", - srcs = [ - "ast.hjson", - ], -) - -autogen_hjson_rust_header( - name = "ast_rust_regs", - srcs = [ - "ast.hjson", - ], -) - filegroup( - name = "all_files", - srcs = glob(["**"]), + name = "hjson", + srcs = ["ast.hjson"], ) diff --git a/hw/top_darjeeling/ip/sensor_ctrl/BUILD b/hw/top_darjeeling/ip/sensor_ctrl/BUILD index 44122369227e5f..3627ba643043c3 100644 --- a/hw/top_darjeeling/ip/sensor_ctrl/BUILD +++ b/hw/top_darjeeling/ip/sensor_ctrl/BUILD @@ -4,9 +4,8 @@ package(default_visibility = ["//visibility:public"]) -filegroup( - name = "all_files", - srcs = glob(["**"]) + [ - "//hw/top_darjeeling/ip/sensor_ctrl/data:all_files", - ], +opentitan_ip( + name = "sensor_ctrl", + files = glob(["**"]), + hjson = "//hw/top_earlgrey/ip/sensor_ctrl/data:hjson", ) diff --git a/hw/top_darjeeling/ip/sensor_ctrl/data/BUILD b/hw/top_darjeeling/ip/sensor_ctrl/data/BUILD index 8e4acec5a40275..c160cf080967e6 100644 --- a/hw/top_darjeeling/ip/sensor_ctrl/data/BUILD +++ b/hw/top_darjeeling/ip/sensor_ctrl/data/BUILD @@ -4,27 +4,7 @@ package(default_visibility = ["//visibility:public"]) -load( - "//rules:autogen.bzl", - "autogen_hjson_c_header", - "autogen_hjson_rust_header", -) - -autogen_hjson_c_header( - name = "sensor_ctrl_c_regs", - srcs = [ - "sensor_ctrl.hjson", - ], -) - -autogen_hjson_rust_header( - name = "sensor_ctrl_rust_regs", - srcs = [ - "sensor_ctrl.hjson", - ], -) - filegroup( - name = "all_files", - srcs = glob(["**"]), + name = "hjson", + srcs = ["sensor_ctrl.hjson"], )