Skip to content
Snippets Groups Projects
Select Git revision
  • 6f06ec62ab13b70e1222dd0a239200d48ccc5aca
  • master default protected
  • gec-84-c-compiler-dependency
  • gec-50-only-test-plot-with-gtkmm
  • make-baseline-aoqplot-nicer
  • use-system-pybind11
  • fix-filterbank-imagesets
  • fix-drawing-large-images
  • allow-writing-to-filterbanksets
  • implement-nroamlize-bandpass-for-non-complex-data
  • support-multiple-pols-in-filterbank
  • solve-flipped-axis-crashes
  • improve-statistics-speed
  • avoid-deprecated-gtkmm
  • ast-1621-deprecated-deletetable
  • ast-1613-update-hdf5-url
  • rename-use-input-flags-variable
  • dockerfile-fix
  • open-correct-data-column
  • add-target-cpu
  • add-git-to-format-conatiner
  • v3.4.0
  • v3.3.0
  • v3.2.0
  • test-vx.y
  • v3.1.0
  • v3.0.0
  • v2.15.0
  • v2.14.0
  • v2.13.0
  • v2.12.1
  • v2.12.0
  • v2.11.0
  • v2.10.0
  • v2.9.0
  • v2.8.0
  • v2.7.0
  • v2.6.0
  • v2.5.0
  • v2.4.0
  • v2.3.0
41 results

combinatorialthresholder.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    init_hdl.sh 2.84 KiB
    #!/usr/bin/env bash -e
    ###############################################################################
    #
    # Copyright (C) 2018 
    # ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
    # P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    #
    # $Id$
    #
    ###############################################################################
    
    #
    # Initialisation script to setup the environment variables for this branch
    #
    
    # 
    # Make sure it is sourced and no one accidentally gave the script execution rights and just executes it.
    if [[ "$_" == "${0}" ]]; then
        echo "ERROR: Use this command with '. ' or 'source '"
        sleep 1
        return
    fi
    
    # 
    if [ -z "${ALTERA_DIR}" ]; then
        echo "== environ variable 'ALTERA_DIR' not set. =="
        echo "should be in your .bashrc file."
        echo "if it is your .bashrc file but not active run bash in your terminal"
        return
    fi
    
    # Figure out where this script is located and set environment variables accordingly
    export RADIOHDL_WORK="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    echo "HDL environment will be setup for" $RADIOHDL_WORK
    
    # setup paths to build and config dir if not already defined by the user.
    export ARGS_WORK=${RADIOHDL_WORK}
    export RADIOHDL_BUILD_DIR=${RADIOHDL_WORK}/build
    if [[ ! -d "${RADIOHDL_BUILD_DIR}" ]]; then
        echo "make buil dir"
        echo "${RADIOHDL_BUILD_DIR}"
        mkdir "${RADIOHDL_BUILD_DIR}"
    fi
    # modelsim uses this sim dir for testing
    export HDL_IOFILE_SIM_DIR=${RADIOHDL_BUILD_DIR}/sim
    if [[ ! -d "${HDL_IOFILE_SIM_DIR}" ]]; then
        echo "make sim dir"
        echo "${HDL_IOFILE_SIM_DIR}"
        mkdir "${HDL_IOFILE_SIM_DIR}"
    fi
    # if sim dir not empty, remove all files and dirs
    if [ ! -z "$(ls -A ${HDL_IOFILE_SIM_DIR})" ]; then
        echo "clear sim dir"
        rm -r ${HDL_IOFILE_SIM_DIR}/*
    fi
    
    # copy git user_componets.ipx into Altera dir's
    for altera_dir in ${ALTERA_DIR}/*; do
        if [[ -d "${altera_dir}" ]] &&  [[ ! -h "${altera_dir}" ]]; then
            echo "copy git hdl_user_components.ipx to ${altera_dir}/ip/altera/user_components.ipx"
            cp ${RADIOHDL_WORK}/hdl_user_components.ipx $altera_dir/ip/altera/user_components.ipx
        fi
    done
    
    # source also radiohdl and args tools
    . ../radiohdl/init_radiohdl.sh
    if [[ -d "${RADIOHDL_WORK}/../args" ]]; then
        . ../args/init_args.sh
    fi