How do I compile and run a VHDL program on Mac with ghdl?

前端 未结 4 710
执笔经年
执笔经年 2021-02-02 01:52

i just wrote a simple VHDL program. I saved the file as a .vhd file. Then I compiled it with

ghdl -a test.vhd

and then built and executable fi

4条回答
  •  醉梦人生
    2021-02-02 02:27

    A New Mac OS X gcc version of GHDL

    There's a new version of ghdl available from ghdl-updates / Builds / ghdl-0.31 / OSX, a gcc version that includes the mcode verison.

    It's only known to run on OS X 10.9 but I think it would run OS X 10.8 if Xcode and it's command line tools were installed - the gcc version currently depends on /usr/bin/as and /usr/bin/ld, which are part of the essentials package installing OS X 10.9 and available by installing Xcode command line tools on OS X 10.8.

    Once this version of ghdl is installed, in a terminal you can

    info ghdl
    

    Scroll down to Starting with GHDL, hitting carriage return. Scroll down to The hello world program (carriage return), A full adder (carriage return), or Starting with a design (carriage return). The first one is a VHDL hello world program, the second one is a one bit adder with a test bench. The Starting with a design leads you to a download link and directions for a DLX processor simulation.

    I'm planning to develop a 10.6 - 10.9 gcc version of ghdl that doesn't depend on Xcode for 10.6 - 10.8, and runs on 10.9. It'll likely be version 0.32 of ghdl.

    Tony Bybell's gtkwave.app runs on OS X 10.6 - 10.9 and is available along with it's manual from the GTKWave SourceForge page. The latest version of the application can be downloaded from this link on Sourceforge - gtkwave.zip.

    There are several ghdl/gtkwave tutorials available on YouTube, although none are OS X specific, try googling.

    ghdl has it's own gtkwave format, GHW which is VHDL friendly and allows you to peer into complex composite types. ghdl-0.33 will likely include support for Tony Bybell's FSB format as well.

    The more adventuresome can build ghdl from scratch on OS X, see Instructions for building ghdl-0.31 with gcc4.8.2 on OS X 10.9. Building with gcc4.9.1 would require the ghdl-0.32 release available from the Mercurial archive found here. When released version ghdl-0.32 binaries will also be available from Sourceforge.

    The Sourceforge site ghdl-updates is the location for on going ghdl development activity by the author of ghdl, Tristan Gingold.

    In addition to joining the ghdl discussion list or perusing it's archives you can file bug reports on the ghdl-updates Tickets page, where you view both open and closed issues.

    The development future for ghdl is bright. Future releases are expected to focus on IEEE Std 1076-2008 compliance for the near future. There's also development toward using ghdl as an llvm front end as well as a purely interpretive version to supplant ghdl-mcode.

    It's possible with binary releases of ghdl and gtkwave to separate user from developer.

提交回复
热议问题