Sim QA: Test raw model with fewer pins than its symbol

This commit is contained in:
Mikolaj Wielgus 2022-09-02 16:38:17 +02:00
parent 338b06c1ec
commit b225e53135
3 changed files with 113 additions and 104 deletions

View File

@ -265,9 +265,11 @@
}
],
"meta": {
"version": 2
"version": 3
},
"net_colors": null
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {

View File

@ -1,10 +1,79 @@
(kicad_sch (version 20220622) (generator eeschema)
(kicad_sch (version 20220822) (generator eeschema)
(uuid 986bd0ba-4f89-4046-b50f-9d5b4a950ed1)
(paper "A4")
(lib_symbols
(symbol "Amplifier_Operational:AD797" (pin_names (offset 0.127)) (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at 1.27 6.35 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "AD797" (id 1) (at 1.27 3.81 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 1.27 1.27 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.analog.com/media/en/technical-documentation/data-sheets/AD797.pdf" (id 3) (at 1.27 3.81 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "single opamp" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Ultralow Distortion, Ultralow Noise Op Amp, DIP-8/SOIC-8" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_fp_filters" "DIP*W7.62mm* SOIC*3.9x4.9mm*P1.27mm* TO?5*" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "AD797_0_1"
(polyline
(pts
(xy -5.08 5.08)
(xy 5.08 0)
(xy -5.08 -5.08)
(xy -5.08 5.08)
)
(stroke (width 0.254) (type default))
(fill (type background))
)
)
(symbol "AD797_1_1"
(pin input line (at 0 -7.62 90) (length 5.08)
(name "BAL" (effects (font (size 0.508 0.508))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin input line (at -7.62 -2.54 0) (length 2.54)
(name "-" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin input line (at -7.62 2.54 0) (length 2.54)
(name "+" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at -2.54 -7.62 90) (length 3.81)
(name "V-" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin input line (at 2.54 -7.62 90) (length 6.35)
(name "COMP" (effects (font (size 0.508 0.508))))
(number "5" (effects (font (size 1.27 1.27))))
)
(pin output line (at 7.62 0 180) (length 2.54)
(name "~" (effects (font (size 1.27 1.27))))
(number "6" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at -2.54 7.62 270) (length 3.81)
(name "V+" (effects (font (size 1.27 1.27))))
(number "7" (effects (font (size 1.27 1.27))))
)
(pin input line (at 0 7.62 270) (length 5.08)
(name "C/B" (effects (font (size 0.508 0.508))))
(number "8" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "R" (id 0) (at 2.032 0 90)
(effects (font (size 1.27 1.27)))
@ -44,66 +113,6 @@
)
)
)
(symbol "Simulation_SPICE:OPAMP" (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
(property "Reference" "U" (id 0) (at 3.81 3.175 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Value" "OPAMP" (id 1) (at 3.81 -3.175 0)
(effects (font (size 1.27 1.27)) (justify left))
)
(property "Footprint" "" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Spice_Netlist_Enabled" "Y" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify left) hide)
)
(property "Spice_Primitive" "X" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify left) hide)
)
(property "ki_keywords" "simulation" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Operational amplifier, single, node sequence=1:+ 2:- 3:OUT 4:V+ 5:V-" (id 7) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "OPAMP_0_1"
(polyline
(pts
(xy 5.08 0)
(xy -5.08 5.08)
(xy -5.08 -5.08)
(xy 5.08 0)
)
(stroke (width 0.254) (type default))
(fill (type background))
)
)
(symbol "OPAMP_1_1"
(pin input line (at -7.62 2.54 0) (length 2.54)
(name "+" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin input line (at -7.62 -2.54 0) (length 2.54)
(name "-" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin output line (at 7.62 0 180) (length 2.54)
(name "~" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at -2.54 7.62 270) (length 3.81)
(name "V+" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin power_in line (at -2.54 -7.62 90) (length 3.81)
(name "V-" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "Simulation_SPICE:VDC" (pin_numbers hide) (pin_names (offset 0.0254)) (in_bom yes) (on_board yes)
(property "Reference" "V" (id 0) (at 2.54 2.54 0)
(effects (font (size 1.27 1.27)) (justify left))
@ -510,44 +519,6 @@
(pin "1" (uuid ad7ba891-8ff2-4bf4-a870-e5ad25f0a69b))
)
(symbol (lib_id "Simulation_SPICE:OPAMP") (at 156.21 88.9 0) (unit 1)
(in_bom yes) (on_board yes)
(uuid cc59f4a2-42c2-43d4-8c02-165b80567b4f)
(default_instance (reference "U") (unit 1) (value "") (footprint ""))
(property "Reference" "U" (id 0) (at 161.29 91.44 0)
(effects (font (size 1.27 1.27)))
)
(property "Value" "" (id 1) (at 161.29 93.98 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Spice_Primitive" "X" (id 4) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Spice_Model" "uopamp_lvl2" (id 5) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Spice_Netlist_Enabled" "Y" (id 6) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Spice_Lib_File" "opamp.lib.spice" (id 7) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Spice_Node_Sequence" "1 2 4 5 3" (id 8) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid cbbb0b8c-1dbe-4c21-af6e-6e3cf910864c))
(pin "2" (uuid bce0106b-ad36-47f9-9d83-9d977ec7738c))
(pin "3" (uuid a9a4f3a6-caaa-4546-b353-19691ed00cb5))
(pin "4" (uuid e6134a62-7970-44d5-b60f-74c34a29defd))
(pin "5" (uuid 870b6082-c2ac-4465-9283-4dda39395c4c))
)
(symbol (lib_id "power:GND") (at 140.97 111.125 270) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced)
(uuid cff6b3be-ce12-4cf3-a4df-6cf831f3551f)
@ -567,6 +538,41 @@
(pin "1" (uuid 1f17aa02-93a3-4a14-bb64-3ef4902aa181))
)
(symbol (lib_id "Amplifier_Operational:AD797") (at 156.21 88.9 0) (unit 1)
(in_bom yes) (on_board yes)
(uuid e7af28af-cdd0-4b16-8d48-fcf8499bab85)
(default_instance (reference "U1") (unit 1) (value "AD797") (footprint ""))
(property "Reference" "U1" (id 0) (at 161.29 82.55 0)
(effects (font (size 1.27 1.27)))
)
(property "Value" "AD797" (id 1) (at 161.29 85.09 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (id 2) (at 157.48 87.63 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "https://www.analog.com/media/en/technical-documentation/data-sheets/AD797.pdf" (id 3) (at 157.48 85.09 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Sim_Device" "SPICE" (id 8) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Sim_Pins" "3 2 7 4 6 ~ ~ ~" (id 9) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Sim_Params" "type=X model=uopamp_lvl2 lib=opamp.lib.spice" (id 10) (at 156.21 88.9 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 7bc9184d-2a47-45f1-be60-ec64a780338c))
(pin "2" (uuid cbfc3dd9-4c0d-4aa6-b69a-1aff9157200b))
(pin "3" (uuid 6f604776-5068-4d95-a0bb-c9b71f4818c5))
(pin "4" (uuid 7e82c9bb-edf2-4be8-9bbd-55c6ec7a5a17))
(pin "5" (uuid d6c24569-447c-4b5d-b2c9-f864e81e62a4))
(pin "6" (uuid 2c96fe5f-fdd5-454b-9481-fb248946b516))
(pin "7" (uuid bcf3c97c-50c0-4126-8865-7bd1580f4d6b))
(pin "8" (uuid 27f92840-fe70-4cba-a9f7-9e67e34bbda2))
)
(sheet_instances
(path "/" (page "1"))
)
@ -590,8 +596,8 @@
(path "/6fd7ad5e-35c3-4ed7-8c83-260de65f107b"
(reference "R2") (unit 1) (value "10k") (footprint "")
)
(path "/cc59f4a2-42c2-43d4-8c02-165b80567b4f"
(reference "U1") (unit 1) (value "OPAMP") (footprint "")
(path "/e7af28af-cdd0-4b16-8d48-fcf8499bab85"
(reference "U1") (unit 1) (value "AD797") (footprint "")
)
(path "/90069e2b-54a1-463f-b33c-024aaf6ce8c2"
(reference "V2") (unit 1) (value "VDC") (footprint "")

View File

@ -313,7 +313,6 @@ BOOST_AUTO_TEST_CASE( NpnCeAmp )
}
// Incomplete. TODO.
BOOST_AUTO_TEST_CASE( Rlc )
{
TestNetlist( "rlc" );
@ -464,6 +463,8 @@ BOOST_AUTO_TEST_CASE( LegacySallenKey )
BOOST_AUTO_TEST_CASE( LegacyOpamp )
{
// Amplifier_Operational:AD797 model is used to test symbols that have more pins than the model.
TestNetlist( "legacy_opamp" );
TestTranPoint( 0, { { "V(/in)", 0 }, { "V(/out)", 0 } } );
TestTranPoint( 250e-6, { { "V(/in)", 500e-3 }, { "V(/out)", 1 } } );