In the previous article we described the netpp server enhancements to our GHDL based simulation to feed data to a FIFO. So we had condemned that extra thread being a slave listening to commands. But what if the GHDL-Simulation would be a netpp master?
Inspired by Yann Guidons framebuffer example at http://ygdes.com/GHDL/, the thought came up: why not hack a netpp client and use the existing ‘display’ device server (which we use for our intelligent camera remote display). What performance would it have?
For this, we extended our libnetpp.vhdl bindings by a few functions:
- function device_open(id: string) return netpphandle_t — Opens a connection to a netpp (remote) device
- function initfb(dev: netpphandle_t; x: integer; y: integer; buftype: integer) return framebuffer_t — Initialize virtual frame buffer from device
- procedure setfb(fb: framebuffer_t; data: pixarray_t) — transfer data to framebuffer
Not to forget the cleanup functions device_close() and releasefb().
With this little functionality, we are running a little YUV color coded display as shown below:
It is very slow as we keep repeatedly filling the YUV (more precisely UYVY interleaved data) using a clock sensitive process. We thus get a framerate of about 1fps – but it works!
Find the current code here: