FABulous Configuration Variables¶
FABulous can use environment variables to configure options, paths and projects. We distinguish between two types of environment variables: global and project specific environment variables.
Global environment variables are used to configure FABulous itself. They always start with
FAB_.Project specific environment variables are used to configure a specific FABulous project. They always start with
FAB_PROJ_.
All environment variables can be set in the shell before running FABulous or can be set via .env files.
.env File Locations¶
Scope |
Location |
How to use |
|---|---|---|
User global |
|
Created automatically or manually |
Global (explicit) |
Any path |
Pass via |
Project (auto-detected) |
|
Placed inside your project |
Project (explicit) |
Any path |
Pass via |
Note
Environment variables set in the shell always have the highest priority, followed by project-specific .env files, then global .env files.
PDK Resolution Logic¶
FABulous uses three environment variables to locate and manage a Process Design Kit (PDK) for back-end GDS generation.
Variable |
Purpose |
|---|---|
|
Name of the PDK (e.g. |
|
File-system path to the PDK installation directory |
|
Version hash identifying a specific PDK snapshot |
Default value of FAB_PDK¶
When a new project is created with create_project, FAB_PDK is set to ihp-sg13g2 in the project .env file by default. This value can be overridden afterward.
Resolution at startup¶
When FABulous loads its settings, the following rules determine how the PDK is resolved. For ciel-supported PDKs, FABulous handles installation and activation automatically, so there is no need to manually run ciel enable.
Neither
FAB_PDKnorFAB_PDK_ROOTis set. A warning is logged and GDS features are unavailable.FAB_PDK_ROOTis set butFAB_PDKis missing. An error is raised asking the user to setFAB_PDK.FAB_PDKis set withoutFAB_PDK_ROOT, and the PDK belongs to a ciel-supported family.FAB_PDK_ROOTis automatically resolved from the ciel home directory and the PDK is installed and activated via ciel.FAB_PDKis set withoutFAB_PDK_ROOT, and the PDK is not ciel-supported. An error is raised asking the user to setFAB_PDK_ROOTmanually.Both are set, but the PDK is not a ciel family. FABulous assumes a custom PDK with manual setup. The path must exist on disk.
Both are set and the PDK is a ciel family. The recommended
FAB_PDK_HASHis resolved from librelane. If the user did not provideFAB_PDK_HASH, it is filled in automatically; if the user-provided value differs from the recommended one, a mismatch warning is logged. The PDK is then installed and activated via ciel.
Global Environment Variables¶
Variable |
Environment Variable |
Type |
Default |
User Value |
Description |
|---|---|---|---|---|---|
|
|
Path |
(dynamic) |
|
- |
|
|
Path |
None |
|
- |
|
|
Path |
yosys |
|
- |
|
|
Path |
sta |
|
- |
|
|
Path |
nextpnr-generic |
|
- |
|
|
Path |
iverilog |
|
- |
|
|
Path |
vvp |
|
- |
|
|
Path |
ghdl |
|
- |
|
|
Path |
klayout |
|
- |
|
|
Path |
openroad |
|
- |
|
|
Path |
None |
|
- |
|
|
Path |
None |
|
- |
|
|
bool |
False |
|
- |
|
|
str |
None |
any string |
- |
|
|
int |
0 |
|
- |
|
|
bool |
False |
|
- |
|
|
Path |
None |
|
Root directory of the PDK installation |
|
|
str |
None |
any string |
PDK name (e.g. ‘ihp-sg13g2’) |
|
|
str |
None |
any string |
Specific PDK version hash; auto-resolved from librelane when omitted if the PDK is supported by ciel |
|
|
tuple |
(0, 0, 1000, 1000) |
|
- |
|
|
bool |
False |
|
- |
Project Specific Environment Variables¶
Variable |
Environment Variable |
Type |
Default |
User Value |
Description |
|---|---|---|---|---|---|
|
|
Path |
(dynamic) |
|
- |
|
|
HDLType |
HDLType.VERILOG |
|
- |
|
|
Version |
0.0.1 |
|
- |
|
|
Version |
- |
|
- |
Interactive CLI Settables¶
These variables can be set and get interactively in the FABulous CLI using the set and get commands.
Usage:
FABulous> set <variable> <value>
FABulous> get <variable>
Variable |
Type |
Description |
|---|---|---|
|
Path |
The directory of the project |
|
Path |
The fabric file |
|
bool |
verbose output |
|
bool |
force execution |