Properly reset all registers

This commit is contained in:
Alex Forencich 2015-07-13 23:15:09 -07:00
parent dfab866e99
commit ac97cffc2b
4 changed files with 6 additions and 0 deletions

View File

@ -115,6 +115,8 @@ end
always @(posedge clk) begin
if (rst) begin
ptr_reg <= 0;
full_reg <= 0;
empty_reg <= 1;
end else begin
if (shift) begin
data_reg[0] <= {input_axis_tlast, input_axis_tuser, input_axis_tdata};

View File

@ -118,6 +118,8 @@ end
always @(posedge clk) begin
if (rst) begin
ptr_reg <= 0;
full_reg <= 0;
empty_reg <= 1;
end else begin
if (shift) begin
data_reg[0] <= {input_axis_tlast, input_axis_tuser, input_axis_tkeep, input_axis_tdata};

View File

@ -77,6 +77,7 @@ end
always @(posedge clk) begin
if (rst) begin
ptr_reg <= 0;
full_reg <= 0;
end else begin
// transfer empty to full
full_reg <= ~output_axis_tready & output_axis_tvalid;

View File

@ -80,6 +80,7 @@ end
always @(posedge clk) begin
if (rst) begin
ptr_reg <= 0;
full_reg <= 0;
end else begin
// transfer empty to full
full_reg <= ~output_axis_tready & output_axis_tvalid;