Run static timing and FDTD2D on CPU with alti px

Query PX operations, run static timing from a project input, keep and reopen the result, and run the FDTD2D fixture on CPU.

Use Altifigence CLI 0.1.9 on Linux to run PX operations on files in your project's inputs/ folder. Start with the capability queries, run single-clock static timing, keep the result in the project's artifact store, and run the built-in FDTD2D fixture with the CPU backend.

Query PX operations

Read the installed PX capability documents. These commands are queries: they print a JSON document and run no job. alti px fdtd2d readiness reports installed FDTD2D readiness without taking a CPU lease.

alti px capabilities
alti px fdtd2d capabilities
alti px fdtd2d readiness

Require exit status 0 for each command.

Run static timing

Use an absolute path to your local project and run the commands as your ordinary user. PX reads input files from the project's inputs/ folder. Pass the file name relative to inputs/.

set -euo pipefail
PROJECT="$(cd "$HOME/alti-projects/demo-project" && pwd -P)"
WORK="$(mktemp -d)"
mkdir -p "$PROJECT/inputs"
cat > "$PROJECT/inputs/timing.json" <<'JSON'
{
  "schema": "altifigence.px.static-timing-request.v1",
  "version": 1,
  "delayModel": "explicit_arc_min_max",
  "cornerModel": "single_caller_resolved",
  "libraryModel": "none",
  "graph": {
    "nodeIds": ["in", "mid", "out"],
    "sourceNodeId": "in",
    "sourceMinArrivalNs": 0.0,
    "sourceMaxArrivalNs": 0.0,
    "arcs": [
      {"id": "a1", "fromNodeId": "in", "toNodeId": "mid", "minDelayNs": 0.1, "maxDelayNs": 0.2},
      {"id": "a2", "fromNodeId": "mid", "toNodeId": "out", "minDelayNs": 0.3, "maxDelayNs": 0.4}
    ]
  },
  "constraints": {
    "clockPeriodNs": 1.0,
    "setupTimeNs": 0.05,
    "holdTimeNs": 0.02,
    "setupMarginNs": 0.0,
    "holdMarginNs": 0.0
  }
}
JSON

The request gives each arc an explicit minimum and maximum delay in nanoseconds, one source node and one ideal clock with setup and hold constraints. Keep node IDs and arc IDs unique, and point every arc at listed nodes. A request holds up to 65536 nodes and 131072 arcs within 4194304 bytes.

alti px static-timing --project "$PROJECT" timing.json > "$WORK/timing.json"
jq '{schema, operationId}' "$WORK/timing.json"

Require exit status 0. The selected fields are:

{
  "schema": "altifigence.px.operation-result.v1",
  "operationId": "altifigence.px.static-timing.v1"
}

The result carries an altifigence.px.static-timing-report.v1 report with authority non_signoff, the arrival times and slacks for each node, and the artifact, input and request digests.

Keep and reopen results

Store the static-timing result in the project's PX artifact store, then list the stored entries and reopen the entry by its ID.

alti px artifact store --project "$PROJECT" "$WORK/timing.json" > "$WORK/entry.json"
jq '{schema, entryId}' "$WORK/entry.json"
ENTRY="$(jq -r .entryId "$WORK/entry.json")"
alti px artifact list --project "$PROJECT" | jq -r '.[].entryId'
alti px artifact show --project "$PROJECT" "$ENTRY" > "$WORK/shown.json"
jq '{schema, operationId}' "$WORK/shown.json"

Require exit status 0 for each command. The store writes a manifest with schema altifigence.px.artifact-manifest.v1. Its entryId is a 64-character lowercase SHA-256, and the entry is kept below .altifigence/artifacts/px in the project. alti px artifact show revalidates the stored result and prints it again with schema altifigence.px.operation-result.v1.

Run the FDTD2D fixture on CPU

Save the built-in FDTD2D fixture request below inputs/ and run it with the CPU backend.

cat > "$PROJECT/inputs/fdtd2d.json" <<'JSON'
{
  "schema": "altifigence.px.fdtd2d-execute-request.v1",
  "fixtureId": "px.fdtd2d.owned-pattern-19x13-96.v1"
}
JSON
alti px fdtd2d execute --backend cpu --project "$PROJECT" \
  fdtd2d.json > "$WORK/fdtd2d.json"
jq -r .schema "$WORK/fdtd2d.json"

Require exit status 0. The receipt schema is altifigence.px.fdtd2d-execute-receipt.v1. Keep the request within 4096 bytes. The CPU run is deterministic: running the same request again prints the same receipt.

Recover from PX errors

For static-timing engine failures, read the JSON error line on stderr. It has schema altifigence.localRunner.error.v1, a category and a message.

If stderr reports this line, the input file could not be read at the given path below inputs/:

{"schema":"altifigence.localRunner.error.v1","category":"input_io","message":"failed to read job input"}

Save the file in $PROJECT/inputs/ and pass its path relative to inputs/, for example timing.json.

If stderr reports this line, the request does not match its schema:

{"schema":"altifigence.localRunner.error.v1","category":"invalid_job","message":"job input is not an admitted PX operation"}

For static timing, use the fields, version 1, schema and graph rules in the timing request above, then run the command again. For FDTD2D, use the schema and fixtureId in the fixture request.

If the command prints this error for alti px fdtd2d execute, the input path is not a plain path below inputs/:

PX numerical input must be a file below workspace inputs/

Pass the path relative to inputs/ with / separators and no empty, . or .. segments, for example fdtd2d.json.

Compile a process recipe

Save one oxidation step as inputs/recipe.json. Run process-recipe to validate the recipe and compile its declaration-order plan. Keep its operation result with the same artifact store commands used for timing.

