Skip to main content

Module solver

Module solver 

Source
Expand description

The hardware constraint solver.

Takes a parsed Config and a Database and produces a list of Conflicts. Phase 2 detects exactly the four conflict classes from the README roadmap:

  1. Pin collision — two peripheral signals on one physical pin.
  2. AF mismatch — a pin assigned to a peripheral it doesn’t connect to.
  3. Missing required pin — a peripheral declared without a required pin.
  4. Clock domain disabled — a peripheral whose bus clock is turned off.

Per the scope rules there is no DMA-collision or full clock-tree analysis.

Structs§

SignalRef
A (peripheral, signal) pair identifying one use of a pin.

Enums§

Conflict
A single resolved conflict. Every variant is an error (it makes the config un-buildable); nucleus check exits non-zero if any are present.

Functions§

solve
Run the solver over config against db, returning all conflicts in a deterministic order (so output and tests are stable across runs).