From 967a138d0f172b68d894cd5a1ff6c9556b42b0d7 Mon Sep 17 00:00:00 2001 From: Istvan Csomortani Date: Thu, 13 Dec 2018 09:42:40 +0000 Subject: [PATCH] adi_project_intel: Add support for Quartus Pro By defualt the supported tool chain is Quartus PRO. If you want to build the project with Quartus Standard, you need to define an environment variable called QUARTUS_PRO_ISUSED with the value 0. (e.g. export QUARTUS_PRO_ISUSED=0 ) Note: Not all projects going to build on Quartus Standard, you should fix the errors if there is any. --- projects/scripts/adi_project_intel.tcl | 41 ++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/projects/scripts/adi_project_intel.tcl b/projects/scripts/adi_project_intel.tcl index caf837534..2f8dc5afc 100644 --- a/projects/scripts/adi_project_intel.tcl +++ b/projects/scripts/adi_project_intel.tcl @@ -21,6 +21,19 @@ proc adi_project {project_name {parameter_list {}}} { global version global quartus + # check $ALT_NIOS_MMU_ENABLED environment variables + + set mmu_enabled 1 + if [info exists ::env(ALT_NIOS_MMU_ENABLED)] { + set mmu_enabled $::env(ALT_NIOS_MMU_ENABLED) + } + + # check $QUARTUS_PRO_ISUSED environment variables + set quartus_pro_isused 1 + if [info exists ::env(QUARTUS_PRO_ISUSED)] { + set quartus_pro_isused $::env(QUARTUS_PRO_ISUSED) + } + if [regexp "_a10gx$" $project_name] { set family "Arria 10" set device 10AX115S2F45I1SG @@ -109,11 +122,29 @@ proc adi_project {project_name {parameter_list {}}} { puts $QFILE "save_system {system_bd.qsys}" close $QFILE - exec -ignorestderr $quartus(quartus_rootpath)/sopc_builder/bin/qsys-script \ - --script=system_qsys_script.tcl - exec -ignorestderr $quartus(quartus_rootpath)/sopc_builder/bin/qsys-generate \ - system_bd.qsys --synthesis=VERILOG --output-directory=system_bd \ - --family=$family --part=$device + # check which type of Quartus is used, to call the qsys utilities with the + # correct attributes + if {$quartus_pro_isused == 1} { + + exec -ignorestderr $quartus(quartus_rootpath)/sopc_builder/bin/qsys-script \ + --quartus_project=$project_name --script=system_qsys_script.tcl + + exec -ignorestderr $quartus(quartus_rootpath)/sopc_builder/bin/qsys-generate \ + system_bd.qsys --synthesis=VERILOG --family=$family --part=$device \ + --quartus-project=$project_name + + } else { + + exec -ignorestderr $quartus(quartus_rootpath)/sopc_builder/bin/qsys-script \ + --script=system_qsys_script.tcl + + exec -ignorestderr $quartus(quartus_rootpath)/sopc_builder/bin/qsys-generate \ + system_bd.qsys --synthesis=VERILOG --family=$family --part=$device \ + + # I/O Timing Analysis is available just in Quartus Standard + set_global_assignment -name ENABLE_ADVANCED_IO_TIMING ON + + } # default assignments