Skip to content
Snippets Groups Projects
Commit 9ea8ff15 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[StreamingFC] simplify weight strm FIFO interface

parent 2e3fe383
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@
`define Q_srl
module Q_srl (clock, reset, i_d, i_v, i_b, o_d, o_v, o_b, count);
module Q_srl (clock, reset, i_d, i_v, i_r, o_d, o_v, o_r, count);
parameter depth = 16; // - greatest #items in queue (2 <= depth <= 256)
parameter width = 16; // - width of data (i_d, o_d)
......@@ -105,11 +105,13 @@ module Q_srl (clock, reset, i_d, i_v, i_b, o_d, o_v, o_b, count);
input [width-1:0] i_d; // - input stream data (concat data + eos)
input i_v; // - input stream valid
output i_b; // - input stream back-pressure
output i_r; // - input stream ready
wire i_b; // - input stream back-pressure
output [width-1:0] o_d; // - output stream data (concat data + eos)
output o_v; // - output stream valid
input o_b; // - output stream back-pressure
input o_r; // - output stream ready
wire o_b; // - output stream back-pressure
output [addrwidth:0] count; // - output number of elems in queue
......@@ -147,6 +149,9 @@ module Q_srl (clock, reset, i_d, i_v, i_b, o_d, o_v, o_b, count);
assign o_v = o_v_reg; // - output valid if non-empty
assign i_b = i_b_reg; // - input bp if full
assign i_r = !i_b;
assign o_b = !o_r;
assign count = (state==state_more ? addr+2 : (state==state_one ? 1 : 0));
// - ''always'' block with both FFs and SRL16 does not work,
......
......@@ -134,7 +134,7 @@ wire [31:0] config_q0;
//multiple wire AXI Streams
reg m_axis_0_afull = 0;
reg m_axis_0_tready_inv;
reg m_axis_0_tready;
wire m_axis_0_tvalid;
wire $WEIGHT_RANGE$ m_axis_0_tdata;
......@@ -217,7 +217,7 @@ mem
//multiple output AXI Streams, TDATA width rounded to multiple of 8 bits
.m_axis_0_afull(m_axis_0_afull),
.m_axis_0_tready(!m_axis_0_tready_inv),
.m_axis_0_tready(m_axis_0_tready),
.m_axis_0_tvalid(m_axis_0_tvalid),
.m_axis_0_tdata(m_axis_0_tdata),
......@@ -260,10 +260,10 @@ $LAYER_NAME$_w_fifo
.reset(!ap_rst_n),
.i_d(m_axis_0_tdata),
.i_v(m_axis_0_tvalid),
.i_b(m_axis_0_tready_inv),
.i_r(m_axis_0_tready),
.o_d(m_axis_0_tdata_q),
.o_v(m_axis_0_tvalid_q),
.o_b(!m_axis_0_tready_q)
.o_r(m_axis_0_tready_q)
);
//MVA_Stream_Unit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment