cocotb_questa_sim

Rules

cocotb_questa_sim

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

cocotb_questa_sim(name, env, vcom, vlib, vlog, vsim)

A simulator configuration for running Mentor/Siemens EDA Questa (and the older ModelSim — cocotb uses the same questa runner for both) simulations in cocotb tests.

Status

Infrastructure only. Questa/ModelSim 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 (e.g. via new_local_repository over $MODEL_TECH or the equivalent Questa install directory) and registering a cocotb_toolchain that routes sim = "questa" through this rule. Cocotb's runner handles the actual build/sim via Runner.build / Runner.test.

Notes

Questa accepts both Verilog/SystemVerilog (VerilogInfo) and VHDL (VhdlInfo) modules. The rule defers the vlib / vlog / vcom invocations to cocotb's runner at test time rather than running them during the Bazel build, so the simulator only needs to be present on the test execution environment.

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/SystemVerilog compiler binary.Labelrequired
vsimThe vsim simulator binary.Labelrequired