Skip to content

hw-bzl/rules_vhdl

Repository files navigation

rules_vhdl

BCR CI

A small Bazel module that provides reusable VHDL dependency graph metadata via vhdl_library.

What This Module Does

vhdl_library collects:

  • srcs (.vhd, .vhdl) — VHDL source files
  • data — data files needed during compilation or simulation
  • deps — other vhdl_library targets
  • library — VHDL library name (defaults to "work")
  • standard — VHDL standard version (optional; empty string means "unspecified")
  • top_entity — the library's entry-point entity name (optional; empty string means "unspecified")

and propagates a transitive VhdlInfo provider that downstream rules can consume.

Installation (Bzlmod)

Add to MODULE.bazel:

# See releases for available versions.
bazel_dep(name = "rules_vhdl", version = "{version}")

Usage

load("@rules_vhdl//vhdl:defs.bzl", "vhdl_library")

vhdl_library(
    name = "utils",
    srcs = ["utils_pkg.vhd"],
    library = "my_utils",
)

vhdl_library(
    name = "core",
    srcs = ["core.vhd"],
    deps = [":utils"],
)

vhdl_library(
    name = "soc",
    srcs = ["soc_top.vhdl"],
    top_entity = "soc_top",
    deps = [":core"],
)

VhdlInfo is exported from @rules_vhdl//vhdl:defs.bzl for custom rule authors.

Development

Run all checks locally:

bazel test //...

License

Apache-2.0.

About

Provide foundational vhdl interfaces for Bazel rulesets (e.g., vhdl_library).

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors