print_spice_element(): do not substitute "extra" pins in format string (like @body) with body=xxx given in parent symbol instance attributes

This commit is contained in:
stefan schippers 2025-05-20 02:51:52 +02:00
parent ae86b92fda
commit 28dd3f2013
12 changed files with 2146 additions and 1959 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Xschem" Language="1033" Version="3.4.6.1" Manufacturer="Xschem" UpgradeCode="0deb9c17-cbbd-491c-be3e-24446b27ccd5"> <Product Id="*" Name="Xschem" Language="1033" Version="3.4.7" Manufacturer="Xschem" UpgradeCode="0deb9c17-cbbd-491c-be3e-24446b27ccd5">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<WixVariable Id="WixUILicenseRtf" <WixVariable Id="WixUILicenseRtf"
Value="License.rtf" /> Value="License.rtf" />

View File

@ -4669,9 +4669,15 @@
<Component Id="cmp6459B0DD74A47A086E6B614933AFC28C" Guid="{84B8FE38-A121-4078-9118-E17E2FBB5879}"> <Component Id="cmp6459B0DD74A47A086E6B614933AFC28C" Guid="{84B8FE38-A121-4078-9118-E17E2FBB5879}">
<File Id="fil407D827A4500F875A532804A7BE85429" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\autozero_comp_xyce.sch" /> <File Id="fil407D827A4500F875A532804A7BE85429" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\autozero_comp_xyce.sch" />
</Component> </Component>
<Component Id="cmpF33E5835E3AFEC359F3EF52C98089341" Guid="{9C5468FA-E0E8-48D5-AD7D-64027F0CF28D}">
<File Id="fil66BA291CBF8131316F5F6D5990D604D1" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\boost.sch" />
</Component>
<Component Id="cmp89838BB57E0FD4179DCA4965EB90E8C7" Guid="{97778F38-5A7D-4D0A-A747-4639545FB0A0}"> <Component Id="cmp89838BB57E0FD4179DCA4965EB90E8C7" Guid="{97778F38-5A7D-4D0A-A747-4639545FB0A0}">
<File Id="fil12622F9C466C8C2E0ADDBEFBAD8AE5BB" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\buck.sch" /> <File Id="fil12622F9C466C8C2E0ADDBEFBAD8AE5BB" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\buck.sch" />
</Component> </Component>
<Component Id="cmp3A991DB4062245FBD1F578B76AAFB226" Guid="{054E1763-5900-4E07-9EAC-13B6BBB5E558}">
<File Id="filD559008F6B96294C31CED1F33673AE7E" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\buck_boost.sch" />
</Component>
<Component Id="cmp80F17668356F715FB30000BA77553EBA" Guid="{1AEFCA10-5D52-4934-A5B4-774EFE511D5E}"> <Component Id="cmp80F17668356F715FB30000BA77553EBA" Guid="{1AEFCA10-5D52-4934-A5B4-774EFE511D5E}">
<File Id="fil76CC1010EF62948C6E2502EA33C400C3" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\buf_ngspice.sch" /> <File Id="fil76CC1010EF62948C6E2502EA33C400C3" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\buf_ngspice.sch" />
</Component> </Component>
@ -4810,6 +4816,12 @@
<Component Id="cmpC7926C63F014277EC36E893A1F3696D4" Guid="{A963CEAC-807D-436C-9E23-06C4A78DEE37}"> <Component Id="cmpC7926C63F014277EC36E893A1F3696D4" Guid="{A963CEAC-807D-436C-9E23-06C4A78DEE37}">
<File Id="filBA2604076D7BCA03B0B63CC6789EDECF" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\stimuli.autozero_comp_xyce" /> <File Id="filBA2604076D7BCA03B0B63CC6789EDECF" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\stimuli.autozero_comp_xyce" />
</Component> </Component>
<Component Id="cmp03A03DB4D153397E0DA0407EE473F082" Guid="{5176AC0D-F570-45D4-981F-6EC6A946E48C}">
<File Id="filB9F20714D53B540E8CC5524725C5CF51" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\stimuli.boost" />
</Component>
<Component Id="cmpD04400F1EAF6A42D0D8294DB788CBB41" Guid="{9B8DD435-4071-4879-A5A4-1CDA1A18FE4F}">
<File Id="fil447561B0211FCC08BEA84A759F30DFF1" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\stimuli.buck_boost" />
</Component>
<Component Id="cmpFEC120B795E6A9EA4ECF425320D6F3C6" Guid="{F03A60E9-8203-4423-B7D0-05A192C225AA}"> <Component Id="cmpFEC120B795E6A9EA4ECF425320D6F3C6" Guid="{F03A60E9-8203-4423-B7D0-05A192C225AA}">
<File Id="filD02F5239991E52D47E5BD2AFD82780AA" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\tb_diff_amp.sch" /> <File Id="filD02F5239991E52D47E5BD2AFD82780AA" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\tb_diff_amp.sch" />
</Component> </Component>
@ -4829,6 +4841,44 @@
<File Id="fil95911A877A642C5D3E09DA8EB64DD3FC" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\xor_ngspice.sym" /> <File Id="fil95911A877A642C5D3E09DA8EB64DD3FC" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice\xor_ngspice.sym" />
</Component> </Component>
</Directory> </Directory>
<Directory Id="dir592EAC8063F59728EDFDDF8860C7AB7D" Name="ngspice_verilog_cosim">
<Component Id="cmpA613D3DF715962FA6F2CBA41D25DB13E" Guid="{C1A35D78-9CB4-4D6A-918D-DE68F10B4155}">
<File Id="fil03361C0A2C32D62B27791E8ECED1D944" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\adc.v" />
</Component>
<Component Id="cmp4E71B6DF84D980F2F0B8C50AB43658F0" Guid="{96CE77BA-275F-4323-9AA4-91E76B012D3A}">
<File Id="filE03D5BEA71AB2635DC3AC17B379A52CC" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\ainv.sch" />
</Component>
<Component Id="cmp8A93880DC2E4C5A3881AD0EC7FEFD353" Guid="{82B70654-32F1-4179-A37B-8C2177FD70E6}">
<File Id="filF68354346C998ADE5B8F95FB7DA2046E" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\ainv.sym" />
</Component>
<Component Id="cmp82189982E4A04BEC40CD595C52D08238" Guid="{4D3F6031-AB81-4032-9D8B-F25CE13C6697}">
<File Id="fil86ECBF1B74549C4643D613A0E3B21A13" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\ccap.sch" />
</Component>
<Component Id="cmp1A0A6CB97A7498EC2529B2D077D2CB49" Guid="{997D01A1-B3A4-435E-A254-59E9C8DDE410}">
<File Id="fil36E4E4B1FB92391C12BF1B3091E8A799" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\ccap.sym" />
</Component>
<Component Id="cmpF54BFEBB28AD260C51E60995CD5EA5BE" Guid="{B81BA4B9-E0AA-4F13-9D35-21412152FC04}">
<File Id="fil24516EB14D3356260C6B077AB3797A3D" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\sar_adc.sch" />
</Component>
<Component Id="cmp6E3A3C7E0B1E887495798F4CDDDCBD75" Guid="{C620BFA6-1F7B-47D2-9330-C70E016B79FC}">
<File Id="fil173D3623CBA57948340532B73AC2D701" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\sar_adc.sym" />
</Component>
<Component Id="cmpE646B68F472ACF02B3830FB762289243" Guid="{2EDB25B8-21BA-4156-85CB-A61AF528D9AC}">
<File Id="filF62430DACDC1A0FB89E92D58A94D111B" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\sar_adc_vlog.sym" />
</Component>
<Component Id="cmp42527D9091DB5E008C537CA5714100E8" Guid="{41D9337E-94AE-4A75-B043-5EF5F07AF078}">
<File Id="fil099E99A272E800F9397CEE0088209F30" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\tb_sar_adc.sch" />
</Component>
<Component Id="cmpCEA3159E3193470BA8EC96C45FDAA7F6" Guid="{7B729546-951C-4649-8D13-16A65D1751EE}">
<File Id="filE525270814D1EB2BA3AB887D889F6A64" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\tb_sar_adc.sym" />
</Component>
<Component Id="cmp3B1CC84B767F30ED3AD8C41BFC813570" Guid="{3626950B-75DD-4E38-9DCA-EDB7E61D3AAE}">
<File Id="fil38FC455119481CBA3658DFCEE8AF6FCE" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\tgate.sch" />
</Component>
<Component Id="cmp9B377E4F4F91B41732596BC305A7FA8D" Guid="{EE4A39E3-91EB-43DB-8C7C-102E2308D5E2}">
<File Id="fil9B3C9375540E3B3046F32D6941025A39" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\ngspice_verilog_cosim\tgate.sym" />
</Component>
</Directory>
<Directory Id="dirBD835285122EBEFC359E369581C7F6C9" Name="pcb"> <Directory Id="dirBD835285122EBEFC359E369581C7F6C9" Name="pcb">
<Component Id="cmp55E5CC645BE7A7C627C0B2B83746BDF6" Guid="{D404BDE3-666E-4503-B0DC-96BABD34263B}"> <Component Id="cmp55E5CC645BE7A7C627C0B2B83746BDF6" Guid="{D404BDE3-666E-4503-B0DC-96BABD34263B}">
<File Id="fil66837EE1DC782258E61586CCB920B273" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\pcb\0_pcb_top.sch" /> <File Id="fil66837EE1DC782258E61586CCB920B273" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\pcb\0_pcb_top.sch" />
@ -7975,7 +8025,9 @@
<ComponentRef Id="cmp81121000EE29EDB7D590EC4C84F1AA2A" /> <ComponentRef Id="cmp81121000EE29EDB7D590EC4C84F1AA2A" />
<ComponentRef Id="cmpD009418B633A058FED795DBEBEBC109A" /> <ComponentRef Id="cmpD009418B633A058FED795DBEBEBC109A" />
<ComponentRef Id="cmp6459B0DD74A47A086E6B614933AFC28C" /> <ComponentRef Id="cmp6459B0DD74A47A086E6B614933AFC28C" />
<ComponentRef Id="cmpF33E5835E3AFEC359F3EF52C98089341" />
<ComponentRef Id="cmp89838BB57E0FD4179DCA4965EB90E8C7" /> <ComponentRef Id="cmp89838BB57E0FD4179DCA4965EB90E8C7" />
<ComponentRef Id="cmp3A991DB4062245FBD1F578B76AAFB226" />
<ComponentRef Id="cmp80F17668356F715FB30000BA77553EBA" /> <ComponentRef Id="cmp80F17668356F715FB30000BA77553EBA" />
<ComponentRef Id="cmpBD9487EA59ED3AE24081A421B0769C70" /> <ComponentRef Id="cmpBD9487EA59ED3AE24081A421B0769C70" />
<ComponentRef Id="cmp97AB2F4BC3ABE4634A8B25AB0F5E28BD" /> <ComponentRef Id="cmp97AB2F4BC3ABE4634A8B25AB0F5E28BD" />
@ -8022,12 +8074,26 @@
<ComponentRef Id="cmp77356AD341ED858C86F7395F40A57F7A" /> <ComponentRef Id="cmp77356AD341ED858C86F7395F40A57F7A" />
<ComponentRef Id="cmpDB6B5CBFE445584C13D50BDB01BBE11A" /> <ComponentRef Id="cmpDB6B5CBFE445584C13D50BDB01BBE11A" />
<ComponentRef Id="cmpC7926C63F014277EC36E893A1F3696D4" /> <ComponentRef Id="cmpC7926C63F014277EC36E893A1F3696D4" />
<ComponentRef Id="cmp03A03DB4D153397E0DA0407EE473F082" />
<ComponentRef Id="cmpD04400F1EAF6A42D0D8294DB788CBB41" />
<ComponentRef Id="cmpFEC120B795E6A9EA4ECF425320D6F3C6" /> <ComponentRef Id="cmpFEC120B795E6A9EA4ECF425320D6F3C6" />
<ComponentRef Id="cmpB653089DCFC0CAA251E4166A6E0EAE0C" /> <ComponentRef Id="cmpB653089DCFC0CAA251E4166A6E0EAE0C" />
<ComponentRef Id="cmp2015FC5E9167C308D6475A30BA070CCC" /> <ComponentRef Id="cmp2015FC5E9167C308D6475A30BA070CCC" />
<ComponentRef Id="cmpCDAAA8F82466F91565BD09D130FB616A" /> <ComponentRef Id="cmpCDAAA8F82466F91565BD09D130FB616A" />
<ComponentRef Id="cmp3CDEBE336A570223DF766E1A767D37CE" /> <ComponentRef Id="cmp3CDEBE336A570223DF766E1A767D37CE" />
<ComponentRef Id="cmp1F8997B22A7D08567BB15C73851418F2" /> <ComponentRef Id="cmp1F8997B22A7D08567BB15C73851418F2" />
<ComponentRef Id="cmpA613D3DF715962FA6F2CBA41D25DB13E" />
<ComponentRef Id="cmp4E71B6DF84D980F2F0B8C50AB43658F0" />
<ComponentRef Id="cmp8A93880DC2E4C5A3881AD0EC7FEFD353" />
<ComponentRef Id="cmp82189982E4A04BEC40CD595C52D08238" />
<ComponentRef Id="cmp1A0A6CB97A7498EC2529B2D077D2CB49" />
<ComponentRef Id="cmpF54BFEBB28AD260C51E60995CD5EA5BE" />
<ComponentRef Id="cmp6E3A3C7E0B1E887495798F4CDDDCBD75" />
<ComponentRef Id="cmpE646B68F472ACF02B3830FB762289243" />
<ComponentRef Id="cmp42527D9091DB5E008C537CA5714100E8" />
<ComponentRef Id="cmpCEA3159E3193470BA8EC96C45FDAA7F6" />
<ComponentRef Id="cmp3B1CC84B767F30ED3AD8C41BFC813570" />
<ComponentRef Id="cmp9B377E4F4F91B41732596BC305A7FA8D" />
<ComponentRef Id="cmp55E5CC645BE7A7C627C0B2B83746BDF6" /> <ComponentRef Id="cmp55E5CC645BE7A7C627C0B2B83746BDF6" />
<ComponentRef Id="cmp638723DEE6C9B17E1C8E1594DA083185" /> <ComponentRef Id="cmp638723DEE6C9B17E1C8E1594DA083185" />
<ComponentRef Id="cmp5B93C1BFDDB73CBE28A4459E3406D3AC" /> <ComponentRef Id="cmp5B93C1BFDDB73CBE28A4459E3406D3AC" />

File diff suppressed because it is too large Load Diff

View File

@ -26,6 +26,9 @@
<Component Id="cmp5BFCD659D613BCDD89442010C8B409AE" Guid="{BDAEE43C-6D3F-4F05-B1E3-C9D7D8DDC3FB}"> <Component Id="cmp5BFCD659D613BCDD89442010C8B409AE" Guid="{BDAEE43C-6D3F-4F05-B1E3-C9D7D8DDC3FB}">
<File Id="fil075F132FD859EDF98C0AAD67FC8F77CA" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\attributes.sym" /> <File Id="fil075F132FD859EDF98C0AAD67FC8F77CA" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\attributes.sym" />
</Component> </Component>
<Component Id="cmp53A8AE8741A24AE5CCD997B132E6070C" Guid="{E4D63113-71ED-4AB5-89B6-0AE577CC4D06}">
<File Id="fil582A8CBBFD874D4BFAB219FCDFA7FC85" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\bindkeys_cheatsheet.sym" />
</Component>
<Component Id="cmp8B38271A0A2367D71EF3F44B18F002CB" Guid="{1F23D370-35A1-44AF-83A2-5585BB8C0C86}"> <Component Id="cmp8B38271A0A2367D71EF3F44B18F002CB" Guid="{1F23D370-35A1-44AF-83A2-5585BB8C0C86}">
<File Id="filDF409E59853F402C6BB473747B49CD6C" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\bsource.sym" /> <File Id="filDF409E59853F402C6BB473747B49CD6C" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\bsource.sym" />
</Component> </Component>
@ -275,6 +278,15 @@
<Component Id="cmpD97AE943007C3AC19332BBE4DD1231CC" Guid="{9E87B48E-7BAC-4BA7-ADB9-AF663E891C8F}"> <Component Id="cmpD97AE943007C3AC19332BBE4DD1231CC" Guid="{9E87B48E-7BAC-4BA7-ADB9-AF663E891C8F}">
<File Id="fil15C79DAD681B86515BAC306AF0B7612A" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\rnmos4.sym" /> <File Id="fil15C79DAD681B86515BAC306AF0B7612A" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\rnmos4.sym" />
</Component> </Component>
<Component Id="cmp49B46F4662130845E4343088AA42DE38" Guid="{4D3651EC-6851-40E4-8FEC-F2D8F78A9BB5}">
<File Id="filEED9882556970814AD7850C652FDEA66" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\scope.sym" />
</Component>
<Component Id="cmp83815AB254A25EFFFFCB48E7A26D44BB" Guid="{7397C2E7-9A69-4573-8B70-EAF1D93A945B}">
<File Id="fil203B1C3344DC9A8B41BC7E92B9B7B44D" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\scope2.sym" />
</Component>
<Component Id="cmp8D77275A41AAFA9F1D403E6F70B3DDC5" Guid="{9783BD30-9157-4640-8200-263C7209C2D4}">
<File Id="fil8D85992D9C398152630DC07165348EB4" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\scope_ammeter.sym" />
</Component>
<Component Id="cmpE8B96CE880019FD2D8721E0EBA844767" Guid="{878EE5E2-EF78-46DD-AFA4-5F3EA4FEC61D}"> <Component Id="cmpE8B96CE880019FD2D8721E0EBA844767" Guid="{878EE5E2-EF78-46DD-AFA4-5F3EA4FEC61D}">
<File Id="fil24CC7B37174D5826F66B50EFFA44387A" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\short.sym" /> <File Id="fil24CC7B37174D5826F66B50EFFA44387A" KeyPath="yes" Source="$(var.xschemLibrarySrcDir)\devices\short.sym" />
</Component> </Component>
@ -371,6 +383,7 @@
<ComponentRef Id="cmp6B88C7B9D8CFC4FF40D953C136587245" /> <ComponentRef Id="cmp6B88C7B9D8CFC4FF40D953C136587245" />
<ComponentRef Id="cmpDF5400FB08BB656821AB8CBB45FA321F" /> <ComponentRef Id="cmpDF5400FB08BB656821AB8CBB45FA321F" />
<ComponentRef Id="cmp5BFCD659D613BCDD89442010C8B409AE" /> <ComponentRef Id="cmp5BFCD659D613BCDD89442010C8B409AE" />
<ComponentRef Id="cmp53A8AE8741A24AE5CCD997B132E6070C" />
<ComponentRef Id="cmp8B38271A0A2367D71EF3F44B18F002CB" /> <ComponentRef Id="cmp8B38271A0A2367D71EF3F44B18F002CB" />
<ComponentRef Id="cmpD042A22D0CFCBF4CF2BE08A941DD8077" /> <ComponentRef Id="cmpD042A22D0CFCBF4CF2BE08A941DD8077" />
<ComponentRef Id="cmp41894FA8F8DE5B9A1B24E5C840E37F54" /> <ComponentRef Id="cmp41894FA8F8DE5B9A1B24E5C840E37F54" />
@ -454,6 +467,9 @@
<ComponentRef Id="cmpA6D9B275607613A4C61E8980D499B751" /> <ComponentRef Id="cmpA6D9B275607613A4C61E8980D499B751" />
<ComponentRef Id="cmpE33D206A79E72DCC203BF9219CECA21A" /> <ComponentRef Id="cmpE33D206A79E72DCC203BF9219CECA21A" />
<ComponentRef Id="cmpD97AE943007C3AC19332BBE4DD1231CC" /> <ComponentRef Id="cmpD97AE943007C3AC19332BBE4DD1231CC" />
<ComponentRef Id="cmp49B46F4662130845E4343088AA42DE38" />
<ComponentRef Id="cmp83815AB254A25EFFFFCB48E7A26D44BB" />
<ComponentRef Id="cmp8D77275A41AAFA9F1D403E6F70B3DDC5" />
<ComponentRef Id="cmpE8B96CE880019FD2D8721E0EBA844767" /> <ComponentRef Id="cmpE8B96CE880019FD2D8721E0EBA844767" />
<ComponentRef Id="cmpCEAF5664B6AEF38BECFAF994B2D9A81A" /> <ComponentRef Id="cmpCEAF5664B6AEF38BECFAF994B2D9A81A" />
<ComponentRef Id="cmp0F9FB8C96A0FFABEBE019FD047730B71" /> <ComponentRef Id="cmp0F9FB8C96A0FFABEBE019FD047730B71" />

View File

@ -1732,6 +1732,7 @@ int copy_hierarchy_data(const char *from_win_path, const char *to_win_path)
my_strdup2(_ALLOC_ID_, &to->hier_attr[i].prop_ptr, hier_attr[i].prop_ptr); my_strdup2(_ALLOC_ID_, &to->hier_attr[i].prop_ptr, hier_attr[i].prop_ptr);
my_strdup2(_ALLOC_ID_, &to->hier_attr[i].templ, hier_attr[i].templ); my_strdup2(_ALLOC_ID_, &to->hier_attr[i].templ, hier_attr[i].templ);
my_strdup2(_ALLOC_ID_, &to->hier_attr[i].symname, hier_attr[i].symname); my_strdup2(_ALLOC_ID_, &to->hier_attr[i].symname, hier_attr[i].symname);
my_strdup2(_ALLOC_ID_, &to->hier_attr[i].sym_extra, hier_attr[i].sym_extra);
if(to->portmap[i].table) str_hash_free(&to->portmap[i]); if(to->portmap[i].table) str_hash_free(&to->portmap[i]);
str_hash_init(&to->portmap[i], HASHSIZE); str_hash_init(&to->portmap[i], HASHSIZE);
for(j = 0; j < HASHSIZE; j++) { for(j = 0; j < HASHSIZE; j++) {
@ -2457,6 +2458,8 @@ int descend_schematic(int instnumber, int fallback, int alert, int set_title)
my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].prop_ptr, my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].prop_ptr,
xctx->inst[n].prop_ptr); xctx->inst[n].prop_ptr);
my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ, xctx->sym[xctx->inst[n].ptr].templ); my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ, xctx->sym[xctx->inst[n].ptr].templ);
my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].sym_extra,
get_tok_value(xctx->sym[xctx->inst[n].ptr].prop_ptr, "extra", 0));
dbg(1,"descend_schematic(): inst_number=%d\n", inst_number); dbg(1,"descend_schematic(): inst_number=%d\n", inst_number);
my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], find_nth(str, ",", "", 0, inst_number)); my_strcat(_ALLOC_ID_, &xctx->sch_path[xctx->currsch+1], find_nth(str, ",", "", 0, inst_number));
@ -2554,6 +2557,7 @@ void go_back(int what)
xctx->currsch--; xctx->currsch--;
my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].prop_ptr); my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].prop_ptr);
my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ); my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ);
my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].sym_extra);
save_modified = xctx->modified; /* we propagate modified flag (cleared by load_schematic */ save_modified = xctx->modified; /* we propagate modified flag (cleared by load_schematic */
/* by default) to parent schematic if going back from embedded symbol */ /* by default) to parent schematic if going back from embedded symbol */

View File

@ -60,7 +60,7 @@ static void my_cairo_fill(cairo_surface_t *src_surface, int x, int y, unsigned i
cairo_surface_destroy(dest_surface); dest_surface = NULL; cairo_surface_destroy(dest_surface); dest_surface = NULL;
} }
#endif #endif
#ifdef __unix__
int xserver_ok(void) int xserver_ok(void)
{ {
int has_x = 1; int has_x = 1;
@ -77,6 +77,7 @@ int xserver_ok(void)
} }
return has_x; return has_x;
} }
#endif
int textclip(int x1,int y1,int x2,int y2, int textclip(int x1,int y1,int x2,int y2,
double xa,double ya,double xb,double yb) double xa,double ya,double xb,double yb)

View File

@ -5204,6 +5204,8 @@ int descend_symbol(void)
xctx->inst[n].prop_ptr); xctx->inst[n].prop_ptr);
my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ, my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].templ,
xctx->sym[xctx->inst[n].ptr].templ); xctx->sym[xctx->inst[n].ptr].templ);
my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch].sym_extra,
get_tok_value(xctx->sym[xctx->inst[n].ptr].prop_ptr, "extra", 0));
if(!xctx->inst[n].embed) if(!xctx->inst[n].embed)
/* use -1 to keep track we are descending into symbol from instance with no embed attr /* use -1 to keep track we are descending into symbol from instance with no embed attr

View File

@ -474,6 +474,8 @@ int global_spice_netlist(int global, int alert) /* netlister driver */
/* only additional symbols (created with instance schematic=... attr) will have this attribute */ /* only additional symbols (created with instance schematic=... attr) will have this attribute */
my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].prop_ptr, my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].prop_ptr,
tcl_hook2(xctx->sym[i].parent_prop_ptr)); tcl_hook2(xctx->sym[i].parent_prop_ptr));
my_strdup(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].sym_extra,
get_tok_value(xctx->sym[i].prop_ptr, "extra", 0));
my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, "")); my_strdup(_ALLOC_ID_, &abs_path, abs_sym_path(xctx->sym[i].name, ""));
if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path)) if(strcmp(xctx->sym[i].type,"subcircuit")==0 && check_lib(1, abs_path))
{ {
@ -504,6 +506,8 @@ int global_spice_netlist(int global, int alert) /* netlister driver */
my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].templ); my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].templ);
if(xctx->hier_attr[xctx->currsch - 1].prop_ptr) if(xctx->hier_attr[xctx->currsch - 1].prop_ptr)
my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].prop_ptr); my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].prop_ptr);
if(xctx->hier_attr[xctx->currsch - 1].sym_extra)
my_free(_ALLOC_ID_, &xctx->hier_attr[xctx->currsch - 1].sym_extra);
my_free(_ALLOC_ID_, &abs_path); my_free(_ALLOC_ID_, &abs_path);
/* get_additional_symbols(0); */ /* get_additional_symbols(0); */
my_free(_ALLOC_ID_, &subckt_name); my_free(_ALLOC_ID_, &subckt_name);

