Compare two UPF power-intent files (IEEE 1801) and report added, removed and changed power domains, supply sets, isolation and retention strategies.
Compares two UPF (IEEE 1801 power intent) files for logical equivalence. Each file is sourced into an embedded Tcl interpreter running the upf-shell command layer, which builds a UPF data model; the two models are then compared semantically (UPFSemanticCompare): every object is named by its place in the design (scope(/u_cpu) / PowerDomain PD1 / Isolation iso1) and each of its modelled attributes and references is a fact; the files are equivalent when their fact sets are equal. Order of commands, how they were spelled (-update, loops, load_upf, one list or several options) and file/line bookkeeping do not matter. Output is a numbered difference list in UPF terms, written to a text file (default diff.txt) and echoed to the log.
Changes in release 10.0
- A Tcl error in a command (Error 50111, with the Tcl message and the command) no longer ends the load: the load goes on with the next command, so a command that failed is in neither model; check the log's error count too.
- The decompiler fixes of release 10.0 apply, and compareupf no longer compares a logic net's domain, which IEEE 1801 cannot express.
Usage
compareupf -golden <file.upf> -revised <file.upf> [-outfile <file>] [-user <email>]
Every option is listed by compareupf -help, and the complete reference is in the capability file that ships with the tool's AGENTS.md.
Exit status
- Errors the UPF files themselves raise while loading (an undefined domain, a typo'd command) are reported and the load goes on with the next command (as
upf-shell -freads the same file; a Tcl error is Error 50111 with the Tcl message and the command), so a command that failed is in neither model; the comparison is only as good as the loads, so check the log's error count too. - Message format:
compareupf: <Severity>: <id>: <text>, severity one ofError,Fatal Error,Warning,Note,Programming Error;<id>is a 5-digit message number. Key notes:Loading golden file : <f>,Loading revised file : <f>,Found total differences : N,Written differences into file : <f>, then 10931The golden and revised UPF are equivalent ...or... differ .... - The run ends with
compareupf: Note: <id>: Found N error(s) and M warning(s) ....
Requirements
Java 11 or newer on PATH (Java 21 recommended), Linux or Windows. Unpack the bundle, run source setup_env.sh and call compareupf. Install in one command with curl -fsSL https://edautils.com/install.sh | sh -s -- compareupf.