fabulous¶
FABulous command-line interface entry point.
This module provides the main entry point for the FABulous FPGA framework command-line interface. It handles argument parsing, project setup, and CLI initialization.
Attributes¶
Classes¶
Shell types supported by the nix development environment. |
Functions¶
Check version compatibility between package and project. |
|
|
Provide common options for all FABulous commands. |
Convert legacy argparse arguments to new Typer commands. |
|
|
Create a new FABulous project. |
|
Install FABulator in the specified directory. |
Install Nix. |
|
|
Install the oss-cad-suite in the specified directory. |
|
Entry point for the application. |
|
Drop into the Nix development environment with EDA tool verification. |
|
Reorder global flags to be before subcommands. |
|
Run commands directly in a FABulous project. |
|
Execute a script file with auto-detection of script type. |
|
Start FABulous in interactive mode. Alias: s. |
Update project version to match package version. |
|
|
Validate the project directory. |
|
Print version information and exit. |
Module Contents¶
NixShell¶
- class NixShell[source]¶
Bases:
StrEnumShell types supported by the nix development environment.
Initialize self. See help(type(self)) for accurate signature.
- check_version_compatibility(_) None[source]¶
Check version compatibility between package and project.
- common_options(ctx, project_dir=None, _version=None, verbose=0, debug=None, log_file=None, global_dot_env=None, project_dot_env=None) None[source]¶
Provide common options for all FABulous commands.
- convert_legacy_args_with_deprecation_warning() None[source]¶
Convert legacy argparse arguments to new Typer commands.
- create_project_cmd(project_dir, writer=HDLType.VERILOG, overwrite=False) None[source]¶
Create a new FABulous project.
Alias: c
- install_fabulator_cmd(directory=None) None[source]¶
Install FABulator in the specified directory.
This will create a new directory FABulator and install the suite there. If the directory already exists, it will be replaced. This also automatically adds the FABULATOR_ROOT env var in the global FABulous .env file.
- install_oss_cad_suite_cmd(directory=None) None[source]¶
Install the oss-cad-suite in the specified directory.
This will create a new directory called oss-cad-suite and install the suite there. If the directory already exists, it will be replaced. This also automatically adds the FAB_OSS_CAD_SUITE env var in the global FABulous .env file.
- nix_env_cmd(flake_dir=None, shell=None, no_check=False) None[source]¶
Drop into the Nix development environment with EDA tool verification.
Enters a Nix dev shell and verifies that yosys, nextpnr, and openroad are installed and sourced from the Nix store. Use –no-check to skip the verification step.
- reorder_options(argv) list[str][source]¶
Reorder global flags to be before subcommands.
Rules:
Only flags whose (base) token (before any ‘=’) is in GLOBAL_FLAGS are moved.
Supports both –opt=value and –opt value forms (second handled heuristically: if the next token does not start with ‘-’ it is treated as that flag’s value).
Flags already before the subcommand are left untouched.
Order among moved flags is preserved relative to their appearance after the subcommand.
If no registered subcommand is present, argv is returned unchanged.
- run_cmd(commands=None, force=False) None[source]¶
Run commands directly in a FABulous project.
Alias: r
- script_cmd(script_file, script_type='tcl', force=False) None[source]¶
Execute a script file with auto-detection of script type.
Automatically detects whether the script is a FABulous (.fab, .fs) or TCL (.tcl) script based on file extension and content. You can override the detection with –type.
If no project directory is specified, uses the current directory.