GithubHelp home page GithubHelp logo

vhdl's Introduction

Agents of Chaos' Embedded Programming project.

Running the code

The makefile has the following recipes -

all - Compiles all the required files
run - Runs the compiled files
with-gtkwave - Compiles and runs the files, as well as creates the GTKWave file
clean - Cleans up the .o, .cf and executable files from the directory



The team is -

  • EE16BTECH11026 - Aravind Ganesh
  • ES16BTECH11005 - Jeel Bhavsar
  • ES16BTECH11012 - Akshita Ramya
  • ES16BTECH11025 - V. V. Shashank
  • ES16BTECH11029 - Srinidhi Bachu
Here's how you build GHDL for Ubuntu, in case you haven't already -

We're gonna be building ghdl with a gcc backend. This will take slightly more disk-space (not by much) and a little longer to download the files for, but gcc should be the fastest backend for ghdl. Here we go -

  1. Install an ada compiler (you may already have this, run the command anyway) -
    sudo apt-get install gnat

  2. Acquire gcc source-code. The download is the time taking part.
    wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2

  3. After downlaoding the tar.gz archive of the source code, extract it
    tar xvjf gcc-4.9.4.tar.bz2

  4. Add the directory of your gcc source code to a local variable -
    gccsource=$(pwd)/gcc-4.9.4/

  5. Download certain prerequisites for gcc -
    (cd $gccsource; ./contrib/download_prerequisites)

  6. After that's done, download ghdl source code -
    git clone https://github.com/tgingold/ghdl.git

  7. Go into the directory where you downloaded ghdl -
    cd ghdl

  8. Configure ghdl with the right parameters before install -
    ./configure --with-gcc=$gccsource --prefix=/usr/local

  9. Finally, install ghdl -

    make
    sudo make install
    
  10. Yayy! You're done! After you're done, you can get rid of the gcc and ghdl source code you downloaded -

    cd ..
    sudo rm -R ghdl
    sudo rm -R gcc-4.9.4
    

Now, you can use ghdl normally as a terminal command to compile and run vhdl files! :D

This is how to compile and run a vhdl file

Write a vhdl code in a text file and save it with .vhdl file extension.

In the directory run this command export PATH=/opt/ghdl-updates/bin/:$PATH

Run the following command to compile the file ghdl -a file_name.vhdl

Then you have to build excutable file (-e means elaborate) ghdl -e entity_name

An executable file entity_name is generated. To run the file excute the following command ghdl -r entity_name

GTKWave

To install GTKWave, run the following in the terminal sudo apt-get install gtkwave

Follow this step while running the executable file to create waveform file (VCD format) ghdl -r excutable_file --vcd=file_name.vcd

To view the .vcd file, gtkwave file_name.vcd

vhdl's People

Contributors

aravindganesh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.