hdl / bazel_rules_hdl

Hardware Description Language (Verilog, VHDL, Chisel, nMigen, etc) with open tools (Yosys, Verilator, OpenROAD, etc) rules for Bazel (https://bazel.build)
Apache License 2.0
119 stars 44 forks source link

Add a `additional_inputs=...` or similar to `verilator_cc_library` #354

Open filmil opened 2 months ago

filmil commented 2 months ago

Some verilog code, such as the serv core, uses $readmemh to read memory content to pre-fill memory arrays. This apparently happens at verilation step, making it necessary to provide the memory file to the verilator_cc_library rule at compile time.

While it is possible to provide additional files to verilator_library, such files become part of the runfiles, and are not available at build time.