X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-CMAE-Analysis: v=2.4 cv=d+MwdTvE c=1 sm=1 tr=0 ts=60848921 a=+cj0cO56Fp8x7EdhTra87A==:117 a=uk6vJ0hgOxDmNQKXMQJsew==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=3YhXtTcJ-WEA:10 a=a1KZgU7cAAAA:8 a=I-LazPasD4mt-s8hlksA:9 a=QEXdDO2ut3YA:10 a=ng0hpkU2jXKPaRTLMVYJ:22 X-SECURESERVER-ACCT: glimrick AT epilitimus DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=epilitimus.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YNq/Fjktt/xsOvEfRlaZhrEOBewrQ6l6zGBo6TpaWhA=; b=eRQRImmusmjbVB4v3YEPvK4rGM M/EKNgs9eZXGE4vVGr9f2SOIyZyXrdMTKSZmZjdCkgTbAOx0I18rqW5s+T2UgXBKS9d6ApxV9+x86 9NF29gOD/6VI+K+yEWfAd33Ep3ig+t7zYiPOnw3eQOdMju29iAcdbr0MVXkwJtCUdKTBzVj6JksEv RhnJsdmG6r5+dhJUfLBrRHjCnPEEST19TC4nUFtTn2J6z4HylgrDGBwDQu40Z7Gg675789UZlctUJ tWR54xS8zZQHkmPr8scO91Kd/lv0//30qKv+RfdanZdpY7Zqx97Ng7ZHxOM8j7kqGTc1W7rD67RJ+ g4pGH2xw==; Subject: Re: [geda-user] xspice integration To: geda-user AT delorie DOT com References: <9fe0dd9a-cbb8-a51f-f63d-36cd6d3a31c7 AT epilitimus DOT com> <4775a561-41ad-5368-271a-998ded5bfbc6 AT epilitimus DOT com> From: "Glenn (glimrick AT epilitimus DOT com) [via geda-user AT delorie DOT com]" Message-ID: <07d13043-cd66-88f1-4b6c-172345c864e1@epilitimus.com> Date: Sat, 24 Apr 2021 13:10:02 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2plcpnl0121.prod.iad2.secureserver.net X-AntiAbuse: Original Domain - delorie.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - epilitimus.com X-Get-Message-Sender-Via: a2plcpnl0121.prod.iad2.secureserver.net: authenticated_id: glimrick AT epilitimus DOT com X-Authenticated-Sender: a2plcpnl0121.prod.iad2.secureserver.net: glimrick AT epilitimus DOT com X-Source: X-Source-Args: X-Source-Dir: X-CMAE-Envelope: MS4xfDGo/ho029g6O3L1iKHFcqj9SU9vW/2OvHOfJxOnx7dMPX72wrrNHBy2UTQFxQ4LSTGgV4wqrnmV2zGdQfBvlINUm7AxELYpltGluALI5l+yc1KQhFbG jfS44PuDv+l7YmYOHNGW+zI6kOSeUhwOncCXZA966kH/p1k/lH1MSoZF1slfLsqVal0mF1SCnP4VWjk5MhpPEerrIsfQTLRoWydFt5fuRH/Z35ID6PTchRwP Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Roland, > A few first questions about xspice: > > Is the repository at http://epilitimus.com/git_repos/xspice.git the > latest version?  Are there any other resources I need to consider?  It > looks to me like I'm missing something.  The web page is mentioning > libs/ and symbols/ subdirectories, but they don't appear to be in the > repository. Also, it mentions XML files, but I couldn't find any. > First since you have it, copy the file test/models/2n3904.mod somewhere outside of the xspice tree. You will need it later and it will save you some hunting to have it on hand. I had to remove it from the repository as it is from an external source. As for the repo problem I had forgotten to set up to automatically do update-server-info after each push. I fixed that so you should now get the current version. last commit should be: > commit cb3f7ce4acb9e501352cd4778aa90c16ff1994f6 (HEAD -> master, > origin/master, origin/HEAD) > Author: Glenn Pavlovic > Date:   Thu Apr 8 15:32:58 2021 -0800 > >     Added vector aliases Let me know if there is still a problem. > Your backend is called "xspice", but in the example, the resulting > .cir file is further processed with ngspice.  Is this temporary, > specific to the test, an oversight, or is "x" really a placeholder for > "any of the derivatives"? > > Also, what does "convert non spice native devices in to the > corresponding spice models and subcircuits to be usable in ngspice" mean? I'm going to try to answer these without the Encyclopedia Britannica answer... Spice understands a specific set of devices namely passives (like resistors, capacitors, etc.), various sources (both voltage and current), several flavors of transistors (BJT, FET, etc.), and a few others. These are the native spice devices which every version of spice knows what to do with. Subcircuits are a native device which contain other native devices. An analogy would be: native devices are to spice what keywords are to the C compiler, subcircuits are to spice what functions are to the compiler. XSpice is a superset of spice. Among other things it adds a bunch of new native devices, gain blocks, flip-flops, etc. Ngspice is an implementation of spice which also has xspice support. To use the xspice extensions, ngspice must be built with the --enable-xspice command line switch to configure. It usually is but that is up to whoever built it for your machine. So, you process an xspice netlist with ngspice which has been built with xspice extensions enabled. Also because xspice is a superset of spice, the xspice backend will generate a valid *spice* netlist provided no xspice components are used. The only difference (mostly) between a *spice* netlist and an *xspice* netlist is the additional native devices which xspice supports. Any device which spice/xspice (hereafter ngspice, and the --enable-xspice is assumed) doesn't know what to do with must be converted into some combination of models and subcircuits which are known. For example ngspice doesn't know anything about LM555 timers. So if a schematic contains an LM555 that device must first be converted into something ngspice can work with before it can be simulated. Previously this was done by hand. Please keep in mind that there are entire college courses devoted to using spice, so there are no stupid questions, but the learning curve may be a bit steep. It is like trying to understand OOP while only having worked in traditional BASIC. If you still have questions after the above feel free to ask and I will go into more detail. > Also, some files are missing license headers.  Can I assume the > license in gnet_xspice.py applies to the rest of the code, as well, > and the other files are under the same license as the corresponding > files in gEDA/gaf? I am actually unclear as to what exactly the license is that geda/gaf is released under as the COPYING file references GPL and there is also a COPYING.LGPL file. In any case my intention is to release this under the GPL unless geda is actually under the more restrictive LGPL. So yes, all files are released under one license and it is my intention that it be the license used by the bulk of geda/gaf. A further point along these lines. In the past spice models were usually obtained from manufacturers and so were copyrighted by them. This is the reason for the comment at the top of libs/xspiceLib_74xx.lib , and why I had to remove the 2N3904.mod from the repo. I need to revise that comment and add it to all the other libraries as well, to allow for both multiple authors and still make clear the contained stuff is not from any copyrighted sources. Glenn