cmd_user_design¶
User design flow commands for the FABulous REPL.
Synthesis, place-and-route, bitstream generation, simulation, and user design wrapper generation.
Classes¶
User design flow: synthesis through bitstream and simulation. |
Functions¶
|
Resolve every Verilog source the gate-level simulator needs. |
|
Resolve the PDK standard-cell Verilog sim models for |
Module Contents¶
UserDesignCommandSet¶
- class UserDesignCommandSet[source]¶
Bases:
ReplCommandSetUser design flow: synthesis through bitstream and simulation.
Private reference to the CLI instance in which this CommandSet running.
This will be set when the CommandSet is registered and it should be accessed by child classes using the self._cmd property.
Methods¶
- do_compile_design(files, top='top_wrapper', json=None, synth_only=False, pnr_only=False, bitgen_only=False, synth_extra_args='', yosys_extra_args='', nextpnr_extra_args='', log=None, fasm=None, bin_file=None, yosys_synth_help=False, nextpnr_help=False) None[source]¶
Compile a user design through synthesis, PnR, and bitstream generation.
This function orchestrates the full compile flow by delegating to a compile Taskfile. It resolves input file paths, builds the synthesis command, and invokes the appropriate task(s) depending on the selected mode (full compile, synth-only, pnr-only, or no-bitgen).
- do_gen_bitStream_binary(file) None[source]¶
Generate bitstream of a given design.
deprecated: Use
compile_designwhich includes bitstream generation.
- do_gen_user_design_wrapper(user_design, user_design_top_wrapper) None[source]¶
Generate a wrapper that connects the user design to the fabric.
- do_place_and_route(file) None[source]¶
Run place and route with Nextpnr for a given JSON file.
deprecated: Use
compile_design --pnr-onlyinstead.
- do_run_FABulous_bitstream(file) None[source]¶
Run FABulous to generate bitstream on a given design.
deprecated: Use
compile_designinstead.
- do_run_simulation(output_format, file, design='', simulator='', extra_iverilog_flag='', extra_nvc_flag='', extra_ghdl_flag='', gl=False, gl_sim_libs=None) 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.
- do_synthesis(files, top='top_wrapper', auto_top=False, blif=None, edif=None, json_file=None, lut='4', plib=None, extra_plib=None, extra_map=None, encfile=None, nofsm=False, noalumacc=False, carry='none', noregfile=False, iopad=False, complex_dff=False, noflatten=False, nordff=False, noshare=False, run=None, no_rw_check=False) None[source]¶
Run Yosys synthesis for the specified Verilog files.
deprecated: Use
compile_design --synth-onlyinstead.
- 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.
- 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.