View File

@ -46,7 +46,7 @@ static int tedax_netlist(FILE *fd, int tedax_stop )
{ {
if(skip_instance(i, 1, lvs_ignore)) continue; if(skip_instance(i, 1, lvs_ignore)) continue;
my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type); my_strdup(_ALLOC_ID_, &type,(xctx->inst[i].ptr+ xctx->sym)->type);
if(!strcmp(type,"noconn")) continue; if(type && !strcmp(type,"noconn")) continue;
if( type && !IS_LABEL_OR_PIN(type) ) { if( type && !IS_LABEL_OR_PIN(type) ) {
/* already done in global_tedax_netlist */ /* already done in global_tedax_netlist */
if(!strcmp(type,"netlist_commands") && xctx->netlist_count==0) continue; if(!strcmp(type,"netlist_commands") && xctx->netlist_count==0) continue;

View File

@ -2391,10 +2391,12 @@ int print_spice_element(FILE *fd, int inst)
size_t tok_val_len; size_t tok_val_len;
char *parent_prop_ptr = NULL; char *parent_prop_ptr = NULL;
char *parent_templ = NULL; char *parent_templ = NULL;
char *parent_sym_extra = NULL;
if(xctx->currsch > 0) { if(xctx->currsch > 0) {
parent_prop_ptr = xctx->hier_attr[xctx->currsch - 1].prop_ptr; parent_prop_ptr = xctx->hier_attr[xctx->currsch - 1].prop_ptr;
parent_templ = xctx->hier_attr[xctx->currsch - 1].templ; parent_templ = xctx->hier_attr[xctx->currsch - 1].templ;
parent_sym_extra = xctx->hier_attr[xctx->currsch - 1].sym_extra;
} }
dbg(1, "print_spice_element(): token: |%s|\n", token); dbg(1, "print_spice_element(): token: |%s|\n", token);
@ -2414,8 +2416,15 @@ int print_spice_element(FILE *fd, int inst)
* ..." * ..."
* model=nfet_01v8 * model=nfet_01v8
*/ */
my_strdup2(_ALLOC_ID_, &val,
if(parent_sym_extra && strstr(parent_sym_extra, token + 1)) {
/* do not translate extra pins with parent instance attributes */
my_strdup2(_ALLOC_ID_, &val,
translate3(token, 0, xctx->inst[inst].prop_ptr, NULL, NULL, NULL));
} else {
my_strdup2(_ALLOC_ID_, &val,
translate3(token, 0, xctx->inst[inst].prop_ptr, parent_prop_ptr, NULL, NULL)); translate3(token, 0, xctx->inst[inst].prop_ptr, parent_prop_ptr, NULL, NULL));
}
/* can not put template in above translate3: ---------------------------^^^^ /* can not put template in above translate3: ---------------------------^^^^
* if instance has VHI=VHI, format string has VHI=@VHI, and symbol template has VHI=3 * if instance has VHI=VHI, format string has VHI=@VHI, and symbol template has VHI=3
* we do not want token @VHI to resolve to 3, but stop at VHI as specified in instance */ * we do not want token @VHI to resolve to 3, but stop at VHI as specified in instance */

View File

@ -408,6 +408,7 @@ static void free_xschem_data()
if(xctx->hier_attr[i].templ) my_free(_ALLOC_ID_, &xctx->hier_attr[i].templ); if(xctx->hier_attr[i].templ) my_free(_ALLOC_ID_, &xctx->hier_attr[i].templ);
if(xctx->hier_attr[i].prop_ptr) my_free(_ALLOC_ID_, &xctx->hier_attr[i].prop_ptr); if(xctx->hier_attr[i].prop_ptr) my_free(_ALLOC_ID_, &xctx->hier_attr[i].prop_ptr);
if(xctx->hier_attr[i].symname) my_free(_ALLOC_ID_, &xctx->hier_attr[i].symname); if(xctx->hier_attr[i].symname) my_free(_ALLOC_ID_, &xctx->hier_attr[i].symname);
if(xctx->hier_attr[i].sym_extra) my_free(_ALLOC_ID_, &xctx->hier_attr[i].sym_extra);
} }
my_free(_ALLOC_ID_, &xctx->gridpoint); my_free(_ALLOC_ID_, &xctx->gridpoint);
@ -596,6 +597,7 @@ static void alloc_xschem_data(const char *top_path, const char *win_path)
xctx->sch_path_hash[i]=0; xctx->sch_path_hash[i]=0;
xctx->hier_attr[i].prop_ptr = NULL; xctx->hier_attr[i].prop_ptr = NULL;
xctx->hier_attr[i].templ = NULL; xctx->hier_attr[i].templ = NULL;
xctx->hier_attr[i].sym_extra = NULL;
xctx->hier_attr[i].symname = NULL; xctx->hier_attr[i].symname = NULL;
xctx->hier_attr[i].fd = NULL; xctx->hier_attr[i].fd = NULL;
xctx->portmap[i].table = NULL; xctx->portmap[i].table = NULL;

View File

@ -696,6 +696,7 @@ typedef struct
char *prop_ptr; char *prop_ptr;
char *templ; char *templ;
char *symname; char *symname;
char *sym_extra;
} Lcc; } Lcc;
typedef struct { typedef struct {