verilog rules

Bazel rules for Verilog / SystemVerilog.

Setup

bazel_dep(name = "rules_verilog", version = "{version}")

Rules

Providers

verilog_library

load("@rules_verilog//verilog:defs.bzl", "verilog_library")

verilog_library(name, deps, srcs, hdrs, compile_data, top)

TODO

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsThe list of other libraries to be linked.List of labelsoptional[]
srcsVerilog or SystemVerilog sources.List of labelsoptional[]
hdrsVerilog or SystemVerilog headers.List of labelsoptional[]
compile_dataTODOList of labelsoptional[]
topThe top of the module. If unset, a file must be found matching the name of the target.LabeloptionalNone

VerilogInfo

load("@rules_verilog//verilog:defs.bzl", "VerilogInfo")

VerilogInfo(compile_data, deps, hdrs, srcs, top)

Verilog provider

FIELDS

NameDescription
compile_dataDepset[File]: Files required at compile time.
depsDepset[VerilogInfo]: Transitive Verilog dependencies.
hdrsDepset[File]: Verilog/SystemVerilog header files.
srcsDepset[File]: Verilog/SystemVerilog source files.
topFile: The source file that represents the module top. The file name is expected to match the module name.