index.html : created by Yann Guidon /
The files in this subdirectory are released in the hope that they are helpful or entertaining, no warranty yada yada...
You use a high level language so you're a grown up now.
version 2017/12/08

GHDL interfaces and extensions

I own the copyright on these files and they are distributed under the terms of the GNU GPLv3. They support articles that have been published to spread the knowledge and use of GHDL but they are not officially part of this simulator.

They provide and demonstrate interesting and useful features for interactive simulations. They also show advanced and special coding techniques that could give you other ideas to extend GHDL for your own projects.

You can download the whole directory with this archive : ghdl_extra.tgz.

Article : published in GNU/Linux Magazine France #128, june2010
Generates a "real time clock", which helps slowing down a simulation. The clock period is given as a generic in milliseconds, though the system calls will usually round up this if you're not careful. It's quite useful if you want to synchronise a testbench at a few Hz.

Article : published in GNU/Linux Magazine France #130, september 2010
adds a simple and nicely working interface to the Linux framebuffer in 32-bit mode (RGBA). It needs to be enhanced in the future but it's powerful enough for doing nice pictures...

Article : published in GNU/Linux Magazine France #131
Adds a "getenv" function that reads the requested environment variable and returns an integer or a string.
2017/12/09 : look at the t37 directory for the simpler (yet more limited) version implemented in the Ticket #37 since GHDLv0.33 (2015)!

Article : published in GNU/Linux Magazine France #HS51, november 2010
creates a 7-segment display, using the /fb/ and /clk/ package.

Article : published in OpenSilicium #1, december 2010
it's a scalable 4-xor LFSR, from 5 taps to 786, very handy !

Article : published in GNU/Linux Magazine France #133, december 2010
read the parallel printer port's status signals and turn them into VHDL signals. A really primitive sketching application is shown as example (using /fb/ and /clk/).

Article : published in GNU/Linux Magazine France #136, march 2011
int_ops.c and int_ops.vhdl provide boolean/logic operations to VHDL's integer type. An intermediate type is provided by 4 packages with different properties and a microbenchmark implements the SHA1 algorithm to demonstrate the speedup that behavioural simulation can benefit from.

This shows how GHDL can access variables located in a C module, using the access type (sort of pointer).

This shows how a C module can access a shared variable in a VHDL package, using the extern keyword. However it is a more brittle method than the previous one.


More to come in the future...