Next: , Previous: Starting a simulation from a foreign program, Up: Interfacing to other languages


5.9.5 Linking with Ada

As explained previously in Starting a simulation from a foreign program, you can start a simulation from an Ada program. However the build process is not trivial: you have to elaborate your Ada program and your VHDL design.

First, you have to analyze all your design files. In this example, we suppose there is only one design file, design.vhdl.

     $ ghdl -a design.vhdl

Then, bind your design. In this example, we suppose the entity at the design apex is ‘design’.

     $ ghdl --bind design

Finally, compile, bind your Ada program at link it with your VHDL design:

     $ gnatmake my_prog -largs `ghdl --list-link design`