index.html : created by Yann Guidon / ygdes.com
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 2020/07/31
 

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.

2020/07 : check the explanations at https://ghdl.github.io/ghdl-cosim/vhpidirect/ and the repository at https://github.com/eine/hwd-ide/tree/develop/examples/ygdes_ghdl_extra !
GHDL has significantly evolved since these hacks were published and the transition to 64-bits has broken some delicate code.

GHDL/clk/
Article : "Simulation à vitesse réelle avec GHDL"
published in GNU/Linux Magazine France #128, june 2010

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.

GHDL/fb/
Article : "Affichage graphique avec le framebuffer et GHDL"
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...

GHDL/ghdl_env/
Article : "GHDL et les chaînes de caractères : application à getenv()"
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)!

GHDL/7segments/
Article : "Création d un afficheur 7 segments avec GHDL"
published in GNU/Linux Magazine France #HS51, november 2010

creates a 7-segment display, using the /fb/ and /clk/ package.

GHDL/lfsr4/
Article : "Conception et applications des LFSR en VHDL"
published in OpenSilicium #1, december 2010

it's a scalable 4-xor LFSR, from 5 taps to 786, very handy !

GHDL/io_port/
Article : "Interfaçage de GHDL avec le port parallèle sous Linux"
(I/O ports with GHDL)

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/).

GHDL/int_bool/
Article : "Conception et applications des LFSR en VHDL"
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.

Not published

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

GHDL/direct_c/
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.




........ Enjoy !