Skip to content

Commit 3d9c593

Browse files
authored
16 hbm in 1 stack only (#127)
Signed-off-by: Bruno Mesnet <bruno.mesnet@fr.ibm.com>
1 parent e1d7148 commit 3d9c593

3 files changed

Lines changed: 13 additions & 31 deletions

File tree

hardware/setup/create_hbm.tcl

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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
5848
create_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]
277268
connect_bd_net [get_bd_pins refclk_bufg_apb_clk/BUFGCE_O] [get_bd_pins hbm/APB_0_PCLK]
278269
connect_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 } {
281272
connect_bd_net [get_bd_pins constant_1_zero/dout] [get_bd_pins hbm/APB_1_PENABLE] >> $log_file
282273
connect_bd_net [get_bd_pins constant_22_zero/dout] [get_bd_pins hbm/APB_1_PADDR] >> $log_file
283274
connect_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
365356
connect_bd_net [get_bd_pins hbm/HBM_REF_CLK_0] [get_bd_pins S_AXI_p0_HBM_ACLK]
366357
connect_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

hardware/setup/create_hbm_for_simu.tcl

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ set hbm_axi_if_num $::env(HBM_AXI_IF_NUM)
2626

2727
# user can set a specific value for the Action clock lower than the 250MHz nominal clock
2828
# as of now, only 3 clock frequencies are enabled in this file: 200MHz, 225MHz and 250MHz
29+
# At this time, only AXI Action clock which can be used is the 200MHz nominal clock
2930
set action_clock_freq "200MHz"
3031
#overide default value if variable exist
3132
#set action_clock_freq $::env(FPGA_ACTION_CLK)
@@ -37,20 +38,10 @@ set bd_name hbm_top
3738
# _______________________________________________________________________________
3839
# In this file, we define all the logic to have independent 256MB/2Gb memories
3940
# each with an independent AXI interfaces which will be connected to the action
40-
# Default is hbm_axi_if_num = 12 interfaces
41-
# TO increase/decrease the number of memory needed, just look to #CHANGE_HBM_INTERFACES_NUMBER
42-
# param and 1) change HBM_AXI_IF_NUM value n Kconfig menu with a value between 1 and 32
43-
# and 2) set the right params enabling AXI and MC
44-
# -------------------------------------------------------
45-
# If you modify the number of AXI interfaces, don't forget to modify also :
46-
# actions/hls_hbm_memcopy/hw/hw_action_memcopy.cpp
47-
# hardware/hdl/hls/action_wrapper.v
48-
# hardware/hdl/core/framework_afu.v
49-
# --> follow HBM names <--
41+
# The number of HBM interfaces is selected by the Kconfig menu
42+
# It needs to be in sync with the param #define HBM_AXI_IF_NB which should be
43+
# defined in actions/hls_hbm_memcopy_1024/hw/hw_action_hbm_memcopy_1024.cpp
5044
# _______________________________________________________________________________
51-
#CHANGE_HBM_INTERFACES_NUMBER
52-
#set HBM_MEM_NUM 12
53-
#this parameter is taken from Kmenu => set hbm_axi_if_num
5445

5546
# Create HBM project
5647
create_project $prj_name $root_dir/ip/hbm -part $fpga_part -force >> $log_file

scripts/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ config ACTION_USER_CLOCK
757757
config HLS_CLOCK_PERIOD_CONSTRAINT
758758
prompt "The HLS clock period constraint used when C code (only used for hls action)"
759759
string
760-
default "4ns"
760+
default "5ns"
761761
range "1ns" "20ns"
762762
help
763763
The HLS clock period constraint in "ns" used when C code is compiled to rtl,

0 commit comments

Comments
 (0)