cat > "$PROJECT/inputs/recipe.json" <<'JSON'
{"schema":"px-recipe-1","name":"oxide","wafer":{"substrate_doping_cm3":1000000000000000,"depth_um":0.25,"mesh_nodes":51},"steps":[{"kind":"oxidation","label":"oxide","params":{"ambient":"dry","temp_c":1000,"time_s":10,"pressure_atm":1,"initial_oxide_nm":0}}]}
JSON
alti px process-recipe --project "$PROJECT" recipe.json > "$WORK/recipe-result.json"
jq '{operationId, steps: .artifact.payload.stepCount}' "$WORK/recipe-result.json"
{"operationId":"altifigence.px.process-recipe.v1","steps":1}

For invalid_job, compare the file with the example: use schema px-recipe-1, lowercase oxidation and the listed wafer and step fields. Correct the file, then rerun process-recipe.

Summarize and analyze SPEF

Save the SPEF below as inputs/synthetic.spef. Summary reports extracted resistors and capacitors. Save the configuration as inputs/spef-config.json to compute Elmore delay and static IR drop for the selected net and corner.

cat > "$PROJECT/inputs/synthetic.spef" <<'SPEF'
*SPEF "IEEE 1481 subset"
*DESIGN "synthetic"
*C_UNIT 1 FF
*R_UNIT 1 OHM
*NAME_MAP
*1 VDD
*2 VDD:src
*3 VDD:n1
*4 VDD:n2
*5 SIG:agg
*PORTS
*2 I
*D_NET *1 10.0
*CONN
*P *2 I
*I *3 B
*I *4 B
*CAP
1 *2 1.0
2 *3 2.0
3 *4 3.0
4 *4 *5 4.0
*RES
1 *2 *3 100.0
2 *3 *4 50.0
*END
SPEF
cat > "$PROJECT/inputs/spef-config.json" <<'JSON'
{"schema":"altifigence.px.spef-configured-analysis-config.v1","version":1,"spefArtifactId":"synthetic-spef","corner":{"model":"single_caller_resolved","name":"nominal"},"units":{"capacitance":"farad","resistance":"ohm","current":"ampere","time":"second","voltage":"volt"},"assumptions":{"couplingCapacitance":"reported_not_folded_into_elmore_load","elmoreTopology":"connected_resistor_tree","irDrop":"static_linear_resistor_network"},"elmore":{"net":"VDD","root":"VDD:src","target":"VDD:n2"},"irDrop":{"net":"VDD","ground":"VDD:src","currents":[{"node":"VDD:n2","currentA":0.001}]}}
JSON
alti px spef-summary --project "$PROJECT" synthetic.spef > "$WORK/spef-summary.json"
alti px spef-analyze --project "$PROJECT" synthetic.spef spef-config.json > "$WORK/spef-analysis.json"
jq -r .operationId "$WORK/spef-summary.json" "$WORK/spef-analysis.json"
altifigence.px.spef-summary.v1
altifigence.px.spef-configured-analysis.v1

For invalid_job, check that the configured net, root, target and current-source nodes match the SPEF names. Use the units and assumptions shown above, then rerun the analysis.

Execute a local job

To execute the timing request as a bounded local job, calculate its SHA-256 and send the job document on stdin. Require exit status 0 and result status succeeded. Keep the returned artifact URI for the saved report.

DIGEST="$(sha256sum "$PROJECT/inputs/timing.json" | cut -d ' ' -f 1)"
cat > "$WORK/timing-job.template.json" <<'JSON'
{"schema":"altifigence.engine.job.v1","job_id":"timing-job-1","operation":{"engine_id":"px","operation_id":"static-timing","contract_id":"px.static-timing.v1"},"execution_placement":"local","device_preference":{"selection":{"mode":"class","value":"cpu"},"fallback":"deny"},"resources":{"cpu_slots":1,"memory_bytes":268435456,"device_slots":0,"device_memory_bytes":0,"max_wall_time_ms":60000},"inputs":[{"artifact_id":"timing-request","role":"static_timing_request","artifact_schema":"altifigence.px.static-timing-request.v1","uri":"workspace://inputs/timing.json","sha256":"REPLACE_WITH_DIGEST"}],"cancellation":{"cancellation_id":"cancel-timing-job-1"}}
JSON
jq --arg digest "$DIGEST" '.inputs[0].sha256 = $digest' "$WORK/timing-job.template.json" > "$WORK/timing-job.json"
alti px execute --project "$PROJECT" < "$WORK/timing-job.json" > "$WORK/job-result.json"
jq '{schema, status}' "$WORK/job-result.json"
{"schema":"altifigence.engine.result.v1","status":"succeeded"}

If the result reports px.local_runner.workspace_input, save the request below inputs/ and recalculate its SHA-256. For px.local_runner.output_exists, use a new job_id and cancellation_id, regenerate the job, then execute it again.

Query through the local compatibility command

The local compatibility command accepts capabilities and execute after --. To read the installed capabilities, run:

alti px analyze --runner local --project "$PROJECT" -- capabilities

If the compatibility command asks for a local engine operation, put capabilities or execute after --.

Read a committed analysis

For a project that already contains a committed logic-topology analysis, set RUN_ID to that analysis run ID. Readback loads its saved analysis envelope and report, verifies the netlist and report, and prints the verified operation with provenance.

alti px readback --project "$PROJECT" "$RUN_ID" > "$WORK/readback.json"
jq -r .schema "$WORK/readback.json"
altifigence.px.committed-logic-topology-readback.v1

For input_io, check the project directory and the selected committed run under analyze/. Correct the project or run ID and read it again.

CLI engine commands