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


V

 

This page explains the compilation, elaboration and run the UART project.

  1. The first part of the bash script is the option clear. If entered, it must be the first parameter, as opposed to the other ones. If the switch is given, the GHDL compilation directory is removed.
    Note: the shift command must follow, in case more switches are given by the user.

  2. if [ "$1" = "clear" ] ; then
      #clear any former compilation results
      rm -fr work
      shift
    fi

  3. Next the presence of the work directory is checked.

  4. if [ -d "work" ] ; then
      echo "work directory exists"
    else
      mkdir work
    fi

  5. Last before running GHDL commands, comes the input switches handling: compilation skip, generate waves in VCD format and simulation run time.
    Note: the usage of grep command to make sure a valid number was given. The output is piped to /dev/null and the status code, returned by grep, is checked.



  6. comp_skip="no"
    ghdl_vcd="no"
    ghdl_time="100"
    #build the simulation command
    while (( "$#" )); do
      if [ "$1" = vcd ] ; then
        ghdl_vcd="yes"
      else
        if [ "$1" = "no_comp" ] ; then
          comp_skip="yes"
        else
          #checks for time validity - has to be a number
          echo $1 | grep "^[0-9]*$" >> /dev/null
          if [ $? -eq 0 ] ; then
            ghdl_time=$1
          fi
        fi
      fi
      shift
    done
    ghdl_run="./rx_tb --stop-time="${ghdl_time}"us --assert-level=error"
    if [ "$ghdl_vcd" = "yes" ] ; then
      ghdl_run=${ghdl_run}" --vcdgz=ghdl.vcd.gz"
    fi
    ghdl_run=${ghdl_run}" >& ghdl.log"
    ...


    To return to the main project type: Main .

  ...


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


Home

VHDL IP Stack

SD slave with Samsung flash (k9f1208) (vhdl project).

Download Area






Search This Site


Feedback This Site




new pages on this site