ra3xdh / qucs_s

Qucs-S is a circuit simulation program with Qt-based GUI
https://ra3xdh.github.io/
GNU General Public License v2.0
848 stars 110 forks source link

Replacement for Qucs Verilog-A Library #980

Open tomhajjar opened 1 week ago

tomhajjar commented 1 week ago

Slowly making replacements for the Qucs Verilog-A Library devices.

1) Modded VCR.sch to get rid of divide by zero if Vin=0 volts. What actual VCR is chosen is TBD. 2) A new mod-amp was created using a Spice model supplied by Holger, @holvo 3) Qucs Curtice EDD based MESFET has been updated by @ra3xdh to work in ngspice. 4) IGBT "generic" model from Intusoft based on IRGBC40U. The "real" manufacturer model doesn't work right in ngspice or LTspice. Some of the libraries have a dozen devices in them and "confuse" Qucs/ngspice. 5) Use BSIM3 to replace EKV. The models and device parameters are used in the ngspice examples. At this point I didn't make the parameters user selectable. I need to know which ones would be useful to the end user.

Other devices will take time.

Verilog-A_qucs

2024-10-01_133425 2024-10-01_133057 2024-10-01_133036 2024-10-01_171959 2024-10-01_211402 2024-10-01_211417 2024-10-01_211549

Verilog-A_Lib_qucs_prj.zip

tomhajjar commented 6 days ago

Made a Voltage Controlled Amplifier (VCA) from the Ideal Multiplier.

Presently the Control Voltage, Vc is not bounded. Voltage can be any positive or negative voltage. Gain is negative when Vc <0V.

2024-10-02_231711 2024-10-02_232545

VCA_prj.zip

ra3xdh commented 5 days ago

The replacement of the Qucsator Verilog-A devices for Ngspice is not straightforward task. The SPICE entries may be directly generated only for VCRES and POT devices. The firs in fact VCCS and the second is two series resistors. Other devices in principle may be integrated only as subcircuit macromodel. Qucsator doesn't support something like SPICE .INCLUDE directive. Only integration via library is possible.

The current implementation doesn't support attaching subcircuits to to hardcoded C++ system library devices. The extension at C++ level is needed here. The XML library may a transitional solution.

The better solution would be implementing the #343 Maybe I will return to this task after the status of the OpenVAF will become clear.

Summarizing all above, I would keep the Verilog-A devices group except VCRES and POT as is. These devices are rarely used and were designed as a demo of Qucs+ADMS link. Let's wait for implementation of #343. The QucsatorRF should be switched to OSDI interface in the future. But I don't consider implementation of this feature in the near future because of short of time.