@vessel-dsp/compiler 0.5.0 → 0.7.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.
Files changed (88) hide show
  1. package/README.md +4 -2
  2. package/dist/bbd-clock.d.ts +42 -0
  3. package/dist/bbd-clock.d.ts.map +1 -1
  4. package/dist/bbd-clock.js +383 -1
  5. package/dist/bbd-clock.js.map +1 -1
  6. package/dist/compile.d.ts.map +1 -1
  7. package/dist/compile.js +316 -34
  8. package/dist/compile.js.map +1 -1
  9. package/dist/device-laws.d.ts.map +1 -1
  10. package/dist/device-laws.js +581 -98
  11. package/dist/device-laws.js.map +1 -1
  12. package/dist/fixtures/circuits.d.ts +23 -2
  13. package/dist/fixtures/circuits.d.ts.map +1 -1
  14. package/dist/fixtures/circuits.js +205 -2
  15. package/dist/fixtures/circuits.js.map +1 -1
  16. package/dist/index.d.ts +2 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/lower.d.ts.map +1 -1
  21. package/dist/lower.js +13 -0
  22. package/dist/lower.js.map +1 -1
  23. package/dist/netlist.d.ts +30 -0
  24. package/dist/netlist.d.ts.map +1 -1
  25. package/dist/netlist.js +502 -8
  26. package/dist/netlist.js.map +1 -1
  27. package/dist/part-catalog.d.ts +42 -18
  28. package/dist/part-catalog.d.ts.map +1 -1
  29. package/dist/part-catalog.js +2518 -576
  30. package/dist/part-catalog.js.map +1 -1
  31. package/dist/partition.d.ts.map +1 -1
  32. package/dist/partition.js +6 -0
  33. package/dist/partition.js.map +1 -1
  34. package/dist/registry-data/bjt.d.ts +3 -0
  35. package/dist/registry-data/bjt.d.ts.map +1 -0
  36. package/dist/registry-data/bjt.js +1350 -0
  37. package/dist/registry-data/bjt.js.map +1 -0
  38. package/dist/registry-data/charge-pump.d.ts +3 -0
  39. package/dist/registry-data/charge-pump.d.ts.map +1 -0
  40. package/dist/registry-data/charge-pump.js +204 -0
  41. package/dist/registry-data/charge-pump.js.map +1 -0
  42. package/dist/registry-data/diode.d.ts +3 -0
  43. package/dist/registry-data/diode.d.ts.map +1 -0
  44. package/dist/registry-data/diode.js +786 -0
  45. package/dist/registry-data/diode.js.map +1 -0
  46. package/dist/registry-data/index.d.ts +21 -0
  47. package/dist/registry-data/index.d.ts.map +1 -0
  48. package/dist/registry-data/index.js +103 -0
  49. package/dist/registry-data/index.js.map +1 -0
  50. package/dist/registry-data/jfet.d.ts +3 -0
  51. package/dist/registry-data/jfet.d.ts.map +1 -0
  52. package/dist/registry-data/jfet.js +605 -0
  53. package/dist/registry-data/jfet.js.map +1 -0
  54. package/dist/registry-data/loader.d.ts +137 -0
  55. package/dist/registry-data/loader.d.ts.map +1 -0
  56. package/dist/registry-data/loader.js +350 -0
  57. package/dist/registry-data/loader.js.map +1 -0
  58. package/dist/registry-data/mosfet.d.ts +3 -0
  59. package/dist/registry-data/mosfet.d.ts.map +1 -0
  60. package/dist/registry-data/mosfet.js +63 -0
  61. package/dist/registry-data/mosfet.js.map +1 -0
  62. package/dist/registry-data/opamp.d.ts +37 -0
  63. package/dist/registry-data/opamp.d.ts.map +1 -0
  64. package/dist/registry-data/opamp.js +669 -0
  65. package/dist/registry-data/opamp.js.map +1 -0
  66. package/dist/registry-data/regulator.d.ts +3 -0
  67. package/dist/registry-data/regulator.d.ts.map +1 -0
  68. package/dist/registry-data/regulator.js +189 -0
  69. package/dist/registry-data/regulator.js.map +1 -0
  70. package/dist/registry-data/schema.d.ts +60 -0
  71. package/dist/registry-data/schema.d.ts.map +1 -0
  72. package/dist/registry-data/schema.js +151 -0
  73. package/dist/registry-data/schema.js.map +1 -0
  74. package/dist/registry-data/ujt.d.ts +3 -0
  75. package/dist/registry-data/ujt.d.ts.map +1 -0
  76. package/dist/registry-data/ujt.js +48 -0
  77. package/dist/registry-data/ujt.js.map +1 -0
  78. package/dist/registry-data/zener.d.ts +3 -0
  79. package/dist/registry-data/zener.d.ts.map +1 -0
  80. package/dist/registry-data/zener.js +547 -0
  81. package/dist/registry-data/zener.js.map +1 -0
  82. package/dist/registry.d.ts +93 -6
  83. package/dist/registry.d.ts.map +1 -1
  84. package/dist/registry.js +35 -7
  85. package/dist/registry.js.map +1 -1
  86. package/dist/types.d.ts +242 -19
  87. package/dist/types.d.ts.map +1 -1
  88. package/package.json +1 -1
