diff --git a/fpga/hls/jf_conversion.cpp b/fpga/hls/jf_conversion.cpp index 25df9b08..4f62cdfd 100644 --- a/fpga/hls/jf_conversion.cpp +++ b/fpga/hls/jf_conversion.cpp @@ -115,29 +115,29 @@ void jf_conversion(STREAM_512 &data_in, STREAM_512 &data_out, #pragma HLS INTERFACE register both axis port=addr_in #pragma HLS INTERFACE register both axis port=addr_out -#pragma HLS INTERFACE m_axi port=d_hbm_p0 bundle=d_hbm_p0 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p0 bundle=d_hbm_p0 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p1 bundle=d_hbm_p1 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p1 bundle=d_hbm_p1 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p2 bundle=d_hbm_p2 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p2 bundle=d_hbm_p2 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p3 bundle=d_hbm_p3 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p3 bundle=d_hbm_p3 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p4 bundle=d_hbm_p4 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p4 bundle=d_hbm_p4 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p5 bundle=d_hbm_p5 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p5 bundle=d_hbm_p5 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p6 bundle=d_hbm_p6 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p6 bundle=d_hbm_p6 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p7 bundle=d_hbm_p7 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p7 bundle=d_hbm_p7 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p8 bundle=d_hbm_p8 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p8 bundle=d_hbm_p8 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p9 bundle=d_hbm_p9 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p9 bundle=d_hbm_p9 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p10 bundle=d_hbm_p10 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p10 bundle=d_hbm_p10 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 -#pragma HLS INTERFACE m_axi port=d_hbm_p11 bundle=d_hbm_p11 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p11 bundle=d_hbm_p11 depth=512 offset=direct \ max_read_burst_length=16 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=9 packet_512_t packet_in; diff --git a/fpga/hls/save_to_hbm.cpp b/fpga/hls/save_to_hbm.cpp index 0cdb4cf0..24815ef9 100644 --- a/fpga/hls/save_to_hbm.cpp +++ b/fpga/hls/save_to_hbm.cpp @@ -73,13 +73,13 @@ void save_to_hbm(STREAM_512 &data_in, #pragma HLS INTERFACE register ap_none port=idle #pragma HLS INTERFACE register ap_stable port=hbm_size -#pragma HLS INTERFACE m_axi port=d_hbm_p0 bundle=d_hbm_p0 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p0 bundle=d_hbm_p0 depth=512 offset=direct \ max_read_burst_length=2 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=2 -#pragma HLS INTERFACE m_axi port=d_hbm_p1 bundle=d_hbm_p1 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p1 bundle=d_hbm_p1 depth=512 offset=direct \ max_read_burst_length=2 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=2 -#pragma HLS INTERFACE m_axi port=d_hbm_p2 bundle=d_hbm_p2 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p2 bundle=d_hbm_p2 depth=512 offset=direct \ max_read_burst_length=2 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=2 -#pragma HLS INTERFACE m_axi port=d_hbm_p3 bundle=d_hbm_p3 depth=512 offset=off \ +#pragma HLS INTERFACE m_axi port=d_hbm_p3 bundle=d_hbm_p3 depth=512 offset=direct \ max_read_burst_length=2 max_write_burst_length=16 latency=120 num_write_outstanding=8 num_read_outstanding=2 ap_uint<128> packet_mask[MAX_MODULES_FPGA*2]; diff --git a/fpga/scripts/bd_pcie.tcl b/fpga/scripts/bd_pcie.tcl index f2a3f2e2..d796da35 100644 --- a/fpga/scripts/bd_pcie.tcl +++ b/fpga/scripts/bd_pcie.tcl @@ -455,6 +455,10 @@ proc create_root_design { parentCell } { CONFIG.DESIGN_NUMBER {0} \ ] [get_bd_cells jungfraujoch_0/action_config_0] + for {set i 0} {$i < 16} {incr i} { + set_property -dict [list CONFIG.CONST_VAL [expr 0x20000000 * $i]] [get_bd_cells jungfraujoch_0/constant_hbm_offset_${i}] + } + # Restore current instance current_bd_instance $oldCurInst diff --git a/fpga/scripts/hbm_u55c.tcl b/fpga/scripts/hbm_u55c.tcl index 442b15bb..baf9eff1 100644 --- a/fpga/scripts/hbm_u55c.tcl +++ b/fpga/scripts/hbm_u55c.tcl @@ -236,7 +236,7 @@ proc create_hier_cell_hbm_infrastructure { parentCell nameHier } { CONFIG.USER_PHY_ENABLE_13 {FALSE} \ CONFIG.USER_PHY_ENABLE_14 {FALSE} \ CONFIG.USER_PHY_ENABLE_15 {FALSE} \ - CONFIG.USER_SWITCH_ENABLE_00 {FALSE} \ + CONFIG.USER_SWITCH_ENABLE_00 {TRUE} \ CONFIG.USER_SWITCH_ENABLE_01 {FALSE} \ CONFIG.USER_TEMP_POLL_CNT_0 {100000} \ CONFIG.USER_XSDB_INTF_EN {TRUE} \ diff --git a/fpga/scripts/jfjoch.tcl b/fpga/scripts/jfjoch.tcl index 84326c15..9fcb6444 100644 --- a/fpga/scripts/jfjoch.tcl +++ b/fpga/scripts/jfjoch.tcl @@ -88,7 +88,7 @@ proc create_hier_cell_jungfraujoch { parentCell nameHier } { create_bd_pin -dir I -type clk axi_clk create_bd_pin -dir I -type rst axi_rst_n - # Create instance: action_config_0, and set properties + # Create instance: action_config_0, and set properties set block_name action_config set block_cell_name action_config_0 if { [catch {set action_config_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } { @@ -354,6 +354,118 @@ proc create_hier_cell_jungfraujoch { parentCell nameHier } { CONFIG.Use_RSTB_Pin {true} \ ] $calibration_addr_bram + # Create instance: constant_hbm_offset_0, and set properties + set constant_hbm_offset_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_0 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_0 + + # Create instance: constant_hbm_offset_1, and set properties + set constant_hbm_offset_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_1 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_1 + + # Create instance: constant_hbm_offset_2, and set properties + set constant_hbm_offset_2 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_2 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_2 + + # Create instance: constant_hbm_offset_3, and set properties + set constant_hbm_offset_3 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_3 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_3 + + # Create instance: constant_hbm_offset_4, and set properties + set constant_hbm_offset_4 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_4 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_4 + + # Create instance: constant_hbm_offset_5, and set properties + set constant_hbm_offset_5 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_5 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_5 + + # Create instance: constant_hbm_offset_6, and set properties + set constant_hbm_offset_6 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_6 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_6 + + # Create instance: constant_hbm_offset_7, and set properties + set constant_hbm_offset_7 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_7 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_7 + + # Create instance: constant_hbm_offset_8, and set properties + set constant_hbm_offset_8 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_8 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_8 + + # Create instance: constant_hbm_offset_9, and set properties + set constant_hbm_offset_9 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_9 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_9 + + # Create instance: constant_hbm_offset_10, and set properties + set constant_hbm_offset_10 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_10 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_10 + + # Create instance: constant_hbm_offset_11, and set properties + set constant_hbm_offset_11 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_11 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_11 + + # Create instance: constant_hbm_offset_12, and set properties + set constant_hbm_offset_12 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_12 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_12 + + # Create instance: constant_hbm_offset_13, and set properties + set constant_hbm_offset_13 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_13 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_13 + + # Create instance: constant_hbm_offset_14, and set properties + set constant_hbm_offset_14 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_14 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_14 + + # Create instance: constant_hbm_offset_15, and set properties + set constant_hbm_offset_15 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 constant_hbm_offset_15 ] + set_property -dict [ list \ + CONFIG.CONST_VAL {0} \ + CONFIG.CONST_WIDTH {64} \ + ] $constant_hbm_offset_15 + # Create instance: data_collection_fsm_0, and set properties set data_collection_fsm_0 [ create_bd_cell -type ip -vlnv psi.ch:hls:data_collection_fsm:1.0 data_collection_fsm_0 ] @@ -539,6 +651,22 @@ proc create_hier_cell_jungfraujoch { parentCell nameHier } { connect_bd_net -net axis_work_completion_fifo_0_almost_full [get_bd_pins action_config_0/work_compl_fifo_full] [get_bd_pins axis_work_completion_fifo_0/almost_full] connect_bd_net -net axis_work_request_fifo_0_almost_empty [get_bd_pins action_config_0/work_req_fifo_empty] [get_bd_pins axis_work_request_fifo_0/almost_empty] connect_bd_net -net axis_work_request_fifo_0_almost_full [get_bd_pins action_config_0/work_req_fifo_full] [get_bd_pins axis_work_request_fifo_0/almost_full] + connect_bd_net -net constant_hbm_offset_0_dout [get_bd_pins constant_hbm_offset_0/dout] [get_bd_pins jf_conversion_0/d_hbm_p0_offset] + connect_bd_net -net constant_hbm_offset_10_dout [get_bd_pins constant_hbm_offset_10/dout] [get_bd_pins jf_conversion_0/d_hbm_p10_offset] + connect_bd_net -net constant_hbm_offset_11_dout [get_bd_pins constant_hbm_offset_11/dout] [get_bd_pins jf_conversion_0/d_hbm_p11_offset] + connect_bd_net -net constant_hbm_offset_12_dout [get_bd_pins constant_hbm_offset_12/dout] [get_bd_pins save_to_hbm_0/d_hbm_p0_offset] + connect_bd_net -net constant_hbm_offset_13_dout [get_bd_pins constant_hbm_offset_13/dout] [get_bd_pins save_to_hbm_0/d_hbm_p1_offset] + connect_bd_net -net constant_hbm_offset_14_dout [get_bd_pins constant_hbm_offset_14/dout] [get_bd_pins save_to_hbm_0/d_hbm_p2_offset] + connect_bd_net -net constant_hbm_offset_15_dout [get_bd_pins constant_hbm_offset_15/dout] [get_bd_pins save_to_hbm_0/d_hbm_p3_offset] + connect_bd_net -net constant_hbm_offset_1_dout [get_bd_pins constant_hbm_offset_1/dout] [get_bd_pins jf_conversion_0/d_hbm_p1_offset] + connect_bd_net -net constant_hbm_offset_2_dout [get_bd_pins constant_hbm_offset_2/dout] [get_bd_pins jf_conversion_0/d_hbm_p2_offset] + connect_bd_net -net constant_hbm_offset_3_dout [get_bd_pins constant_hbm_offset_3/dout] [get_bd_pins jf_conversion_0/d_hbm_p3_offset] + connect_bd_net -net constant_hbm_offset_4_dout [get_bd_pins constant_hbm_offset_4/dout] [get_bd_pins jf_conversion_0/d_hbm_p4_offset] + connect_bd_net -net constant_hbm_offset_5_dout [get_bd_pins constant_hbm_offset_5/dout] [get_bd_pins jf_conversion_0/d_hbm_p5_offset] + connect_bd_net -net constant_hbm_offset_6_dout [get_bd_pins constant_hbm_offset_6/dout] [get_bd_pins jf_conversion_0/d_hbm_p6_offset] + connect_bd_net -net constant_hbm_offset_7_dout [get_bd_pins constant_hbm_offset_7/dout] [get_bd_pins jf_conversion_0/d_hbm_p7_offset] + connect_bd_net -net constant_hbm_offset_8_dout [get_bd_pins constant_hbm_offset_8/dout] [get_bd_pins jf_conversion_0/d_hbm_p8_offset] + connect_bd_net -net constant_hbm_offset_9_dout [get_bd_pins constant_hbm_offset_9/dout] [get_bd_pins jf_conversion_0/d_hbm_p9_offset] connect_bd_net -net data_collection_fsm_0_out_idle_V [get_bd_pins action_config_0/data_collection_idle] [get_bd_pins data_collection_fsm_0/out_idle] connect_bd_net -net host_writer_0_err_reg_V [get_bd_pins action_config_0/host_writer_err] [get_bd_pins host_writer_0/err_reg] connect_bd_net -net host_writer_0_err_reg_V_ap_vld [get_bd_pins action_config_0/host_writer_err_valid] [get_bd_pins host_writer_0/err_reg_ap_vld]