Email: bknpk@hotmail.com Phone: +972-54-7649119
V

 

ASIC/FPGA Design and Verification Out Source Services

simple bash script to compile vhdl design using the ghdl

  1. The following is a simple bash script to compile a VHDL design and test bench using ghdl.
  2. Since the operator || and && did not work, I captured the output into a file. If the new created file, has a size greater than 0, this is probably an error.
  3. The script uses sed to extract the size printed by a du command.

  4. #!/bin/bash

    if [ -d "work" ] ; then
      rm -fr work
      mkdir work
    fi
    if [ -e "tmp.txt" ] ; then
      rm -f tmp.txt
    fi
    ghdl -i --warn-no-vital-generic --workdir=work *.vhd >& tmp.txt
    sz=`du tmp.txt | sed 's/\(^[0-9]*\).*/\1/'`
    echo $sz
    ok="0"
    if [ "$sz" -eq "$ok" ] ; then
      echo "compilation ended ok"
      ghdl -m --warn-no-vital-generic --workdir=work -P~/Home_2/VHDL_IP_Stack/CODE/PostNGDsim/unisim --ieee=synopsys -fexplicit TB
    else
      less tmp.txt
    fi


  5. A similar script can be seen at: AHB non free project

    This AHB project is a VHDL project, made of two AHB masters, one arbiter, one AHB to APB bridge and one simple APB slave. If you are interested in this project as a graduate project, contact me via mail and put in the subject: non free AHB project.




Please let me know what you think on my site.

 


Contact me now at:

  ...


I would be happy to offer my services. Call ASAP !


Home

simple bash script, which demonstrates generation of a random number within a specified range and writing the result into a VHDL file.






Search This Site


Feedback This Site




new pages on this site