From b69b23c2325d77a59efa1cb647bae69ffe6b3219 Mon Sep 17 00:00:00 2001 From: Jonathan Hargreaves <hargreaves@astron.nl> Date: Wed, 15 Feb 2017 14:27:28 +0000 Subject: [PATCH] define unb2b toolset to support arria 10 FPGA version e1sg --- tools/hdltool_unb2b.cfg | 14 +++++ tools/modelsim/set_modelsim | 8 +-- tools/oneclick/base/hdl_config.py | 3 +- tools/oneclick/base/modelsim_config.py | 2 +- .../base/modelsim_regression_test_vhdl.py | 2 +- tools/oneclick/base/quartus_config.py | 2 +- tools/quartus/run_qsys | 2 +- tools/quartus/set_quartus | 52 +++++++++---------- 8 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 tools/hdltool_unb2b.cfg diff --git a/tools/hdltool_unb2b.cfg b/tools/hdltool_unb2b.cfg new file mode 100644 index 0000000000..2afb465082 --- /dev/null +++ b/tools/hdltool_unb2b.cfg @@ -0,0 +1,14 @@ +toolset_name = unb2b +lib_root_dir = $RADIOHDL +technology_names = ip_arria10_e1sg +build_dir = $HDL_BUILD_DIR +tool_name_sim = modelsim +tool_name_synth = quartus +model_tech_dir = /home/software/Mentor/10.4/modeltech +modelsim_search_libraries = + # arria10 only + altera_ver lpm_ver sgate_ver altera_mf_ver altera_lnsim_ver twentynm_ver twentynm_hssi_ver twentynm_hip_ver + altera lpm sgate altera_mf altera_lnsim twentynm twentynm_hssi twentynm_hip + # both stratixiv and arria10 + #altera_ver lpm_ver sgate_ver altera_mf_ver altera_lnsim_ver stratixiv_ver stratixiv_hssi_ver stratixiv_pcie_hip_ver twentynm_ver twentynm_hssi_ver twentynm_hip_ver + #altera lpm sgate altera_mf altera_lnsim stratixiv stratixiv_hssi stratixiv_pcie_hip twentynm twentynm_hssi twentynm_hip diff --git a/tools/modelsim/set_modelsim b/tools/modelsim/set_modelsim index 1e3fda3fbf..bfeb562d7c 100755 --- a/tools/modelsim/set_modelsim +++ b/tools/modelsim/set_modelsim @@ -42,11 +42,11 @@ if [ "${SITE-}" = "USN" ]; then elif [ "${TOOLSET}" = "unb2" ]; then . ${RADIOHDL}/tools/quartus/quartus_version.sh 15.0 . ${RADIOHDL}/tools/modelsim/modelsim_version.sh 10.4 - elif [ "${TOOLSET}" = "unb2a" ]; then + elif [ "${TOOLSET}" = "unb2a" -o "${TOOLSET}" = "unb2b" ]; then . ${RADIOHDL}/tools/quartus/quartus_version.sh 15.1 . ${RADIOHDL}/tools/modelsim/modelsim_version.sh 10.4 else - echo "error: unknown tool setting: ${TOOLSET} (choose 'unb1', 'unb2' or 'unb2a')" + echo "error: unknown tool setting: ${TOOLSET} (choose 'unb1', 'unb2', 'unb2a' or 'unb2b')" exit 1 fi # "${TOOLSET}" else # default site @@ -58,7 +58,7 @@ else # default site . ${RADIOHDL}/tools/modelsim/modelsim_version.sh 10.4 # Next line may be needed, but comment it if it yields ld.so errors export LD_PRELOAD=/home/software/freetype2/usr/lib/libfreetype.so - elif [ "${TOOLSET}" = "unb2a" ]; then + elif [ "${TOOLSET}" = "unb2a" -o "${TOOLSET}" = "unb2b" ]; then . ${RADIOHDL}/tools/quartus/quartus_version.sh 16.0 . ${RADIOHDL}/tools/modelsim/modelsim_version.sh 10.4 # Next line may be needed, but comment it if it yields ld.so errors @@ -67,7 +67,7 @@ else # default site . ${RADIOHDL}/tools/ise/ise_version.sh 10.1.03 . ${RADIOHDL}/tools/modelsim/modelsim_version.sh 6.6c else - echo "error: unknown tool setting: ${TOOLSET} (choose 'rsp', 'unb1', 'unb2' or 'unb2a')" + echo "error: unknown tool setting: ${TOOLSET} (choose 'rsp', 'unb1', 'unb2', 'unb2a' or 'unb2b')" exit 1 fi fi diff --git a/tools/oneclick/base/hdl_config.py b/tools/oneclick/base/hdl_config.py index d52c89eb30..1b90dcc80a 100644 --- a/tools/oneclick/base/hdl_config.py +++ b/tools/oneclick/base/hdl_config.py @@ -524,7 +524,7 @@ if __name__ == '__main__': mode = 0 # Parse command line arguments - hdl_args = HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a']) + hdl_args = HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a', 'unb2b']) # Read the dictionary info from all HDL tool and library configuration files in the current directory and the sub directories hdl = HdlConfig(toolRootDir=os.path.expandvars('$RADIOHDL/tools'), libFileName='hdllib.cfg', toolFileName=hdl_args.toolFileName) @@ -595,6 +595,7 @@ if __name__ == '__main__': if hdl_args.toolset=='unb1': top_lib = 'unb1_minimal' if hdl_args.toolset=='unb2': top_lib = 'unb2_minimal' if hdl_args.toolset=='unb2a': top_lib = 'unb2a_minimal' + if hdl_args.toolset=='unb2b': top_lib = 'unb2b_minimal' for build_type in ['sim', 'synth']: print '' print 'derive_all_use_libs for %s of %s = \n' % (build_type, top_lib), hdl.derive_all_use_libs(build_type, top_lib) diff --git a/tools/oneclick/base/modelsim_config.py b/tools/oneclick/base/modelsim_config.py index 1490a0d1e0..84e371d525 100755 --- a/tools/oneclick/base/modelsim_config.py +++ b/tools/oneclick/base/modelsim_config.py @@ -353,7 +353,7 @@ if __name__ == '__main__': mode = 0 # Parse command line arguments - hdl_args = hdl_config.HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a', 'rsp']) + hdl_args = hdl_config.HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a', 'unb2b', 'rsp']) if hdl_args.verbosity>=1: print '' hdl_args.argparser.print_help() diff --git a/tools/oneclick/base/modelsim_regression_test_vhdl.py b/tools/oneclick/base/modelsim_regression_test_vhdl.py index 2b1206a086..74fec74acf 100644 --- a/tools/oneclick/base/modelsim_regression_test_vhdl.py +++ b/tools/oneclick/base/modelsim_regression_test_vhdl.py @@ -58,7 +58,7 @@ from datetime import timedelta ############################################################################### # Parse command line arguments ############################################################################### -hdl_args = hdl_config.HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a']) +hdl_args = hdl_config.HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a', 'unb2b']) if hdl_args.verbosity>=1: print '' hdl_args.argparser.print_help() diff --git a/tools/oneclick/base/quartus_config.py b/tools/oneclick/base/quartus_config.py index 393e04de0f..0671cc1efc 100755 --- a/tools/oneclick/base/quartus_config.py +++ b/tools/oneclick/base/quartus_config.py @@ -226,7 +226,7 @@ class QuartusConfig(hdl_config.HdlConfig): if __name__ == '__main__': # Parse command line arguments - hdl_args = hdl_config.HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a']) + hdl_args = hdl_config.HdlParseArgs(toolsetSelect=['unb1', 'unb2', 'unb2a', 'unb2b']) if hdl_args.verbosity>=1: print '' hdl_args.argparser.print_help() diff --git a/tools/quartus/run_qsys b/tools/quartus/run_qsys index c0751d760e..ae6d61735f 100755 --- a/tools/quartus/run_qsys +++ b/tools/quartus/run_qsys @@ -142,7 +142,7 @@ unb_info $0 "QSYS generated successfully." # Additionally build the UNBOS App here as well: use_arg="use=qsys" -if [ "${toolset}" = "unb2" -o "${toolset}" = "unb2a" ]; then +if [ "${toolset}" = "unb2" -o "${toolset}" = "unb2a" -o "${toolset}" = "unb2b" ]; then use_arg="use=gen2" fi unb_info $0 "Additionally building the UNBOS App: run_app ${toolset} ${project} ${use_arg}" diff --git a/tools/quartus/set_quartus b/tools/quartus/set_quartus index e5f3b19024..95ce74f933 100755 --- a/tools/quartus/set_quartus +++ b/tools/quartus/set_quartus @@ -54,10 +54,10 @@ if [ "${SITE-}" = "USN" ]; then . ${RADIOHDL}/tools/quartus/quartus_version.sh 11.1sp2 elif [ "${TOOLSET}" = "unb2" ]; then . ${RADIOHDL}/tools/quartus/quartus_version.sh 15.0 - elif [ "${TOOLSET}" = "unb2a" ]; then + elif [ "${TOOLSET}" = "unb2a" -o "${TOOLSET}" = "unb2b" ]; then . ${RADIOHDL}/tools/quartus/quartus_version.sh 15.1 else - echo "error: unknown tool setting: ${TOOLSET} (choose 'unb1', 'unb2' or 'unb2a')" + echo "error: unknown tool setting: ${TOOLSET} (choose 'unb1', 'unb2', 'unb2a' or 'unb2b')" exit 1 fi # check that ipx file is correctly setup @@ -68,33 +68,33 @@ else # default site . ${RADIOHDL}/tools/quartus/quartus_version.sh 11.1 elif [ "${TOOLSET}" = "unb2" ]; then . ${RADIOHDL}/tools/quartus/quartus_version.sh 15.0 - elif [ "${TOOLSET}" = "unb2a" ]; then + elif [ "${TOOLSET}" = "unb2a" -o "${TOOLSET}" = "unb2b" ]; then # . ${RADIOHDL}/tools/quartus/quartus_version.sh 15.1 - . ${RADIOHDL}/tools/quartus/quartus_version.sh 16.0 +# . ${RADIOHDL}/tools/quartus/quartus_version.sh 16.0 -# # Begin: For 16.0-pro only: -# . ${RADIOHDL}/tools/quartus/quartus_version.sh 16.0-pro -# export QUARTUS_ROOTDIR=${QUARTUS_DIR}/quartus -# export QUARTUS_ROOTDIR_OVERRIDE=${QUARTUS_DIR}/quartus -# export NIOSDIR=${QUARTUS_DIR}/nios2eds -# export SOPC_KIT_NIOS2=${NIOSDIR} -# # Add to the $PATH, only once to avoid double entries -# pathadd ${QUARTUS_ROOTDIR}/bin -# pathadd ${QUARTUS_ROOTDIR}/sopc_builder/bin -# pathadd ${NIOSDIR}/bin -# pathadd ${NIOSDIR}/bin/gnu/H-i686-pc-linux-gnu/bin -# pathadd ${NIOSDIR}/bin/gnu/H-x86_64-pc-linux-gnu/bin -# pathadd ${NIOSDIR}/sdk2/bin -# # Qsys -# export ALTERA_HW_TCL_KEEP_TEMP_FILES=1 -# # User synthesis timestamp in FPGA image -# export UNB_COMPILE_STAMPS=1 -# export RADIOHDL_SVN_REVISION=`svn info ${RADIOHDL} | grep Revision` -# unset QUARTUS_DIR # <-- this is required otherwise run_qsys crashes with Java error -# return -# # End: For 16.0-pro only. + # Begin: For 16.0-pro only: + . ${RADIOHDL}/tools/quartus/quartus_version.sh 16.0-pro + export QUARTUS_ROOTDIR=${QUARTUS_DIR}/quartus + export QUARTUS_ROOTDIR_OVERRIDE=${QUARTUS_DIR}/quartus + export NIOSDIR=${QUARTUS_DIR}/nios2eds + export SOPC_KIT_NIOS2=${NIOSDIR} + # Add to the $PATH, only once to avoid double entries + pathadd ${QUARTUS_ROOTDIR}/bin + pathadd ${QUARTUS_ROOTDIR}/sopc_builder/bin + pathadd ${NIOSDIR}/bin + pathadd ${NIOSDIR}/bin/gnu/H-i686-pc-linux-gnu/bin + pathadd ${NIOSDIR}/bin/gnu/H-x86_64-pc-linux-gnu/bin + pathadd ${NIOSDIR}/sdk2/bin + # Qsys + export ALTERA_HW_TCL_KEEP_TEMP_FILES=1 + # User synthesis timestamp in FPGA image + export UNB_COMPILE_STAMPS=1 + export RADIOHDL_SVN_REVISION=`svn info ${RADIOHDL} | grep Revision` + unset QUARTUS_DIR # <-- this is required otherwise run_qsys crashes with Java error + return + # End: For 16.0-pro only. else - echo "error: unknown tool setting: ${TOOLSET} (choose 'unb1', 'unb2' or 'unb2a')" + echo "error: unknown tool setting: ${TOOLSET} (choose 'unb1', 'unb2', 'unb2a' or 'unb2b')" exit 1 fi # check that ipx file is correctly setup -- GitLab