diff --git a/vta/hardware/xilinx/src/vta.cc b/vta/hardware/xilinx/src/vta.cc index da8ea7435a90..cb6b7b76cd11 100644 --- a/vta/hardware/xilinx/src/vta.cc +++ b/vta/hardware/xilinx/src/vta.cc @@ -586,19 +586,29 @@ void vta( // Instantiate temporary instruction queues (used for peeking) hls::stream tmp_load_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=tmp_load_queue) hls::stream tmp_gemm_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=tmp_gemm_queue) hls::stream tmp_store_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=tmp_store_queue) // Instatiate physical instruction queues hls::stream load_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=load_queue) hls::stream gemm_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=gemm_queue) hls::stream store_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=store_queue) // Dependence queues hls::stream l2g_dep_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=l2g_dep_queue) hls::stream s2g_dep_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=s2g_dep_queue) hls::stream g2l_dep_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=g2s_dep_queue) hls::stream g2s_dep_queue; + PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=g2s_dep_queue) // Instantiate memories inp_vec_T inp_mem[VTA_INP_BUFF_DEPTH][VTA_BATCH]; diff --git a/vta/hardware/xilinx/src/vta.h b/vta/hardware/xilinx/src/vta.h index 6480debbe4f9..1395d5eaba8e 100644 --- a/vta/hardware/xilinx/src/vta.h +++ b/vta/hardware/xilinx/src/vta.h @@ -113,6 +113,13 @@ typedef ap_int aluop_imm_T; /* \typedef aluop_opcode_T ALU operation shift immediate datatype*/ typedef ap_int aluop_sh_imm_T; +/*! +* Define HLS stream depth +*/ +#define PRAGMA_SUB(x) _Pragma (#x) +#define PRAGMA_HLS(x) PRAGMA_SUB(x) +#define STREAM_IN_DEPTH 8 + /*! * \brief Fetch module. * Reads in \a insn_count instructions via DMA and pushes them to the