xschem reading Ngspice simulation data directly. ...
# xschem
s
xschem reading Ngspice simulation data directly. Now need to add some UI for zooming / panning, waveform displaying is lightning fast! The bottom circuit draws / zooms at 42 fps with all waveforms loaded. The 8MB .raw file is read in 17ms.
πŸ‘ 1
πŸ‘ 6
r
Great Work! You are really making Xschem a great tool.
s
Yes! after one day lot of improvements, colors, overlays. What is impressive is the speed, a 100MB spice datafile is read in 130ms and xschem draws / pans / zooms the schematic with waveforms at 30/40 frames per second. Now need to add some user interface to zoom/measure with the mouse.
πŸ₯° 1
πŸ’― 3
🎯 1
😍 1
πŸ‘ 1
πŸ’‘ 1
βœ… 2
❀️ 7
l
Copy code
very cool, very good tool.
in the future I would also like to contribute code.
b
I tried installing xschem and gaw and able to run a transient simulation of LDO circuit designed using skywater pdk. I tried the new feature that Stefan Schippers introduced where in the waveform can be integrated into the schematic. I am able to drop that object using Simulation-> Add Waveform graph menu option and also edit its attribute to observe a node voltage that exist in my design. But while i am able to see the waveforms in gaw, i don't see anything appear in this integrated waveform window, I must be missing something basic. I am new to these tools. Can Stefan or somehow help me with this ? Below is the snapshot.
@Stefan Schippers --is this cool feature not yet released ?. I picked your latest xschem from github and saw that there is menu item under Simulation tab to Add waveform graph. But i don't know how to load the raw file into it. Could you please help ?
s
Hi, @Bhaskar Ramachandran, i need to add some user interface, but right now it is useable, You need to add the list of nodes to plot in the attributes of the graph: Click inside the graph near the borders so you select it, then hit 'q' to edit its attributes, and set the list of nodes you want to be displayed: node="in out gate" for example. You need to issue this command "*xschem raw_read /path/to/simulation/file.raw*" in the xschem command window. If you open one of the example schematics (test_nmos.sch) in the xschem_sky130 examples you can see the details. The arrow shaped symbol will automatically load the raw file when you crrl-click on it. Of course my final goal is to add a dialog box where you can easily set the list of nodes to be plotted.
@Bhaskar Ramachandran here is a picture, in this case it is a multiple run transient simulation, So edit the 'node' attribute and set the nodes you want to see. Nodes can be called v(node) or node, while currents are specified as i(vnn). Basically you use the same names as they appear in the raw file. There are more parameters in the edit attribute dialog, most of these are set autmatically while zooming / movin the graphs. dragging the mouse in the graph area moves the waves, mouse wheel will scroll the waves ctrl-mouse wheel will zoom in / zoom out Pressing 'f' will do a full view doing the above command to the left of the y axis will do these commands for the y direction. Pressing 'a' and / or 'b' will show a cursor, the 'a' cursor will display voltage meaures on all signals, while the a-b distance is always shown. You can copy the green arrow symbol in your schematic, ctrl-click on it will load the spice raw file.
@Bhaskar Ramachandran here is a more elaborate example, with cursors and measures. Adding a 'digital=true' attribute to the graph attribute will show a digital graph where you can stack many signals (and even display buses) See the rom8k.sch test schematic provided with xschem. Basically all the graph functions are done, what is still missing is some nice user interface to allow for example clicking a node and sending to the graph. I am working on that. When the mouse cursor is inside the graph you can operate on the graphs, when the mouse is outside the usual xschem user interface is active. If you use a digital graph (digital=1) you also need to set y1 and y2 values for the voltage range, in case of buses this information is needed to calculate voltage thresholds for logic '1' and '0' values. The good thing is that once you set the nodes to be displayed and save the schematic the setup of the graph is saved, so you don't need to redo this tedious operation again.
b
Wonderful!. I am able to now see the waveforms.. I was naming the nets as VO and REF in upper cases.. but somehow in the raw file they are saved as lower case vo and ref nets... when i set the attributes to the graph window to show the lower case vo and ref signals, it immediately showed up... This is just amazing. More importantly the timely help and detailed comments helped me try this out and get it working and i can't thank you enough for this. Very much appreciate it!!. Thanks a lot