cocotb_activehdl_sim

Rules

cocotb_activehdl_sim

load("@rules_cocotb//cocotb:cocotb_activehdl_sim.bzl", "cocotb_activehdl_sim")

cocotb_activehdl_sim(name, env, vcom, vlib, vlog, vsimsa)

A simulator configuration for running Aldec Active-HDL simulations in cocotb tests.

Status

Infrastructure only. Active-HDL is commercial, with no BCR module and no redistributable binary; rules_cocotb cannot validate this rule in CI. Wire it up downstream by pointing the binary attrs at your own install and registering a cocotb_toolchain that routes sim = "activehdl" through this rule. Cocotb's runner handles the actual build/sim via Runner.build / Runner.test.

Downstream wiring

The pattern matches cocotb_riviera_sim — wrap the installed vlib, vlog, vcom, and vsimsa binaries via a local repository, then:

load("@rules_cocotb//cocotb:cocotb_activehdl_sim.bzl", "cocotb_activehdl_sim")
load("@rules_cocotb//cocotb:cocotb_toolchain.bzl", "cocotb_toolchain")

cocotb_activehdl_sim(
    name = "cocotb_activehdl",
    vlib = "@activehdl//:vlib",
    vlog = "@activehdl//:vlog",
    vcom = "@activehdl//:vcom",
    vsimsa = "@activehdl//:vsimsa",
)

cocotb_toolchain(
    name = "my_cocotb_toolchain",
    cocotb = "//path/to:cocotb_py_library",
    simulators = {":cocotb_activehdl": "activehdl"},
)

Register the toolchain in MODULE.bazel ahead of //cocotb/toolchain and use cocotb_test(sim = "activehdl", ...).

Active-HDL accepts both Verilog/SystemVerilog (VerilogInfo) and VHDL (VhdlInfo) modules.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
envEnvironment variables to set when the cocotb runner invokes this simulator at test time (license-server pointers, install root vars, …). Precedence: toolchain env < sim env < rule-level cocotb_test(env = ...).Dictionary: String -> Stringoptional{}
vcomThe vcom VHDL compiler binary.Labelrequired
vlibThe vlib library manager binary.Labelrequired
vlogThe vlog Verilog compiler binary.Labelrequired
vsimsaThe vsimsa batch simulation runner binary.Labelrequired