cmd_run_simulation¶
Run-simulation command implementation for the FABulous CLI.
RTL simulation exercises the behavioural fabric FABulous emits. Gate-level
simulation (--gl) reuses the same testbench and bitstream but swaps the
inner fabric core eFPGA and its tiles for the post-place-and-route netlists
hardened by the GDS flow, linked against the PDK standard-cell models. The
behavioural wrapper eFPGA_top (with its configuration controller) is kept,
so the existing <design>_tb.v drives the mixed-level DUT unchanged.
Attributes¶
Functions¶
|
Resolve every Verilog source the gate-level simulator needs. |
|
Simulate given FPGA design. |
|
Resolve the PDK standard-cell Verilog sim models for |
Module Contents¶
- collect_gl_sources(project, sim_lib_overrides) list[Path][source]¶
Resolve every Verilog source the gate-level simulator needs.
Returns one self-contained source list so the caller can hand it to iverilog directly (no extra
findin the Taskfile):the behavioural wrapper that keeps driving configuration (
Fabric/*.v:eFPGA_top, the config controller,Frame_*,BlockRAM,models_pack…). The behavioural coreeFPGA.vis excluded because the gate-leveleFPGA.nl.vreplaces it.the post-PnR fabric netlist (
Fabric/macro/final_viewsholds exactly one*.nl.v, structural, instantiating tile macros by name),every tile netlist (
Tile/<tile>/macro/final_views/nl/<tile>.nl.v),the PDK cell models the netlists bind against.
- Parameters:
- Returns:
Behavioural wrapper, fabric netlist, tile netlists, then PDK cell models, in that order.
- Raises:
FileNotFoundError – If the fabric netlist or tile netlists are missing (the GDS flow has not been run).
ValueError – If more than one fabric netlist is present.
- do_run_simulation(self, args) None[source]¶
Simulate given FPGA design.
Uses Taskfile.yml (preferred) or falls back to Make (deprecated). The bitstream_file argument should be a binary file generated by ‘compile_design’. With
--glthe hardened fabric netlist replaces the behavioural core for gate-level simulation.
- resolve_sim_libs(project, overrides) list[Path][source]¶
Resolve the PDK standard-cell Verilog sim models for
project.Honours
overrides(files or globs) first; otherwise takes the active PDK and its install root from the FABulous context (which resolvesFAB_PDK/FAB_PDK_ROOTand the ciel install) and globs<pdk_root>/<pdk>/libs.ref/<scl>/verilog/for<scl>.vplus any*udp*.v/primitives.vcompanion (sky130 and gf180 ship their UDPs in a separateprimitives.v; IHP inlines them).- Parameters:
- Returns:
Verilog cell-model files for the simulator.
- Raises:
FileNotFoundError – If an override matches nothing, or the resolved PDK sim file is missing.
ValueError – If the context has no PDK or PDK root, or the PDK has no known default standard-cell library.