Closed ra3xdh closed 7 years ago
Support for the development of new XSPICE Code Models is up and running. Modellers can now add new XSPICE Code Models to their user libraries. A route is also available for Developers to add XSPICE Code Models to a new Qucs library called AnalogueCM. At this time this just contains a new Esaki Tunnel Diode model. The results from test simulations are shown below. More models to follow in the future and ASAP a section will be added to the spice4qucs-help document outlining this new modelling capability.
@r2com This bug is not in spice4qucs
subsystem. GUI crash on manual changing axis limits is related to #305 and #313 . It should be fixed in mainline code. The latest Qucs-0.0.19S-rc5 contain this and many other fixes. Please use RC5 package from here: https://github.com/ra3xdh/qucs/releases/tag/0.0.19S-rc5
ok i downloaded the one from here. seems to scale without problems.
Another question, when i select "simulate with spice" and then click to simulate... for some reason there is like 10 second freezing delay before everything starts working/simulating. why is that? (again on win7/10)
Do you experience same delay between button press and the start of simulation?
No, I have never met such delays before. It is the first report. Could you please send me your schematic to reproduce this bug?
its not really much of a circuit just source and cap. but here is a link to zipped project anyway: http://www.filedropper.com/test1prj
Added to the spice4qucs_current branch a new library containing a high percentage of the standard XSPICE analogue Code Models. The library is called Xanalogue to differentiate it from the library containing user generated XSPICE Code Models. This is the first step in the process needed to add mixed analogue/digital simulation to Qucs-S. The symbols for the new library are given in the following screen dump. The remaining diagrams show two examples recorded during testing of the new library. The full set of model tests can be found under directory Xanalogue-tests held below directory Ngspice in the Qucs example directory.
Mike, are all those components available now in rc5 build? or all these changes will be from rc6?
Hello r2com The process of developing Qucs-S is an ongoing process.Each rcX release tries to capture recent changes. However, therewill always be a small lag in bringing Qucs-S fully up to date. The latest development version can be downloaded and compiled (Linux)from branch spice4qucs_current.
At the present time I am starting the process of unifying the XSPICE modelsadded to Qucs-S. Our intention is to move as many as possible to libraries outsidethe core C++ code. This will have the advantage of keeping the core package code toa manageable size. In the long term it should be possible for users to load only those librariesrequired for a particular task. I will ask Vadim if he would consider releasing another rcX version once the basic library changes arecomplete. Best wishes. Mike Mike Brinson mbrin72043@yahoo.co.uk
From: r2com <notifications@github.com>
To: Qucs/qucs qucs@noreply.github.com Cc: MikeBrinson mbrin72043@yahoo.co.uk Sent: Tuesday, 19 April 2016, 15:11 Subject: Re: [Qucs/qucs] Spice4qucs. A tool to simulate Qucs circuit with ngspice (#77)
Mike, are all those components available now in rc5 build? or all these changes will be from rc6?— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub
@r2com
10 second freezing delay before everything starts
Yes, I can reproduce it. I have also tested it with slow machine and slow HDD. These delays can take place for circuit with over 10k transient simulation points. For fast machines the limit is about 100k simulation points. The reasons are multiple:
All of mentioned fixes are available at spice4qucs_current branch (Last commits). I will backport them into upcoming 0.0.19S release.
are all those components available now in rc5 build? or all these changes will be from rc6?
I don't consider preparation of rc6 build. Maybe it can take place only if 0.0.19 release will be further delayed. New Xanalogue.lib library may be included directly in 0.0.19S release package.
Hello all
The Xanalogue.lib is available in the spice4qucs_current branch. A set of test examples isalso included in the Qucs examples directory. However, there around five other XSPICE analogue code models which are difficult to include in the Xanalogue.lib due to their requirementfor vector subcircuit parameters. At present I am adding these to the XSPICE analogue blocks sectionof the built-in component lists. Duplicate models like the adder, multiplier and others will then be removed from theXSPICE analogue block list. This work should be finished in a week or so. Best wishes. Mike Mike Brinson mbrin72043@yahoo.co.uk
From: Vadim Kusnetsov <notifications@github.com>
To: Qucs/qucs qucs@noreply.github.com Cc: MikeBrinson mbrin72043@yahoo.co.uk; State change state_change@noreply.github.com Sent: Sunday, 24 April 2016, 8:36 Subject: Re: [Qucs/qucs] Spice4qucs. A tool to simulate Qucs circuit with ngspice (#77)
@r2com 10 second freezing delay before everything starts Yes, I can reproduce it. I have also tested it with slow machine and slow HDD. These delays can take place for circuit with over 10k transient simulation points. For fast machines the limit is about 100k simulation points. The reasons are multiple:
@ra3xdh
So is there a version now with all the fixes regarding sim. speed you mentioned in a new build? (some fixes + raw binary data format fix) ?
If yes, can you provide a link where i can download it? i tried searching it, didnt find "current branch"? maybe looking in a wrong place.
Also, are you saying that Windows version will be slower than Linux one in that sense?
Added XSPICE pwl component to "XPICE analogue blocks"; see example given below:-
Sorry if writing to the wrong node, what is the current state of Spice4qucs?
According to your last message: " _The next version of Qucs-S will be switched to spice3f5 raw-binary format that is sufficient faster. I have added a temporary fix that will increase parsing speed. Now the whole files are read into RAM and then parsed. All of mentioned fixes are available at spice4qucscurrent branch (Last commits). I will backport them into upcoming 0.0.19S release."
So is the current 0.0.19S already has those changes for speed and RAW binary data parsing?
Yes, the latest Qucs-0.0.19S-RC6 is switched to binary datasets by default. You can download it here: https://github.com/ra3xdh/qucs/releases/tag/0.0.19S-rc6 This fix was missing in release notes.
alright, at first glance, it does seem to work faster.
I only at the very first run noticed freezing with Ngspice, but after reload it never happened again.
I also decided to download SpiceOpus and try that as well, it also was relatively fast. Of course I'll need to play with some more complex circuits later to tell more.
There are several comments/questions:
1) Where did Microwave components from library component list disappear? Like Stubs,opens,and tons of other RF microwave components?
2) I saw you added Xyce Serial and Xyce Parallel sims there, so any comments on them working under Windows with Spice4QUCS?
3) why a very specific (older i guess?) MIngW version for Verilog-A? Will it be fixed too to work with latest? Or its permanent?
Hello r2com Thanks for your interest in spice4qucs. Xyce is fully integrated with spice4qucs. The serial version of Xyce can be downloaded as a binaryfrom the Xyce web site. Currently we are making an effort to bring the spice4qucs-help documentationup to date so that it outlines the use of all the modelling and simulation features embedded in the spice4qucspackage. This process will continue over the summer period in parallel with testing the latest additions the spice4qucs. Our intention is to try and generate an in depth user and reference manual for spice4qucs which includes circuit examples of gradedcomplexity. This will take time however, mainly because spice4qucs has developed into a very extensive circuit design tool and modelling package with many features that will probably not be obvious to the casual user. To keep up to date on our progress in developing spice4qucs I suggest that you regularly look at the spice4qucs-help documentation on the web. Best wishes. Mike
Mike Brinson mbrin72043@yahoo.co.uk
From: r2com <notifications@github.com>
To: Qucs/qucs qucs@noreply.github.com Cc: MikeBrinson mbrin72043@yahoo.co.uk; State change state_change@noreply.github.com Sent: Wednesday, 6 July 2016, 16:13 Subject: Re: [Qucs/qucs] Spice4qucs. A tool to simulate Qucs circuit with ngspice (#77)
alright, at first glance, it does seem to work faster.I only at the very first run noticed freezing with Ngspice, but after reload it never happened again.I also decided to download SpiceOpus and try that as well, it also was relatively fast. Of course I'll need to play with some more complex circuits later to tell more.I have a question, I saw you added Xyce Serial and Xyce Parallel sims there, so any comments on them working under Windows with Spice4QUCS?— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
thanks but what about my questions #1 and #3 in previous post?
Specifically question #1, where did all the Microwave components disappear from the component library in 0.0.19S-rc6?
Qucs RF components are SPICE-incompatible and they are not (and should not) be shown when Ngspice/XYCE is selected as default simulator. Such components will not work with SPICE and you should use SPICE models (LTRA, UDRCL,etc.) instead. The latest Qucs-S version has the default simulation setting. You may select Qucsator, Ngspice, or XYCE as default simulation kernel. Simulator-incompatible devices will become unavailable to avoid errors that may be very hard to debug.
ok, i selected qucsator and see them now. Nevermind, I just wanted to make sure that if i want RF stuff, i can use microwave stuff as well, so all i have to do is select qucsator and they appear. got it.
now, what is about the 3rd question: why a very specific (older i guess?) MIngW version for Verilog-A? Will it be fixed too to work with latest? Or its permanent?
Verilog-A modules and Qucs application should be compiled by the identical version of C++ compiler. Other combinations may not work. It is feature of standard C++ library of MinGW and cannot be fixed at the Qucs side.
two more questions: 1) "Verilog-A modules and Qucs application should be compiled by the identical version of C++ compiler."
Can the whole thing be compiled with MSVC201564bit then? Both Verilog Modules and QUCS?
2) Do the plots made in QUCS after simulation utilize the GPU? Are they done in OpenGL or not?
I don't know about spice4qucs
specifically, but there was some work done by @guitorri on compiling the Qucs GUI with VS2010, see #239 and the end of Qucs/ADMS#16, here, not merged because "not yet ready", apparently (?).
The plots do not use OpenGL.
I have just added experimental direct support of SPICE libraries in Qucs with Ngspice/Xyce backend. Sources are available at spice4qucs_current branch. It allows to attach SPICE libraries directly to Qucs bypassing all compatibility layers (such as qucsconv
tool).
You should give *.lib extension an existing SPICE library and put in into $HOME/.qucs/user_lib
or system Qucs library directory. Then you can get access to SPICE library via QucsLib
tool or from the left-side dock.
SPICE library is treated as a set of .SUBCKT entries. Every .SUBCKT found is considered as a single component. It will be shown in the library manager and it will be available for drag'n'drop. Subcircuits are available via an existing SpiceLibComp
component.
Default symbol will be created, if there is no symbol attached to component. But you can attach user symbol to every component. Symbol file (Qucs XML) should be placed at the library_name subdirectory. This location is used also for other resources such as XSPICE CodeModel sources. Two symbol types are implemented:
Default symbol will be substituted, if component symbol file is not found
You can look at SPICE library example with attached symbols here: https://github.com/ra3xdh/qucs_spicelib Clone this repository and copy ad822.lib
file and ad822
subdirectory into $HOME/.qucs/user_lib directory
. This library contains one component (AD822 opamp). Attached screenshot illustrates how it will be displayed in QucsLib tool.
Enchanced manual on direct usage of SPICE libraries will follow at our documentation.
@r2com I don't consider adding support for MS tools. Spice4qucs
is not tested with MSVC2010. And plots don't use OpenGL in spice4qcus
and mainline Qucs.
I created qucs spice snap. Src: https://github.com/ra3xdh/qucs/releases/tag/0.0.19S-rc7 Built-in: ngspice
Hello Eldar Khayrullin More information on the Qucs-S RC7 capabilities can be found in the Qucs-S Help documentation- see
https://qucs-help.readthedocs.io/en/spice4qucs/index.html. Qucs-S Help documentation is a "Live" document which Vadim and I are writing as Qucs-S is developed. It is intended to provide Qucs-S users with instructions on how to use the packageand useful reference material. We regularly update the content so anyone interested in Qucs-Sshould check regularly for changes. Best wishes. Mike
Qucs-S Help documentation — Qucs-S Help 0.0.19-S documentation | |
|
Mike Brinson mbrin72043@yahoo.co.uk
From: Eldar Khayrullin <notifications@github.com>
To: Qucs/qucs qucs@noreply.github.com Cc: MikeBrinson mbrin72043@yahoo.co.uk; State change state_change@noreply.github.com Sent: Monday, 5 September 2016, 19:22 Subject: Re: [Qucs/qucs] Spice4qucs. A tool to simulate Qucs circuit with ngspice (#77)
I created qucs spice snap. Src: https://github.com/ra3xdh/qucs/releases/tag/0.0.19S-rc7 Built-in: ngspice— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
@MikeBrinson Thank you for info, I know
@ra3xdh About Unofficial Qucs-S release candidate 7: Linux: qucs-s wasn't find only qucs (-DCMAKE_INSTALL_PREFIX=/usr); Windows: Qucs-s doesn't find translation files and libraries. If I rename installation directory name from Qucs-s to Qucs I have all OK.
@eldarkg Qucs-S release tarballs doesn't support building basic Qucs. And it should not be supported. It can build only Qucs-S (version with relocated installation tree) to simplify package build rules. This tarball uses special patched CMakeList.txt to hardcode two build option (WITH_SPICE=ON
and DCMAKE_BUILD_TYPE=Release
). You can see at at first two lines of CMakeLists.txt
. If you are interested in building of basic Qucs perform the following steps:
qucs-s-stable
branch of my repository. I use this branch for release preparation. This branch contains full Qucs sources (both qucs-gui
and qucs-core
). Use this command: git clone -b qucs-s-stable https://github.com/ra3xdh/qucs && qucs
-DWITH_SPICE=ON
to cmake
it will build Qucs-S. It has relocated installation tree and executable names. CMake will use standard Qucs name and installation tree location without this switch. Default is WITH_SPICE=OFF
qucs-core
is not affected by WITH_SPICE
. Use standard procedure if you wish to build it too.I have also checked Qucs-S installation on clean Windows system (using Wine). It successfully loads translation. Probably you have QUCSDIR
setting in system registry mixed from different installations. It may point to nonexistent location. I will probably later remove this environment variable usage in my particular branch.
@ra3xdh I have done in accordance your instruction. I don't see any notify about -DWITH_SPICE
flag. For me this flag is mean nothing - I use snap package.
@eldarkg I have probably misunderstand you. What do you exactly mean "qucs-s wasn't find qucs"? I understand it that you have tried to build basic qucs
from RC7 release source tarball.
@ra3xdh Sorry fo my english. In you instruction said that I should to run qucs-s but file qucs-s isn't exist. Now I understood that need to add flag -DWITH_SPICE=ON
. I want to build Qucs with spice and qucsator.
Again, if you are using release tarball, you don't need to set 'WITH_SPICE' flag manually. qucs-s
binary should be created automatically. I have tested build on Slackware and Debian systems. All was successfully built. You will need to set this flag only if you are using sources directly from Git. If you want to build qucsator too, you should use sources from Git.
(looking at your GitHub profiles, I guess you could continue the discussion in Russian if you prefer :grin:)
@ra3xdh So I choiced the right way. selected archive
@in3otd Thank you. We don't search easy ways. :)
I don't know if this is the correct place to post this. I will remove if not appropriate. I'm an RF and IC designer and I have been using Qucs and ngspice for quite some time for experiments at home. The thing that I lacked in my ngspice setup was a proper schematic capture program (tried to use xcircuit before). You could imagine that I was thrilled to see the integration of ngspice into Qucs. I have been experimenting with spice4qucs for IC design a couple of hours now, and I am pleased with the results. I will try some more complex designs in the near future.
I have a proposal for a feature that I think would be very helpful for a lot of designers using spice4qucs. When I e.g. design an opamp, I like to know some internal parameters of my transistors: e.g. gm, ro, ... . In ngspice these parameters can be printed by the @Mx[parameter_name] construct. Would it be possible to add something that it is possible to see some internal parameters of the device if asked by the user?
Maybe it could be possible to add a box to specify extra singals and values to be written to the output file of spice? I haven't looked into the code of spice4qucs, so I don't know what is possible or the easiest solution.
Thank you for considering this.
@hramon , I think "Nutmeg script" simulation type can help you. You can use this simulation type for all nonstandard cases. And you can output all variables whatever you want. You need only to form proper raw-SPICE output with write
Nutmeg command. You can also use "Equation" and "Nutmeg equation" components for postprocessing purposes.
@ra3xdh , I will look into nutmeg simulation. Thank you!
alright I am a bit confused, as far as I know, ra3 have corrected/optimized loading of spice results to be binary in RC6, and I saw that loading of results was really better.
question: does RC7 has that feature as well? or RC7 has some stuff added but ra3's optimization not there?>
@r2com , Yes, RC7 inherits all improvements introduced in the RC6. It contains binary datasets parser, of course.
awesomski
@ra3xdh you answered someone about Nutmeg for printing vars, but another useful necessary thing for IC design related things is load of appropriate models depending on the size of transistor.
In complex kits inside Cadence Virtuoso Schematics view for example it is handled automatically. For example, for all MOS devices between 1um < W < 5um one model is loaded, for another range 5um < W < 10um another model is loaded.
In other words, in Cadence for example a user just placing MOS symbol and enters the W, but depending on what W he entered the proper model is loaded inside a simulator.
I feel that its not something where Nutmeg could help.
Any idea how to get that one done?
another question, where did qucsator disappear in RC7? it cant start qucsator
What if sometimes I want to use a qucsator for rf Sims? Should I then install regular qucs and qucs-s at the same time but in different directories?
On Sep 13, 2016 12:17 PM, "Vadim Kusnetsov" notifications@github.com wrote:
- Nutmeg is simulation data postrprocessor. Simulation data is transfered into Nutmeg and it can perform different manipulations with it (for exmaple compute spectrum or Z-parameters). Models are assigned to components in netlist. Ngspice/XYCE don't automatic assignment of appropriate model based on device parameters (for example L and W). In theory it could be introduced at the Qucs-GUI side. It will also require to hold somewhere a matching table of W values and appropriate models. It could be useful for design of a big number of similar IC's, but may give nothing for design of numerous unique circuits (not only IC's). We aren't planning introduction of this feature, because we have other tasks that have higher priority. Also we don't consider Qucs as IC-specialised CAD.
- Qucator is downgraded to ordinary external simulator and is not shipped with Qucs-S RC's anymore. It was done to avoid overwriting of system Qucs and Qucsator installation by Qucs-S and to simplify installation and run procedure. If you wish to use Qucsator, you need to install basic Qucs and specify Qucsator location. It was done also to support different Qucsator version with Qucs-S.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Qucs/qucs/issues/77#issuecomment-246737360, or mute the thread https://github.com/notifications/unsubscribe-auth/ARe2KpNP3iB-eNZr4hEIc0_p7JYUcYjNks5qpsyugaJpZM4CzwKa .
Yes you need to install basic Qucs too. For Linux you may use the same installation directory. It could be installed with system package manager (like apt
or yum
) in usual way. For windows you need to download Qucs installer, install it somewhere in system, and specify Qucsator location in the application settings.
well, here http://qucs.sourceforge.net/road.html the devs in roadmap #5 are talking about Chip editor and LVS... or maybe it never will be done, ok
Frankly, instead of writing from scratch, it makes more sense to join efforts with existing projects for layout and verification. In the revised roadmap it is proposed to interface to KiCad and KLayout (or other tools) might be the best approach. But for that we need a better integration between schematic and layout tools. Ideally a tight integration, but for that to happen Qucs need to reshape its data structure. Which brings many other challenges such as modularization, interfacing databases, callback mechanisms between, library management... So it is certainly possible, but it needs "some" work.
I have added Qucs-S DEB binary package for Debian-8 (Ubuntu 16.04 is also tested) See release page for more details.
There may be way to overcome #34 and #41. I started implementation of
spice4qucs
extension. This extension allows you to switch betweenqucsator
simulation kernel andngspice
simulation kernel. You can simulate your Qucs circuits withngspice
using this extension. I am planning to add menu entrySimulation->Simulate with spice
. Spice simulation will be available after execution of this menu. Spice simulation results will be converted to Qucs simulation data and diagrams will be available from the display page. With spice4qucs you can use good old spice to simulate Qucs circuits with it.You can see current state of work at https://github.com/ra3xdh/qucs/tree/spice4qucs
Now implemented only conversion of the Qucs circuit to Spice netlist.
Not all components conversion is implemented. The list of spice-compatible components:
The list of supported simulations:
Sample schematic is available here: https://gist.github.com/ra3xdh/6c554e32e531c25e6e6b
To test
spice4qucs
open this schematic with Qucs, then executeSimulation->Simulate with spice
. Spice netlist is located at$HOME/.qucs/spice4qucs.cir
. Now switch to system terminal and executengspice
:Then run simulation and see waveforms:
The simulation fails for this schematic with Qucs, but ngspice simulates it correctly.
Have you any suggestions? Should I continue work in this direction?
My current task list: