|
From: Cary R. <cy...@ya...> - 2018-01-19 05:49:59
|
Look in the vpi directory where all the system function Icarus supports are implemented. That directory and the standard to understand what the various VPI commands do should allow you to get the VPI interface to work.
Cary
On Thursday, January 18, 2018, 9:12:06 PM PST, David Fang via Iverilog-devel <ive...@li...> wrote:
Hi, long-time lurker here. I have some experience with VPI co-simulation with a custom gate-level digital simulator (hacprsim), tested against VCS and (minimally) Incisive, though I admit I've never tried to connect it to iverilog.
The following code includes calls to the VPI library that synchronize events coming from the host simulator and registers callbacks to the custom simulator, effectively keeping internal simulator event queues in-sync, and transporting values between the two simulators.
https://github.com/fangism/hackt/blob/master/src/sim/prsim/vpi-prsim.cc
As dated as the code seems, it's been working stably for years.
This test directory contains some expected outputs when co-simulated with VCS:https://github.com/fangism/hackt/tree/master/test/prsim/vpi
Hope this helps some, or gives you some ideas?
On Thu, Jan 18, 2018 at 6:55 PM, Kevin Cameron <iv...@gr...> wrote:
Hi Beat,
I've done Icarus/Gnucap, and Icarus/Spice3 before, and there was an "embedded-vvp" branch supporting that, but it's probably well out of date by now.
It was with VPI; I was intercepting driver updates on non-blocking assigns in Icarus and going through PWL sources to drive the analog, and (undriven) current PWL sources to pick up Voltages from the analog simulator.
I was trying to get the guys at Analog Rails to work on it, but the Gnucap folk were clueless and it didn't go anywhere. AR have since moved on to using Xyce, and might be interested in revisiting the problem, likewise eFabless. The idea was to get the AR guys to netlist out of their schematic environment in some easy-to-use way as a starting point.
The extensions to the analog simulator are minimal if it has PWL sources - just hack it to go through a C/C++ API to pick up the PWL waveform - instance path and signal name and some code (library/function) to load dynamically.
Generally you want to have the analog simulator as master and digital as the slave (analog does event scheduling) if you can.
If you can get this to work there's possibly money in it -
http://www.v-ms.com/ICCAD- 2014.pdf
- digital simulators can't do power or CDC detection. Analog simulators are only (really) slow if the models they use require solving, and Xyce is designed for parallel processing.
Kev.
On 01/16/2018 04:57 PM, Beat Arnet wrote:
Hello experts,
I am looking for some advice on how to implement a co-simulation between Icarus and a circuit simulator.
The objective would be to couple both simulators and have the circuit simulator provide stimuli to Icarus and feed Verilog output variables from Icarus back into the circuit simulator.
My hunch is that I will have to implement a VPI module that communicates with the circuit simulator to exchange simulation data.
What I am unsure of is how to implement such a VPI function similar to the $monitor statement, in that it is automatically called when a signal changes.
Any tips and suggestions would be much appreciated.
Kind regards,
Beat
------------------------------ ------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
______________________________ _________________
Iverilog-devel mailing list
Iverilog-devel@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/iverilog-devel
------------------------------ ------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
______________________________ _________________
Iverilog-devel mailing list
Iverilog-devel@lists. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/iverilog-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Iverilog-devel mailing list
Ive...@li...
https://lists.sourceforge.net/lists/listinfo/iverilog-devel
|