Hi whygee,
The trick there is that it's NOT the C side that controls the simulation,
but the VHDL side that sets the thing up.
Yes this is what I need a control from C side.
For example, the real-time clock actually stops/pauses the simulator
when it has finished all its deltas.
Doing otherwise is much more difficult.
So your overall events system must work in a "polled" way,
with your C function called everytime GHDL has done its work for the
current cycle.
Polled way is not nice, but if it the only way.
Ok I can make a process for polling.
What ist the wait until time/event?
process
wait until C function
?
to Martin,
If you want more complex shit with
autogenerated HW description and virtual devices, google for
ghdlex/netpp.
Some folks are also using simple unix pipes for C <-> Simulation I/O,
like the classic trick with 'socat' to fake a virtual UART via a PTY.
Just found something that should come close, see attachment. You can
hack a tad more solutions with socat that can do networking without
requiring you to set up your own socket dance.
A virtual Uart on a PTY is also interesting. Please add more information.
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss