@vessel-dsp/compiler 0.2.0 → 0.4.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 +35 -228
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +8 -4
- package/dist/compile.js.map +1 -1
- package/dist/device-laws.d.ts.map +1 -1
- package/dist/device-laws.js +21 -5
- package/dist/device-laws.js.map +1 -1
- package/dist/fixtures/circuits.d.ts +21 -0
- package/dist/fixtures/circuits.d.ts.map +1 -1
- package/dist/fixtures/circuits.js +492 -0
- package/dist/fixtures/circuits.js.map +1 -1
- package/dist/fixtures/expected.d.ts +12 -8
- package/dist/fixtures/expected.d.ts.map +1 -1
- package/dist/fixtures/expected.js +12 -8
- package/dist/fixtures/expected.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/part-catalog.d.ts +8 -0
- package/dist/part-catalog.d.ts.map +1 -1
- package/dist/part-catalog.js +73 -0
- package/dist/part-catalog.js.map +1 -1
- package/dist/sparse-schedule.d.ts +51 -0
- package/dist/sparse-schedule.d.ts.map +1 -1
- package/dist/sparse-schedule.js +220 -0
- package/dist/sparse-schedule.js.map +1 -1
- package/package.json +1 -1
|
@@ -1453,6 +1453,498 @@ ${jacks} - id: VP
|
|
|
1453
1453
|
Description: "MN3007 delay memory switch."
|
|
1454
1454
|
wires: []
|
|
1455
1455
|
`;
|
|
1456
|
+
/**
|
|
1457
|
+
* A JFET whose gate, source and drain each sit on their own 1M/1M divider off 9 V,
|
|
1458
|
+
* so every terminal idles at 4.5 V and the channel (Vds = 0) carries nothing. The only
|
|
1459
|
+
* current in the circuit is the gate's own: each junction draws
|
|
1460
|
+
* `gateSaturationCurrent * softplus((0 - 0.5) / 0.06)` ~ 2.4 nA, and the two together
|
|
1461
|
+
* sag the 0.5M-thevenin gate divider ~2.4 mV while lifting the source/drain dividers
|
|
1462
|
+
* ~1.2 mV each. A voltmeter on the gate therefore reads the gate law directly.
|
|
1463
|
+
*
|
|
1464
|
+
* Unregistered, so this is the class default under test, not any part. The registered
|
|
1465
|
+
* twin below (`jfetGateLoadedDivider2SK30A`) is the same copper with a part number,
|
|
1466
|
+
* and the pair pins the per-part refinement: same dividers, no sag.
|
|
1467
|
+
*/
|
|
1468
|
+
export const jfetGateLoadedDivider = `${header("Gate-Loaded Divider Fixture")}components:
|
|
1469
|
+
${jacks} - id: VP
|
|
1470
|
+
kind: rail
|
|
1471
|
+
name: V_PLUS
|
|
1472
|
+
sourceTypeName: Circuit.Rail
|
|
1473
|
+
origin:
|
|
1474
|
+
x: 0
|
|
1475
|
+
y: -100
|
|
1476
|
+
rotation: 0
|
|
1477
|
+
flipped: false
|
|
1478
|
+
terminals:
|
|
1479
|
+
- name: terminal
|
|
1480
|
+
role: end
|
|
1481
|
+
node: 4
|
|
1482
|
+
position:
|
|
1483
|
+
x: 0
|
|
1484
|
+
y: -100
|
|
1485
|
+
properties:
|
|
1486
|
+
Voltage: "9"
|
|
1487
|
+
Description: "Divider supply."
|
|
1488
|
+
- id: RG1
|
|
1489
|
+
kind: resistor
|
|
1490
|
+
name: R_GATE_UPPER
|
|
1491
|
+
sourceTypeName: Circuit.Resistor
|
|
1492
|
+
origin:
|
|
1493
|
+
x: -60
|
|
1494
|
+
y: -50
|
|
1495
|
+
rotation: 0
|
|
1496
|
+
flipped: false
|
|
1497
|
+
terminals:
|
|
1498
|
+
- name: a
|
|
1499
|
+
node: 4
|
|
1500
|
+
position:
|
|
1501
|
+
x: -60
|
|
1502
|
+
y: -70
|
|
1503
|
+
- name: b
|
|
1504
|
+
node: 5
|
|
1505
|
+
position:
|
|
1506
|
+
x: -60
|
|
1507
|
+
y: -30
|
|
1508
|
+
properties:
|
|
1509
|
+
Resistance: "1M"
|
|
1510
|
+
Description: "Gate divider upper."
|
|
1511
|
+
- id: RG2
|
|
1512
|
+
kind: resistor
|
|
1513
|
+
name: R_GATE_LOWER
|
|
1514
|
+
sourceTypeName: Circuit.Resistor
|
|
1515
|
+
origin:
|
|
1516
|
+
x: -60
|
|
1517
|
+
y: 50
|
|
1518
|
+
rotation: 0
|
|
1519
|
+
flipped: false
|
|
1520
|
+
terminals:
|
|
1521
|
+
- name: a
|
|
1522
|
+
node: 5
|
|
1523
|
+
position:
|
|
1524
|
+
x: -60
|
|
1525
|
+
y: 30
|
|
1526
|
+
- name: b
|
|
1527
|
+
node: 0
|
|
1528
|
+
position:
|
|
1529
|
+
x: -60
|
|
1530
|
+
y: 70
|
|
1531
|
+
properties:
|
|
1532
|
+
Resistance: "1M"
|
|
1533
|
+
Description: "Gate divider lower."
|
|
1534
|
+
- id: RS1
|
|
1535
|
+
kind: resistor
|
|
1536
|
+
name: R_SOURCE_UPPER
|
|
1537
|
+
sourceTypeName: Circuit.Resistor
|
|
1538
|
+
origin:
|
|
1539
|
+
x: 60
|
|
1540
|
+
y: -50
|
|
1541
|
+
rotation: 0
|
|
1542
|
+
flipped: false
|
|
1543
|
+
terminals:
|
|
1544
|
+
- name: a
|
|
1545
|
+
node: 4
|
|
1546
|
+
position:
|
|
1547
|
+
x: 60
|
|
1548
|
+
y: -70
|
|
1549
|
+
- name: b
|
|
1550
|
+
node: 6
|
|
1551
|
+
position:
|
|
1552
|
+
x: 60
|
|
1553
|
+
y: -30
|
|
1554
|
+
properties:
|
|
1555
|
+
Resistance: "1M"
|
|
1556
|
+
Description: "Source divider upper."
|
|
1557
|
+
- id: RS2
|
|
1558
|
+
kind: resistor
|
|
1559
|
+
name: R_SOURCE_LOWER
|
|
1560
|
+
sourceTypeName: Circuit.Resistor
|
|
1561
|
+
origin:
|
|
1562
|
+
x: 60
|
|
1563
|
+
y: 50
|
|
1564
|
+
rotation: 0
|
|
1565
|
+
flipped: false
|
|
1566
|
+
terminals:
|
|
1567
|
+
- name: a
|
|
1568
|
+
node: 6
|
|
1569
|
+
position:
|
|
1570
|
+
x: 60
|
|
1571
|
+
y: 30
|
|
1572
|
+
- name: b
|
|
1573
|
+
node: 0
|
|
1574
|
+
position:
|
|
1575
|
+
x: 60
|
|
1576
|
+
y: 70
|
|
1577
|
+
properties:
|
|
1578
|
+
Resistance: "1M"
|
|
1579
|
+
Description: "Source divider lower."
|
|
1580
|
+
- id: RD1
|
|
1581
|
+
kind: resistor
|
|
1582
|
+
name: R_DRAIN_UPPER
|
|
1583
|
+
sourceTypeName: Circuit.Resistor
|
|
1584
|
+
origin:
|
|
1585
|
+
x: 140
|
|
1586
|
+
y: -50
|
|
1587
|
+
rotation: 0
|
|
1588
|
+
flipped: false
|
|
1589
|
+
terminals:
|
|
1590
|
+
- name: a
|
|
1591
|
+
node: 4
|
|
1592
|
+
position:
|
|
1593
|
+
x: 140
|
|
1594
|
+
y: -70
|
|
1595
|
+
- name: b
|
|
1596
|
+
node: 7
|
|
1597
|
+
position:
|
|
1598
|
+
x: 140
|
|
1599
|
+
y: -30
|
|
1600
|
+
properties:
|
|
1601
|
+
Resistance: "1M"
|
|
1602
|
+
Description: "Drain divider upper."
|
|
1603
|
+
- id: RD2
|
|
1604
|
+
kind: resistor
|
|
1605
|
+
name: R_DRAIN_LOWER
|
|
1606
|
+
sourceTypeName: Circuit.Resistor
|
|
1607
|
+
origin:
|
|
1608
|
+
x: 140
|
|
1609
|
+
y: 50
|
|
1610
|
+
rotation: 0
|
|
1611
|
+
flipped: false
|
|
1612
|
+
terminals:
|
|
1613
|
+
- name: a
|
|
1614
|
+
node: 7
|
|
1615
|
+
position:
|
|
1616
|
+
x: 140
|
|
1617
|
+
y: 30
|
|
1618
|
+
- name: b
|
|
1619
|
+
node: 0
|
|
1620
|
+
position:
|
|
1621
|
+
x: 140
|
|
1622
|
+
y: 70
|
|
1623
|
+
properties:
|
|
1624
|
+
Resistance: "1M"
|
|
1625
|
+
Description: "Drain divider lower."
|
|
1626
|
+
- id: RJIN
|
|
1627
|
+
kind: resistor
|
|
1628
|
+
name: R_INPUT_TERMINATION
|
|
1629
|
+
sourceTypeName: Circuit.Resistor
|
|
1630
|
+
origin:
|
|
1631
|
+
x: -140
|
|
1632
|
+
y: 0
|
|
1633
|
+
rotation: 0
|
|
1634
|
+
flipped: false
|
|
1635
|
+
terminals:
|
|
1636
|
+
- name: a
|
|
1637
|
+
node: 1
|
|
1638
|
+
position:
|
|
1639
|
+
x: -140
|
|
1640
|
+
y: -20
|
|
1641
|
+
- name: b
|
|
1642
|
+
node: 0
|
|
1643
|
+
position:
|
|
1644
|
+
x: -140
|
|
1645
|
+
y: 20
|
|
1646
|
+
properties:
|
|
1647
|
+
Resistance: "1M"
|
|
1648
|
+
Description: "Input termination."
|
|
1649
|
+
- id: RJOUT
|
|
1650
|
+
kind: resistor
|
|
1651
|
+
name: R_OUTPUT_TERMINATION
|
|
1652
|
+
sourceTypeName: Circuit.Resistor
|
|
1653
|
+
origin:
|
|
1654
|
+
x: 220
|
|
1655
|
+
y: 0
|
|
1656
|
+
rotation: 0
|
|
1657
|
+
flipped: false
|
|
1658
|
+
terminals:
|
|
1659
|
+
- name: a
|
|
1660
|
+
node: 2
|
|
1661
|
+
position:
|
|
1662
|
+
x: 220
|
|
1663
|
+
y: -20
|
|
1664
|
+
- name: b
|
|
1665
|
+
node: 0
|
|
1666
|
+
position:
|
|
1667
|
+
x: 220
|
|
1668
|
+
y: 20
|
|
1669
|
+
properties:
|
|
1670
|
+
Resistance: "1M"
|
|
1671
|
+
Description: "Output termination."
|
|
1672
|
+
- id: Q1
|
|
1673
|
+
kind: jfet
|
|
1674
|
+
name: GATE_LOADED_FET
|
|
1675
|
+
sourceTypeName: Circuit.JFET
|
|
1676
|
+
origin:
|
|
1677
|
+
x: 0
|
|
1678
|
+
y: 0
|
|
1679
|
+
rotation: 0
|
|
1680
|
+
flipped: false
|
|
1681
|
+
terminals:
|
|
1682
|
+
- name: gate
|
|
1683
|
+
role: gate
|
|
1684
|
+
node: 5
|
|
1685
|
+
position:
|
|
1686
|
+
x: -20
|
|
1687
|
+
y: 0
|
|
1688
|
+
- name: drain
|
|
1689
|
+
role: drain
|
|
1690
|
+
node: 7
|
|
1691
|
+
position:
|
|
1692
|
+
x: 0
|
|
1693
|
+
y: 20
|
|
1694
|
+
- name: source
|
|
1695
|
+
role: source
|
|
1696
|
+
node: 6
|
|
1697
|
+
position:
|
|
1698
|
+
x: 0
|
|
1699
|
+
y: -20
|
|
1700
|
+
properties:
|
|
1701
|
+
Description: "Gate-law probe; no part number, so the class default applies."
|
|
1702
|
+
wires: []
|
|
1703
|
+
`;
|
|
1704
|
+
/**
|
|
1705
|
+
* The same copper as `jfetGateLoadedDivider` with the 2SK30A part number, so the
|
|
1706
|
+
* catalog's per-part gate data applies instead of the class default: the gate draws
|
|
1707
|
+
* ~1e-18 A and every divider sits at its unloaded 4.5 V. The two fixtures render the
|
|
1708
|
+
* same circuit with different gate laws, which is what makes their pair a regression
|
|
1709
|
+
* test for the refinement rather than two readings of one law.
|
|
1710
|
+
*/
|
|
1711
|
+
export const jfetGateLoadedDivider2SK30A = `${header("Gate-Loaded Divider Fixture, 2SK30A")}components:
|
|
1712
|
+
${jacks} - id: VP
|
|
1713
|
+
kind: rail
|
|
1714
|
+
name: V_PLUS
|
|
1715
|
+
sourceTypeName: Circuit.Rail
|
|
1716
|
+
origin:
|
|
1717
|
+
x: 0
|
|
1718
|
+
y: -100
|
|
1719
|
+
rotation: 0
|
|
1720
|
+
flipped: false
|
|
1721
|
+
terminals:
|
|
1722
|
+
- name: terminal
|
|
1723
|
+
role: end
|
|
1724
|
+
node: 4
|
|
1725
|
+
position:
|
|
1726
|
+
x: 0
|
|
1727
|
+
y: -100
|
|
1728
|
+
properties:
|
|
1729
|
+
Voltage: "9"
|
|
1730
|
+
Description: "Divider supply."
|
|
1731
|
+
- id: RG1
|
|
1732
|
+
kind: resistor
|
|
1733
|
+
name: R_GATE_UPPER
|
|
1734
|
+
sourceTypeName: Circuit.Resistor
|
|
1735
|
+
origin:
|
|
1736
|
+
x: -60
|
|
1737
|
+
y: -50
|
|
1738
|
+
rotation: 0
|
|
1739
|
+
flipped: false
|
|
1740
|
+
terminals:
|
|
1741
|
+
- name: a
|
|
1742
|
+
node: 4
|
|
1743
|
+
position:
|
|
1744
|
+
x: -60
|
|
1745
|
+
y: -70
|
|
1746
|
+
- name: b
|
|
1747
|
+
node: 5
|
|
1748
|
+
position:
|
|
1749
|
+
x: -60
|
|
1750
|
+
y: -30
|
|
1751
|
+
properties:
|
|
1752
|
+
Resistance: "1M"
|
|
1753
|
+
Description: "Gate divider upper."
|
|
1754
|
+
- id: RG2
|
|
1755
|
+
kind: resistor
|
|
1756
|
+
name: R_GATE_LOWER
|
|
1757
|
+
sourceTypeName: Circuit.Resistor
|
|
1758
|
+
origin:
|
|
1759
|
+
x: -60
|
|
1760
|
+
y: 50
|
|
1761
|
+
rotation: 0
|
|
1762
|
+
flipped: false
|
|
1763
|
+
terminals:
|
|
1764
|
+
- name: a
|
|
1765
|
+
node: 5
|
|
1766
|
+
position:
|
|
1767
|
+
x: -60
|
|
1768
|
+
y: 30
|
|
1769
|
+
- name: b
|
|
1770
|
+
node: 0
|
|
1771
|
+
position:
|
|
1772
|
+
x: -60
|
|
1773
|
+
y: 70
|
|
1774
|
+
properties:
|
|
1775
|
+
Resistance: "1M"
|
|
1776
|
+
Description: "Gate divider lower."
|
|
1777
|
+
- id: RS1
|
|
1778
|
+
kind: resistor
|
|
1779
|
+
name: R_SOURCE_UPPER
|
|
1780
|
+
sourceTypeName: Circuit.Resistor
|
|
1781
|
+
origin:
|
|
1782
|
+
x: 60
|
|
1783
|
+
y: -50
|
|
1784
|
+
rotation: 0
|
|
1785
|
+
flipped: false
|
|
1786
|
+
terminals:
|
|
1787
|
+
- name: a
|
|
1788
|
+
node: 4
|
|
1789
|
+
position:
|
|
1790
|
+
x: 60
|
|
1791
|
+
y: -70
|
|
1792
|
+
- name: b
|
|
1793
|
+
node: 6
|
|
1794
|
+
position:
|
|
1795
|
+
x: 60
|
|
1796
|
+
y: -30
|
|
1797
|
+
properties:
|
|
1798
|
+
Resistance: "1M"
|
|
1799
|
+
Description: "Source divider upper."
|
|
1800
|
+
- id: RS2
|
|
1801
|
+
kind: resistor
|
|
1802
|
+
name: R_SOURCE_LOWER
|
|
1803
|
+
sourceTypeName: Circuit.Resistor
|
|
1804
|
+
origin:
|
|
1805
|
+
x: 60
|
|
1806
|
+
y: 50
|
|
1807
|
+
rotation: 0
|
|
1808
|
+
flipped: false
|
|
1809
|
+
terminals:
|
|
1810
|
+
- name: a
|
|
1811
|
+
node: 6
|
|
1812
|
+
position:
|
|
1813
|
+
x: 60
|
|
1814
|
+
y: 30
|
|
1815
|
+
- name: b
|
|
1816
|
+
node: 0
|
|
1817
|
+
position:
|
|
1818
|
+
x: 60
|
|
1819
|
+
y: 70
|
|
1820
|
+
properties:
|
|
1821
|
+
Resistance: "1M"
|
|
1822
|
+
Description: "Source divider lower."
|
|
1823
|
+
- id: RD1
|
|
1824
|
+
kind: resistor
|
|
1825
|
+
name: R_DRAIN_UPPER
|
|
1826
|
+
sourceTypeName: Circuit.Resistor
|
|
1827
|
+
origin:
|
|
1828
|
+
x: 140
|
|
1829
|
+
y: -50
|
|
1830
|
+
rotation: 0
|
|
1831
|
+
flipped: false
|
|
1832
|
+
terminals:
|
|
1833
|
+
- name: a
|
|
1834
|
+
node: 4
|
|
1835
|
+
position:
|
|
1836
|
+
x: 140
|
|
1837
|
+
y: -70
|
|
1838
|
+
- name: b
|
|
1839
|
+
node: 7
|
|
1840
|
+
position:
|
|
1841
|
+
x: 140
|
|
1842
|
+
y: -30
|
|
1843
|
+
properties:
|
|
1844
|
+
Resistance: "1M"
|
|
1845
|
+
Description: "Drain divider upper."
|
|
1846
|
+
- id: RD2
|
|
1847
|
+
kind: resistor
|
|
1848
|
+
name: R_DRAIN_LOWER
|
|
1849
|
+
sourceTypeName: Circuit.Resistor
|
|
1850
|
+
origin:
|
|
1851
|
+
x: 140
|
|
1852
|
+
y: 50
|
|
1853
|
+
rotation: 0
|
|
1854
|
+
flipped: false
|
|
1855
|
+
terminals:
|
|
1856
|
+
- name: a
|
|
1857
|
+
node: 7
|
|
1858
|
+
position:
|
|
1859
|
+
x: 140
|
|
1860
|
+
y: 30
|
|
1861
|
+
- name: b
|
|
1862
|
+
node: 0
|
|
1863
|
+
position:
|
|
1864
|
+
x: 140
|
|
1865
|
+
y: 70
|
|
1866
|
+
properties:
|
|
1867
|
+
Resistance: "1M"
|
|
1868
|
+
Description: "Drain divider lower."
|
|
1869
|
+
- id: RJIN
|
|
1870
|
+
kind: resistor
|
|
1871
|
+
name: R_INPUT_TERMINATION
|
|
1872
|
+
sourceTypeName: Circuit.Resistor
|
|
1873
|
+
origin:
|
|
1874
|
+
x: -140
|
|
1875
|
+
y: 0
|
|
1876
|
+
rotation: 0
|
|
1877
|
+
flipped: false
|
|
1878
|
+
terminals:
|
|
1879
|
+
- name: a
|
|
1880
|
+
node: 1
|
|
1881
|
+
position:
|
|
1882
|
+
x: -140
|
|
1883
|
+
y: -20
|
|
1884
|
+
- name: b
|
|
1885
|
+
node: 0
|
|
1886
|
+
position:
|
|
1887
|
+
x: -140
|
|
1888
|
+
y: 20
|
|
1889
|
+
properties:
|
|
1890
|
+
Resistance: "1M"
|
|
1891
|
+
Description: "Input termination."
|
|
1892
|
+
- id: RJOUT
|
|
1893
|
+
kind: resistor
|
|
1894
|
+
name: R_OUTPUT_TERMINATION
|
|
1895
|
+
sourceTypeName: Circuit.Resistor
|
|
1896
|
+
origin:
|
|
1897
|
+
x: 220
|
|
1898
|
+
y: 0
|
|
1899
|
+
rotation: 0
|
|
1900
|
+
flipped: false
|
|
1901
|
+
terminals:
|
|
1902
|
+
- name: a
|
|
1903
|
+
node: 2
|
|
1904
|
+
position:
|
|
1905
|
+
x: 220
|
|
1906
|
+
y: -20
|
|
1907
|
+
- name: b
|
|
1908
|
+
node: 0
|
|
1909
|
+
position:
|
|
1910
|
+
x: 220
|
|
1911
|
+
y: 20
|
|
1912
|
+
properties:
|
|
1913
|
+
Resistance: "1M"
|
|
1914
|
+
Description: "Output termination."
|
|
1915
|
+
- id: Q1
|
|
1916
|
+
kind: jfet
|
|
1917
|
+
name: GATE_LOADED_FET
|
|
1918
|
+
sourceTypeName: Circuit.JFET
|
|
1919
|
+
origin:
|
|
1920
|
+
x: 0
|
|
1921
|
+
y: 0
|
|
1922
|
+
rotation: 0
|
|
1923
|
+
flipped: false
|
|
1924
|
+
terminals:
|
|
1925
|
+
- name: gate
|
|
1926
|
+
role: gate
|
|
1927
|
+
node: 5
|
|
1928
|
+
position:
|
|
1929
|
+
x: -20
|
|
1930
|
+
y: 0
|
|
1931
|
+
- name: drain
|
|
1932
|
+
role: drain
|
|
1933
|
+
node: 7
|
|
1934
|
+
position:
|
|
1935
|
+
x: 0
|
|
1936
|
+
y: 20
|
|
1937
|
+
- name: source
|
|
1938
|
+
role: source
|
|
1939
|
+
node: 6
|
|
1940
|
+
position:
|
|
1941
|
+
x: 0
|
|
1942
|
+
y: -20
|
|
1943
|
+
properties:
|
|
1944
|
+
PartNumber: "2SK30A"
|
|
1945
|
+
Description: "Gate-law probe with the registered switch part."
|
|
1946
|
+
wires: []
|
|
1947
|
+
`;
|
|
1456
1948
|
/**
|
|
1457
1949
|
* A supply with a protection diode wired the wrong way round: anode on the 9 V rail, cathode on
|
|
1458
1950
|
* ground, so the whole supply forward biases it.
|