@@ -83,6 +83,24 @@ export type MacroPortRoles = {
83
83
  * nothing about the single-output path changes.
84
84
  */
85
85
  readonly audioOut2?: readonly string[];
86
+ /**
87
+ * A part made of two sections that a circuit may chain, and where the audio leaves when it
88
+ * does. `sectionOut` is the first section's output, `nextIn` the second section's input and
89
+ * `finalOut` the second section's output, each as aliases of a terminal role.
90
+ *
91
+ * Applies only when the document wires `sectionOut` and `nextIn` to the **same node**: that
92
+ * connectivity is the circuit saying the sections are in series, so the delay the part
93
+ * contributes (all of its stages) is read at `finalOut`, not at the half-way tap `audioOut`
94
+ * names. A document that leaves the second section unused (its input on ground, or not named)
95
+ * is not chained and resolves by `audioOut` exactly as before.
96
+ *
97
+ * Absent for every part that has one section, and nothing about those changes.
98
+ */
99
+ readonly cascade?: {
100
+ readonly sectionOut: readonly string[];
101
+ readonly nextIn: readonly string[];
102
+ readonly finalOut: readonly string[];
103
+ };
86
104
  /**
87
105
  * Aliases for the terminal whose network derives the `parameter` port, if the part has one.
88
106
  *
@@ -168,6 +186,22 @@ export declare function pinoutMatches(pinout: PartPinout, terminalRoles: readonl
168
186
  import type { FirmwareEvidence } from "./firmware-class";
169
187
  import type { TerminalProfile } from "./terminal-role";
170
188
  import type { ProxyDeclaration } from "./proxy-declaration";
189
+ /**
190
+ * One provisional parameter an entry's law carries: the registry parameter name and
191
+ * the `community` source URL its value was taken from.
192
+ *
193
+ * Stamped by the `registry-data` builders (`bjtLawEntry`, `diodeLawEntry`,
194
+ * `fetLawEntry`, the op-amp gain-bandwidth and output-swing passes) from the record's
195
+ * `community`-basis parameters, so the compiler can name every device that runs on a
196
+ * provisional value without importing any part data. Absent or empty means the entry
197
+ * carries no provisional value.
198
+ */
199
+ export type ProvisionalParam = {
200
+ /** The registry parameter name, e.g. `saturationCurrent`. */
201
+ readonly name: string;
202
+ /** The community source URL the value was taken from. */
203
+ readonly url: string;
204
+ };
171
205
  export type PartEntry = {
172
206
  /** Matched whole and case-folded against a device's part number. */
173
207
  readonly partIds: readonly string[];
@@ -187,6 +221,27 @@ export type PartEntry = {
187
221
  * reproduce. Absent means the entry asserts it models the part.
188
222
  */
189
223
  readonly proxy?: ProxyDeclaration;
224
+ /**
225
+ * **Provisional parameters this entry's law carries.** Each names a registry
226
+ * parameter whose value came from a `community` source, with that source's URL.
227
+ * See `ProvisionalParam`. Absent or empty means the entry carries no provisional
228
+ * value, and nothing about the entry changes: the law stamps exactly as before.
229
+ */
230
+ readonly provisionalParams?: readonly ProvisionalParam[];
231
+ /**
232
+ * **The registry parameters the source record states, by schema name.** The wave-1
233
+ * builders gap-fill every law field a record leaves out with the class default the
234
+ * unregistered path stamps, so the law alone cannot say which numbers a source supplied:
235
+ * `2SC1815` states `forwardBeta` only and its `saturationCurrent` is the bjt class
236
+ * default, repeated by value. This names the ones a source did state, so a warning about
237
+ * defaults can tell a registered value from a gap-fill.
238
+ *
239
+ * Absent means the entry's author stated the whole law (a hand-built entry, a fixture),
240
+ * and every field counts as stated. Present, it is exhaustive: a name not listed is a
241
+ * gap-fill. Provisional (`community`) parameters are listed, since they are stated; the
242
+ * provisional warning names them separately.
243
+ */
244
+ readonly citedParams?: readonly string[];
190
245
  /**
191
246
  * **Whether this chip's behaviour comes from a program — typed, with positive evidence.**
192
247
  * Absent means `undetermined`, which is **not** a scope boundary. See `firmware-class.ts`: the
@@ -207,6 +262,20 @@ export type PartEntry = {
207
262
  * Absent means no datasheet figure is recorded, and the part draws nothing, as before.
208
263
  */
209
264
  readonly quiescentSupplyAmps?: number;
265
+ /**
266
+ * **A charge pump's fixed open-circuit shortfall below ideal inversion, in volts,
267
+ * from its datasheet.**
268
+ *
269
+ * Present only on single-section `voltage-source` entries that model a
270
+ * switched-capacitor inverter: the derived rail is
271
+ * `-(inputVolts) - sign * chargePumpLossVolts` with the section law's `sourceOhms`
272
+ * carrying the load-dependent drop (see `pumpDerivation` in `device-laws.ts`).
273
+ * The CMOS 7660 family prints ~99.9% open-circuit conversion efficiency and so
274
+ * carries 0; the LT1054 prints a loss table (0.35 V TYP at 10 mA, TI SLVS033G p5)
275
+ * and carries that. Absent means the entry is not a pump model and the derivation
276
+ * never reads it.
277
+ */
278
+ readonly chargePumpLossVolts?: number;
210
279
  /**
211
280
  * **What each terminal IS, with per-terminal evidence.** Absent means `unpopulated`, which is a
212
281
  * correct state rather than a gap: a consumer that needs audio terminals must fall back to
@@ -313,17 +382,35 @@ export declare function foldToken(value: string | undefined | null): string;
313
382
  * a silent one is what let every amp in the corpus run a 6V6 fit.
314
383
  */
315
384
  export declare function registryLawFor(registry: PartRegistry, partNumber: string | null, lawKind: DeviceLaw["kind"]): DeviceLaw | null;
385
+ /** A part's printed output swing, as the registry states it. See `DeviceLaw` `outputSwingDropHighVolts`. */
386
+ export type OpampOutputSwing = {
387
+ readonly highVolts: number;
388
+ readonly lowVolts: number;
389
+ readonly printed: NonNullable<Extract<DeviceLaw, {
390
+ kind: "ideal-opamp";
391
+ }>["outputSwingPrinted"]>;
392
+ };
393
+ /**
394
+ * The output-swing pair, with the condition it was printed at, from an `ideal-opamp` law, or `null`
395
+ * when the law states none. **Both of the pair or neither, and the printed condition exactly when the
396
+ * pair is**: a law that states a half, or a pair with no condition, or a condition with no pair, is a
397
+ * table error and throws, naming the part. Nothing here guesses a missing side from the other.
398
+ */
399
+ export declare function opampOutputSwingOf(law: Extract<DeviceLaw, {
400
+ kind: "ideal-opamp";
401
+ }>, partId: string): OpampOutputSwing | null;
316
402
  /**
317
- * How far a part's output stops short of each supply rail, from the registry entry that names
318
- * it, or `null` when the part is not in the registry or states none (the rails are then used as
319
- * they are). Read from either an `ideal-opamp` law entry or the first section of a `sections`
320
- * entry, because a declared `opamp` device never reaches the section lowering.
403
+ * How far a part's output stops short of each supply rail, as its datasheet prints it, from the
404
+ * registry entry that names it by exact folded part id, or `null` when the part is not in the registry
405
+ * or its entry states none (the rails are then used as they are). Read from either an `ideal-opamp` law
406
+ * entry or the first section of a `sections` entry, because a declared `opamp` device never reaches the
407
+ * section lowering. Throws on a half-stated pair (`opampOutputSwingOf`).
321
408
  */
322
- export declare function registryOpampSwingDrop(registry: PartRegistry, partNumber: string | null): number | null;
409
+ export declare function registryOpampSwing(registry: PartRegistry, partNumber: string | null): OpampOutputSwing | null;
323
410
  /**
324
411
  * The gain-bandwidth product, in hertz, that a part's datasheet states, from the registry entry
325
412
  * that names it by exact part id, or `null` when the part is not in the registry or its entry states
326
- * none. Read the same way as `registryOpampSwingDrop` -- from an `ideal-opamp` law entry or the first
413
+ * none. Read the same way as `registryOpampSwing` -- from an `ideal-opamp` law entry or the first
327
414
  * section of a `sections` entry -- and for the same reason: a declared `opamp` device never reaches
328
415
  * the section lowering, so this is the only door through which the catalog's figure reaches it.
329
416
  *
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAA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uFAAuF;AACvF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAKlE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAC7B,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,GACxB,SAAS,GAAG,IAAI,CAclB;AAED,4GAA4G;AAC5G,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE;QAAE,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC;CACjG,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,GAAG,EAAE,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC,EAChD,MAAM,EAAE,MAAM,GACZ,gBAAgB,GAAG,IAAI,CA0BzB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,MAAM,GAAG,IAAI,GACvB,gBAAgB,GAAG,IAAI,CAoBzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACzC,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,MAAM,GAAG,IAAI,GACvB,MAAM,GAAG,IAAI,CAoBf"}
package/dist/registry.js CHANGED
@@ -164,12 +164,40 @@ export function registryLawFor(registry, partNumber, lawKind) {
164
164
  return null;
165
165
  }
166
166
  /**
167
- * How far a part's output stops short of each supply rail, from the registry entry that names
168
- * it, or `null` when the part is not in the registry or states none (the rails are then used as
169
- * they are). Read from either an `ideal-opamp` law entry or the first section of a `sections`
170
- * entry, because a declared `opamp` device never reaches the section lowering.
167
+ * The output-swing pair, with the condition it was printed at, from an `ideal-opamp` law, or `null`
168
+ * when the law states none. **Both of the pair or neither, and the printed condition exactly when the
169
+ * pair is**: a law that states a half, or a pair with no condition, or a condition with no pair, is a
170
+ * table error and throws, naming the part. Nothing here guesses a missing side from the other.
171
171
  */
172
- export function registryOpampSwingDrop(registry, partNumber) {
172
+ export function opampOutputSwingOf(law, partId) {
173
+ const high = law.outputSwingDropHighVolts;
174
+ const low = law.outputSwingDropLowVolts;
175
+ const printed = law.outputSwingPrinted;
176
+ if (high === undefined && low === undefined && printed === undefined) {
177
+ return null;
178
+ }
179
+ if (high === undefined || low === undefined || printed === undefined) {
180
+ throw new Error(`${partId}: an op-amp output swing is a pair with its printed condition, both sides and the condition or none ` +
181
+ `(outputSwingDropHighVolts ${String(high)}, outputSwingDropLowVolts ${String(low)}, outputSwingPrinted ${printed === undefined ? "absent" : "present"})`);
182
+ }
183
+ const finitePositive = (value) => Number.isFinite(value) && value > 0;
184
+ if (!finitePositive(high) ||
185
+ !finitePositive(low) ||
186
+ !finitePositive(printed.supplyVolts) ||
187
+ !finitePositive(printed.loadOhms) ||
188
+ (printed.translation !== "constant" && printed.translation !== "proportional")) {
189
+ throw new Error(`${partId}: an op-amp output swing needs finite positive drops, supply and load and a translation of "constant" or "proportional"`);
190
+ }
191
+ return { highVolts: high, lowVolts: low, printed };
192
+ }
193
+ /**
194
+ * How far a part's output stops short of each supply rail, as its datasheet prints it, from the
195
+ * registry entry that names it by exact folded part id, or `null` when the part is not in the registry
196
+ * or its entry states none (the rails are then used as they are). Read from either an `ideal-opamp` law
197
+ * entry or the first section of a `sections` entry, because a declared `opamp` device never reaches the
198
+ * section lowering. Throws on a half-stated pair (`opampOutputSwingOf`).
199
+ */
200
+ export function registryOpampSwing(registry, partNumber) {
173
201
  if (partNumber === null) {
174
202
  return null;
175
203
  }
@@ -184,7 +212,7 @@ export function registryOpampSwingDrop(registry, partNumber) {
184
212
  ? entry.model.sections[0]?.law
185
213
  : undefined;
186
214
  if (law !== undefined && law.kind === "ideal-opamp") {
187
- return law.outputSwingDropVolts ?? null;
215
+ return opampOutputSwingOf(law, partNumber);
188
216
  }
189
217
  }
190
218
  return null;
@@ -192,7 +220,7 @@ export function registryOpampSwingDrop(registry, partNumber) {
192
220
  /**
193
221
  * The gain-bandwidth product, in hertz, that a part's datasheet states, from the registry entry
194
222
  * that names it by exact part id, or `null` when the part is not in the registry or its entry states
195
- * none. Read the same way as `registryOpampSwingDrop` -- from an `ideal-opamp` law entry or the first
223
+ * none. Read the same way as `registryOpampSwing` -- from an `ideal-opamp` law entry or the first
196
224
  * section of a `sections` entry -- and for the same reason: a declared `opamp` device never reaches
197
225
  * the section lowering, so this is the only door through which the catalog's figure reaches it.
198
226
  *
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,EAAE;AACF,kFAAkF;AAClF,4EAA4E;AAC5E,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,mFAAmF;AACnF,4CAA4C;AAC5C,iFAAiF;AACjF,gFAAgF;AA6JhF;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC/B,aAAyC,EACzC,OAA0B;IAE1B,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CACrD,IAAI,KAAK,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAChD,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAE,OAAO,CAAC,CAAC,CAAY,CAAC,CAAC,C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BAA0B,CACzC,QAAsB,EACtB,UAAyB;IAEzB,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,EAAE,CAAC;YAC5D,SAAS;QACV,CAAC;QACD,MAAM,GAAG,GACR,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK;YACzB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;YACjB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU;gBAChC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG;gBAC9B,CAAC,CAAC,SAAS,CAAC;QACf,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;YACrD,OAAO,GAAG,CAAC,eAAe,IAAI,IAAI,CAAC;QACpC,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
package/dist/types.d.ts CHANGED
@@ -125,6 +125,43 @@ export type DeclaredWindingImpedance = Readonly<{
125
125
  across: readonly [number, number];
126
126
  ohms: number;
127
127
  }>;
128
+ /**
129
+ * An explicit device-parameter override block, as declared in a component's `properties`
130
+ * under the `DeviceOverride` key (stage 2).
131
+ *
132
+ * A `.vdsp` NAMES the part; the registry holds its parameters. This block states measured
133
+ * values that replace registry values for this device (`kind: "measured"`), or the full
134
+ * parameter set for a part the registry does not have (`kind: "custom"`). Parameter names
135
+ * are the part's own class-schema names (`CLASS_PARAM_SCHEMAS`), values are plain SI numbers
136
+ * with one value per parameter. Parsed and validated by `readDeviceOverride` in `netlist.ts`;
137
+ * this type is the validated shape that `device.parameters` merging and the
138
+ * `registry-override-applied` notice both read.
139
+ */
140
+ export type DeviceOverrideParameter = Readonly<{
141
+ /** A class-schema parameter name (checked against the part's class schema). */
142
+ readonly name: string;
143
+ /** The single SI number the engine uses. */
144
+ readonly value: number;
145
+ }>;
146
+ export type DeviceOverrideKind = "measured" | "custom";
147
+ export type DeviceOverrideProvenance = Readonly<{
148
+ readonly kind: DeviceOverrideKind;
149
+ /** What was measured, or which document the numbers come from. */
150
+ readonly source: string;
151
+ /** Instrument/procedure for `measured`; why the registry lacks the part for `custom`. */
152
+ readonly method: string;
153
+ /** Sitting date, ISO YYYY-MM-DD. */
154
+ readonly date: string;
155
+ /** A named person or organisation. */
156
+ readonly by: string;
157
+ /** Optional supply, temperature, current. */
158
+ readonly conditions?: string;
159
+ }>;
160
+ export type DeviceOverride = Readonly<{
161
+ readonly provenance: DeviceOverrideProvenance;
162
+ /** A list (not a mapping) so a duplicate name stays detectable. */
163
+ readonly parameters: readonly DeviceOverrideParameter[];
164
+ }>;
128
165
  export type Device = {
129
166
  readonly id: DeviceId;
130
167
  readonly kind: DeviceKind;
@@ -136,6 +173,15 @@ export type Device = {
136
173
  readonly control: ControlId | null;
137
174
  readonly identity: DeviceIdentity;
138
175
  readonly isLed?: boolean;
176
+ /**
177
+ * This device's explicit parameter override, as the source declared it under
178
+ * `properties.DeviceOverride`, or absent where it declares none. Validated at
179
+ * read time (unknown names, bad provenance and `custom` rule violations refuse
180
+ * the pedal); the merged values already sit in `parameters`, so this carries
181
+ * the provenance and the per-parameter record the `registry-override-applied`
182
+ * notice reports.
183
+ */
184
+ readonly deviceOverride?: DeviceOverride;
139
185
  /**
140
186
  * This device's id **within its package**, when the source split the package itself.
141
187
  *
@@ -255,8 +301,15 @@ export type DeclaredProgram = Readonly<{
255
301
  * `reverse-linear` is a real track the corpus declares (`klon-centaur`,
256
302
  * `vemuram-jan-ray`, `jhs-morning-glory`) and is not the same device as
257
303
  * `reverse-logarithmic`: the track is linear, only its direction is reversed.
304
+ *
305
+ * `s-curve` is Alpha's W(4B) and only that: the one S-curve a vendor sheet on file prints
306
+ * (RV16AF §2.4: 5-15 % at 90 degrees, 40-60 % at 150, 85-95 % at 210, of a 300-degree rotation).
307
+ * Any other S-curve is `custom` in the core format until a source prints its points.
308
+ *
309
+ * The runtime refuses a taper outside this list rather than reading it as linear, so a program
310
+ * naming a law a console does not implement stops at load instead of playing the wrong curve.
258
311
  */
259
- export type TaperKind = "linear" | "logarithmic" | "reverse-logarithmic" | "reverse-linear";
312
+ export type TaperKind = "linear" | "logarithmic" | "reverse-logarithmic" | "reverse-linear" | "s-curve";
260
313
  export type Control = {
261
314
  readonly id: ControlId;
262
315
  readonly taper: TaperKind;
@@ -363,6 +416,13 @@ export type PartIdentity = {
363
416
  readonly partId: string;
364
417
  readonly evidence: "exact-part" | "declared-type" | "pinout";
365
418
  };
419
+ /**
420
+ * How a printed op-amp output-swing pair is carried to a pedal whose supply is not the supply it
421
+ * was printed at (`DeviceLaw` `outputSwingPrinted`). A closed pair of words, compared whole:
422
+ * `"constant"` applies the printed drops as printed; `"proportional"` multiplies both by the
423
+ * op-amp's own supply span over the printed supply.
424
+ */
425
+ export type OpampOutputSwingTranslation = "constant" | "proportional";
366
426
  /** A lumped constitutive relation the solver can stamp into a matrix. */
367
427
  export type DeviceLaw = {
368
428
  readonly kind: "conductance";
@@ -888,14 +948,48 @@ export type DeviceLaw = {
888
948
  */
889
949
  readonly openLoopGain: number;
890
950
  /**
891
- * How far the output stops short of each supply rail, in volts. **A drop from the rail,
892
- * not an absolute swing**: the output clamps to `railLow + drop .. railHigh - drop`, so the
893
- * same figure is right on a 9 V pedal and an 18 V one. Absent means the part states none
894
- * and the rails are used as they are. The pedal still owns the rails; the part owns only how
895
- * close to them it gets. Symmetric, so it cannot say the LM358/LM324's asymmetric swing to
896
- * ground; those parts state none.
951
+ * How far the output stops short of the positive and of the negative supply rail, in volts,
952
+ * **as the part's datasheet prints it, at the condition it prints it at**
953
+ * (`outputSwingPrinted`). A drop from the rail, not an absolute swing: the output clamps to
954
+ * `railLow + low .. railHigh - high`. The pedal still owns the rails; the part owns only how
955
+ * close to them it gets, and the two sides are separate facts so a part that prints them
956
+ * separately (an LM358's swing to ground) can say so.
957
+ *
958
+ * **Both or neither**, and `outputSwingPrinted` exactly when the pair is: the catalog loader
959
+ * and `registryOpampSwing` throw on anything else. Absent means the part states none and the
960
+ * rails are used as they are (`opamp-law-default-parameters` names it). There is no single
961
+ * symmetric field: the one that was here carried a figure printed at +-15 V to a 9 V pedal
962
+ * without saying so.
963
+ *
964
+ * On a lowered law (a section of a resolved device) these stay the printed figures; what the
965
+ * lowering actually applied is `outputSwingCarried`.
966
+ */
967
+ readonly outputSwingDropHighVolts?: number;
968
+ readonly outputSwingDropLowVolts?: number;
969
+ /**
970
+ * The condition `outputSwingDropHighVolts`/`outputSwingDropLowVolts` were printed at, and how
971
+ * they are carried to a pedal on another supply: `supplyVolts` is the **total** supply of the
972
+ * printed row (30 for +-15 V), `loadOhms` the printed load, `translation` the owner's stated
973
+ * reading of the datasheet. `"constant"` applies the printed drops as printed;
974
+ * `"proportional"` scales both by `(railHigh - railLow) / supplyVolts`. Evidence status is
975
+ * part of the choice and lives in the table row's `source`, never in this field.
976
+ */
977
+ readonly outputSwingPrinted?: {
978
+ readonly supplyVolts: number;
979
+ readonly loadOhms: number;
980
+ readonly translation: OpampOutputSwingTranslation;
981
+ };
982
+ /**
983
+ * Set by the lowering, only on a lowered law, and only when it moved the rails: the drops it
984
+ * applied (after `translation`) and the supply span of the op-amp they were applied to. Read
985
+ * by `opamp-law-default-parameters` to tell a pair carried across a supply from one used at
986
+ * the supply it was printed at.
897
987
  */
898
- readonly outputSwingDropVolts?: number;
988
+ readonly outputSwingCarried?: {
989
+ readonly highVolts: number;
990
+ readonly lowVolts: number;
991
+ readonly circuitSupplyVolts: number;
992
+ };
899
993
  /**
900
994
  * Gain-bandwidth product in hertz: where a single-pole part's open-loop gain falls to
901
995
  * unity, so its dominant pole sits at `gainBandwidthHz / openLoopGain`. A closed-loop
@@ -1021,6 +1115,28 @@ export type DeviceLaw = {
1021
1115
  readonly pullDownOhms: number;
1022
1116
  readonly floatOhms: number;
1023
1117
  readonly sensitivity: number;
1118
+ } | {
1119
+ /**
1120
+ * Unijunction transistor: an interbase bar (B2 to B1) with the emitter
1121
+ * diode tapped at a fraction `eta` of the bar, plus conductivity
1122
+ * modulation that makes the emitter see negative resistance once fired.
1123
+ *
1124
+ * The bar split and the tap are the part's facts (this law). The snap
1125
+ * itself has no lowering yet: it needs a hysteretic switch stamp
1126
+ * (once-per-sample evaluation, no Newton involvement), so until that
1127
+ * stamp exists no device resolves to this law and `lower.ts` refuses
1128
+ * one that does. The shape is kept so the registry contract, the
1129
+ * override vocabulary and the builder below have a law to target.
1130
+ */
1131
+ readonly kind: "ujt";
1132
+ /**
1133
+ * Intrinsic standoff ratio eta, dimensionless, strictly between 0 and 1:
1134
+ * the fraction of the interbase voltage that appears at the tap with the
1135
+ * emitter open. RB1 = eta * Rbb, RB2 = (1 - eta) * Rbb.
1136
+ */
1137
+ readonly intrinsicStandoffRatio: number;
1138
+ /** Interbase resistance Rbb in ohms, B1 to B2 with the emitter open. */
1139
+ readonly interbaseResistanceOhms: number;
1024
1140
  };
1025
1141
  /** A region the compiler does not solve. Exists only when the registry fills it. */
1026
1142
  export type MacroModel = {
@@ -1156,7 +1272,7 @@ export type MacroClockControl = {
1156
1272
  * `electrically-isolated` has its own dedicated warning (`electrically-isolated-ic`) and is
1157
1273
  * tagged only so `findIcsNotExecuted` can exclude it by the decision rather than by guessing.
1158
1274
  */
1159
- export type OpenIcReason = "source-boundary-shell" | "registry-arity-mismatch" | "electrically-isolated" | "charge-pump-declared-rail" | "registry-open" | "declared-class-without-model";
1275
+ export type OpenIcReason = "source-boundary-shell" | "registry-arity-mismatch" | "electrically-isolated" | "charge-pump-declared-rail" | "charge-pump-no-input" | "charge-pump-output-unloaded" | "registry-open" | "declared-class-without-model";
1160
1276
  /**
1161
1277
  * Which phase-3 bucket an unmodelled core belongs in (board-p3 row 1).
1162
1278
  *
@@ -2808,6 +2924,10 @@ export type RailWithoutVoltageWarning = {
2808
2924
  * **What it does not claim.** Not that the source is wrong: a packet may leave a JFET untyped on
2809
2925
  * purpose, because the datasheet prints only grade limits (the 2N5952 case). The claim is only
2810
2926
  * that the stamped values came from the consumer, not the source.
2927
+ *
2928
+ * **Per parameter, and registry-aware**, as `BjtLawDefaultWarning`: a registered part whose
2929
+ * record states only its gate (`2SK30A`) still runs Vt0 and Beta on the class default and is
2930
+ * named for them; one whose record states them is not.
2811
2931
  */
2812
2932
  export type FetLawDefaultWarning = {
2813
2933
  readonly code: "fet-law-default-parameters";
@@ -2829,6 +2949,13 @@ export type FetLawDefaultWarning = {
2829
2949
  * **What it does not claim.** Not that the source is wrong: most corpus BJTs predate any
2830
2950
  * typed parameter, and a packet may leave one untyped because its datasheet prints only a
2831
2951
  * beta bin. The claim is only that the stamped values came from the consumer, not the source.
2952
+ *
2953
+ * **Per parameter, and registry-aware.** A device is named only for a parameter that really
2954
+ * runs on the class default: one the document does not type and the registry record for its
2955
+ * exact part does not state (`PartEntry.citedParams`). A record that states BF alone leaves
2956
+ * IS on the default and is named for IS alone; a record that states both is not named.
2957
+ * Before this, a registered part was named whatever its record held, so a count of these
2958
+ * warnings overstated how many pedals run on defaults.
2832
2959
  */
2833
2960
  export type BjtLawDefaultWarning = {
2834
2961
  readonly code: "bjt-law-default-parameters";
@@ -2837,24 +2964,120 @@ export type BjtLawDefaultWarning = {
2837
2964
  readonly detail: string;
2838
2965
  };
2839
2966
  /**
2840
- * Op-amps whose output runs the full supply, because the part states no distance it stops short
2841
- * of the rails (`outputSwingDropVolts`). One warning per document, naming every such device.
2967
+ * A device whose law runs on at least one provisional `community` registry value,
2968
+ * because no datasheet, manufacturer model or owner measurement states it.
2969
+ *
2970
+ * **Why it is named.** A community value is a published number, not a measured fact
2971
+ * about the part: a SPICE model fit at other currents, or one author's bench reading.
2972
+ * The pedal still renders -- this is a notice, not a refusal -- but a reader quoting
2973
+ * the render is entitled to know which parts of it rest on provisional values and
2974
+ * where those values can be checked. Adding a better source for the same parameter
2975
+ * of the same part throws until the community record is removed, so this warning can
2976
+ * only ever name values nothing better has replaced.
2977
+ *
2978
+ * **What it does not claim.** Not that the value is wrong: only that it is
2979
+ * provisional. A device whose document types the parameter runs on its own typed
2980
+ * value instead and is not listed for that parameter.
2981
+ */
2982
+ export type RegistryProvisionalValueWarning = {
2983
+ readonly code: "registry-provisional-value";
2984
+ readonly device: DeviceId;
2985
+ /** The part number as the source authored it. */
2986
+ readonly partNumber: string | null;
2987
+ /** The registry parameter names this device took from community values. */
2988
+ readonly parameters: readonly string[];
2989
+ /** The distinct community source URLs those values were taken from. */
2990
+ readonly urls: readonly string[];
2991
+ readonly detail: string;
2992
+ };
2993
+ /**
2994
+ * A device parameter the source still types under its legacy spelling (`Aol`, `IS`, `BF`,
2995
+ * `Vt0`, `Beta`, `GBP`, `EmissionCoefficient`, ...), which the compiler still reads while
2996
+ * the artifacts migration to explicit `DeviceOverride` blocks is in flight. One warning per
2997
+ * device, naming every legacy key present.
2998
+ *
2999
+ * **Why it is named.** The end state (stage 4) reads device parameters from no other property:
3000
+ * a legacy key the migration drops without converting silently changes the program (or, for
3001
+ * keys the compiler never read, silently changes nothing while looking like it did). Naming
3002
+ * every still-read legacy key per device is the migration checklist, and the `overridden`
3003
+ * subset says which ones an override block already supersedes. REMOVAL of legacy reading is
3004
+ * stage 4, not this task: this warning is additive and changes no program.
3005
+ */
3006
+ export type LegacyDeviceParameterWarning = {
3007
+ readonly code: "legacy-device-parameter";
3008
+ readonly device: DeviceId;
3009
+ /** Every legacy typed device-parameter key present on the component, as authored. */
3010
+ readonly keys: readonly string[];
3011
+ /** The subset an explicit override block supersedes (the override value wins). */
3012
+ readonly overridden: readonly string[];
3013
+ readonly detail: string;
3014
+ };
3015
+ /**
3016
+ * One applied explicit parameter override: the device's values that came from its
3017
+ * `DeviceOverride` block rather than the registry or a class default. One notice per device,
3018
+ * so a player can show "measured by ... on ..." beside the part.
3019
+ *
3020
+ * A notice, never a refusal: the values already stamped (precedence override > legacy typed
3021
+ * key > registry > class default). `registryValue` is `null` when no registry value was
3022
+ * replaced -- either the part has no entry, or the entry states no such parameter -- and
3023
+ * `detail` says which.
3024
+ */
3025
+ export type RegistryOverrideAppliedWarning = {
3026
+ readonly code: "registry-override-applied";
3027
+ readonly device: DeviceId;
3028
+ /** The part number as the source authored it (null when the device names none). */
3029
+ readonly partNumber: string | null;
3030
+ /** Per overridden parameter: what the override states and what it replaced. */
3031
+ readonly items: readonly {
3032
+ readonly parameter: string;
3033
+ readonly overrideValue: number;
3034
+ readonly registryValue: number | null;
3035
+ }[];
3036
+ readonly provenance: DeviceOverrideProvenance;
3037
+ readonly detail: string;
3038
+ };
3039
+ /**
3040
+ * Why one op-amp is named by `opamp-law-default-parameters`. `not-stated`: the part states no
3041
+ * output-swing pair, so the output runs the full supply. `stated-at-other-supply`: the part's
3042
+ * datasheet prints a pair, but at a supply other than this pedal's, and the lowering carried it
3043
+ * across by the row's stated `translation`; `printedSupplyVolts` is the row's total supply and
3044
+ * `circuitSupplyVolts` the span of the op-amp it was carried to.
3045
+ */
3046
+ export type OpampLawDefaultItem = {
3047
+ readonly device: DeviceId;
3048
+ readonly reason: "not-stated";
3049
+ } | {
3050
+ readonly device: DeviceId;
3051
+ readonly reason: "stated-at-other-supply";
3052
+ readonly printedSupplyVolts: number;
3053
+ readonly circuitSupplyVolts: number;
3054
+ };
3055
+ /**
3056
+ * Op-amps whose output swing the compiler could not take from the part at this pedal's supply:
3057
+ * either the part states no distance it stops short of the rails (`outputSwingDropHighVolts` /
3058
+ * `outputSwingDropLowVolts`), or it states one printed at another supply and the lowering carried it.
3059
+ * One warning per document, naming every such device with a typed reason (`items`); `devices` is
3060
+ * the same list without the reason.
2842
3061
  *
2843
3062
  * **Why it is named.** No real op-amp reaches its rails. `mxr-phase-90` read WEAK 79.6 deg on
2844
3063
  * rail-to-rail TL062s and SWEEPING 106.0 deg once they stopped 1.2 V short of each rail
2845
- * (packet-study/mxr-phase-90, 2026-09-29), and three simulators agreed on the wrong answer
2846
- * because the oracle deck follows the program's rails. A comparator or LFO near the rails, or a
2847
- * clipper, is decided by this number.
3064
+ * (packet-study/mxr-phase-90, 2026-09-29), and three simulators agreed on the wrong answer because
3065
+ * the oracle deck follows the program's rails. A comparator or LFO near the rails, or a clipper, is
3066
+ * decided by this number. Almost every printed swing row is at +-15 V and almost every pedal runs
3067
+ * at 9 V, so a figure carried across the supply is a choice the part's datasheet does not make; the
3068
+ * second reason names it instead of hiding it.
2848
3069
  *
2849
3070
  * **What it does not claim.** Not that the source is wrong, and not that the stamped rails are
2850
- * wrong for a circuit that never nears them; a unity-gain buffer at low level is untouched.
2851
- * The claim is only that the swing came from the consumer's default (the supply), not the part.
2852
- * LM358, LM324 and TL022 are listed until an asymmetric swing can be stated.
3071
+ * wrong for a circuit that never nears them; a unity-gain buffer at low level is untouched. The
3072
+ * claim is only that the swing came from the consumer's default (the supply) or from a datasheet
3073
+ * row carried across a supply, not from a figure printed for this pedal. LM358, LM324 and TL022 are
3074
+ * listed until a row for them is typed.
2853
3075
  */
2854
3076
  export type OpampLawDefaultWarning = {
2855
3077
  readonly code: "opamp-law-default-parameters";
2856
3078
  readonly device: null;
2857
3079
  readonly devices: readonly DeviceId[];
3080
+ readonly items: readonly OpampLawDefaultItem[];
2858
3081
  readonly detail: string;
2859
3082
  };
2860
3083
  /**
@@ -3048,7 +3271,7 @@ export type GenericTubeFitWarning = {
3048
3271
  * whose source explicitly records the marking as unknown, has nothing for this stage to have
3049
3272
  * failed to read and is silent. This fires only where the source states something: a part marking
3050
3273
  * whose law is not derivable here (`W20`, `Boss-G-taper`, `BH`), or a taper core's format supports
3051
- * and this runtime has no curve for (`s-curve`, `stepped`, `custom`).
3274
+ * and this runtime has no curve for (`stepped`, `custom`).
3052
3275
  *
3053
3276
  * Measured 2026-09-03: 69 of the corpus's 608 declared tapers fell through to linear, and all 69
3054
3277
  * did it silently. An audio pot rendered linear is audible across the whole knob sweep, which is
@@ -3123,7 +3346,7 @@ export type PowerDomainControlWarning = {
3123
3346
  readonly device: DeviceId;
3124
3347
  readonly detail: string;
3125
3348
  };
3126
- export type CompileWarning = UnroutableThrowWarning | GenericSpeakerProfileWarning | LedgerDivergenceWarning | GenericTubeFitWarning | InertControlWarning | UnboundedOpampWarning | SupplyShortWarning | TaperNotExecutableWarning | OverDrivenNodeWarning | DanglingActiveTerminalWarning | ClockDriverSupplyAtGroundWarning | NonExecutableClockDriverWarning | NonExecutableSupportShellWarning | UnconnectedBehaviorComponentWarning | UnreadableTerminalRoleWarning | UnverifiedPinoutBindingWarning | PowerDomainControlWarning | UnimplementedControlRoleWarning | UnimplementedDeviceLawWarning | ElectricallyIsolatedIcWarning | RailWithoutVoltageWarning | FetLawDefaultWarning | BjtLawDefaultWarning | OpampLawDefaultWarning | OpampGainBandwidthDefaultWarning | IcNotExecutedWarning | OutputPortUnreachableWarning | InterfaceOrSourceOnlyWarning | NotPopulatedWarning | NotPopulatedWithoutValueWarning | UnsupportedComponentWarning | UnexecutedActiveRegionWarning | OutputPortNotTransformerCoupledWarning | NoOutputTransformerWarning | DeclaredDelayWarning | ControlPositionDisagreesWarning | BypassEngagedDisagreesWarning | ModulationNotModelledWarning | ConverterScaleNotModelledWarning;
3349
+ export type CompileWarning = UnroutableThrowWarning | GenericSpeakerProfileWarning | LedgerDivergenceWarning | GenericTubeFitWarning | InertControlWarning | UnboundedOpampWarning | SupplyShortWarning | TaperNotExecutableWarning | OverDrivenNodeWarning | DanglingActiveTerminalWarning | ClockDriverSupplyAtGroundWarning | NonExecutableClockDriverWarning | NonExecutableSupportShellWarning | UnconnectedBehaviorComponentWarning | UnreadableTerminalRoleWarning | UnverifiedPinoutBindingWarning | PowerDomainControlWarning | UnimplementedControlRoleWarning | UnimplementedDeviceLawWarning | ElectricallyIsolatedIcWarning | RailWithoutVoltageWarning | FetLawDefaultWarning | BjtLawDefaultWarning | RegistryProvisionalValueWarning | LegacyDeviceParameterWarning | RegistryOverrideAppliedWarning | OpampLawDefaultWarning | OpampGainBandwidthDefaultWarning | IcNotExecutedWarning | OutputPortUnreachableWarning | InterfaceOrSourceOnlyWarning | NotPopulatedWarning | NotPopulatedWithoutValueWarning | UnsupportedComponentWarning | UnexecutedActiveRegionWarning | OutputPortNotTransformerCoupledWarning | NoOutputTransformerWarning | DeclaredDelayWarning | ControlPositionDisagreesWarning | BypassEngagedDisagreesWarning | ModulationNotModelledWarning | ConverterScaleNotModelledWarning;
3127
3350
  /**
3128
3351
  * A composed program that touches a data converter but runs unity in volts, because one side's
3129
3352
  * converter is unwired, ambiguous, or has no cited full scale. See `converter-scale.ts`: the