I am running System Verilog inside of an ASIC simulator. SV has an import/export mechanism to call C functions from SV, and for SV functions to be called from within C.
I’d like to send realtime-ish (a very slow stream) data from the simulation to a charting program that I will write in Java. What is the best way to call the Java with periodic updates from the simulator/C program?
After a quick glance here : http://java.sun.com/docs/books/jni/html/invoke.html, …
Then consider this:
The simplest way is to write the data to a file, and write a java program
to read from the file as it grows. See this answer: Java IO implementation of unix/linux "tail -f"
Start them both separately, or use
system()to start the java program from your plugin, passing the filename as an argument.