Ieee1164. Resolver
(ieee1164 v0.2.0)
Copy Markdown
Resolves std_ulogic into std_logic by deriving the resolution rules
from the ieee1164 knowledge graph — never by transcribing the standard's
table. The hard-coded resolution_table is only ever an oracle to check
against (see the tests).
The strength lattice is read straight from the artefact's edges:
FORCES/WEAKLY_FORCESorder the knowns (0,1 over W over L,H)POISONS/PROPAGATESliftX/Uabove the real driversYIELDS_TOsettles the rest —Zyields to all,X(and-) yield toU. The explicitX YIELDS_TO Uis what placesUaboveXwithout importing any "propagates beats poisons" precedence.
From that order: the stronger driver wins; equal-strength drivers that
disagree birth the tier's unknown (0/1 → X, L/H → W); - is indifferent
(RESOLVES_AS X); and a lone driver passes through unresolved.
Summary
Functions
The nine values in IEEE 1164 order — U X 0 1 Z W L H -, indices 0..8.
Resolve a 1-d vector of drivers into a single resolved value.
Functions
The full 9×9 resolution matrix as an Nx.Tensor of :u8, generated by
exercising the resolver over every ordered pair. Each cell is the index into
order/0 of the resolved value.
The nine values in IEEE 1164 order — U X 0 1 Z W L H -, indices 0..8.
Resolve a 1-d vector of drivers into a single resolved value.
Accepts the drivers as value strings (["0", "1", "Z"] → "X"), as
u8 indices into order/0 ([2, 3, 4] → 1), or as a 1-d Nx
tensor of those indices (→ a scalar :u8 tensor). A single driver resolves
to itself — the standard's single-driver carve-out, so a lone - stays -;
two or more fold pairwise, and order does not matter (resolution is
commutative).