| name | erc-rules |
| description | Interprets SKiDL ERC output, classifies errors vs warnings, and provides concrete fix patterns (pin conflicts, floating pins, decoupling, NC usage). Use when running ERC(), reviewing ERC results, fixing ERC errors, or performing any design review that includes electrical rule checking. |
SKiDL ERC Rules
When to use
- Before exporting any netlist
- After any circuit code change
- During design review (errors must be 0 before proceeding)
Procedure
Drive strength order (PWR > OUT > BIDIR > TRI > OC > IN > NC)
Must-fix errors — treat as blockers:
- Output-to-output conflict (two OUT pins on same net)
- Floating input on active IC
- Power pin conflict
- Unconnected pin on IC (unless
NC)
Warnings — investigate, suppress only with justification:
- Open-drain needs external pull-up → add resistor or
erc_assert()
- Multi-driver bus (I2C, SPI) → expected; suppress with
erc_assert()
Mandatory decoupling:
Every IC VCC pin → 100 nF minimum, named C_DECOUP_*
Intentional NC:
U1['NC1', 'NC2'] += NC
Warning suppression:
erc_assert("expected open-drain", net)
ERC run pattern:
if __name__ == "__main__":
ERC()
Output
Produce this summary line after every ERC run:
"X errors, Y warnings, Z notes. Circuit is [PASS/FAIL]."
Validation
- Never declare a circuit ready until errors == 0
- Suppressed warnings must have a comment explaining why