@vessel-dsp/compiler 0.5.0 → 0.6.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 +4 -2
- package/dist/bbd-clock.d.ts.map +1 -1
- package/dist/bbd-clock.js +5 -0
- package/dist/bbd-clock.js.map +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +261 -12
- package/dist/compile.js.map +1 -1
- package/dist/device-laws.d.ts.map +1 -1
- package/dist/device-laws.js +541 -97
- package/dist/device-laws.js.map +1 -1
- package/dist/fixtures/circuits.d.ts +23 -2
- package/dist/fixtures/circuits.d.ts.map +1 -1
- package/dist/fixtures/circuits.js +205 -2
- package/dist/fixtures/circuits.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/netlist.d.ts +30 -0
- package/dist/netlist.d.ts.map +1 -1
- package/dist/netlist.js +488 -8
- package/dist/netlist.js.map +1 -1
- package/dist/part-catalog.d.ts +35 -18
- package/dist/part-catalog.d.ts.map +1 -1
- package/dist/part-catalog.js +2474 -592
- package/dist/part-catalog.js.map +1 -1
- package/dist/registry-data/bjt.d.ts +3 -0
- package/dist/registry-data/bjt.d.ts.map +1 -0
- package/dist/registry-data/bjt.js +1350 -0
- package/dist/registry-data/bjt.js.map +1 -0
- package/dist/registry-data/charge-pump.d.ts +3 -0
- package/dist/registry-data/charge-pump.d.ts.map +1 -0
- package/dist/registry-data/charge-pump.js +204 -0
- package/dist/registry-data/charge-pump.js.map +1 -0
- package/dist/registry-data/diode.d.ts +3 -0
- package/dist/registry-data/diode.d.ts.map +1 -0
- package/dist/registry-data/diode.js +683 -0
- package/dist/registry-data/diode.js.map +1 -0
- package/dist/registry-data/index.d.ts +20 -0
- package/dist/registry-data/index.d.ts.map +1 -0
- package/dist/registry-data/index.js +100 -0
- package/dist/registry-data/index.js.map +1 -0
- package/dist/registry-data/jfet.d.ts +3 -0
- package/dist/registry-data/jfet.d.ts.map +1 -0
- package/dist/registry-data/jfet.js +605 -0
- package/dist/registry-data/jfet.js.map +1 -0
- package/dist/registry-data/loader.d.ts +137 -0
- package/dist/registry-data/loader.d.ts.map +1 -0
- package/dist/registry-data/loader.js +350 -0
- package/dist/registry-data/loader.js.map +1 -0
- package/dist/registry-data/mosfet.d.ts +3 -0
- package/dist/registry-data/mosfet.d.ts.map +1 -0
- package/dist/registry-data/mosfet.js +63 -0
- package/dist/registry-data/mosfet.js.map +1 -0
- package/dist/registry-data/opamp.d.ts +37 -0
- package/dist/registry-data/opamp.d.ts.map +1 -0
- package/dist/registry-data/opamp.js +669 -0
- package/dist/registry-data/opamp.js.map +1 -0
- package/dist/registry-data/regulator.d.ts +3 -0
- package/dist/registry-data/regulator.d.ts.map +1 -0
- package/dist/registry-data/regulator.js +189 -0
- package/dist/registry-data/regulator.js.map +1 -0
- package/dist/registry-data/schema.d.ts +56 -0
- package/dist/registry-data/schema.d.ts.map +1 -0
- package/dist/registry-data/schema.js +142 -0
- package/dist/registry-data/schema.js.map +1 -0
- package/dist/registry-data/zener.d.ts +3 -0
- package/dist/registry-data/zener.d.ts.map +1 -0
- package/dist/registry-data/zener.js +547 -0
- package/dist/registry-data/zener.js.map +1 -0
- package/dist/registry.d.ts +61 -6
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +35 -7
- package/dist/registry.js.map +1 -1
- package/dist/types.d.ts +209 -19
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/registry.d.ts.map
CHANGED
|
@@ -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,S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AO,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
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
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
|
|
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
|
|
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 `
|
|
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
|
*
|
package/dist/registry.js.map
CHANGED
|
@@ -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,CA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/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
|
|
892
|
-
*
|
|
893
|
-
*
|
|
894
|
-
*
|
|
895
|
-
* close to them it gets
|
|
896
|
-
* ground
|
|
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
|
|
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
|
|
@@ -1156,7 +1250,7 @@ export type MacroClockControl = {
|
|
|
1156
1250
|
* `electrically-isolated` has its own dedicated warning (`electrically-isolated-ic`) and is
|
|
1157
1251
|
* tagged only so `findIcsNotExecuted` can exclude it by the decision rather than by guessing.
|
|
1158
1252
|
*/
|
|
1159
|
-
export type OpenIcReason = "source-boundary-shell" | "registry-arity-mismatch" | "electrically-isolated" | "charge-pump-declared-rail" | "registry-open" | "declared-class-without-model";
|
|
1253
|
+
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
1254
|
/**
|
|
1161
1255
|
* Which phase-3 bucket an unmodelled core belongs in (board-p3 row 1).
|
|
1162
1256
|
*
|
|
@@ -2837,24 +2931,120 @@ export type BjtLawDefaultWarning = {
|
|
|
2837
2931
|
readonly detail: string;
|
|
2838
2932
|
};
|
|
2839
2933
|
/**
|
|
2840
|
-
*
|
|
2841
|
-
*
|
|
2934
|
+
* A device whose law runs on at least one provisional `community` registry value,
|
|
2935
|
+
* because no datasheet, manufacturer model or owner measurement states it.
|
|
2936
|
+
*
|
|
2937
|
+
* **Why it is named.** A community value is a published number, not a measured fact
|
|
2938
|
+
* about the part: a SPICE model fit at other currents, or one author's bench reading.
|
|
2939
|
+
* The pedal still renders -- this is a notice, not a refusal -- but a reader quoting
|
|
2940
|
+
* the render is entitled to know which parts of it rest on provisional values and
|
|
2941
|
+
* where those values can be checked. Adding a better source for the same parameter
|
|
2942
|
+
* of the same part throws until the community record is removed, so this warning can
|
|
2943
|
+
* only ever name values nothing better has replaced.
|
|
2944
|
+
*
|
|
2945
|
+
* **What it does not claim.** Not that the value is wrong: only that it is
|
|
2946
|
+
* provisional. A device whose document types the parameter runs on its own typed
|
|
2947
|
+
* value instead and is not listed for that parameter.
|
|
2948
|
+
*/
|
|
2949
|
+
export type RegistryProvisionalValueWarning = {
|
|
2950
|
+
readonly code: "registry-provisional-value";
|
|
2951
|
+
readonly device: DeviceId;
|
|
2952
|
+
/** The part number as the source authored it. */
|
|
2953
|
+
readonly partNumber: string | null;
|
|
2954
|
+
/** The registry parameter names this device took from community values. */
|
|
2955
|
+
readonly parameters: readonly string[];
|
|
2956
|
+
/** The distinct community source URLs those values were taken from. */
|
|
2957
|
+
readonly urls: readonly string[];
|
|
2958
|
+
readonly detail: string;
|
|
2959
|
+
};
|
|
2960
|
+
/**
|
|
2961
|
+
* A device parameter the source still types under its legacy spelling (`Aol`, `IS`, `BF`,
|
|
2962
|
+
* `Vt0`, `Beta`, `GBP`, `EmissionCoefficient`, ...), which the compiler still reads while
|
|
2963
|
+
* the artifacts migration to explicit `DeviceOverride` blocks is in flight. One warning per
|
|
2964
|
+
* device, naming every legacy key present.
|
|
2965
|
+
*
|
|
2966
|
+
* **Why it is named.** The end state (stage 4) reads device parameters from no other property:
|
|
2967
|
+
* a legacy key the migration drops without converting silently changes the program (or, for
|
|
2968
|
+
* keys the compiler never read, silently changes nothing while looking like it did). Naming
|
|
2969
|
+
* every still-read legacy key per device is the migration checklist, and the `overridden`
|
|
2970
|
+
* subset says which ones an override block already supersedes. REMOVAL of legacy reading is
|
|
2971
|
+
* stage 4, not this task: this warning is additive and changes no program.
|
|
2972
|
+
*/
|
|
2973
|
+
export type LegacyDeviceParameterWarning = {
|
|
2974
|
+
readonly code: "legacy-device-parameter";
|
|
2975
|
+
readonly device: DeviceId;
|
|
2976
|
+
/** Every legacy typed device-parameter key present on the component, as authored. */
|
|
2977
|
+
readonly keys: readonly string[];
|
|
2978
|
+
/** The subset an explicit override block supersedes (the override value wins). */
|
|
2979
|
+
readonly overridden: readonly string[];
|
|
2980
|
+
readonly detail: string;
|
|
2981
|
+
};
|
|
2982
|
+
/**
|
|
2983
|
+
* One applied explicit parameter override: the device's values that came from its
|
|
2984
|
+
* `DeviceOverride` block rather than the registry or a class default. One notice per device,
|
|
2985
|
+
* so a player can show "measured by ... on ..." beside the part.
|
|
2986
|
+
*
|
|
2987
|
+
* A notice, never a refusal: the values already stamped (precedence override > legacy typed
|
|
2988
|
+
* key > registry > class default). `registryValue` is `null` when no registry value was
|
|
2989
|
+
* replaced -- either the part has no entry, or the entry states no such parameter -- and
|
|
2990
|
+
* `detail` says which.
|
|
2991
|
+
*/
|
|
2992
|
+
export type RegistryOverrideAppliedWarning = {
|
|
2993
|
+
readonly code: "registry-override-applied";
|
|
2994
|
+
readonly device: DeviceId;
|
|
2995
|
+
/** The part number as the source authored it (null when the device names none). */
|
|
2996
|
+
readonly partNumber: string | null;
|
|
2997
|
+
/** Per overridden parameter: what the override states and what it replaced. */
|
|
2998
|
+
readonly items: readonly {
|
|
2999
|
+
readonly parameter: string;
|
|
3000
|
+
readonly overrideValue: number;
|
|
3001
|
+
readonly registryValue: number | null;
|
|
3002
|
+
}[];
|
|
3003
|
+
readonly provenance: DeviceOverrideProvenance;
|
|
3004
|
+
readonly detail: string;
|
|
3005
|
+
};
|
|
3006
|
+
/**
|
|
3007
|
+
* Why one op-amp is named by `opamp-law-default-parameters`. `not-stated`: the part states no
|
|
3008
|
+
* output-swing pair, so the output runs the full supply. `stated-at-other-supply`: the part's
|
|
3009
|
+
* datasheet prints a pair, but at a supply other than this pedal's, and the lowering carried it
|
|
3010
|
+
* across by the row's stated `translation`; `printedSupplyVolts` is the row's total supply and
|
|
3011
|
+
* `circuitSupplyVolts` the span of the op-amp it was carried to.
|
|
3012
|
+
*/
|
|
3013
|
+
export type OpampLawDefaultItem = {
|
|
3014
|
+
readonly device: DeviceId;
|
|
3015
|
+
readonly reason: "not-stated";
|
|
3016
|
+
} | {
|
|
3017
|
+
readonly device: DeviceId;
|
|
3018
|
+
readonly reason: "stated-at-other-supply";
|
|
3019
|
+
readonly printedSupplyVolts: number;
|
|
3020
|
+
readonly circuitSupplyVolts: number;
|
|
3021
|
+
};
|
|
3022
|
+
/**
|
|
3023
|
+
* Op-amps whose output swing the compiler could not take from the part at this pedal's supply:
|
|
3024
|
+
* either the part states no distance it stops short of the rails (`outputSwingDropHighVolts` /
|
|
3025
|
+
* `outputSwingDropLowVolts`), or it states one printed at another supply and the lowering carried it.
|
|
3026
|
+
* One warning per document, naming every such device with a typed reason (`items`); `devices` is
|
|
3027
|
+
* the same list without the reason.
|
|
2842
3028
|
*
|
|
2843
3029
|
* **Why it is named.** No real op-amp reaches its rails. `mxr-phase-90` read WEAK 79.6 deg on
|
|
2844
3030
|
* 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
|
-
*
|
|
2847
|
-
*
|
|
3031
|
+
* (packet-study/mxr-phase-90, 2026-09-29), and three simulators agreed on the wrong answer because
|
|
3032
|
+
* the oracle deck follows the program's rails. A comparator or LFO near the rails, or a clipper, is
|
|
3033
|
+
* decided by this number. Almost every printed swing row is at +-15 V and almost every pedal runs
|
|
3034
|
+
* at 9 V, so a figure carried across the supply is a choice the part's datasheet does not make; the
|
|
3035
|
+
* second reason names it instead of hiding it.
|
|
2848
3036
|
*
|
|
2849
3037
|
* **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
|
-
*
|
|
2852
|
-
*
|
|
3038
|
+
* wrong for a circuit that never nears them; a unity-gain buffer at low level is untouched. The
|
|
3039
|
+
* claim is only that the swing came from the consumer's default (the supply) or from a datasheet
|
|
3040
|
+
* row carried across a supply, not from a figure printed for this pedal. LM358, LM324 and TL022 are
|
|
3041
|
+
* listed until a row for them is typed.
|
|
2853
3042
|
*/
|
|
2854
3043
|
export type OpampLawDefaultWarning = {
|
|
2855
3044
|
readonly code: "opamp-law-default-parameters";
|
|
2856
3045
|
readonly device: null;
|
|
2857
3046
|
readonly devices: readonly DeviceId[];
|
|
3047
|
+
readonly items: readonly OpampLawDefaultItem[];
|
|
2858
3048
|
readonly detail: string;
|
|
2859
3049
|
};
|
|
2860
3050
|
/**
|
|
@@ -3048,7 +3238,7 @@ export type GenericTubeFitWarning = {
|
|
|
3048
3238
|
* whose source explicitly records the marking as unknown, has nothing for this stage to have
|
|
3049
3239
|
* failed to read and is silent. This fires only where the source states something: a part marking
|
|
3050
3240
|
* 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 (`
|
|
3241
|
+
* and this runtime has no curve for (`stepped`, `custom`).
|
|
3052
3242
|
*
|
|
3053
3243
|
* Measured 2026-09-03: 69 of the corpus's 608 declared tapers fell through to linear, and all 69
|
|
3054
3244
|
* did it silently. An audio pot rendered linear is audible across the whole knob sweep, which is
|
|
@@ -3123,7 +3313,7 @@ export type PowerDomainControlWarning = {
|
|
|
3123
3313
|
readonly device: DeviceId;
|
|
3124
3314
|
readonly detail: string;
|
|
3125
3315
|
};
|
|
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;
|
|
3316
|
+
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
3317
|
/**
|
|
3128
3318
|
* A composed program that touches a data converter but runs unity in volts, because one side's
|
|
3129
3319
|
* converter is unwired, ambiguous, or has no cited full scale. See `converter-scale.ts`: the
|