WeSpice Frequently Asked Questions
Where do I find more info?
- The internal help system is made of html pages, so follow the links - there is one page for each module. You can setup the help system to start with the context-related page (see Settings). You can also download the help pages here.
- The full NGSPICE manual is here.
How do I run my own netlist (bypassing the Schematic Editor)?
- When you press RUN the system generates the file Spice.sim (it overwrites it every time). This is passed to the NGSPICE simulation engine. When things go wrong, you can open it with the Text Editor and check it. It should be a well formed netlist (circuit and commands).
- Spice.sim will contain:
- The extracted netlist of the current schematic (empty if there is no schematic)
- Some global options, local options, and simulations you defined in this Analysis tab (mostly empty if you defined nothing)
- The contents of the "Include" file, which you can choose by pressing on its name (up-right in the Analysis tab). Default it's Spice.cmd, but you can choose whatever. This can be used to add anything that the simulator understands (can be circuits, simulation commands, .model, .include, .lib, etc).
- So in fact you have the options to:
- Add netlist lines in the Include file, to complement what is extracted from the schematic.
- Run only your Include file as a stand-alone netlist if your current schematic is empty.
- You can try this immediately:
- Go to /samples/simtests. It has no schematic, but it's full of *.cir netlists (tests for SPICE simulators) that you can open with the Text Editor to understand what they do.
- In the Analysis tab, choose any of them as "Include". RUN it.
- In the Results tab, choose different variables to plot (you have to check the netlist to know what they actually are).
- Go back to Analysis and try another one.
How do I use my own models?
- Option 1: Copy-paste them in Models.sys of nmos/pmos (or your personal copy of nmos/pmos components).
- Option 2: Use the "Include" file (see previous answer). Copy-paste the models directly in it, or put them in another file referenced with an .include statement.
How do I use my own netlist subcircuits?
- Choose "Use SPICE netlist" from the Schemtic Editor menu.
A sub-menu allows you to pick which file in the circuit folder to use (nothing appears if there are no eligible files). The first sub-circuit in the file will be used as the content of this schematic.
- Parameters defined in the .SUBCKT line are recognized.
- Everything between ".SUBCKT foobar" and ".ENDS foobar" will end up in the final simulation netlist (as a renamed sub-circuit).
This includes for example models declared inside the sub-circuit.
- Graphic schematic editing is not possible in this configuration. The schematic is reading all info, including pinout and parameters, from the netlist. To come back to normal mode, choose "disable" from the sub-menu.
- In order to instance it in other circutis, you still have to build a symbol for this circuit. The symbol pins have to match the pin names (not the order) of the schematic. As usual, the wizard in the Symbol Editor can build a first correct version from the schematic info.
- In the top-level generated simulation netlist, this subcircuit will appear with the name of the WeSpice circuit, not the imported netlist name or subcircuit name in the imported netlist. The pin order may be changed (both in SUBCKT and in its instances) from the original netlist, because the symbol is used as the master definition for pinout.
I see warnings/errors in the log. Should I worry?
- Nothing to worry if they are debug (blue) or info (white) type.
- Warnings (orange) are related to Not OK things in what you are trying to do. You should fix them before you proceed. Otherwise, the simulation might not run or might yield unexpected results.
- Errors (red) are internal problems of WeSpice. We would be grateful to receive a report from you, describing the circumstances.
The app crashes or hangs. Can I get some help here?
- Always choose "Report" in the popup. This sends us detailed info (stack trace) about the problem.
- It helps if you write a few words describing the circumstances. Please note that all info we receive is anonymous, so we will not be able to answer questions from the crash report.
- We will start immediately to investigate and a fix will be released soon (usually in a few days).
- If WeSpice crashes immediately at startup, try deleting the file /WeSpice/.RootState.sys on the SD card. Next time WeSpice will start with the "safe" schematic /samples/start.
- If the simulation engine crashes, this is normally caught and flagged with "Error 21" by the app. However, it might be possible that this brings down the full app.
Please note that the simulation engine has a habit of crashing for some invalid spice inputs (missing ground, floating nodes...).
Copyright © 2012-2022 Lindentree. All rights reserved.