load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.5.0/rules_python-0.5.0.tar.gz",
sha256 = "cd6730ed53a002c56ce4e2f396ba3b3be262fd7cb68339f0377a45e8227fe332",
)
http_archive(name = "rules_hdl",
sha256 = "6b4f6797b73d8a9cae9999ce890635dc725e30c958c8dae2a84bbf762791c309",
strip_prefix = "bazel_rules_hdl-main",
urls = [
"https://github.com/hdl/bazel_rules_hdl/archive/refs/heads/main.zip",
],
)
load("@rules_hdl//dependency_support:dependency_support.bzl", rules_hdl_dependency_support = "dependency_support")
rules_hdl_dependency_support()
load("@rules_hdl//:init.bzl", rules_hdl_init = "init")
rules_hdl_init()
load("@rules_hdl//synthesis:build_defs.bzl", "synthesize_rtl")
load("@rules_hdl//place_and_route:build_defs.bzl", "place_and_route")
load("@rules_hdl//verilog:providers.bzl", "verilog_library")
place_and_route(
name = "counter_place_and_route",
clock_period = "10",
core_padding_microns = 20,
die_height_microns = 200,
die_width_microns = 200,
placement_density = "0.7",
synthesized_rtl = ":verilog_counter_synth",
)
synthesize_rtl(
name = "verilog_counter_synth",
top_module = "counter",
deps = [
":verilog_counter",
],
)
verilog_library(
name = "verilog_counter",
srcs = [
"counter.v",
],
)
module counter(
input wire clk,
input wire reset,
output [127:0] out,
);
reg [127:0] counter_tmp;
always @ (posedge clk or posedge reset) begin
if (reset) begin
counter_tmp <= 0;
end else begin
counter_tmp <= counter_tmp + 1;
end
end
assign out = counter_tmp;
endmodule
Error in patch: Unable to load package for //dependency_support/org_theopenroadproject:0001-logging-change-to-support-silence.patch: BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.