Qucs / qucs

Qucs Project official mirror
http://qucs.sourceforge.net/
GNU General Public License v2.0
1.15k stars 213 forks source link

Dragging from the library dock window make a corrupt netlist #39

Closed hoditohod closed 10 years ago

hoditohod commented 10 years ago

Version: Qucs 0.0.18 official windows build.

How to reproduce:

Observed outcome: syntax error in netlist line 12: checker error, subcircuit typeBridges_KBPC1005' requires 4 nodes in Sub:_net0', found 3

Netlist:

# Qucs 0.0.18  C:/Users/Gyorgy Szekely/.qucs/zxcfjksdn_prj/xdfgf.sch

.Def:Bridges_KBPC1005 _net0 _net1 _net2 _net3
      Diode:D1 _net0 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D2 _net2 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D3 _net3 _net2 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D4 _net3 _net0 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
    .Def:End

Sub: _net0 _net1 _net2 _net3 Type="Bridges_KBPC1005"

Note the missing subnet name!

Workaround:

The netlist is correct in this case:

# Qucs 0.0.18  C:/Users/Gyorgy Szekely/.qucs/zxcfjksdn_prj/xdfgf.sch

.Def:Bridges_KBPC1005 _net0 _net1 _net2 _net3
      Diode:D1 _net0 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D2 _net2 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D3 _net3 _net2 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D4 _net3 _net0 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
    .Def:End

Sub:D1 _net0 _net1 _net2 _net3 Type="Bridges_KBPC1005"
guitorri commented 10 years ago

Dragging from the dock does not instantiate the component properly. See below the schematic section for a bridge dragged from the dock and another from the Qucs Library Tool.

<Components>
  <Lib * 1 220 130 0 0 0 0 "Bridges" 0 "GBU4G" 0>
  <Lib D1 1 390 210 20 20 0 0 "Bridges" 0 "GBU4G" 0>
</Components>
ra3xdh commented 10 years ago

Bug is confirmed for Linux. This bug appears for only components that contains subcircuits (Diode bridges, NMOSFETS with diode, etc., but not opamps). Single transistors can be placed on schematic without problems.

guitorri commented 10 years ago

These libs seem to trigger the issue:

 BRIDGES    LIB
 MOSFETs    LIB
 NMOSFETs   LIB
 PMOSFETs   LIB
 Varistor   LIB
 ZDiodes    LIB
yodalee commented 10 years ago

I cannot reproduce this, since I can only add these element by drop and drag them in the "manage libraries", and the sub-circuit will be properly initialize in this way.

guitorri commented 10 years ago

Thank you @ra3xdh !