{"id":1863,"date":"2011-09-28T18:55:55","date_gmt":"2011-09-28T16:55:55","guid":{"rendered":"http:\/\/localhost\/wp\/?p=130"},"modified":"2019-10-20T00:37:43","modified_gmt":"2019-10-19T22:37:43","slug":"vhdl-simulation-remote-display","status":"publish","type":"post","link":"https:\/\/section5.ch\/index.php\/2011\/09\/28\/vhdl-simulation-remote-display\/","title":{"rendered":"VHDL simulation remote display"},"content":{"rendered":"<p>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?<\/p>\n<p>Inspired by Yann Guidons framebuffer example at <a href=\"http:\/\/ygdes.com\/GHDL\/\">http:\/\/ygdes.com\/GHDL\/<\/a>, the thought came up: why not hack a netpp client and use the existing &#8216;display&#8217; device server (which we use for our intelligent camera remote display). What performance would it have?<\/p>\n<p>For this, we extended our libnetpp.vhdl bindings by a few functions:<\/p>\n<ul>\n<li>function device_open(id: string) return netpphandle_t &#8212; Opens a connection to a netpp (remote) device<\/li>\n<li>function initfb(dev: netpphandle_t; x: integer; y: integer; buftype: integer) return framebuffer_t &#8212; Initialize virtual frame buffer from device<\/li>\n<li>procedure setfb(fb: framebuffer_t; data: pixarray_t) &#8212; transfer data to framebuffer<\/li>\n<\/ul>\n<p>Not to forget the cleanup functions device_close() and releasefb().<\/p>\n<p>With this little functionality, we are running a little YUV color coded display as shown below:<\/p>\n<p><a href=\"https:\/\/section5.ch\/wp-content\/uploads\/2011\/09\/simfb.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-132\" title=\"simfb\" src=\"https:\/\/section5.ch\/wp-content\/uploads\/2011\/09\/simfb-300x189.png\" alt=\"Framebuffer output\" width=\"300\" height=\"189\" \/><\/a><\/p>\n<p>It is very slow as\u00a0 we keep repeatedly filling the YUV (more precisely UYVY interleaved data) using a clock sensitive process. We thus get a framerate of about 1fps &#8211; but it works!<\/p>\n<p>The ghdlex source code is now hosted publicly at:<\/p>\n<p><a href=\"https:\/\/github.com\/hackfin\/ghdlex\">https:\/\/github.com\/hackfin\/ghdlex<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":150,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[23,30,24],"tags":[],"_links":{"self":[{"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/posts\/1863"}],"collection":[{"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/users\/150"}],"replies":[{"embeddable":true,"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/comments?post=1863"}],"version-history":[{"count":1,"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/posts\/1863\/revisions"}],"predecessor-version":[{"id":1898,"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/posts\/1863\/revisions\/1898"}],"wp:attachment":[{"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/media?parent=1863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/categories?post=1863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/section5.ch\/index.php\/wp-json\/wp\/v2\/tags?post=1863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}