Now I have Ubuntu 10.04 Lucyd Lynx running on my Mac, and I can compile VHDL with GHDL and also use GTKWave. Yay! 🙂
Tagged: ghdl Toggle Comment Threads | Keyboard Shortcuts
Yay. My first code in VHDL.
entity ha_CG is
Port ( X : in std_logic;
Y : in std_logic;
Sum : out std_logic;
Carry : out std_logic);
architecture Behavioral of ha_CG is
Sum <= X xor Y;
Carry <= X and Y;
Happy enough to successfully compile it with GHDL and Wine.
Like has been said here:
Unlike some other simulators, GHDL is a compiler: it directly translates a VHDL file to machine code, using the GCC back-end and without using an intermediary language such as C or C++. Therefore, the compiled code should be faster and the analysis time should be shorter than with a compiler using an intermediary language.
- Download GHDL for Mac OS download here
- Put the whole directory in the home directory
- Type a simple .vhdl code from here
-- Hello world program.
use std.textio.all; -- Imports the standard textio package.
-- Defines a design entity, without any ports.
entity hello_world is
architecture behaviour of hello_world is
variable l : line;
write (l, String'("Hello world!"));
writeline (output, l);
- Compile the file:
wine ghdl.exe -a hello_world.vhdl
- Build an executable file:
wine ghdl.exe -e hello_world
- Run the code:
wine ghdl.exe -r hello_worldor
the working directory is : /Users/chika/.wine/drive_c/Program Files/Ghdl/bin
CG, Tinh, vincent, and 1 other are discussing. Toggle Comments
But before installing Wine I had to installed Macports for Snow Leopard, downloaded from here.