Tagged: ghdl Toggle Comment Threads | Keyboard Shortcuts

  • CG 1:13 pm on May 6, 2010 Permalink | Reply
    Tags: ghdl, , , , , virtual box   

    Ubuntu on Mac, yay :) 

    Now I have Ubuntu 10.04 Lucyd Lynx running on my Mac, and I can compile VHDL with GHDL and also use GTKWave. Yay! 🙂

    Thanks to VirtualBox and the one who recommends it 🙂

    Advertisements
     
    • bobby 8:30 am on May 7, 2010 Permalink | Reply

      pake virtualbox deh biar aman

  • CG 12:04 pm on May 5, 2010 Permalink | Reply
    Tags: ghdl, half adder,   

    Half-adder in VHDL 

    Yay. My first code in VHDL.

    library ieee;
    use ieee.std_logic_1164.all;

    entity ha_CG is
    Port ( X : in std_logic;
    Y : in std_logic;
    Sum : out std_logic;
    Carry : out std_logic);
    end ha_CG;

    architecture Behavioral of ha_CG is
    begin
    Sum <= X xor Y;
    Carry <= X and Y;
    end Behavioral;

    Happy enough to successfully compile it with GHDL and Wine.

     
  • CG 1:33 pm on May 4, 2010 Permalink | Reply
    Tags: ghdl, vdhl   

    GHDL is a compiler. It does not generate netlist. 

    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.

     
  • CG 12:51 pm on May 4, 2010 Permalink | Reply
    Tags: , ghdl, ,   

    Compiling VHDL with GHDL on Mac OS 

    1. Download GHDL for Mac OS download here
    2. Put the whole directory in the home directory
    3. 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
      end hello_world;

      architecture behaviour of hello_world is
      begin
      process
      variable l : line;
      begin
      write (l, String'("Hello world!"));
      writeline (output, l);
      wait;
      end process;
      end behaviour;

    4. Compile the file:  wine ghdl.exe -a hello_world.vhdl
    5. Build an executable file:  wine ghdl.exe -e hello_world
    6. Run the code:  wine ghdl.exe -r hello_world or wine ./hello_world

    Notes:

    the working directory is : /Users/chika/.wine/drive_c/Program Files/Ghdl/bin

     
    • Nadav 2:31 am on May 5, 2010 Permalink | Reply

      When I write VHDL or Verilog I like to use automated tools. C-to-Verilog.com is a website which allows you to compiler your C code into hardware circuits. It has a great pipelining algorithm for superb performance.

    • vincent 6:15 pm on August 25, 2010 Permalink | Reply

      Thanks for this help on how to install and use ghdl in OS X unfortunately it does not work. Instructions seem not to cover what to do with the wine stuff. Could you please help?

      thanks
      vin

    • Tinh 9:42 am on April 8, 2015 Permalink | Reply

      Hello! thanks for you instruction. However, wen i run a command line “wine ghdl.exe -a file.vhdl” it said that “-bash: wine: command not found”. so do i need to install wine? or just copy from the dmg that you provided? thanks!

      • CG 12:20 pm on April 8, 2015 Permalink | Reply

        yes you have to install wine! 🙂

  • CG 12:35 pm on May 4, 2010 Permalink | Reply
    Tags: ghdl, , macports, , wine   

    Installing Wine on Mac OS 

    I have to install Wine, because I want to use GHDL to compile VHDL.

    Useful links:

    1. http://davidbaumgold.com/tutorials/wine-mac/
    2. http://wiki.winehq.org/MacOSX
    3. http://wiki.winehq.org/MacOSX/Installing

    But before installing Wine I had to installed Macports for Snow Leopard, downloaded from here.

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel