agentleFS
chipweaverchipweaver/veripower/skills/power-analysis/SKILL.md

power-analysis

Skill10 starsChanged 53 days agoMITView on GitHub

Build and check power experiments, calculate averaged gate-level power with SAIF and PT-PX, and assess the results against the task's power requirements; not for functional regression or static timing analysis.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read {workdir}/dispatch.json for input locations.

    line 12
  2. Distinctive:

    Check useful behavior against the task's expected outcomes.

    line 64
  3. Very specific:

    Check that capture covers the intended conditions and interval.

    line 67
  4. Distinctive:

    Leave it unresolved when the cause is unknown.

    line 102

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Power Analysis

Establish the intended operating conditions, capture their activity, calculate power, and explain what the measurement establishes. The supplied tools use gate-level simulation, SAIF and PT-PX interval-average power; this does not establish instantaneous peak power or IR drop.

Read {workdir}/dispatch.json for input locations. intent, design and requirements give the goals, design choices and budgets. Read both plan/verification-plan.md for measurement meaning and plan/power-scenarios.json for identifiers. netlist/out/ contains the implementation and constraints; tb_env provides reusable verification sources, data, scripts and setup. Inspect what you reuse, including any services behind a reference-model bridge. Write under {workdir}; shared inputs remain read-only.

Choose the work from the evidence

The framework carries published experiment sources, setup and measurements into {workdir}, without the old verdict. Choose the work from changed inputs and the measurement being claimed. Reuse artifacts whose implementation, conditions and scope still apply; a budget-only change can use existing reports.

For a new workdir, prepare editable setup (<skill> is this skill's directory):

python3 <skill>/scripts/power/__main__.py bootstrap --workdir {workdir} [--top <TOP>]

Bootstrap resolves the netlist top and plan, and installs missing templates. It does not run tools or require simulation inputs for a calculation-only task. Existing authored files survive rework; check their settings against this round's inputs. Use the project's actual libraries and models.

From {workdir}, source env.sh and select the needed command:

. ./env.sh
python3 <skill>/scripts/power/__main__.py COMMAND --workdir .
COMMANDWork performed
compileBuild the authored experiment and check SDF annotation
simulateRun planned scenarios using the existing executable
calculateRead checked activity and calculate power in a fresh PT process per scenario

These commands are independent. They invalidate the artifacts they replace; interrupted calculations cannot publish reports. Wait for processes to exit, fix local errors and retry the affected work.

Build the experiment when needed

Author experiment/compile.sh and experiment/run.sh; both run from {workdir}. The compiler script supplies the netlist, matching simulation models and SDF annotation. Put disposable build intermediates in work/; keep inputs and reusable outputs outside it. Finalize publishes the other workdir contents except framework files and execution scratch under .pending/. Inspect annotation warnings for unmapped arcs or model mismatches. Choose suitable TB components; no UVM inheritance, agent or DUT instance hierarchy is prescribed.

run.sh <scenario-id> <absolute-saif-path> <absolute-status-path> controls workload, initialization, cooperating interfaces, clocks/resets, sampling and completion. Referenced helpers can manage data and services. Reuse suitable drivers, reference models and checks directly. Adapt checks to the measured behavior: idle need not have transactions, while an active workload must do useful work. Check useful behavior against the task's expected outcomes.

Choose legal initialization and observation times from the measurement purpose and actual timing. Check that capture covers the intended conditions and interval. Write PASS to the supplied status path after the checks and SAIF capture complete; for UVM, account for report-server errors/fatals. A zero simulator exit alone is not completion evidence.

Calculate and interpret

env.sh supplies calculation inputs. Set LIB_DB to the Tcl list of linked .db paths and STRIP_PATH to the captured DUT hierarchy using the SAIF separator. Adapt scripts/ptpx.tcl for needed macro, constraint or operating-condition setup. The calculator consumes the netlist, library, constraints and activity; SDF belongs to GLS. Review mapping, slew/load modeling and tool warnings against the design. Nonzero annotation and a parsed number do not establish a valid measurement.

Activity and completion evidence are in saif/<id>.{saif,status,run.log}; calculation reports and logs are in reports_ptpx/<id>/. Failed/interrupted calculation output remains under .pending/. Explain the measured conditions, checks, results and limits concisely in analysis.md, referencing the original evidence. No budget means a measurement report, not compliance with an invented limit.

Close the stage

Finalize when this stage's work is complete, or when an unresolved issue must be returned to its caller. Changes to acceptance meaning follow the user's actual authorization, whether decided by a person or under delegation.

python3 <skill>/scripts/power/__main__.py finalize --workdir {workdir} \
  [--fail-reason "<unresolved cause>"] [--fix-owner <rule>] \
  [--requirements '[{"id":"R-1","met":true,"actual":"reported","measured":"analysis.md and reports_ptpx/idle/power_flat.rpt"}]']

Finalize checks completion and reports, reconciles components, and compares numerical power_mw targets with the named scenario, or all scenarios if unnamed. Give evidence-based --requirements verdicts for rows without numerical targets. Use --fail-reason for an invalid or incomplete measurement even if reports contain numbers; the CLI cannot infer workload meaning.

Name --fix-owner from the evidence, including this stage for its own experiment or calculation. Leave it unresolved when the cause is unknown.

Exit 0 means result.json was written, pass or fail; return STATUS: DONE and let the caller route it. Exit 2 means closure failed; resolve the reported cause or return STATUS: BLOCKED <cause>.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.