mirror of
https://github.com/alexforencich/verilog-ethernet.git
synced 2025-01-14 06:43:18 +08:00
Properly reset all registers
This commit is contained in:
parent
dfab866e99
commit
ac97cffc2b
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user