Running without the shell¶
faultflow’s primary interface is the interactive Tcl shell. This
page documents the batch CLI — the same core operations as one-shot,
non-interactive commands driven entirely by config.ofs, for scripts and CI where
a live session isn’t needed.
python3 ff.py <command> [options]
The bin/faultflow wrapper is exactly equivalent (it execs the project’s
venv/bin/python ff.py "$@"), so once the venv is on your PATH you can write:
faultflow <command> [options]
Common options¶
These apply to init, sim, intest, extest, status, scan, scan-status,
scan-check, scan-techmap, and rule_check:
Option |
Required |
Default |
Meaning |
|---|---|---|---|
|
yes |
— |
Top module name |
|
no |
|
Path to the |
project, retarget, add-clock, shell, and run each take a different shape
of options — see their own sections below.
init¶
python3 ff.py init --top <top> -c config.ofs
Create the output/<top>/ workspace and its .faultflow/ internals (including the
SQLite database), and record the input fingerprint. Run this once before sim.
sim¶
python3 ff.py sim --top <top> -c config.ofs [options]
Run combinational stuck-at (or transition) ATPG and fault simulation. This is the main command.
Option |
Meaning |
|---|---|
|
Remove transient junk inside |
|
Remove the entire |
|
Override |
|
Use external |
|
Maximum progressive ATPG rounds (default: |
|
Run full-scan stuck-at ATPG on the reduced pseudo-PI/PO view |
|
Run isolated serial reference diagnostics; does not update production coverage. Cannot be combined with |
|
Target coverage percent at which to stop ATPG (default: |
|
Override |
|
Export scan ATPG patterns as JSON to |
The --ext sidecar (.bench) is a BENCH-format netlist of the same circuit; faultflow
reads it only to recover the primary-input ordering that the .test vector columns map
onto.
intest¶
python3 ff.py intest --top <top> -c config.ofs [options]
IEEE 1500 INTEST: scan-integrated wrapper coverage of the core. Equivalent to
sim --scan with the test mode forced to intest.
Option |
Meaning |
|---|---|
|
Remove transient junk inside |
|
Remove the |
|
Maximum progressive ATPG rounds (default: |
|
Target coverage percent (default: |
extest¶
python3 ff.py extest --top <top> -c config.ofs [options]
IEEE 1500 EXTEST: wrapper-boundary / interconnect coverage, with the core held
safe (combinational ATPG on the fused boundary view). Takes the same options as
intest.
project¶
python3 ff.py project -p project.json [--clean] [--max ROUNDS] [-t PCT]
Hierarchical project flow: runs per-block INTEST plus an assembly EXTEST and
aggregates one chip-level coverage number, driven by a project manifest JSON. This
command takes -p/--project instead of --top — the manifest names the
blocks and assembly itself.
Option |
Required |
Meaning |
|---|---|---|
|
yes |
Project manifest JSON |
|
no |
Clean each scope’s workspace before running |
|
no |
Maximum progressive ATPG rounds per scope |
|
no |
Target coverage percent per scope |
retarget¶
python3 ff.py retarget --patterns PATH --soc-access PATH --block NAME --out PATH
Retarget a block’s exported scan patterns (from sim --scan --export-patterns)
onto a SoC scan path described by a SoC-access manifest. Writes a
faultflow_retargeted_v1 pattern file. No re-ATPG happens at the assembly level.
Option |
Required |
Meaning |
|---|---|---|
|
yes |
Block scan pattern JSON |
|
yes |
SoC access manifest JSON ( |
|
yes |
Source block name |
|
yes |
Output retargeted pattern file |
Note
The Tcl shell’s equivalent command, also named retarget, uses single-dash
Tcl-style flags (-patterns, -soc_access) instead of the CLI’s
--patterns/--soc-access — same operation, different flag syntax.
status¶
python3 ff.py status --top <top> -c config.ofs [--scan]
Print the current coverage status from the campaign database.
Option |
Meaning |
|---|---|
|
Report status from the scan campaign instead of the combinational one |
scan¶
python3 ff.py scan --top <top> -c config.ofs [options]
Insert and stitch generic scan chains.
Option |
Meaning |
|---|---|
|
Requested scan-chain count |
|
Maximum flip-flops per chain (may increase the chain count) |
|
Scan input port base name |
|
Scan output port base name |
|
Scan enable port name |
|
Run / skip the Sky130 scan-cell techmap after stitching |
|
Print the scan plan only |
scan-status¶
python3 ff.py scan-status --top <top> -c config.ofs
Print scan-insertion status.
scan-check¶
python3 ff.py scan-check --top <top> -c config.ofs [options]
Validate the inserted scan chains (structural and normal-mode checks).
Option |
Meaning |
|---|---|
|
Explicit |
|
Require the generated Sky130 Verilog artifact to be present |
scan-techmap¶
python3 ff.py scan-techmap --top <top> -c config.ofs
Regenerate the Sky130 techmap output from the scanned JSON.
rule_check¶
python3 ff.py rule_check --top <top> -c config.ofs [--strict | --advisory]
Run DFT structural rules (a design rule check) on the synthesized netlist. Writes
output/<top>/rule_check.rpt. Has no Tcl shell equivalent.
Option |
Meaning |
|---|---|
|
Treat warnings as blocking (non-zero exit) |
|
Report violations but always exit 0 (no gate) |
By default the command exits non-zero only if a blocking violation is found.
add-clock¶
python3 ff.py add-clock <port> [-c config.ofs] [--off 0|1]
Declare a clock domain by editing config.ofs’s [clocks] section — a
one-shot CLI counterpart to the Tcl shell’s session-scoped add_clock. Unlike the
shell command, this doesn’t touch a live session; it writes the declaration to the
config file so subsequent init / sim / etc. runs pick it up.
Argument |
Required |
Default |
Meaning |
|---|---|---|---|
|
yes |
— |
Clock port name |
|
no |
|
Config file to edit |
|
no |
|
Clock’s inactive level ( |
run (OpenTestability oracle mode)¶
python3 ff.py run -c <ot.ofs>
Oracle mode for OpenTestability: translate an OT-format
.ofs, run ATPG, and write oracle_response.json. The top module is taken from the
OT config, so there is no --top here. Has no Tcl shell equivalent.
Option |
Required |
Meaning |
|---|---|---|
|
yes |
Path to an OpenTestability-format |
shell¶
python3 ff.py shell [options]
Start the interactive Tcl shell. See The Tcl shell for the full command reference.
Option |
Default |
Meaning |
|---|---|---|
|
— |
Execute a Tcl script non-interactively, then exit |
|
— |
Preload a project config (reads |
|
|
Output root directory |
|
off |
More verbose result formatting |
Exit codes¶
Code |
Meaning |
|---|---|
|
Success (or |
|
Oracle ( |
|
Configuration or runner error |
Shell ↔ CLI mapping¶
Both surfaces cover most of the same ground; a few operations exist only on one side.
Operation |
Tcl shell |
Batch CLI |
|---|---|---|
Load / synthesize |
|
implicit from |
Combinational ATPG |
|
|
Insert scan |
|
|
Check scan |
|
|
Scan ATPG |
|
|
Scan status |
|
|
Regenerate techmap |
|
|
Status |
|
|
INTEST |
|
|
EXTEST |
|
|
Hierarchical SoC |
|
|
Retarget to SoC |
|
|
Declare a clock |
|
|
DFT rule check |
(shell has no equivalent) |
|
OpenTestability oracle |
(shell has no equivalent) |
|
Test-point insertion |
|
(CLI has no equivalent) |
Regenerate report |
|
written automatically by |