Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VTA] Fix VTA function Vivado Compile Error. #3375

Merged
merged 1 commit into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions vta/hardware/xilinx/src/vta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -586,19 +586,29 @@ void vta(

// Instantiate temporary instruction queues (used for peeking)
hls::stream<insn_T> tmp_load_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=tmp_load_queue)
hls::stream<insn_T> tmp_gemm_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=tmp_gemm_queue)
hls::stream<insn_T> tmp_store_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=tmp_store_queue)

// Instatiate physical instruction queues
hls::stream<insn_T> load_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=load_queue)
hls::stream<insn_T> gemm_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=gemm_queue)
hls::stream<insn_T> store_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=store_queue)

// Dependence queues
hls::stream<bool> l2g_dep_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=l2g_dep_queue)
hls::stream<bool> s2g_dep_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=s2g_dep_queue)
hls::stream<bool> g2l_dep_queue;
PRAGMA_HLS(HLS stream depth=STREAM_IN_DEPTH variable=g2s_dep_queue)
hls::stream<bool> 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];
Expand Down
7 changes: 7 additions & 0 deletions vta/hardware/xilinx/src/vta.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ typedef ap_int<VTA_ALUOP_IMM_BIT_WIDTH> aluop_imm_T;
/* \typedef aluop_opcode_T ALU operation shift immediate datatype*/
typedef ap_int<VTA_LOG_ACC_WIDTH> 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
Expand Down