Skip to content
copperhead.sh
Get started

Reference

Diagnostics

Every code fang emits, by area.

Diagnostic codes are stable. They are allocated, never reused and retired rather than deleted, so a code in an old log means today what it meant then, and searching for one never lands on a different problem.

Eight areas exist: ELAB, IFACE, TOPO, UNIT, TXN, SIM, IMPORT, MCP.

CodeMeans
UNIT-0001Operands of unequal dimension combined
UNIT-0002Unit symbol not recognized
UNIT-0003Exponent is not a dimensionless rational
UNIT-0004Unit conversion rounded

UNIT-0001 is raised where the expression is constructed, not where it is evaluated. A dimensionally invalid expression cannot be stored.

CodeMeans
ELAB-0001Canonical semantic path is not well formed
ELAB-0002Two entities share a canonical semantic path
ELAB-0003Identifier is not unique within the revision
ELAB-0004Entity traceable to neither a source location nor an import
ELAB-0005Connection has no kind
ELAB-0006Required reference names no entity
ELAB-0007Requirement state transition outside the permitted table
ELAB-0008Tool handle read during elaboration
ELAB-0009Artifact declares an unimplemented major schema version
ELAB-0010Cycle where one is prohibited
ELAB-0011Contradictory mandatory constraints
ELAB-0012A second constraint registry was created

ELAB-0012 is the governing invariant as an error code. There is no flag that permits it.

ELAB-0008 is the three-phase rule as an error code: a program that could observe a tool’s result would not be reproducible.

CodeMeans
IFACE-0001A required interface signal has no pin
IFACE-0002Two interfaces disagree on membership
IFACE-0003A pin selector cites no evidence the part declares
IFACE-0004An address strap names a pin the part does not have

An optional signal with no pin is not an error. IFACE-0001 is about signals the interface says it requires.

IFACE-0003 refuses a PinMap whose selectors name no Cites declaration on the same part. An address given as a bare number is UNIT-0001, as any bare-number parameter is. A strap that resolves to no address is not a diagnostic at all: the board is legal, and the compatibility check reports the address as undecided.

CodeMeans
TXN-0001Transaction proposed against a snapshot that is no longer current
TXN-0002A required check reported a blocking severity
TXN-0003An undecided result covers a must-be-decided requirement
TXN-0004Policy approval requirements unsatisfied
TXN-0005Operation did not normalize into a well-formed entity

These are the gate conditions. A rejection carries its code, its message and the diff it would have applied.

CodeMeans
SIM-0001A question measures into a parameter its module does not declare
SIM-0002A question states its own result
SIM-0003A question names a surface or part that resolves to no pins
SIM-0004A circuit question names no bench
SIM-0005A load is neither a current nor a resistance
SIM-0006A model port the part’s pin map does not reach
SIM-0007A frequency outside a model’s range
SIM-0008A rule-check exclusion gives no reason
SIM-0009An emulation model names a descriptor fang does not ship
SIM-0010A component an emulation touches has neither a model nor an abstraction
SIM-0011A fault the device’s emulation model does not support
SIM-0012A stimulus names an input its model lacks, or a value of the wrong dimension
SIM-0013A pin the emulation platform does not map
SIM-0014An emulation names no run duration, or one that is not positive
SIM-0015No firmware is bound, or it was built for another target
SIM-0016A bus device’s controller or address cannot be resolved

SIM-0001, SIM-0002, SIM-0003, SIM-0005 and SIM-0008 fail where the question is written or elaborated, and so does SIM-0014 for a run that is not positive. The others are a question fang verify reports as not runnable, naming what is missing, rather than running it with something assumed in its place. SIM-0009 to SIM-0016 are an emulation plan refused before anything runs; Emulation has the detail.

CodeMeans
IMPORT-0001Adapter could not represent a construct

Reported in import-report.json rather than raised, because an import that stopped at the first unrepresentable construct would be less useful than one that says what it could not carry.

CodeMeans
MCP-0001A path outside the bound project root was named
MCP-0002No tool by that name is exposed
MCP-0003An argument did not parse
MCP-0004Commit named a proposal the gate did not accept
MCP-0005The protocol dependency is not installed
MCP-0006The operation kind is not one the commit gate evaluates

A refusal at the protocol boundary is its own area: it describes the boundary, not the transaction the boundary was asked about.

New codes are allocated through _allocate at the bottom of the relevant area block in fang/diagnostics.py. Never renumber and never reuse a retired number.