Public entry point for riviera_toolchain.
Rules
riviera_toolchain
load("@rules_riviera//riviera:riviera_toolchain.bzl", "riviera_toolchain")
riviera_toolchain(name, resources, acdb, acom, alib, alog, asim, env, jobs, requires_network,
riviera, version, vmap, vsim, vsimsa)
Declares an Aldec Riviera-PRO toolchain by binding one executable per Riviera tool.
Each tool attr takes an executable target that resolves to the
corresponding Riviera binary. In the ideal case that's a hermetic
toolchain that vendors the whole install into the Bazel action graph;
in practice it can be anything Bazel can exec — a sh_binary
wrapper that sources a license env file and execs a site install, a
container launcher, a PATH shim. The toolchain only cares that each
attr resolves to something that behaves like the named tool.
Tools bound to a wrapper keep their runfiles: each attr is exposed to
the rules as a RivieraToolInfo carrying the target's
files_to_run + default_runfiles, not just the bare executable
File.
vsimsa is the only mandatory attr. It is the one binary the rules
invoke across the Bazel action boundary — every riviera_library
compile action and every riviera_sim_test launcher call. Coverage
report generation (acdb report -txt/-html) runs as TCL inside that
same vsimsa invocation.
Everything else is optional and defaults to a shipped
exec <tool> "$@" PATH-resolving shim:
acdb,vsim,alib,alog,acom,asim,vmap— run inside vsimsa's TCL interpreter today and never cross the Bazel boundary.riviera— the interactive Riviera-PRO IDE. No rule here launches it; the attr exists so a rule of your own can.
They're exposed so downstream consumers have a place to bind if they ever need a Bazel-visible path to those binaries.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| resources | --local_resources slots every Riviera action claims: resource name -> per-action count (as a string). Each entry becomes execution_requirements["resources:<name>"] = <count>, so locally executed actions can be held under a budget declared with --local_resources=<name>=<total>, typically license seats: {"riviera_license": "1"}. Every name used here needs a matching --local_resources registration or local actions fail to schedule. Empty by default, so actions schedule freely. | Dictionary: String -> String | optional | {} |
| acdb | Executable invoked as acdb. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:acdb" |
| acom | Executable invoked as acom. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:acom" |
| alib | Executable invoked as alib. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:alib" |
| alog | Executable invoked as alog. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:alog" |
| asim | Executable invoked as asim. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:asim" |
| env | Extra env vars applied to every action that resolves this toolchain. | Dictionary: String -> String | optional | {} |
| jobs | Default CPU-count hint for actions and tests that resolve this toolchain. -1 (default) means no hint — Bazel schedules however it likes; 0 also means no hint; N > 0 requests N CPUs. Per-target jobs = -1 (the rule default) inherits this value. | Integer | optional | -1 |
| requires_network | Set True when Riviera actions need network access (FlexLM license server). | Boolean | optional | False |
| riviera | Executable invoked as riviera. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:riviera" |
| version | Toolchain version identifier for diagnostics. | String | optional | "" |
| vmap | Executable invoked as vmap. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:vmap" |
| vsim | Executable invoked as vsim. Optional — no rule in this repo invokes it across the Bazel action boundary. Bind it if your own rules need a Bazel-visible path, or to override the default PATH-resolving shim. | Label | optional | "@rules_riviera//riviera/private/shims:vsim" |
| vsimsa | Executable invoked as vsimsa. MANDATORY — the rules call this tool directly. | Label | required |