@vessel-dsp/compiler 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +314 -2
- package/dist/bake.d.ts +38 -0
- package/dist/bake.d.ts.map +1 -0
- package/dist/bake.js +101 -0
- package/dist/bake.js.map +1 -0
- package/dist/bbd-clock.d.ts +171 -0
- package/dist/bbd-clock.d.ts.map +1 -0
- package/dist/bbd-clock.js +1750 -0
- package/dist/bbd-clock.js.map +1 -0
- package/dist/block-row.d.ts +51 -0
- package/dist/block-row.d.ts.map +1 -0
- package/dist/block-row.js +17 -0
- package/dist/block-row.js.map +1 -0
- package/dist/bypass.d.ts +3 -0
- package/dist/bypass.d.ts.map +1 -0
- package/dist/bypass.js +228 -0
- package/dist/bypass.js.map +1 -0
- package/dist/compile.d.ts +24 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +344 -0
- package/dist/compile.js.map +1 -0
- package/dist/converter-scale.d.ts +14 -0
- package/dist/converter-scale.d.ts.map +1 -0
- package/dist/converter-scale.js +133 -0
- package/dist/converter-scale.js.map +1 -0
- package/dist/couple.d.ts +28 -0
- package/dist/couple.d.ts.map +1 -0
- package/dist/couple.js +567 -0
- package/dist/couple.js.map +1 -0
- package/dist/dangling-active-terminal.d.ts +47 -0
- package/dist/dangling-active-terminal.d.ts.map +1 -0
- package/dist/dangling-active-terminal.js +542 -0
- package/dist/dangling-active-terminal.js.map +1 -0
- package/dist/declared-program.d.ts +23 -0
- package/dist/declared-program.d.ts.map +1 -0
- package/dist/declared-program.js +387 -0
- package/dist/declared-program.js.map +1 -0
- package/dist/denomination.d.ts +48 -0
- package/dist/denomination.d.ts.map +1 -0
- package/dist/denomination.js +27 -0
- package/dist/denomination.js.map +1 -0
- package/dist/device-laws.d.ts +237 -0
- package/dist/device-laws.d.ts.map +1 -0
- package/dist/device-laws.js +3497 -0
- package/dist/device-laws.js.map +1 -0
- package/dist/diagnostics.d.ts +13 -0
- package/dist/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics.js +19 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/emit.d.ts +8 -0
- package/dist/emit.d.ts.map +1 -0
- package/dist/emit.js +43 -0
- package/dist/emit.js.map +1 -0
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +39 -0
- package/dist/errors.js.map +1 -0
- package/dist/firmware-class.d.ts +69 -0
- package/dist/firmware-class.d.ts.map +1 -0
- package/dist/firmware-class.js +20 -0
- package/dist/firmware-class.js.map +1 -0
- package/dist/fixtures/circuits.d.ts +1721 -0
- package/dist/fixtures/circuits.d.ts.map +1 -0
- package/dist/fixtures/circuits.js +13404 -0
- package/dist/fixtures/circuits.js.map +1 -0
- package/dist/fixtures/expected.d.ts +257 -0
- package/dist/fixtures/expected.d.ts.map +1 -0
- package/dist/fixtures/expected.js +311 -0
- package/dist/fixtures/expected.js.map +1 -0
- package/dist/fixtures/index.d.ts +4 -0
- package/dist/fixtures/index.d.ts.map +1 -0
- package/dist/fixtures/index.js +8 -0
- package/dist/fixtures/index.js.map +1 -0
- package/dist/fixtures/registry.d.ts +52 -0
- package/dist/fixtures/registry.d.ts.map +1 -0
- package/dist/fixtures/registry.js +341 -0
- package/dist/fixtures/registry.js.map +1 -0
- package/dist/generic-tube-fit.d.ts +12 -0
- package/dist/generic-tube-fit.d.ts.map +1 -0
- package/dist/generic-tube-fit.js +45 -0
- package/dist/generic-tube-fit.js.map +1 -0
- package/dist/grounded-clock-supply.d.ts +13 -0
- package/dist/grounded-clock-supply.d.ts.map +1 -0
- package/dist/grounded-clock-supply.js +45 -0
- package/dist/grounded-clock-supply.js.map +1 -0
- package/dist/identify.d.ts +50 -0
- package/dist/identify.d.ts.map +1 -0
- package/dist/identify.js +319 -0
- package/dist/identify.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/inert-controls.d.ts +15 -0
- package/dist/inert-controls.d.ts.map +1 -0
- package/dist/inert-controls.js +266 -0
- package/dist/inert-controls.js.map +1 -0
- package/dist/latch-seed.d.ts +53 -0
- package/dist/latch-seed.d.ts.map +1 -0
- package/dist/latch-seed.js +257 -0
- package/dist/latch-seed.js.map +1 -0
- package/dist/link.d.ts +7 -0
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +270 -0
- package/dist/link.js.map +1 -0
- package/dist/lower.d.ts +79 -0
- package/dist/lower.d.ts.map +1 -0
- package/dist/lower.js +1855 -0
- package/dist/lower.js.map +1 -0
- package/dist/netlist.d.ts +79 -0
- package/dist/netlist.d.ts.map +1 -0
- package/dist/netlist.js +4746 -0
- package/dist/netlist.js.map +1 -0
- package/dist/non-executable-clock-drivers.d.ts +8 -0
- package/dist/non-executable-clock-drivers.d.ts.map +1 -0
- package/dist/non-executable-clock-drivers.js +33 -0
- package/dist/non-executable-clock-drivers.js.map +1 -0
- package/dist/open-category.d.ts +98 -0
- package/dist/open-category.d.ts.map +1 -0
- package/dist/open-category.js +111 -0
- package/dist/open-category.js.map +1 -0
- package/dist/over-driven-node.d.ts +33 -0
- package/dist/over-driven-node.d.ts.map +1 -0
- package/dist/over-driven-node.js +188 -0
- package/dist/over-driven-node.js.map +1 -0
- package/dist/part-catalog.d.ts +7 -0
- package/dist/part-catalog.d.ts.map +1 -0
- package/dist/part-catalog.js +6639 -0
- package/dist/part-catalog.js.map +1 -0
- package/dist/part-number.d.ts +32 -0
- package/dist/part-number.d.ts.map +1 -0
- package/dist/part-number.js +80 -0
- package/dist/part-number.js.map +1 -0
- package/dist/partition.d.ts +7 -0
- package/dist/partition.d.ts.map +1 -0
- package/dist/partition.js +242 -0
- package/dist/partition.js.map +1 -0
- package/dist/port-full-scale.d.ts +70 -0
- package/dist/port-full-scale.d.ts.map +1 -0
- package/dist/port-full-scale.js +235 -0
- package/dist/port-full-scale.js.map +1 -0
- package/dist/pot-orientation.d.ts +114 -0
- package/dist/pot-orientation.d.ts.map +1 -0
- package/dist/pot-orientation.js +551 -0
- package/dist/pot-orientation.js.map +1 -0
- package/dist/power-domain-control.d.ts +40 -0
- package/dist/power-domain-control.d.ts.map +1 -0
- package/dist/power-domain-control.js +142 -0
- package/dist/power-domain-control.js.map +1 -0
- package/dist/proxy-declaration.d.ts +121 -0
- package/dist/proxy-declaration.d.ts.map +1 -0
- package/dist/proxy-declaration.js +50 -0
- package/dist/proxy-declaration.js.map +1 -0
- package/dist/registry.d.ts +323 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +192 -0
- package/dist/registry.js.map +1 -0
- package/dist/sparse-schedule.d.ts +65 -0
- package/dist/sparse-schedule.d.ts.map +1 -0
- package/dist/sparse-schedule.js +421 -0
- package/dist/sparse-schedule.js.map +1 -0
- package/dist/speaker-load.d.ts +38 -0
- package/dist/speaker-load.d.ts.map +1 -0
- package/dist/speaker-load.js +97 -0
- package/dist/speaker-load.js.map +1 -0
- package/dist/stage-coverage.d.ts +21 -0
- package/dist/stage-coverage.d.ts.map +1 -0
- package/dist/stage-coverage.js +124 -0
- package/dist/stage-coverage.js.map +1 -0
- package/dist/stamp-partition.d.ts +314 -0
- package/dist/stamp-partition.d.ts.map +1 -0
- package/dist/stamp-partition.js +472 -0
- package/dist/stamp-partition.js.map +1 -0
- package/dist/supply-reference.d.ts +19 -0
- package/dist/supply-reference.d.ts.map +1 -0
- package/dist/supply-reference.js +66 -0
- package/dist/supply-reference.js.map +1 -0
- package/dist/supply-short.d.ts +32 -0
- package/dist/supply-short.d.ts.map +1 -0
- package/dist/supply-short.js +118 -0
- package/dist/supply-short.js.map +1 -0
- package/dist/supply-stamps.d.ts +51 -0
- package/dist/supply-stamps.d.ts.map +1 -0
- package/dist/supply-stamps.js +363 -0
- package/dist/supply-stamps.js.map +1 -0
- package/dist/terminal-role.d.ts +109 -0
- package/dist/terminal-role.d.ts.map +1 -0
- package/dist/terminal-role.js +46 -0
- package/dist/terminal-role.js.map +1 -0
- package/dist/terminal-roles.d.ts +59 -0
- package/dist/terminal-roles.d.ts.map +1 -0
- package/dist/terminal-roles.js +92 -0
- package/dist/terminal-roles.js.map +1 -0
- package/dist/transformer.d.ts +181 -0
- package/dist/transformer.d.ts.map +1 -0
- package/dist/transformer.js +476 -0
- package/dist/transformer.js.map +1 -0
- package/dist/types.d.ts +3157 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +11 -0
- package/dist/types.js.map +1 -0
- package/dist/unbounded-operating-point.d.ts +35 -0
- package/dist/unbounded-operating-point.d.ts.map +1 -0
- package/dist/unbounded-operating-point.js +181 -0
- package/dist/unbounded-operating-point.js.map +1 -0
- package/dist/unexecuted-region.d.ts +3 -0
- package/dist/unexecuted-region.d.ts.map +1 -0
- package/dist/unexecuted-region.js +122 -0
- package/dist/unexecuted-region.js.map +1 -0
- package/dist/unimplemented-control-role.d.ts +3 -0
- package/dist/unimplemented-control-role.d.ts.map +1 -0
- package/dist/unimplemented-control-role.js +61 -0
- package/dist/unimplemented-control-role.js.map +1 -0
- package/dist/unreachable-output.d.ts +3 -0
- package/dist/unreachable-output.d.ts.map +1 -0
- package/dist/unreachable-output.js +97 -0
- package/dist/unreachable-output.js.map +1 -0
- package/dist/unreadable-terminal-role.d.ts +67 -0
- package/dist/unreadable-terminal-role.d.ts.map +1 -0
- package/dist/unreadable-terminal-role.js +409 -0
- package/dist/unreadable-terminal-role.js.map +1 -0
- package/dist/unverified-pinout.d.ts +27 -0
- package/dist/unverified-pinout.d.ts.map +1 -0
- package/dist/unverified-pinout.js +121 -0
- package/dist/unverified-pinout.js.map +1 -0
- package/package.json +75 -5
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { type PartRegistry, type PartSection } from "./registry";
|
|
2
|
+
import type { FirmwareClass } from "./firmware-class";
|
|
3
|
+
import type { Block, Device, DeviceResolution, ElectricallyIsolatedIcWarning, IcNotExecutedWarning, LawedNetlist, OpenIcGapClass, UnimplementedDeviceLawWarning, Netlist, NodeId } from "./types";
|
|
4
|
+
/** Room-temperature thermal voltage; the diode law needs a reference somewhere. */
|
|
5
|
+
export declare const THERMAL_VOLTAGE = 0.025852;
|
|
6
|
+
/**
|
|
7
|
+
* Closed and open switch resistances. Not arbitrary: the ratio sets the matrix
|
|
8
|
+
* condition number, so 1e-2 to 1e9 is chosen to be electrically indistinguishable
|
|
9
|
+
* from ideal at audio levels while staying far from the solver's precision limit.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SWITCH_ON_OHMS = 0.01;
|
|
12
|
+
/**
|
|
13
|
+
* The terminal a jack's switch contact makes against, and the terminal a supply calls
|
|
14
|
+
* its return. Closed sets, compared whole.
|
|
15
|
+
*
|
|
16
|
+
* There is deliberately **no set of contact role names**. The corpus names switch
|
|
17
|
+
* contacts eleven ways (`batterySwitch`, `switch`, `switched`, `contact_top`,
|
|
18
|
+
* `normalSwitch`, `switch_black`, ...) and they do not share a sense: a battery contact
|
|
19
|
+
* makes against the sleeve, a `switched_tip` makes against the tip, and a `normalSwitch`
|
|
20
|
+
* on a stereo output *breaks* when a plug goes in. A name table gets the sense wrong on
|
|
21
|
+
* two of those three, and closing a signal contact to the sleeve shorts it to ground.
|
|
22
|
+
* See `portEngage` for what is derived instead.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Series impedance of a pedal supply, in ohms: the **default position of what belongs to a
|
|
26
|
+
* user-selectable power profile**, not a physical claim about one cell.
|
|
27
|
+
*
|
|
28
|
+
* Decided by Joseph, 2026-08-13: source impedance is an *input profile on the UI*, alongside the
|
|
29
|
+
* other things a player chooses about how a pedal is fed. A fresh alkaline, a sagging one and a
|
|
30
|
+
* regulated adapter are three profiles a user picks between, so this stage does not have to guess
|
|
31
|
+
* which the packet meant — a question that has no answer, since a schematic draws a 9 V battery
|
|
32
|
+
* symbol and internal resistance is a property of the cell rather than of the drawing.
|
|
33
|
+
*
|
|
34
|
+
* Until that control exists, this is the default, and it is the low end of the plausible range so
|
|
35
|
+
* the default errs toward the ideal behaviour it replaces: a fresh 9 V alkaline measures 1-2 ohms,
|
|
36
|
+
* a depleted one tens, an adapter well under one. Measured, one ohm moves a working pedal's rail by
|
|
37
|
+
* about 10 mV — `boss-bd-2-blues-driver` by `9.9 mV`, `boss-ge-7` by `19 mV` — and the corpus's
|
|
38
|
+
* ngspice agreement is unchanged at 31.
|
|
39
|
+
*
|
|
40
|
+
* **What zero cost.** Zero is the one value known to be wrong, since no real supply has it, and it
|
|
41
|
+
* let a supply deliver unbounded current: `ibanez-ts808` drew **193 A** through the short
|
|
42
|
+
* `diode-forward-across-supply` warns about and still rendered a plausible gain of 0.506. One ohm
|
|
43
|
+
* collapses that rail instead, which is also what let the diode's `limitJunction` land after two
|
|
44
|
+
* reverts.
|
|
45
|
+
*
|
|
46
|
+
* **Not a battery model.** It does not deplete and it does not tell an adapter from a cell. Both
|
|
47
|
+
* are the profile's job once it exists; this is the mechanism and one defensible default.
|
|
48
|
+
*/
|
|
49
|
+
export declare const SUPPLY_SOURCE_OHMS = 1;
|
|
50
|
+
export declare const SILICON_SATURATION_CURRENT = 1e-14;
|
|
51
|
+
export declare const SILICON_FORWARD_BETA = 100;
|
|
52
|
+
/**
|
|
53
|
+
* The JFET law's own parameters when the source types neither `Vt0` nor `Beta`. Not a part: no
|
|
54
|
+
* datasheet in the corpus prints these, and a 2N5952 or 2SK30A whose document leaves them untyped
|
|
55
|
+
* runs on them regardless of its grade. Exported so `compile.ts` can name every device that does
|
|
56
|
+
* (`fet-law-default-parameters`) against the values actually stamped, not a second copy.
|
|
57
|
+
*/
|
|
58
|
+
export declare const JFET_DEFAULT_THRESHOLD_VOLTS = -2;
|
|
59
|
+
export declare const JFET_DEFAULT_TRANSCONDUCTANCE = 0.001;
|
|
60
|
+
/** How a supply names the terminal current comes back to. */
|
|
61
|
+
export declare const SWITCH_OFF_OHMS = 1000000000;
|
|
62
|
+
export declare function attachDeviceLaws(netlist: Netlist, registry: PartRegistry): LawedNetlist;
|
|
63
|
+
/**
|
|
64
|
+
* A multi-section part as one device per section, or `null` when the part is not multi-section.
|
|
65
|
+
*
|
|
66
|
+
* Each section device carries only the terminals that section uses, in the order the registry gave
|
|
67
|
+
* them, and its `identity.terminalRoles` are the canonical role names for its law's arity. That is
|
|
68
|
+
* what lets lowering treat it as an ordinary device: a section of a dual op-amp is indistinguishable
|
|
69
|
+
* from a packet that declared that half as its own `opamp` component, which is how the packets that
|
|
70
|
+
* already compile transcribe the same chip.
|
|
71
|
+
*
|
|
72
|
+
* A section naming a terminal the device does not have is a registry error and refuses the pedal,
|
|
73
|
+
* rather than silently dropping a section and rendering half a circuit.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* A single-section `voltage-source` model on a regulator or converter that declares which terminal
|
|
77
|
+
* is its output and which is its reference, resolved from those declarations.
|
|
78
|
+
*
|
|
79
|
+
* `null` whenever the document does not settle it: a different law, more than one section, a kind
|
|
80
|
+
* whose format vocabulary has no supply electrodes, or an output/reference role declared zero or
|
|
81
|
+
* several times. Every one of those falls through to the entry's pin naming exactly as before.
|
|
82
|
+
*/
|
|
83
|
+
export declare function declaredRegulatorTerminals(device: Device, model: {
|
|
84
|
+
readonly kind: "sections" | "sections-core";
|
|
85
|
+
readonly sections: readonly PartSection[];
|
|
86
|
+
}): ReadonlyArray<readonly [Device, DeviceResolution]> | null;
|
|
87
|
+
/**
|
|
88
|
+
* Is every one of this device's nodes private to itself — touched by no other device and
|
|
89
|
+
* never ground?
|
|
90
|
+
*
|
|
91
|
+
* A component that shares no net with anything cannot affect the solve, however it would
|
|
92
|
+
* have been modelled: physically, a disconnected chip does nothing. Refusing the whole
|
|
93
|
+
* pedal for it is over-strict; several packets deliberately carry such blocks as declared
|
|
94
|
+
* view-only power clusters (klon-centaur's `MAX1044_CLUSTER_VIEW_ONLY` draws the charge
|
|
95
|
+
* pump on four nodes nothing else touches, and separately declares the rails it produces
|
|
96
|
+
* as voltage-carrying ports — its own record says "not a solved terminal charge-pump
|
|
97
|
+
* model"). The resolution is `open` plus a LOUD compile warning, so a cluster isolated by
|
|
98
|
+
* a wiring mistake rather than by intent is still named, never silently swallowed.
|
|
99
|
+
*
|
|
100
|
+
* Deliberately narrow: ONE shared node — even ground — defeats it. pigtronix's LT1054
|
|
101
|
+
* drives a diode-doubler from its switching pin, shares nets, and keeps refusing.
|
|
102
|
+
*/
|
|
103
|
+
export declare function isElectricallyIsolated(device: Device, devicesTouchingNode: ReadonlyMap<NodeId, number>): boolean;
|
|
104
|
+
/** How many devices touch each node, counting a device once however many terminals it lands. */
|
|
105
|
+
export declare function deviceCountByNode(netlist: Netlist): Map<NodeId, number>;
|
|
106
|
+
/**
|
|
107
|
+
* An OTA whose four signal connections come from the **DIP-8 package order** rather than from
|
|
108
|
+
* anything the document states about its electrodes.
|
|
109
|
+
*
|
|
110
|
+
* Exported so `findUnreadableTerminalRoles` can report exactly the devices this fallback catches,
|
|
111
|
+
* instead of mirroring its condition. A warning kept on a different test from the resolver it
|
|
112
|
+
* guards is how a silent mis-wiring was introduced once already in this compiler, on a switch,
|
|
113
|
+
* and the same shape would be available here: the fallback needs eight all-null *names*, and a
|
|
114
|
+
* predicate that asked about declared roles instead would report a different set of devices.
|
|
115
|
+
*
|
|
116
|
+
* The assumption itself is sound and deliberate -- reading a role-less eight-terminal shell as its
|
|
117
|
+
* package beats reading positions 0..3, which puts the output on pin 3. It is still an assumption
|
|
118
|
+
* the source does not make, which is the whole reason it should say so out loud.
|
|
119
|
+
*/
|
|
120
|
+
export declare function otaPackageOrderAssumed(device: Device): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* The devices opened by `declaresUnimplementedDeviceLaw`, so a packet is told which stated device
|
|
123
|
+
* is absent from its program rather than silently receiving the nearest law.
|
|
124
|
+
*/
|
|
125
|
+
export declare function findUnimplementedDeviceLaws(lawed: LawedNetlist): readonly UnimplementedDeviceLawWarning[];
|
|
126
|
+
/**
|
|
127
|
+
* Every integrated circuit the source declares and the program does not execute.
|
|
128
|
+
*
|
|
129
|
+
* **A residue reporter, deliberately.** It does not ask the five opening predicates their
|
|
130
|
+
* questions again -- it reads the reason `resolveDevice` recorded when it chose the `open`. So a
|
|
131
|
+
* sixth opening path added later is reported the day it is added, as `unrecorded`, instead of
|
|
132
|
+
* joining the silent class this exists to close; and no copy of a resolver's question can drift
|
|
133
|
+
* from the resolver, which is the defect that bit this file twice on 2026-09-03.
|
|
134
|
+
*
|
|
135
|
+
* `electrically-isolated` is excluded because `findElectricallyIsolatedIcs` already names those
|
|
136
|
+
* devices and says more about them than this could. The exclusion is on the recorded decision, not
|
|
137
|
+
* on a re-run of `isElectricallyIsolated`, for the reason above.
|
|
138
|
+
*
|
|
139
|
+
* Runs after section expansion, which is what makes it safe: a package the registry could expand
|
|
140
|
+
* is no longer in `lawed.netlist.devices` at all, so a working dual op-amp cannot appear here.
|
|
141
|
+
* Non-IC opens are out of scope and stay so -- a ground symbol and an unwired jack contact carry
|
|
142
|
+
* no element because the symbol has none, which is not a hole in the model.
|
|
143
|
+
*/
|
|
144
|
+
/**
|
|
145
|
+
* `digital-delay-line` as a composition of primitives (board-p3 row 4):
|
|
146
|
+
* an integer delay line plus one multiply-accumulate for the feedback mix.
|
|
147
|
+
*
|
|
148
|
+
* The op order mirrors the kernel's own evaluation order exactly -- read the
|
|
149
|
+
* delayed sample, publish it, write back tap plus feedback times delayed --
|
|
150
|
+
* so the interpreter reproduces its bits rather than approximating them.
|
|
151
|
+
* Length-mode priority mirrors the kernel's branch priority (clock control,
|
|
152
|
+
* then parameter port, else capacity). Returns `null` for anything but this
|
|
153
|
+
* model, and for a block carrying `modulation`, which the kernel has no
|
|
154
|
+
* branch for: there is no faithful composition of a port the kernel ignores.
|
|
155
|
+
*/
|
|
156
|
+
export declare function decomposeDigitalDelayLine(block: Extract<Block, {
|
|
157
|
+
kind: "macro";
|
|
158
|
+
}>): Extract<Block, {
|
|
159
|
+
kind: "composed";
|
|
160
|
+
}> | null;
|
|
161
|
+
/**
|
|
162
|
+
* `bucket-brigade-delay-line` as a composition of primitives (board-p3
|
|
163
|
+
* row 4): input coupling estimator, fractionally interpolated delay line,
|
|
164
|
+
* write-back.
|
|
165
|
+
*
|
|
166
|
+
* Op order mirrors the kernel exactly -- couple the tap to AC, read the
|
|
167
|
+
* delayed sample with linear interpolation, publish it, write the AC back --
|
|
168
|
+
* and length priority mirrors its branches (clock, clock-law, modulation,
|
|
169
|
+
* parameter).
|
|
170
|
+
*
|
|
171
|
+
* Deliberately no `converter` op: the shipped kernel performs no conversion
|
|
172
|
+
* stage (no companding, no quantization -- `grep compand` finds a device
|
|
173
|
+
* law and comments), so a bit-identical decomposition has nowhere to put
|
|
174
|
+
* one. The enum gains `converter` when a decomposition needs it, not before.
|
|
175
|
+
*/
|
|
176
|
+
export declare function decomposeBucketBrigadeDelayLine(block: Extract<Block, {
|
|
177
|
+
kind: "macro";
|
|
178
|
+
}>): Extract<Block, {
|
|
179
|
+
kind: "composed";
|
|
180
|
+
}> | null;
|
|
181
|
+
/**
|
|
182
|
+
* `digital-reverb-module` as a composition of primitives (board-p3 row 4):
|
|
183
|
+
* four parallel feedback combs averaged, two series allpass diffusers,
|
|
184
|
+
* output gain. A Schroeder reverb, which is what the kernel is.
|
|
185
|
+
*
|
|
186
|
+
* Arithmetic mirrors the kernel term for term: combs accumulate
|
|
187
|
+
* left-to-right then scale by exactly one quarter (a power of two, so the
|
|
188
|
+
* multiply rounds like the kernel's divide), allpasses keep the kernel's
|
|
189
|
+
* multiply order. The kernel has no clock, parameter, or modulation
|
|
190
|
+
* branches, so those ports are dropped rather than carried -- carrying a
|
|
191
|
+
* port the kernel ignores would imply behaviour the composition does not
|
|
192
|
+
* have. `decaySeconds` travels per comb op; the echo-density tables and
|
|
193
|
+
* the allpass coefficient stay interpreter-owned, exactly as today.
|
|
194
|
+
*/
|
|
195
|
+
export declare function decomposeDigitalReverbModule(block: Extract<Block, {
|
|
196
|
+
kind: "macro";
|
|
197
|
+
}>): Extract<Block, {
|
|
198
|
+
kind: "composed";
|
|
199
|
+
}> | null;
|
|
200
|
+
/**
|
|
201
|
+
* Emit compositions for the three decomposed models, passthrough for
|
|
202
|
+
* everything else (board-p3 row 4, the flip). Called once per program after
|
|
203
|
+
* `couple` wires ports: decompositions read fully-resolved blocks, so an
|
|
204
|
+
* earlier flip would compose unwired placeholders. A `null` decomposition
|
|
205
|
+
* (a port the kernel ignores, a model outside the three) keeps the macro
|
|
206
|
+
* block rather than failing the program.
|
|
207
|
+
*/
|
|
208
|
+
export declare function composeMacroBlocks(blocks: readonly Block[]): readonly Block[];
|
|
209
|
+
/**
|
|
210
|
+
* Which phase-3 bucket a gap-candidate open IC belongs in (board-p3 row 1).
|
|
211
|
+
*
|
|
212
|
+
* Pure over typed and structural evidence only: the entry's `firmwareClass`
|
|
213
|
+
* (compared whole-value, never prose) and whether the chip shares a net with
|
|
214
|
+
* a device the program executes. `fixed-function` means no program is
|
|
215
|
+
* missing, so the only question left is what covers the chip's behaviour: an
|
|
216
|
+
* executing macro (memory inside a delay kernel, e.g. a 4164 behind an
|
|
217
|
+
* M50195P) or an executing law (a redundant view of modelled behaviour, e.g.
|
|
218
|
+
* a single-terminal divider placeholder on an executing divider's clock
|
|
219
|
+
* net). Everything else stays `programmable-no-program` -- including
|
|
220
|
+
* `undetermined` firmware, which is an open question rather than evidence of
|
|
221
|
+
* a fixed function, so the phase-3 set keeps the row until proven otherwise.
|
|
222
|
+
*/
|
|
223
|
+
export declare function classifyOpenIcGap(input: {
|
|
224
|
+
readonly firmwareClass: FirmwareClass;
|
|
225
|
+
readonly sharesNodeWithExecutedMacro: boolean;
|
|
226
|
+
readonly sharesNodeWithExecutedLaw: boolean;
|
|
227
|
+
}): OpenIcGapClass;
|
|
228
|
+
export declare function findIcsNotExecuted(lawed: LawedNetlist, original: Netlist, registry: PartRegistry): readonly IcNotExecutedWarning[];
|
|
229
|
+
/**
|
|
230
|
+
* The loud half of `isElectricallyIsolated`: every identification-requiring device whose
|
|
231
|
+
* nodes are all private got an `open` law instead of a refusal, and each one is named here
|
|
232
|
+
* so a cluster isolated by a wiring mistake rather than by intent is never silently
|
|
233
|
+
* swallowed. Runs over the ORIGINAL netlist (pre-section-expansion), because isolation is a
|
|
234
|
+
* property of the drawn component, not of a registry section.
|
|
235
|
+
*/
|
|
236
|
+
export declare function findElectricallyIsolatedIcs(netlist: Netlist): readonly ElectricallyIsolatedIcWarning[];
|
|
237
|
+
//# sourceMappingURL=device-laws.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-laws.d.ts","sourceRoot":"","sources":["../src/device-laws.ts"],"names":[],"mappings":"AAsCA,OAAO,EAKN,KAAK,YAAY,EACjB,KAAK,WAAW,EAQhB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAEX,KAAK,EAKL,MAAM,EAEN,gBAAgB,EAChB,6BAA6B,EAC7B,oBAAoB,EACpB,YAAY,EACZ,cAAc,EAGd,6BAA6B,EAG7B,OAAO,EACP,MAAM,EAEN,MAAM,SAAS,CAAC;AAEjB,mFAAmF;AACnF,eAAO,MAAM,eAAe,WAAY,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;;;;;;;;;;GAWG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAgCpC,eAAO,MAAM,0BAA0B,QAAQ,CAAC;AAChD,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,6BAA6B,QAAO,CAAC;AAyDlD,6DAA6D;AAC7D,eAAO,MAAM,eAAe,aAAM,CAAC;AAwVnC,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,YAAY,GACpB,YAAY,CAwEd;AAED;;;;;;;;;;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