Electric verilog and spice netlisting and external simulators

13 views
Skip to first unread message

Alexandre Rusev

unread,
Mar 27, 2026, 5:01:41 PM (14 days ago) Mar 27
to electr...@googlegroups.com, Steven Rubin


Hello all!

Electric can stream out SPICE and Verilog netlists.
Well.. we have well known integration flow with eternal spice.
And likely less clear integration with external verilog simulators.

My question is do we heve some flow to integrate mixed co-simulation (verilog + spice) in Electric?

Playing with examples from Jake Baker's book I implemented a mixed-bridge for
co-simulation SPICE model with Verilog model.

May be the flow somehow used in Electric unifying capabilities of using external simulators
This is how it looks with gtkwave + NGSpice graph. windows.
May I hope to browse miced result in Electric using currently available tools?

This is what it  now looks like now with use of external tools:
image.png






Attaching my sources for completness

Alex
MixFighter-Co-Sim-with-the-book-examples.tgz

Steven Rubin

unread,
Mar 27, 2026, 5:47:34 PM (14 days ago) Mar 27
to electr...@googlegroups.com

Electric is able to find an external program and run it on a file it has just written, then read its output and process that. This is how it writes a Spice deck, runs Spice, and displays the waveforms.

Are you wanting a more extended path, where two external programs are run? Or are you simply asking for the same mechanism with Verilog? Either option is a simple extension, but will require code.

   -Steven Rubin

--
You received this message because you are subscribed to the Google Groups "Electric VLSI Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to electricvlsi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/electricvlsi/CACoSTqL%3D-3wC9-ugDSYf8JnZ1o-2hK5vAcqgtocD_P%2BR%3DFGTWQ%40mail.gmail.com.

Alexandre Rusev

unread,
Mar 28, 2026, 3:52:56 AM (13 days ago) Mar 28
to electr...@googlegroups.com
I can easily run both programs from the same script started from Electric ...
The result of SPICE simulation may be viewed bot externally (ltspice, ngspice,...) or using Electric UI.
But what about digital simulation results?
For now we can browse  in Electric at least IRSIM simulation results (and iven rerun internaj Java-IRSIM).

What about placing digital and analog waveforms on the same graph in Electric?
(say we can first use IRSIM format as Icarus  .vcd and .fst are likely unsupported by Electric for now)

The challenge is that digital waveforms are update-event-based format and SPICE waveforms are "honest"
time-sampling-based format.
Can be both loaded to the same waveform viewer in Electric?

On the screenshot from previous message you see  separate window for digital waveforms (ngspice+gnuplot and gtkwave).
Pushing analog waveforms to GTKwave window is also working, still analog waveforms are considered also ad  update-event-based by this tool.

You helped me to understan better which user experience I'd like to see:

Now I can formulate question a bit more clear:  has the Electric a feature of putting both types (analog/sampling-based, digital/event-based) of waveforms to the same window?
(at least for external IRSIM and SPICE outputs)
This also needs mostly NOT running 2 programs (a single script can do it easily), but MOSTLY loading 2 files with simulation results



It could be also very interesting interactive internal IRSIM running external "SPICE-server"  upto the time of the next digital event in the IRSIM...
But because of user interaction with ISRIM it requires to move back in time the SPICE simulation and return "back to the future" taking in account digital signal values ...
This in turn would likely requires the deep intrusion into NGSpice code to make it retain analog state at the time of previous digital event, ugh!
I'm not ready to patch NGSPice solver this way right  now! May be some day later;)

So my current provision is not so ambitious: just to try to pus digital and analog wavefroms from 2 files (one produced by SPICE and another by Icarus/IRSIM ) to the same graph in Electric.

"one visualisation graph - two data sources" principle, "let all flowers blossom" ;)



Steven Rubin

unread,
Mar 28, 2026, 8:23:02 AM (13 days ago) Mar 28
to electr...@googlegroups.com
Yes, this can be done. Each panel in the waveform window has one or more Signal objects in it. These are defined in tool/simulation/Signal.java and the basic signal holds Sample objects which can be either digital or analog.

So you can place a single panel in the waveform window with both a digital and analog signal in it, or you can have multiple panels, locked in time, that show the digital and analog values, one above the other.

Building such a facility is doable, but you will still need code that reads both of these sources and constructs the necessary data structures for display.

   -Steven Rubin

Alexandre Rusev

unread,
Apr 7, 2026, 12:44:42 PM (3 days ago) Apr 7
to electr...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages