diff --git a/sm_soc_devkit_ghrd/Makefile b/sm_soc_devkit_ghrd/Makefile index e90be60..d83b564 100755 --- a/sm_soc_devkit_ghrd/Makefile +++ b/sm_soc_devkit_ghrd/Makefile @@ -16,27 +16,16 @@ # - cvr: mUDV Coville Ridge # - lbm: mUCV Little Battle Mountain # -# BOOTS_FIRST: -# - hps: hps first [default] -# - fpga: fpga first +# DEVICE: +# - A5ED065BB32AE5SR0: FPGA OPN# [default] +# +# INITIALIZATION_FIRST: +# - hps: HPS initialization first [default] +# - fpga: FPGA fabric initialization first # # HPS_JTAG_MODE: # - combined: combined mode [default] # -# BOARD_REV: -# - A1: a1 type [default] - -# QUARTUS_DEVICE_FAMILY: -# - Agilex5: none [default] -# -# QUARTUS_DEVICE: -# - A5ED065BB32AE5SR0: FPGA OPN# [default] -# -# ENABLE_HPS_EMIF_ECC: -# - 0: disable [default] -# -# HPS_EMIF_REF_CLK_FREQ_MHZ: -# - 33.333: unit mhz [default] # -> # ######################################################################### @@ -157,11 +146,10 @@ HAVE_QSYS := 1 endif ################################################ -# Design Settings -# If you change and design settings, you need -# to run "make scrub_clean" followed by -# "make generate_from_tcl" for the settings -# to be applied +# Prefix Settings +# Following section defines/derives parameters +# that is not parameterizable via command line +# ################################################ # Dependency @@ -169,25 +157,24 @@ endif #INTEL_CUSTOM_IP_LINK = "https://releases.rocketboards.org/release/intel_custom_ip/$(INTEL_CUSTOM_IP_TARBALL)" # Family and Device -# QUARTUS_DEVICE to Board Revision Mapping +# DEVICE to Board Revision Mapping + +HPS_EMIF_REF_CLK_FREQ_MHZ ?= 33.333 # User Settings # Valid BOARD_TYPE: hidden, cvr -BOARD_TYPE ?= DK-A5E065BB32AES1 +###BOARD_TYPE ?= DK-A5E065BB32AES1 #Loading board configuration include board/board_$(BOARD_TYPE)_make_config.inc # System initilization mode: fpga, hps -BOOTS_FIRST ?= hps +INITIALIZATION_FIRST ?= hps # HPS JTAG MODE: combined, separate HPS_JTAG_MODE ?= combined -# Board Revision: A0, A1 -#BOARD_REV ?= A1 - # Option to enable Hard Processor System -HPS_EN ?= 1 +SUB_HPS_EN ?= 1 # HPS EMIF Enabled: 0, 1 HPS_EMIF_EN ?= 0 @@ -196,20 +183,21 @@ HPS_EMIF_EN ?= 0 ENABLE_HPS_EMIF_ECC ?= 0 # Default Assignment (Do not modify) -QUARTUS_DEVICE_FAMILY := Agilex5 +DEVICE_FAMILY := Agilex5 #SM -QUARTUS_DEVICE ?= A5ED065BB32AE5SR0 +DEVICE ?= A5ED065BB32AE5SR0 # Board Power Management. temporary set power management IC type here, till an alternative is made available for Agilex5 devkit + +PROJECT_NAME ?= ghrd_$(call lc,$(DEVICE)) + BOARD_PWRMGT ?= linear # Publicly Available DC: devkit_dc_oobe, devkit_dc_nand, devkit_dc_emmc DAUGHTER_CARD ?= devkit_dc_oobe -# System initilization mode: fpga, hps -BOOTS_FIRST ?= hps # HPS JTAG MODE: combined, separate HPS_JTAG_MODE ?= combined # Option to enable Hard Processor System -HPS_EN ?= 1 +SUB_HPS_EN ?= 1 F2S_DATA_WIDTH ?= 0 # HPS EMIF Enabled: 0, 1 HPS_EMIF_EN ?= 0 @@ -220,17 +208,17 @@ DFL_ROM_EN ?= 0 SUB_FPGA_RGMII_EN ?= 0 -ifneq ($(QUARTUS_DEVICE_FAMILY),) -QUARTUS_TCL_ARGS += devicefamily $(QUARTUS_DEVICE_FAMILY) -QSYS_TCL_CMDS += set devicefamily $(QUARTUS_DEVICE_FAMILY); +ifneq ($(DEVICE_FAMILY),) +QUARTUS_TCL_ARGS += device_family $(DEVICE_FAMILY) +QSYS_TCL_CMDS += set device_family $(DEVICE_FAMILY); -QUARTUS_TCL_ARGS += project_name ghrd_$(call lc,$(QUARTUS_DEVICE)) -QSYS_TCL_CMDS += set project_name ghrd_$(call lc,$(QUARTUS_DEVICE)); +QUARTUS_TCL_ARGS += project_name $(PROJECT_NAME) +QSYS_TCL_CMDS += set project_name $(PROJECT_NAME); endif -ifneq ($(QUARTUS_DEVICE),) -QUARTUS_TCL_ARGS += device $(QUARTUS_DEVICE) -QSYS_TCL_CMDS += set device $(QUARTUS_DEVICE); +ifneq ($(DEVICE),) +QUARTUS_TCL_ARGS += device $(DEVICE) +QSYS_TCL_CMDS += set device $(DEVICE); endif ifneq ($(BOARD_TYPE),) @@ -248,9 +236,9 @@ QUARTUS_TCL_ARGS += sub_fpga_rgmii_en $(SUB_FPGA_RGMII_EN) QSYS_TCL_CMDS += set sub_fpga_rgmii_en $(SUB_FPGA_RGMII_EN); endif -ifneq ($(BOOTS_FIRST),) -QUARTUS_TCL_ARGS += sys_initialization $(BOOTS_FIRST) -QSYS_TCL_CMDS += set sys_initialization $(BOOTS_FIRST); +ifneq ($(INITIALIZATION_FIRST),) +QUARTUS_TCL_ARGS += initialization_first $(INITIALIZATION_FIRST) +QSYS_TCL_CMDS += set initialization_first $(INITIALIZATION_FIRST); endif ifeq ($(HPS_JTAG_MODE),separate) @@ -274,6 +262,11 @@ QUARTUS_TCL_ARGS += daughter_card $(DAUGHTER_CARD) QSYS_TCL_CMDS += set daughter_card $(DAUGHTER_CARD); endif +ifneq ($(SUB_PERI_EN),) +QUARTUS_TCL_ARGS += sub_peri_en $(SUB_PERI_EN) +QSYS_TCL_CMDS += set sub_peri_en $(SUB_PERI_EN); +endif + ifneq ($(HPS_CLK_SOURCE),) QUARTUS_TCL_ARGS += hps_clk_source $(HPS_CLK_SOURCE) QSYS_TCL_CMDS += set hps_clk_source $(HPS_CLK_SOURCE); @@ -284,9 +277,9 @@ QSYS_TCL_CMDS += set hps_emif_en $(HPS_EMIF_EN); #QUARTUS_TCL_ARGS += hps_emif_ecc_en $(ENABLE_HPS_EMIF_ECC) #QSYS_TCL_CMDS += set hps_emif_ecc_en $(ENABLE_HPS_EMIF_ECC); -ifneq ($(HPS_EN),) -QUARTUS_TCL_ARGS += hps_en $(HPS_EN) f2s_data_width $(F2S_DATA_WIDTH) -QSYS_TCL_CMDS += set hps_en $(HPS_EN); set f2s_data_width $(F2S_DATA_WIDTH); +ifneq ($(SUB_HPS_EN),) +QUARTUS_TCL_ARGS += sub_hps_en $(SUB_HPS_EN) f2s_data_width $(F2S_DATA_WIDTH) +QSYS_TCL_CMDS += set sub_hps_en $(SUB_HPS_EN); set f2s_data_width $(F2S_DATA_WIDTH); endif # EMIF Topology settings, applies only if HPS-EMIF(EMIF_AXI_Enable) is enabled. Set this according to your ddr settings. @@ -346,12 +339,12 @@ endif MODULES := $(shell cat $(MODULES_FILE)) MODULE_BUILD := $(foreach n, $(MODULES), $(n).build) -$(MODULE_BUILD): quartus_generate_qsf_qpf quartus_generate_top +$(MODULE_BUILD): quartus_generate_qsf_qpf @$(MAKE) QSYS_ARGS='$(QSYS_ARGS)' QSYS_TCL_ARGS='$(QSYS_TCL_ARGS)' USER_CONFIG='$(USER_CONFIG_UPDATE)' $(USER_CONFIG_UPDATE) -C $(subst .build,,$@) generate_from_tcl .PHONY: generate_submodule generate_submodule: $(MODULE_BUILD) - + @$(MAKE) quartus_generate_top #=============================================== # Config @@ -465,9 +458,9 @@ AR_FILTER_OUT += %_tb.qsys # ############# -# QSys +# Name the top level QSys file QSYS_FILE_TOP := qsys_top.qsys -QSYS_FILE_TOP ?= $(firstword $(wildcard *top*.qsys) $(wildcard ghrd*.qsys) $(wildcard *main*.qsys) $(wildcard *soc*.qsys) $(wildcard *.qsys)) +#QSYS_FILE_TOP ?= $(firstword $(wildcard *top*.qsys) $(wildcard ghrd*.qsys) $(wildcard *main*.qsys) $(wildcard *soc*.qsys) $(wildcard *.qsys)) OTHER_QSYS_FILES := @@ -536,7 +529,7 @@ endif ############# # Quartus Prime -QUARTUS_QPF := ghrd_$(call lc,$(QUARTUS_DEVICE)).qpf +QUARTUS_QPF := ghrd_$(call lc,$(DEVICE)).qpf ifeq ($(QUARTUS_QPF),) $(error ERROR: QUARTUS_QPF *.qpf file not set and could not be discovered) @@ -644,7 +637,8 @@ QUARTUS_TCL_ARGS += qsys_name $(patsubst %.qsys,%,$(QSYS_FILE_TOP)) ifneq ($(QUARTUS_TOP_GEN),) quartus_generate_top: $(QUARTUS_TOP_GEN) @$(RM) *_top.v - quartus_sh --script=$< $(QUARTUS_TCL_ARGS) prjroot $(PROJECT_ROOT) + quartus_sh --script=$< $(QUARTUS_TCL_ARGS) + @$(ECHO) "quartus_generate_top done!" else quartus_generate_top: @$(ECHO) "Make target '$@' is not supported for this design" @@ -657,7 +651,7 @@ QSYS_GEN_QSYS_DEPS += quartus_generate_qsf_qpf #qsys_generate_qsys: $(QSYS_QSYS_GEN) $(QSYS_GEN_QSYS_DEPS) $(INTEL_CUSTOM_IP_DIR_TARGET) # @$(RM) $(QSYS_FILE_TOP) # qsys-script $(QSYS_ARGS) --script=$< $(QSYS_TCL_ARGS) -#ifeq ($(HPS_ENABLE_SGMII),1) +#ifeq ($(SUB_HPS_ENABLE_SGMII),1) # $(MAKE) quartus_add_post_sgmii_sdc #endif # $(stamp_target) @@ -666,13 +660,14 @@ QSYS_GEN_QSYS_DEPS += quartus_generate_qsf_qpf # @$(ECHO) "Make target '$@' is not supported for this design" #endif +QSYS_TCL_CMDS += set qsys_name $(patsubst %.qsys,%,$(QSYS_FILE_TOP)); .PHONY: qsys_generate_qsys ifneq ($(QSYS_QSYS_GEN),) qsys_generate_qsys: $(QSYS_QSYS_GEN) $(INTEL_CUSTOM_IP_DIR_TARGET) @$(RM) $(QSYS_FILE_TOP) qsys-script $(QSYS_ARGS) --script=$< --cmd="$(QSYS_TCL_ARGS)" -ifeq ($(HPS_ENABLE_SGMII),1) +ifeq ($(SUB_HPS_ENABLE_SGMII),1) $(MAKE) quartus_add_post_sgmii_sdc endif $(stamp_target) @@ -683,7 +678,7 @@ endif HELP_TARGETS += generate_from_tcl -generate_from_tcl.HELP := Generate the Quartus Project source files from tcl script source +generate_from_tcl.HELP := Generate the Quartus Project and Qsys design files from tcl script source .PHONY: generate_from_tcl generate_from_tcl: generate_submodule $(INTEL_CUSTOM_IP_DIR_TARGET) diff --git a/sm_soc_devkit_ghrd/arguments_solver.tcl b/sm_soc_devkit_ghrd/arguments_solver.tcl index 0739dad..2ad8765 100755 --- a/sm_soc_devkit_ghrd/arguments_solver.tcl +++ b/sm_soc_devkit_ghrd/arguments_solver.tcl @@ -61,7 +61,7 @@ # fpga_emif_width : 16, 32, 64 (irrespective of ECC) # fpga_emif_ecc_en : 1 or 0 # hps_en : 1 or 0 -# sys_initialization : HPS initialization sequence. HPS_FIRST or FPGA_FIRST +# initialization_first : HPS initialization sequence. HPS_FIRST or FPGA_FIRST # hps_dap_mode : HPS debug split mode. 2(SDM Pins),1(HPS Pins),0(disabled) # user0_clk_src_select : 7-PeriphC3 or 1-MainC1 (Select H2F User0 clock source) # user0_clk_freq : Default 500.Specify desired frequency for H2F User0 clock @@ -105,32 +105,32 @@ source ${prjroot}/design_config.tcl -proc check_then_accept { param } { - if {$param == device_family || device || qsys_name || project_name} { - puts "-- Accepted paramter \$param = $param" - } else { - puts "Warning: Inserted parameter \"$param\" is not supported for this script. " - } -} +# proc check_then_accept { param } { + # if {$param == device_family || device || qsys_name || project_name} { + # puts "-- Accepted paramter \$param = $param" + # } else { + # puts "Warning: Inserted parameter \"$param\" is not supported for this script. " + # } +# } -if { ![ info exists device_family ] } { - set device_family $DEVICE_FAMILY -} else { - puts "-- Accepted parameter \$device_family = $device_family" -} +# if { ![ info exists device_family ] } { + # set device_family $DEVICE_FAMILY +# } else { + # puts "-- Accepted parameter \$device_family = $device_family" +# } -if { ![ info exists device ] } { - set device $DEVICE -} else { - puts "-- Accepted parameter \$device = $device" -} +# if { ![ info exists device ] } { + # set device $DEVICE +# } else { + # puts "-- Accepted parameter \$device = $device" +# } -if { ![ info exists qsys_name ] } { - set qsys_name $QSYS_NAME -} else { - puts "-- Accepted parameter \$qsys_name = $qsys_name" -} +# if { ![ info exists qsys_name ] } { + # set qsys_name $QSYS_NAME +# } else { + # puts "-- Accepted parameter \$qsys_name = $qsys_name" +# } if { ![ info exists project_name ] } { set project_name $PROJECT_NAME @@ -493,10 +493,10 @@ if { ![ info exists hps_en ] } { puts "-- Accepted parameter \$hps_en = $hps_en" } -if { ![ info exists sys_initialization ] } { - set sys_initialization $SYS_INITIALIZATION +if { ![ info exists initialization_first ] } { + set initialization_first $SYS_INITIALIZATION } else { - puts "-- Accepted parameter \$sys_initialization = $sys_initialization" + puts "-- Accepted parameter \$initialization_first = $initialization_first" } if { ![ info exists hps_dap_mode ] } { diff --git a/sm_soc_devkit_ghrd/board/board_DK-A5E065BB32AES1_make_config.inc b/sm_soc_devkit_ghrd/board/board_DK-A5E065BB32AES1_make_config.inc index 7a34224..42a09e7 100755 --- a/sm_soc_devkit_ghrd/board/board_DK-A5E065BB32AES1_make_config.inc +++ b/sm_soc_devkit_ghrd/board/board_DK-A5E065BB32AES1_make_config.inc @@ -10,9 +10,8 @@ # ################################################ -#FM61 (devkit, mUDV1, mUDV2, char) -QUARTUS_DEVICE ?= AGFB014R24A2E2V -#QUARTUS_DEVICE ?= AGFB014R24A2E2VR1 +#SM +DEVICE ?= A5ED065BB32AE5SR0 #HPS EMIF Reference Clock HPS_EMIF_REF_CLK_FREQ_MHZ ?= "33.333" diff --git a/sm_soc_devkit_ghrd/board/board_cvr_make_config.inc b/sm_soc_devkit_ghrd/board/board_cvr_make_config.inc index 90619e2..69e953a 100755 --- a/sm_soc_devkit_ghrd/board/board_cvr_make_config.inc +++ b/sm_soc_devkit_ghrd/board/board_cvr_make_config.inc @@ -11,7 +11,7 @@ ################################################ #SM -QUARTUS_DEVICE ?= A5ED065BB32AE5SR0 +DEVICE ?= A5ED065BB32AE5SR0 #HPS EMIF Reference Clock HPS_EMIF_REF_CLK_FREQ_MHZ ?= "166.625" diff --git a/sm_soc_devkit_ghrd/board/board_lbm_make_config.inc b/sm_soc_devkit_ghrd/board/board_lbm_make_config.inc index 7d2608f..42a09e7 100644 --- a/sm_soc_devkit_ghrd/board/board_lbm_make_config.inc +++ b/sm_soc_devkit_ghrd/board/board_lbm_make_config.inc @@ -11,7 +11,7 @@ ################################################ #SM -QUARTUS_DEVICE ?= A5ED065BB32AE5SR0 +DEVICE ?= A5ED065BB32AE5SR0 #HPS EMIF Reference Clock HPS_EMIF_REF_CLK_FREQ_MHZ ?= "33.333" diff --git a/sm_soc_devkit_ghrd/create_ghrd_qsys.tcl b/sm_soc_devkit_ghrd/create_ghrd_qsys.tcl index 95f6774..ab0c8f2 100755 --- a/sm_soc_devkit_ghrd/create_ghrd_qsys.tcl +++ b/sm_soc_devkit_ghrd/create_ghrd_qsys.tcl @@ -106,12 +106,12 @@ add_instance subsys_fpga_rgmii fpga_rgmii_subsys reload_ip_catalog } -if {$hps_en == 1} { +if {$sub_hps_en == 1} { add_instance subsys_hps hps_subsys reload_ip_catalog } -if {$fpga_peripheral_en == 1} { +if {$sub_peri_en == 1} { add_instance subsys_periph peripheral_subsys reload_ip_catalog } @@ -154,7 +154,7 @@ if {$cct_en == 1} { # --------------- Connections and connection parameters ------------------# -if {$hps_en == 1} { +if {$sub_hps_en == 1} { if {$hps_emif_en == 1} { connect " clk_100.out_clk subsys_hps.clk rst_in.out_reset subsys_hps.reset @@ -198,17 +198,17 @@ connect "clk_100.out_clk subsys_debug.clk " } -#if {$fpga_peripheral_en == 1} { +#if {$sub_peri_en == 1} { # connect_map " subsys_debug.fpga_m_master subsys_periph.control_slave 0x10000" #} -if {$fpga_peripheral_en == 1} { +if {$sub_peri_en == 1} { connect "clk_100.out_clk subsys_periph.clk rst_in.out_reset subsys_periph.reset " } -if {$fpga_peripheral_en == 1} { +if {$sub_peri_en == 1} { if {$fpga_button_pio_width >0} { # connect "agilex_hps.f2h_irq0 periph.button_pio_irq" # set_connection_parameter_value agilex_hps.f2h_irq0/periph.button_pio_irq irqNumber {1} @@ -234,7 +234,7 @@ if {$lwh2f_width > 0} { # connect_map "subsys_hps.lwhps2fpga subsys_periph.control_slave 0x1_0000" #} - if {$fpga_peripheral_en == 1} { + if {$sub_peri_en == 1} { connect_map "subsys_hps.lwhps2fpga subsys_periph.pb_cpu_0_s0 0x0" connect "subsys_hps.f2h_irq_in subsys_periph.button_pio_irq" set_connection_parameter_value subsys_hps.f2h_irq_in/subsys_periph.button_pio_irq irqNumber {0} @@ -291,7 +291,7 @@ export clkctrl_0 clkctrl_input clkctrl_input export clkctrl_0 clkctrl_output clkctrl_output } -if {$fpga_peripheral_en == 1} { +if {$sub_peri_en == 1} { if {$fpga_button_pio_width >0} { export subsys_periph button_pio_external_connection button_pio_external_connection } diff --git a/sm_soc_devkit_ghrd/create_ghrd_quartus.tcl b/sm_soc_devkit_ghrd/create_ghrd_quartus.tcl index 6230231..408912f 100755 --- a/sm_soc_devkit_ghrd/create_ghrd_quartus.tcl +++ b/sm_soc_devkit_ghrd/create_ghrd_quartus.tcl @@ -13,6 +13,7 @@ foreach {key value} $quartus(args) { set ${key} $value + puts "Quartus script got $key = $value" } #puts "prjroot = ${prjroot} " @@ -59,7 +60,7 @@ set_global_assignment -name USE_SIGNALTAP_FILE cti_tapping.stp set_global_assignment -name SIGNALTAP_FILE cti_tapping.stp } -if {$hps_en == 1} { +if {$sub_hps_en == 1} { # Call "board_${board}_config.tcl" SDMIO config config_sdmio @@ -70,7 +71,7 @@ config_sdmio # puts "Warning (GHRD): proc \"config_misc\" is not exist in file:board_${board}_config.tcl" #} -if {$sys_initialization == "hps"} { +if {$initialization_first == "hps"} { set_global_assignment -name HPS_INITIALIZATION "HPS FIRST" } else { set_global_assignment -name HPS_INITIALIZATION "AFTER INIT_DONE" diff --git a/sm_soc_devkit_ghrd/create_ghrd_top.tcl b/sm_soc_devkit_ghrd/create_ghrd_top.tcl index f6b1e12..b594bf2 100755 --- a/sm_soc_devkit_ghrd/create_ghrd_top.tcl +++ b/sm_soc_devkit_ghrd/create_ghrd_top.tcl @@ -33,7 +33,7 @@ set param(top_name) $top_name set param(qsys_name) $qsys_name set param(daughter_card) $daughter_card set param(clk_gate_en) $clk_gate_en -set param(hps_en) $hps_en +set param(sub_hps_en) $sub_hps_en set param(hps_emif_ecc_en) $hps_emif_ecc_en set param(hps_emif_en) $hps_emif_en set param(hps_emif_rate) $hps_emif_rate @@ -46,12 +46,9 @@ set param(hps_emif_type) $hps_emif_type set param(fpga_emif_ecc_en) $fpga_emif_ecc_en set param(fpga_emif_en) $fpga_emif_en set param(fpga_emif_width) $fpga_emif_width -set param(fpga_peripheral_en) $fpga_peripheral_en -set param(hbm_en) $hbm_en -set param(fpga_sgpio_en) $fpga_sgpio_en -set param(hps_en) $hps_en -set param(h2f_user0_clk_en) $h2f_user0_clk_en -set param(board_rev) $board_rev +set param(sub_peri_en) $sub_peri_en +set param(user0_clk_src_select) $user0_clk_src_select +set param(user1_clk_src_select) $user1_clk_src_select set param(cross_trigger_en) $cross_trigger_en set param(hps_stm_en) $hps_stm_en set param(hps_sdmmc4b_q1_en) $hps_sdmmc4b_q1_en @@ -208,4 +205,4 @@ close $template_fh set content [altera_terp $template param] set fo [open "./ghrd_timing.sdc" "w"] puts $fo $content -close $fo \ No newline at end of file +close $fo diff --git a/sm_soc_devkit_ghrd/hps_subsys/Makefile b/sm_soc_devkit_ghrd/hps_subsys/Makefile index 11f0c2f..3e8e7e2 100755 --- a/sm_soc_devkit_ghrd/hps_subsys/Makefile +++ b/sm_soc_devkit_ghrd/hps_subsys/Makefile @@ -8,12 +8,21 @@ # # <- # -# HPS_EN: +# SUB_HPS_EN: # - 0: disable # - 1: enable [default] +# +# DAUGHTER_CARD: +# - devkit_dc_oobe: Out-of-Box Experience HPS Daughter Card [default] +# - devkit_dc_nand: HPS Daugther Card with NAND +# - devkit_dc_emmc: HPS Daughter Card with eMMC +# - debug2: HPS Daughter Card with debug2 +# - tsn_aic0 : HPS Daughter Card with TSN Config 1 +# # HPS_EMIF_EN : # - 0: disable # - 1: enable [default] +# # HPS_EMIF_WIDTH: # - 0: 1x16 (Not supported) # - 1: 1x32 [default] (Supported) @@ -21,18 +30,15 @@ # - 3: 2x16 bit - dual IO96B (Not supported) # - 4: 2x32 bit (Not supported) # - 5: 4x16 bit (Not supported) +# # HPS_EMIF_ECC_EN : # - 0: disable [default] # - 1: enable -# DAUGHTER_CARD: -# - devkit_dc_oobe: Out-of-Box Experience HPS Daughter Card [default] -# - devkit_dc_nand: HPS Daugther Card with NAND -# - devkit_dc_emmc: HPS Daughter Card with eMMC -# - debug2: HPS Daughter Card with debug2 -# - tsn_aic0 : HPS Daughter Card with TSN Config 1 +# # HPS_CLK_SOURCE: # - 0: HPS External Oscillator [default] # - 1: FPGA Free Clock +# ##demo: ## hps_other_var0 : ## - val00: val00_description [default] @@ -79,21 +85,21 @@ endef # $(eval $(call append_args, hps_other_var1)) #endif -ifeq ($(HPS_EN), $(DISABLE)) +ifeq ($(SUB_HPS_EN), $(DISABLE)) ifeq ($(DAUGHTER_CARD),) - HPS_EN=$(ENABLE) - $(shell echo "force HPS_EN=1 because DAUGHTER_CARD is not set") + SUB_HPS_EN=$(ENABLE) + $(shell echo "force SUB_HPS_EN=1 because DAUGHTER_CARD is not set") endif ifeq ($(DAUGHTER_CARD),none) - HPS_EN=$(ENABLE) - $(shell echo "force HPS_EN=1 because DAUGHTER_CARD is none") + SUB_HPS_EN=$(ENABLE) + $(shell echo "force SUB_HPS_EN=1 because DAUGHTER_CARD is none") endif endif .PHONY: generate_from_tcl generate_from_tcl: -ifeq ($(HPS_EN), $(ENABLE)) +ifeq ($(SUB_HPS_EN), $(ENABLE)) @qsys-script $(shell echo $(QSYS_ARGS) | sed 's/quartus-project=/quartus-project=..\//g') --script=./construct_subsys_hps.tcl --cmd="$(QSYS_TCL_ARGS_SUB)" @echo "compilation for from_tcl for $(CURRENT_FOLDER) done!" else diff --git a/sm_soc_devkit_ghrd/hps_subsys/construct_subsys_hps.tcl b/sm_soc_devkit_ghrd/hps_subsys/construct_subsys_hps.tcl index 4688668..93c738d 100755 --- a/sm_soc_devkit_ghrd/hps_subsys/construct_subsys_hps.tcl +++ b/sm_soc_devkit_ghrd/hps_subsys/construct_subsys_hps.tcl @@ -467,7 +467,7 @@ add_component_param "intel_srcss_gts gts_inst # connect_map "agilex_hps.lwhps2fpga sysid.control_slave 0x0" # } # -# if {$fpga_peripheral_en == 1} { +# if {$sub_peri_en == 1} { # connect_map "agilex_hps.lwhps2fpga periph.pb_cpu_0_s0 0x1000" # } #} @@ -567,7 +567,7 @@ add_component_param "intel_srcss_gts gts_inst # connect "agilex_hps.f2h_irq0 agilex_hps.h2f_usb1_interrupt" # } # } else { -# if {$fpga_peripheral_en == 1} { +# if {$sub_peri_en == 1} { # if {$fpga_button_pio_width >0} { # connect "agilex_hps.f2h_irq0 periph.button_pio_irq" # set_connection_parameter_value agilex_hps.f2h_irq0/periph.button_pio_irq irqNumber {1} diff --git a/sm_soc_devkit_ghrd/top_level_sdc_template.sdc.terp b/sm_soc_devkit_ghrd/top_level_sdc_template.sdc.terp index af02120..a0d828b 100755 --- a/sm_soc_devkit_ghrd/top_level_sdc_template.sdc.terp +++ b/sm_soc_devkit_ghrd/top_level_sdc_template.sdc.terp @@ -27,7 +27,7 @@ set_false_path -from [get_ports {fpga_reset_n[0]}] # sourcing JTAG related SDC source ./jtag.sdc -@@if {$fpga_peripheral_en == 1} { +@@if {$sub_peri_en == 1} { # FPGA IO port constraints @@if {$fpga_button_pio_width > 0} { set_false_path -from [get_ports {fpga_button_pio[0]}] -to * diff --git a/sm_soc_devkit_ghrd/top_level_template.v.terp b/sm_soc_devkit_ghrd/top_level_template.v.terp index 23413c1..b95f500 100755 --- a/sm_soc_devkit_ghrd/top_level_template.v.terp +++ b/sm_soc_devkit_ghrd/top_level_template.v.terp @@ -38,7 +38,7 @@ input wire refclk_bti, input wire fpga_clk_100, @@} -@@if {$fpga_peripheral_en == 1} { +@@if {$sub_peri_en == 1} { @@if {$fpga_led_pio_width > 0 } { output wire [$fpga_led_pio_width-1:0] fpga_led_pio, @@} @@ -50,7 +50,7 @@ input wire [$fpga_button_pio_width-1:0] fpga_button_pio, @@} @@} //HPS -@@if {$hps_en == 1} { +@@if {$sub_hps_en == 1} { @@if {$hps_emif_en == 1} { // HPS EMIF @@if {$hps_emif_type == "ddr4"} { @@ -385,7 +385,7 @@ output wire [$ftrace_output_width-1:0] ftrace_data, output wire ftrace_clk, @@} @@} -@@if {$hps_en == 1} { +@@if {$sub_hps_en == 1} { @@if {$hps_io_off == 0} { input wire hps_osc_clk, @@} @@ -420,7 +420,7 @@ wire emac0_mdoe; assign emac0_mdio = emac0_mdoe? emac0_mdo : 1'bz; assign emac0_mdi = emac0_mdio; @@} -@@if {$hps_en == 1} { +@@if {$sub_hps_en == 1} { //wire h2f_reset; @@if {$user0_clk_src_select ==1} { wire user0_clk_src_clk; @@ -443,7 +443,7 @@ assign system_clk_100_internal = system_clk_100_gated; assign system_clk_100_internal = system_clk_100; @@ } -@@ if {$fpga_peripheral_en ==1} { +@@ if {$sub_peri_en ==1} { @@ if {$fpga_button_pio_width > 0} { wire [$fpga_button_pio_width-1:0] fpga_debounced_buttons; @@ } @@ -458,7 +458,7 @@ assign fpga_led_pio = {heartbeat_led,fpga_led_internal}; -@@if {$hps_en == 1} { +@@if {$sub_hps_en == 1} { @@ if {$hps_f2s_irq_en == 1 || $hps_peri_irq_loopback_en == 1} { // Todo no longer needed //wire [31:0] f2h_irq1_irq; @@ -469,7 +469,7 @@ wire o_pma_cpu_clk; @@if {$hps_stm_en == 1} { wire [43:0] stm_hw_events; -@@if {$fpga_peripheral_en == 1 && $cross_trigger_en == 0} { +@@if {$sub_peri_en == 1 && $cross_trigger_en == 0} { @@ set stm_hw_events_option "" @@ set stm_hw_events_option_bitcount 0 @@ if {$fpga_led_pio_width > 0} { @@ -500,7 +500,7 @@ assign stm_hw_events = 44'b0; // Qsys Top module ${qsys_name} soc_inst ( -@@if {($user0_clk_src_select == 1 && $hps_en == 1)} { +@@if {($user0_clk_src_select == 1 && $sub_hps_en == 1)} { .user0_clk_src_clk (user0_clk_src_clk), @@} .clk_100_clk (system_clk_100_internal), @@ -510,7 +510,7 @@ ${qsys_name} soc_inst ( .clkctrl_input_inclk (system_clk_100), .clkctrl_output_outclk (system_clk_100_gated), @@} -@@if {$fpga_peripheral_en == 1} { +@@if {$sub_peri_en == 1} { @@ if {$fpga_led_pio_width != 0} { .led_pio_external_connection_in_port (fpga_led_internal), .led_pio_external_connection_out_port (fpga_led_internal), @@ -523,7 +523,7 @@ ${qsys_name} soc_inst ( @@} @@} -@@if {$hps_en == 1} { +@@if {$sub_hps_en == 1} { @@if {$hps_stm_en == 1} { .agilex_hps_f2h_stm_hw_events_stm_hwevents (stm_hw_events), //Terminate the CS_JTAG. @@ -916,7 +916,7 @@ begin fpga_reset_n_debounced <= fpga_reset_n_debounced_wire; end -@@if {$fpga_peripheral_en == 1} { +@@if {$sub_peri_en == 1} { @@ if {$fpga_button_pio_width != 0} { // Debounce logic to clean out glitches within 1ms debounce debounce_inst (