GHDL query

Discussion in 'VHDL' started by John Williams, Aug 8, 2003.

  1. Hi folks,

    Does anybody have any experience with GHDL? For those who don't know,
    it's a VHDL compiler based on the gcc (GNU Compiler Collection) framework.

    It's free, unlike modelsim et al. It can export the VCD file format for
    viewing in various wave viewers and so on. Not sure how its performance
    compares with other commercial simulators.

    I've downloaded it and compiled trivial examples (adders etc), and it
    seems to work OK. Just wondering if any body has any deeper experience
    or comments on it?


    John Williams, Aug 8, 2003
    1. Advertisements

  2. Does anybody have any experience with GHDL?

    GHDL is in good shape. I have successfully simulated some 'real-world'
    FPGA projects of about 100k gates. I was easily able to compile and
    simulate all my testbenches and rtl code. I had a few problems compiling
    the Xilinx Unisim, though. Tristan is very responsive and working hard
    on fixing any issue that is reported to him, so I am sure that these
    woes are sorted out soon.

    GHDL is creating VCDs with a resoultion of fs, which may create problems
    with some tools. Currently only the following signal types are dumped to
    the VCD: bit, std_ulogic, std_logic, bit_vector, std_logic_vector, std_

    I working on integrating GHDL into IVI. IVI is a graphical frontend,
    which will allow for interactive simulation and Tcl scripting. IVI is
    currently making rapid progress with new features nearly every week.
    More info on IVI can be found here:

    IVI was originally created to support the Icarus Verilog simulator.
    Icarus Verilog is without doubt a very good simulator with very good
    performance. More info here:

    Once GHDL is integrated with IVI, the result will be a nice GPL'ed and
    language-neutral simulator.

    currently GHDL is a little slow, so there is definitely a need to work
    on optimization. But I am very confident that we can achieve this with
    the help of a few volunteers.

    Any comments welcome,
    best regards

    Felix Bertram, Aug 8, 2003
    1. Advertisements

  3. An URL would be nice. Also, if you make updated packages, could you
    please post notice (with URL) here?
    (I'm running Debian stable so I hope your packages don't need
    testing or newer).
    Tuukka Toivonen, Aug 13, 2003
  4. John Williams

    m a ellis Guest

    Sure. I'll have a go at building a new version.
    I found an old version in a directory called 'woody', which I would give you
    the apt source line for, but it doesn't seem to work with woody. Hrm.
    Screwed that one up somewhere along the line.

    I'll let you know how I get on.

    m a ellis, Aug 13, 2003
  5. The problem seems to be that GHDL (0.7, at least )can't be compiled with the

    I am using the following build system here:

    gcc -v
    Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
    Thread model: posix
    Apple Computer, Inc. GCC version 1252, based on gcc version 3.1 20021003

    gnatmake -v
    GNATMAKE 5.00w (20010924) Copyright 1995-2001 Free Software Foundation,
    Usage: gnatmake opts name {[-cargs opts] [-bargs opts] [-largs opts]
    [-margs opts]}

    Of course, I am building GHDL with gcc3.3 sources.

    Best regards, Felix
    Felix Bertram, Aug 15, 2003
  6. John Williams

    Jerahmie Guest

    Would it be possible to get a more detailed description of how you
    built ghdl for OS X? I've been having some difficulties, and the ghdl
    installation instructions aren't very complete yet. I'm using the
    same version of gcc,GNAT,& ghdl as you described.

    Jerahmie, Sep 3, 2003
  7. Would it be possible to get a more detailed description of how you
    sure, this is quite easy. I attached the script I am using to build GHDL
    below. Please note the following:

    * use the v0.7 version (which is currently the latest)

    * configure currently does not work properly. You will need to manually
    adjust the vhdl/ in order to replace the Linux/x86 code by a
    pthread-based implementation for MacOSX:
    GRT_LINUX_OBJS=i386.o linux.o
    GRT_ADD_OBJS= $(GRT_PTHREAD_OBJS) grt-cbinding.o grt-cvpi.o

    * I am building a patched version of GHDL, that includes a VPI interface
    to integrate with IVI. To do so, I need dlcompat (from Fink) linked into
    the GHDL runtime. I am patching grt.lst to do this. These changes will
    not show up in GHDL before version 0.8

    I assume that you are mainly interested in testing GHDL a little bit
    before putting further effort into this. I have put a binary
    distribution on my website:
    Go to the Files section, browse to the IVIonOSX folder and get the most
    recent dmg-image. This includes an installer that installs IVI complete
    with GHDL and Icarus into /Simulator (so that you may easily remove the
    tools later). The tools may be installed individually, if you need to
    save disk space. Please note that you will also need Tcl/Tk for Aqua
    found here, when planning to use IVI:

    Please be advised that this binary distribution is not finished yet, as
    we are still working on the GHDL/IVI integration. I hope that you are
    nontheless able to get a feeling for it. I am planning to have all this
    polished in the next few weeks. If you have any further questions,
    please do not hesitate to contact me directly.

    Best regards

    email: f-dot-bertram-at-mac-dot-com

    # Project: GHDL - VHDL simulator
    # File: build.command
    # Description: Script to build GHDL on Mac OS X
    root=`dirname $0`
    cd ${root}


    echo "----------------------------------------"
    echo "merge GHDL into GCC"
    echo "----------------------------------------"

    cp -rf ${ghdldir}/vhdl ${srcdir}/gcc

    echo "----------------------------------------"
    echo "setup"
    echo "----------------------------------------"

    CC="cc -no-cpp-precomp"
    export CC

    mkdir ${objdir}
    cd ${objdir}

    mkdir ${pfx}/include
    mkdir ${pfx}/lib
    cp ${fink}/include/dlfcn.h ${pfx}/include/dlfcn.h
    cp ${fink}/lib/libdl.0.dylib ${pfx}/lib/libdl.dylib

    echo "----------------------------------------"
    echo "configure"
    echo "----------------------------------------"

    ${srcdir}/configure \
    --enable-languages=vhdl \
    --prefix=${pfx} || exit 1

    echo "----------------------------------------"
    echo "make"
    echo "----------------------------------------"

    make || exit 1

    echo "----------------------------------------"
    echo "install"
    echo "----------------------------------------"

    make install || exit 1

    # --------------------------------------------
    # fix GHDL build problems
    # --------------------------------------------

    echo "@/libgrt.a" >
    echo "@/system.o" >>
    echo "${pfx}/lib/libdl.dylib" >>
    cp /usr/lib/ada/system.o

    # --------------------------------------------
    # copy additional files
    # --------------------------------------------

    echo `${pfx}/bin/ghdl --version` | \
    sed -e 's/GHDL //' | \
    sed -e 's/ \[.*//' > ${pfx}/VERSION.txt

    cp -f ${srcdir}/COPYING ${pfx}
    cp -f ${srcdir}/COPYING.lib ${pfx}
    cp -f ${srcdir}/MAINTAINERS ${pfx}
    cp -f ${srcdir}/README ${pfx}
    cp -f ${srcdir}/FAQ ${pfx}
    cp -f ${srcdir}/BUGS ${pfx}
    cp -f ${srcdir}/GNATS ${pfx}

    # end of file
    Felix Bertram, Sep 4, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.