Update the Opamp test to use a symbol with unordered pins
This commit is contained in:
parent
963900ab83
commit
103b8a0d2c
|
@ -5,6 +5,63 @@
|
||||||
(paper "A4")
|
(paper "A4")
|
||||||
|
|
||||||
(lib_symbols
|
(lib_symbols
|
||||||
|
(symbol "Amplifier_Operational:MCP6001-OT" (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" "MCP6001-OT" (id 1) (at -1.27 3.81 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
)
|
||||||
|
(property "Footprint" "Package_TO_SOT_SMD:SOT-23-5" (id 2) (at -2.54 -5.08 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "http://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf" (id 3) (at 0 5.08 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" "1MHz, Low-Power Op Amp, SOT-23-5" (id 5) (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "ki_fp_filters" "SOT?23*" (id 6) (at 0 0 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(symbol "MCP6001-OT_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))
|
||||||
|
)
|
||||||
|
(pin power_in line (at -2.54 -7.62 90) (length 3.81)
|
||||||
|
(name "V-" (effects (font (size 1.27 1.27))))
|
||||||
|
(number "2" (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 "5" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(symbol "MCP6001-OT_1_1"
|
||||||
|
(pin output line (at 7.62 0 180) (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 "3" (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 "4" (effects (font (size 1.27 1.27))))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
(symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes)
|
(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)
|
(property "Reference" "R" (id 0) (at 2.032 0 90)
|
||||||
(effects (font (size 1.27 1.27)))
|
(effects (font (size 1.27 1.27)))
|
||||||
|
@ -44,66 +101,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)
|
(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)
|
(property "Reference" "V" (id 0) (at 2.54 2.54 0)
|
||||||
(effects (font (size 1.27 1.27)) (justify left))
|
(effects (font (size 1.27 1.27)) (justify left))
|
||||||
|
@ -364,8 +361,8 @@
|
||||||
(property "Datasheet" "~" (id 3) (at 138.43 93.98 0)
|
(property "Datasheet" "~" (id 3) (at 138.43 93.98 0)
|
||||||
(effects (font (size 1.27 1.27)) hide)
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
)
|
)
|
||||||
(pin "1" (uuid 27dbfa5d-bb20-468f-9a81-7737a5e908fc))
|
(pin "1" (uuid 19da877c-a69c-4a1d-8029-3483030b2fe0))
|
||||||
(pin "2" (uuid 63677ebb-93e3-49bb-8bf1-14fce6c8137d))
|
(pin "2" (uuid 4c449474-8aa6-4bd1-b153-a08aa763d45a))
|
||||||
)
|
)
|
||||||
|
|
||||||
(symbol (lib_id "Device:R") (at 152.4 111.125 90) (unit 1)
|
(symbol (lib_id "Device:R") (at 152.4 111.125 90) (unit 1)
|
||||||
|
@ -408,41 +405,6 @@
|
||||||
(pin "2" (uuid 8a2dca0c-b99f-4109-a426-af5e80ea91fe))
|
(pin "2" (uuid 8a2dca0c-b99f-4109-a426-af5e80ea91fe))
|
||||||
)
|
)
|
||||||
|
|
||||||
(symbol (lib_id "Simulation_SPICE:OPAMP") (at 156.21 88.9 0) (unit 1)
|
|
||||||
(in_bom yes) (on_board yes)
|
|
||||||
(uuid 3dd58d42-1028-4fbc-adf4-32d03de981a6)
|
|
||||||
(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 "Sim_Name" "uopamp_lvl2" (id 6) (at 156.21 88.9 0)
|
|
||||||
(effects (font (size 1.27 1.27)) hide)
|
|
||||||
)
|
|
||||||
(property "Sim_Library" "opamp.lib.spice" (id 7) (at 156.21 88.9 0)
|
|
||||||
(effects (font (size 1.27 1.27)) hide)
|
|
||||||
)
|
|
||||||
(property "Sim_Device" "SUBCKT" (id 8) (at 156.21 88.9 0)
|
|
||||||
(effects (font (size 1.27 1.27)) hide)
|
|
||||||
)
|
|
||||||
(property "Sim_Pins" "1 2 4 5 3" (id 9) (at 156.21 88.9 0)
|
|
||||||
(effects (font (size 1.27 1.27)) hide)
|
|
||||||
)
|
|
||||||
(pin "1" (uuid bd8261ed-4ec3-466d-a593-de8cc22438a4))
|
|
||||||
(pin "2" (uuid 59452a26-a3b6-4a37-a20f-4c2bcc74010e))
|
|
||||||
(pin "3" (uuid 3b7a7231-9907-49c8-aa51-b9e9b9068d1b))
|
|
||||||
(pin "4" (uuid b0f744bf-8c76-450e-8cdf-3daee6f0b8a1))
|
|
||||||
(pin "5" (uuid d981b8b1-dd8d-4890-a039-a934391d8000))
|
|
||||||
)
|
|
||||||
|
|
||||||
(symbol (lib_id "power:GND") (at 140.97 111.125 270) (unit 1)
|
(symbol (lib_id "power:GND") (at 140.97 111.125 270) (unit 1)
|
||||||
(in_bom yes) (on_board yes) (fields_autoplaced)
|
(in_bom yes) (on_board yes) (fields_autoplaced)
|
||||||
(uuid 71c5abbf-da89-4208-ab90-ab47cb47a86d)
|
(uuid 71c5abbf-da89-4208-ab90-ab47cb47a86d)
|
||||||
|
@ -481,6 +443,41 @@
|
||||||
(pin "1" (uuid d51f887c-ce71-4e7a-9f6c-4362d9b8286a))
|
(pin "1" (uuid d51f887c-ce71-4e7a-9f6c-4362d9b8286a))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(symbol (lib_id "Amplifier_Operational:MCP6001-OT") (at 156.21 88.9 0) (unit 1)
|
||||||
|
(in_bom yes) (on_board yes)
|
||||||
|
(uuid c1142581-9f6c-4783-9cde-680875550500)
|
||||||
|
(default_instance (reference "U1") (unit 1) (value "MCP6001-OT") (footprint "Package_TO_SOT_SMD:SOT-23-5"))
|
||||||
|
(property "Reference" "U1" (id 0) (at 163.83 82.55 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Value" "MCP6001-OT" (id 1) (at 163.83 85.09 0)
|
||||||
|
(effects (font (size 1.27 1.27)))
|
||||||
|
)
|
||||||
|
(property "Footprint" "Package_TO_SOT_SMD:SOT-23-5" (id 2) (at 153.67 93.98 0)
|
||||||
|
(effects (font (size 1.27 1.27)) (justify left) hide)
|
||||||
|
)
|
||||||
|
(property "Datasheet" "http://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf" (id 3) (at 156.21 83.82 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Sim_Name" "uopamp_lvl2" (id 4) (at 156.21 88.9 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Sim_Library" "uopamp.lib.spice" (id 5) (at 156.21 88.9 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Sim_Device" "SUBCKT" (id 6) (at 156.21 88.9 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(property "Sim_Pins" "3 4 5 2 1" (id 7) (at 156.21 88.9 0)
|
||||||
|
(effects (font (size 1.27 1.27)) hide)
|
||||||
|
)
|
||||||
|
(pin "2" (uuid 5f74e7f3-6e5a-4915-9655-9c0f0523fb0a))
|
||||||
|
(pin "5" (uuid 9784a75a-18be-45d0-8108-f0556b776534))
|
||||||
|
(pin "1" (uuid 60030f74-1274-44bb-bcfd-d5cec20ed230))
|
||||||
|
(pin "3" (uuid 69bf4152-2799-46c3-acc2-46d3456c830b))
|
||||||
|
(pin "4" (uuid daf27674-a2aa-43e8-b45b-cf8f98a49a42))
|
||||||
|
)
|
||||||
|
|
||||||
(symbol (lib_id "power:GND") (at 138.43 99.06 0) (unit 1)
|
(symbol (lib_id "power:GND") (at 138.43 99.06 0) (unit 1)
|
||||||
(in_bom yes) (on_board yes)
|
(in_bom yes) (on_board yes)
|
||||||
(uuid c4334e6a-69e5-475f-b5f5-911b3308f64a)
|
(uuid c4334e6a-69e5-475f-b5f5-911b3308f64a)
|
||||||
|
@ -563,8 +560,8 @@
|
||||||
(path "/2a5b0448-42a8-4fa4-9a14-267dc34f9ff7"
|
(path "/2a5b0448-42a8-4fa4-9a14-267dc34f9ff7"
|
||||||
(reference "R2") (unit 1) (value "10k") (footprint "")
|
(reference "R2") (unit 1) (value "10k") (footprint "")
|
||||||
)
|
)
|
||||||
(path "/3dd58d42-1028-4fbc-adf4-32d03de981a6"
|
(path "/c1142581-9f6c-4783-9cde-680875550500"
|
||||||
(reference "U1") (unit 1) (value "OPAMP") (footprint "")
|
(reference "U1") (unit 1) (value "MCP6001-OT") (footprint "Package_TO_SOT_SMD:SOT-23-5")
|
||||||
)
|
)
|
||||||
(path "/383ea298-1cb3-473e-8fce-19d3c7ac3912"
|
(path "/383ea298-1cb3-473e-8fce-19d3c7ac3912"
|
||||||
(reference "V2") (unit 1) (value "5") (footprint "")
|
(reference "V2") (unit 1) (value "5") (footprint "")
|
||||||
|
|
|
@ -285,6 +285,9 @@ BOOST_AUTO_TEST_CASE( Rectifier )
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE( Opamp )
|
BOOST_AUTO_TEST_CASE( Opamp )
|
||||||
{
|
{
|
||||||
|
// Instead of Simulation_SPICE:OPAMP, we use Amplifier_Operational:MCP6001-OT because its pins
|
||||||
|
// are not ordered by pin numbers, which is a possible failure condition.
|
||||||
|
|
||||||
const MOCK_PGM_BASE& program = static_cast<MOCK_PGM_BASE&>( Pgm() );
|
const MOCK_PGM_BASE& program = static_cast<MOCK_PGM_BASE&>( Pgm() );
|
||||||
MOCK_EXPECT( program.GetLocalEnvVariables ).returns( ENV_VAR_MAP() );
|
MOCK_EXPECT( program.GetLocalEnvVariables ).returns( ENV_VAR_MAP() );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue