@@ -39,20 +39,10 @@ set bd_name hbm_top
3939# _______________________________________________________________________________
4040# In this file, we define all the logic to have independent 256MB/2Gb memories
4141# each with an independent AXI interfaces which will be connected to the action
42- # Default is hbm_axi_if_num = 12 interfaces
43- # TO increase/decrease the number of memory needed, just look to #CHANGE_HBM_INTERFACES_NUMBER
44- # param and 1) change in menu the HBM_AXI_IF_NUM with a value between 1 and 32.
45- # and 2) set the right params enabling AXI and MC
46- # -------------------------------------------------------
47- # If you modify the number of AXI interfaces, don't forget to modify also :
48- # actions/hls_hbm_memcopy/hw/hw_action_memcopy.cpp
49- # hardware/hdl/hls/action_wrapper.v
50- # hardware/hdl/core/framework_afu.v
51- # --> follow HBM names <--
42+ # The number of HBM interfaces is selected by the Kconfig menu
43+ # It needs to be in sync with the param #define HBM_AXI_IF_NB which should be
44+ # defined in actions/hls_hbm_memcopy_1024/hw/hw_action_hbm_memcopy_1024.cpp
5245# _______________________________________________________________________________
53- # CHANGE_HBM_INTERFACES_NUMBER
54- # set HBM_MEM_NUM 12
55- # #This number is now taken from the Kmenu => hbm_axi_if_num
5646
5747# Create HBM project
5848create_project $prj_name $root_dir /ip/hbm -part $fpga_part -force >> $log_file
@@ -127,8 +117,8 @@ set_property -dict [list \
127117 CONFIG.USER_XSDB_INTF_EN {FALSE} \
128118 ] $cell >> $log_file
129119
130-
131- if { $hbm_axi_if_num < 16 } {
120+ # if less or equal than 16 HBM then 1 stack used
121+ if { $hbm_axi_if_num <= 16 } {
132122 set_property -dict [list \
133123 CONFIG.USER_HBM_DENSITY {4GB} \
134124 CONFIG.USER_HBM_STACK {1} \
@@ -143,6 +133,7 @@ if { $hbm_axi_if_num < 16 } {
143133 CONFIG.USER_SINGLE_STACK_SELECTION {LEFT} \
144134 ] $cell >> $log_file
145135 }
136+ # 2 stacks
146137} else {
147138 set_property -dict [list \
148139 CONFIG.USER_SINGLE_STACK_SELECTION {LEFT} \
@@ -277,7 +268,7 @@ connect_bd_net [get_bd_pins constant_1_zero/dout] [get_bd_pins hbm/APB_0_PWRITE]
277268connect_bd_net [get_bd_pins refclk_bufg_apb_clk/BUFGCE_O] [get_bd_pins hbm/APB_0_PCLK]
278269connect_bd_net [get_bd_pins ARESETN] [get_bd_pins hbm/APB_0_PRESET_N]
279270
280- if { $hbm_axi_if_num > 15 } {
271+ if { $hbm_axi_if_num > 16 } {
281272connect_bd_net [get_bd_pins constant_1_zero/dout] [get_bd_pins hbm/APB_1_PENABLE] >> $log_file
282273connect_bd_net [get_bd_pins constant_22_zero/dout] [get_bd_pins hbm/APB_1_PADDR] >> $log_file
283274connect_bd_net [get_bd_pins constant_1_zero/dout] [get_bd_pins hbm/APB_1_PSEL] >> $log_file
@@ -364,7 +355,7 @@ for {set i 0} {$i < $hbm_axi_if_num} {incr i} {
364355# This line need to be added after the loop since the S_AXI_p0_HBM_ACLK is not defined before
365356connect_bd_net [get_bd_pins hbm/HBM_REF_CLK_0] [get_bd_pins S_AXI_p0_HBM_ACLK]
366357connect_bd_net [get_bd_ports S_AXI_p0_HBM_ACLK] [get_bd_pins refclk_bufg_apb_clk/BUFGCE_I]
367- if { $hbm_axi_if_num > 15 } {
358+ if { $hbm_axi_if_num > 16 } {
368359 connect_bd_net [get_bd_pins hbm/HBM_REF_CLK_1] [get_bd_pins S_AXI_p0_HBM_ACLK]
369360}
370361
0 commit comments