This is an old revision of the document!


Language plugin for Qucs (see http://git.savannah.gnu.org/cgit/gnucap/gnucap-plugins.git/log/?h=qucs for an implementation)

The basic idea is to parse a qucs schematic or a qucsator netlist.

gnucsator

qucsator is the default simulation engine behind the qucs user interface. it does dc/ac/tran and sparam analysis, and maybe a (simplified, linear?) kind of harmonic balance.

The use is quite limited due to the interface between qucs and qucsator, but it defines a sort of interface between the projects.

gnucsator aims to be a drop-in replacement for gnucsator, that means it will - provide the components implemented in qucsator, - have to read the netlist (unless/until somebody fixes this) - produce output equivalent to qucsator output (“dat” file format). - interpret simulation commands (embedded into the netlist) like qucsator.

Example of a qucsator netlist file
# Qucs 0.0.16  bridge.sch
 
IProbe:Pr1 _net0 _net1
R:R2 _net2 _net3 R="500 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
Vdc:V1 _net3 gnd U="1 V"
R:R5 gnd _net2 R="Rmeasure" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
R:R1 _net0 _net3 R="Rbranch" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
R:R4 gnd _net0 R="Rbranch" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
.DC:DC1 Temp="26.85" reltol="0.001" abstol="1 pA" vntol="1 uV" saveOPs="no" MaxIter="150" saveAll="no" convHelper="none" Solver="CroutLU"
R:R3 _net1 _net2 R="500 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
.SW:SW1 Sim="DC1" Type="lin" Param="Rmeasure" Start="10 Ohm" Stop="1 kOhm" Points="100"
.SW:SW2 Sim="SW1" Type="lin" Param="Rbranch" Start="200 Ohm" Stop="1 kOhm" Points="4"
Eqn:Eqn1 Umeasure="500 * abs(Pr1.I)" Export="yes"
Description of the Netlist file

First line shows the version of the qucs and the file path

The list of the components in Qucs can be seen in the link below http://qucs.sourceforge.net/docs/textmode.pdf

Description of the qucsator output file

TODO. tl;dr; some upside-down xml inspired layout without simulation labels.

description of the simulation commands

TODO.

Description of a schematic file

The schematic format used in qucs is not worth the trouble. It will be easy to represent the schematic as a verilog netlist, once qucs supports additional file formats. (then drop the qucsator netlists).

Implementing the Components

We need to provide (most/all) of the components supported by qucsator. It would be possible to wrap them, using a wrapper similar to spice_wrapper (e.g. http://git.savannah.gnu.org/cgit/gnucap/gnucap-plugins.git/tree/qucs_wrapper.cc?h=qucs). It does not seem to be worth the trouble. The approach here https://git.savannah.gnu.org/cgit/gnucap/gnucap-plugins.git/tree/STATUS?h=qucs aims at implementing the components in terms of modules that (re-)use existing gnucap components. Some components are written in Verilog-A, ideally all would be implemented like this.

== misc

_net gives information about in between which nodes the component is connected

gnucap/user/language_plugin_for_qucs.1529493269.txt.gz · Last modified: 2018/06/20 06:14 by felixs
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki