mirror of
https://github.com/corundum/corundum.git
synced 2025-01-30 08:32:52 +08:00
merged changes in eth
This commit is contained in:
commit
48e525f62a
@ -141,16 +141,16 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
grant_reg <= grant_next;
|
||||
grant_valid_reg <= grant_valid_next;
|
||||
grant_encoded_reg <= grant_encoded_next;
|
||||
mask_reg <= mask_next;
|
||||
|
||||
if (rst) begin
|
||||
grant_reg <= 0;
|
||||
grant_valid_reg <= 0;
|
||||
grant_encoded_reg <= 0;
|
||||
mask_reg <= 0;
|
||||
end else begin
|
||||
grant_reg <= grant_next;
|
||||
grant_valid_reg <= grant_valid_next;
|
||||
grant_encoded_reg <= grant_encoded_next;
|
||||
mask_reg <= mask_next;
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -484,8 +484,8 @@ assign m_axis_tid = ID_ENABLE ? m_axis_tid_reg : {ID_WIDTH{1'b0}};
|
||||
assign m_axis_tdest = DEST_ENABLE ? m_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -516,15 +516,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -551,6 +545,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= m_axis_tdest_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -118,6 +118,15 @@ wire [S_COUNT-1:0] grant;
|
||||
wire grant_valid;
|
||||
wire [CL_S_COUNT-1:0] grant_encoded;
|
||||
|
||||
// input registers to pipeline arbitration delay
|
||||
reg [S_COUNT*DATA_WIDTH-1:0] s_axis_tdata_reg = 0;
|
||||
reg [S_COUNT*KEEP_WIDTH-1:0] s_axis_tkeep_reg = 0;
|
||||
reg [S_COUNT-1:0] s_axis_tvalid_reg = 0;
|
||||
reg [S_COUNT-1:0] s_axis_tlast_reg = 0;
|
||||
reg [S_COUNT*S_ID_WIDTH-1:0] s_axis_tid_reg = 0;
|
||||
reg [S_COUNT*DEST_WIDTH-1:0] s_axis_tdest_reg = 0;
|
||||
reg [S_COUNT*USER_WIDTH-1:0] s_axis_tuser_reg = 0;
|
||||
|
||||
// internal datapath
|
||||
reg [DATA_WIDTH-1:0] m_axis_tdata_int;
|
||||
reg [KEEP_WIDTH-1:0] m_axis_tkeep_int;
|
||||
@ -129,17 +138,17 @@ reg [DEST_WIDTH-1:0] m_axis_tdest_int;
|
||||
reg [USER_WIDTH-1:0] m_axis_tuser_int;
|
||||
wire m_axis_tready_int_early;
|
||||
|
||||
assign s_axis_tready = (m_axis_tready_int_reg && grant_valid) << grant_encoded;
|
||||
assign s_axis_tready = ~s_axis_tvalid_reg | ({S_COUNT{m_axis_tready_int_reg}} & grant);
|
||||
|
||||
// mux for incoming packet
|
||||
wire [DATA_WIDTH-1:0] current_s_tdata = s_axis_tdata[grant_encoded*DATA_WIDTH +: DATA_WIDTH];
|
||||
wire [KEEP_WIDTH-1:0] current_s_tkeep = s_axis_tkeep[grant_encoded*KEEP_WIDTH +: KEEP_WIDTH];
|
||||
wire current_s_tvalid = s_axis_tvalid[grant_encoded];
|
||||
wire [DATA_WIDTH-1:0] current_s_tdata = s_axis_tdata_reg[grant_encoded*DATA_WIDTH +: DATA_WIDTH];
|
||||
wire [KEEP_WIDTH-1:0] current_s_tkeep = s_axis_tkeep_reg[grant_encoded*KEEP_WIDTH +: KEEP_WIDTH];
|
||||
wire current_s_tvalid = s_axis_tvalid_reg[grant_encoded];
|
||||
wire current_s_tready = s_axis_tready[grant_encoded];
|
||||
wire current_s_tlast = s_axis_tlast[grant_encoded];
|
||||
wire [S_ID_WIDTH-1:0] current_s_tid = s_axis_tid[grant_encoded*S_ID_WIDTH +: S_ID_WIDTH_INT];
|
||||
wire [DEST_WIDTH-1:0] current_s_tdest = s_axis_tdest[grant_encoded*DEST_WIDTH +: DEST_WIDTH];
|
||||
wire [USER_WIDTH-1:0] current_s_tuser = s_axis_tuser[grant_encoded*USER_WIDTH +: USER_WIDTH];
|
||||
wire current_s_tlast = s_axis_tlast_reg[grant_encoded];
|
||||
wire [S_ID_WIDTH-1:0] current_s_tid = s_axis_tid_reg[grant_encoded*S_ID_WIDTH +: S_ID_WIDTH_INT];
|
||||
wire [DEST_WIDTH-1:0] current_s_tdest = s_axis_tdest_reg[grant_encoded*DEST_WIDTH +: DEST_WIDTH];
|
||||
wire [USER_WIDTH-1:0] current_s_tuser = s_axis_tuser_reg[grant_encoded*USER_WIDTH +: USER_WIDTH];
|
||||
|
||||
// arbiter instance
|
||||
arbiter #(
|
||||
@ -159,8 +168,8 @@ arb_inst (
|
||||
.grant_encoded(grant_encoded)
|
||||
);
|
||||
|
||||
assign request = s_axis_tvalid & ~grant;
|
||||
assign acknowledge = grant & s_axis_tvalid & s_axis_tready & (LAST_ENABLE ? s_axis_tlast : {S_COUNT{1'b1}});
|
||||
assign request = (s_axis_tvalid_reg & ~grant) | (s_axis_tvalid & grant);
|
||||
assign acknowledge = grant & s_axis_tvalid_reg & {S_COUNT{m_axis_tready_int_reg}} & (LAST_ENABLE ? s_axis_tlast_reg : {S_COUNT{1'b1}});
|
||||
|
||||
always @* begin
|
||||
// pass through selected packet data
|
||||
@ -176,6 +185,27 @@ always @* begin
|
||||
m_axis_tuser_int = current_s_tuser;
|
||||
end
|
||||
|
||||
integer i;
|
||||
|
||||
always @(posedge clk) begin
|
||||
// register inputs
|
||||
for (i = 0; i < S_COUNT; i = i + 1) begin
|
||||
if (s_axis_tready[i]) begin
|
||||
s_axis_tdata_reg[i*DATA_WIDTH +: DATA_WIDTH] <= s_axis_tdata[i*DATA_WIDTH +: DATA_WIDTH];
|
||||
s_axis_tkeep_reg[i*KEEP_WIDTH +: KEEP_WIDTH] <= s_axis_tkeep[i*KEEP_WIDTH +: KEEP_WIDTH];
|
||||
s_axis_tvalid_reg[i] <= s_axis_tvalid[i];
|
||||
s_axis_tlast_reg[i] <= s_axis_tlast[i];
|
||||
s_axis_tid_reg[i*S_ID_WIDTH +: S_ID_WIDTH_INT] <= s_axis_tid[i*S_ID_WIDTH +: S_ID_WIDTH_INT];
|
||||
s_axis_tdest_reg[i*DEST_WIDTH +: DEST_WIDTH] <= s_axis_tdest[i*DEST_WIDTH +: DEST_WIDTH];
|
||||
s_axis_tuser_reg[i*USER_WIDTH +: USER_WIDTH] <= s_axis_tuser[i*USER_WIDTH +: USER_WIDTH];
|
||||
end
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
s_axis_tvalid_reg <= 0;
|
||||
end
|
||||
end
|
||||
|
||||
// output datapath logic
|
||||
reg [DATA_WIDTH-1:0] m_axis_tdata_reg = {DATA_WIDTH{1'b0}};
|
||||
reg [KEEP_WIDTH-1:0] m_axis_tkeep_reg = {KEEP_WIDTH{1'b0}};
|
||||
@ -206,8 +236,8 @@ assign m_axis_tid = ID_ENABLE ? m_axis_tid_reg : {M_ID_WIDTH{1'b0}};
|
||||
assign m_axis_tdest = DEST_ENABLE ? m_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -238,15 +268,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -273,6 +297,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= m_axis_tdest_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -121,8 +121,8 @@ assign m_axis_tid = ID_ENABLE ? {M_COUNT{m_axis_tid_reg}} : {M_COUNT*ID_W
|
||||
assign m_axis_tdest = DEST_ENABLE ? {M_COUNT{m_axis_tdest_reg}} : {M_COUNT*DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? {M_COUNT{m_axis_tuser_reg}} : {M_COUNT*USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
wire s_axis_tready_early = ((m_axis_tready & m_axis_tvalid) == m_axis_tvalid) || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid || !s_axis_tvalid));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
wire s_axis_tready_early = ((m_axis_tready & m_axis_tvalid) == m_axis_tvalid) || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -153,15 +153,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
temp_m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
end else begin
|
||||
s_axis_tready_reg <= s_axis_tready_early;
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_input_to_output) begin
|
||||
@ -188,6 +182,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= s_axis_tdest;
|
||||
temp_m_axis_tuser_reg <= s_axis_tuser;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
temp_m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -230,20 +230,21 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
state_reg <= state_next;
|
||||
|
||||
count_reg <= count_next;
|
||||
suppress_zero_reg <= suppress_zero_next;
|
||||
|
||||
temp_tdata_reg <= temp_tdata_next;
|
||||
temp_tvalid_reg <= temp_tvalid_next;
|
||||
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
|
||||
if (rst) begin
|
||||
state_reg <= STATE_IDLE;
|
||||
temp_tvalid_reg <= 1'b0;
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
end else begin
|
||||
state_reg <= state_next;
|
||||
temp_tvalid_reg <= temp_tvalid_next;
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
end
|
||||
|
||||
temp_tdata_reg <= temp_tdata_next;
|
||||
|
||||
count_reg <= count_next;
|
||||
suppress_zero_reg <= suppress_zero_next;
|
||||
end
|
||||
|
||||
// output datapath logic
|
||||
@ -267,8 +268,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -299,15 +300,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -325,6 +320,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -411,17 +411,17 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
input_state_reg <= INPUT_STATE_IDLE;
|
||||
output_state_reg <= OUTPUT_STATE_IDLE;
|
||||
end else begin
|
||||
input_state_reg <= input_state_next;
|
||||
output_state_reg <= output_state_next;
|
||||
end
|
||||
|
||||
input_count_reg <= input_count_next;
|
||||
output_count_reg <= output_count_next;
|
||||
fail_frame_reg <= fail_frame_next;
|
||||
|
||||
if (rst) begin
|
||||
input_state_reg <= INPUT_STATE_IDLE;
|
||||
output_state_reg <= OUTPUT_STATE_IDLE;
|
||||
end
|
||||
end
|
||||
|
||||
// output datapath logic
|
||||
@ -445,8 +445,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -477,15 +477,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -503,6 +497,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -121,33 +121,31 @@ assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {M_COUNT*USER_WIDTH{1'b0
|
||||
integer i;
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
s_axis_tvalid_reg <= {S_COUNT{1'b0}};
|
||||
m_axis_tvalid_reg <= {S_COUNT{1'b0}};
|
||||
select_reg <= {M_COUNT*CL_S_COUNT{1'b0}};
|
||||
end else begin
|
||||
s_axis_tvalid_reg <= s_axis_tvalid;
|
||||
for (i = 0; i < M_COUNT; i = i + 1) begin
|
||||
m_axis_tvalid_reg[i] <= s_axis_tvalid_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]];
|
||||
end
|
||||
select_reg <= select;
|
||||
end
|
||||
|
||||
s_axis_tdata_reg <= s_axis_tdata;
|
||||
s_axis_tkeep_reg <= s_axis_tkeep;
|
||||
s_axis_tvalid_reg <= s_axis_tvalid;
|
||||
s_axis_tlast_reg <= s_axis_tlast;
|
||||
s_axis_tid_reg <= s_axis_tid;
|
||||
s_axis_tdest_reg <= s_axis_tdest;
|
||||
s_axis_tuser_reg <= s_axis_tuser;
|
||||
|
||||
select_reg <= select;
|
||||
|
||||
for (i = 0; i < M_COUNT; i = i + 1) begin
|
||||
m_axis_tdata_reg[i*DATA_WIDTH +: DATA_WIDTH] <= s_axis_tdata_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]*DATA_WIDTH +: DATA_WIDTH];
|
||||
m_axis_tkeep_reg[i*KEEP_WIDTH +: KEEP_WIDTH] <= s_axis_tkeep_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]*KEEP_WIDTH +: KEEP_WIDTH];
|
||||
m_axis_tvalid_reg[i] <= s_axis_tvalid_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]];
|
||||
m_axis_tlast_reg[i] <= s_axis_tlast_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]];
|
||||
m_axis_tid_reg[i*ID_WIDTH +: ID_WIDTH] <= s_axis_tid_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]*ID_WIDTH +: ID_WIDTH];
|
||||
m_axis_tdest_reg[i*DEST_WIDTH +: DEST_WIDTH] <= s_axis_tdest_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]*DEST_WIDTH +: DEST_WIDTH];
|
||||
m_axis_tuser_reg[i*USER_WIDTH +: USER_WIDTH] <= s_axis_tuser_reg[select_reg[i*CL_S_COUNT +: CL_S_COUNT]*USER_WIDTH +: USER_WIDTH];
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
s_axis_tvalid_reg <= {S_COUNT{1'b0}};
|
||||
m_axis_tvalid_reg <= {S_COUNT{1'b0}};
|
||||
select_reg <= {M_COUNT*CL_S_COUNT{1'b0}};
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -184,16 +184,16 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
select_reg <= select_next;
|
||||
drop_reg <= drop_next;
|
||||
frame_reg <= frame_next;
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
|
||||
if (rst) begin
|
||||
select_reg <= 2'd0;
|
||||
drop_reg <= 1'b0;
|
||||
frame_reg <= 1'b0;
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
end else begin
|
||||
select_reg <= select_next;
|
||||
drop_reg <= drop_next;
|
||||
frame_reg <= frame_next;
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
end
|
||||
end
|
||||
|
||||
@ -227,8 +227,8 @@ assign m_axis_tid = ID_ENABLE ? {M_COUNT{m_axis_tid_reg}} : {M_COUNT*ID_W
|
||||
assign m_axis_tdest = DEST_ENABLE ? {M_COUNT{m_axis_tdest_reg}} : {M_COUNT*M_DEST_WIDTH_INT{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? {M_COUNT{m_axis_tuser_reg}} : {M_COUNT*USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = (m_axis_tready & m_axis_tvalid) || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = (m_axis_tready & m_axis_tvalid) || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -259,15 +259,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -294,6 +288,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= m_axis_tdest_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -223,14 +223,6 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
state_reg <= STATE_IDLE;
|
||||
frame_ptr_reg <= {CL_TAG_WORD_WIDTH{1'b0}};
|
||||
port_sel_reg <= {CL_S_COUNT{1'b0}};
|
||||
s_axis_tready_reg <= {S_COUNT{1'b0}};
|
||||
output_tuser_reg <= 1'b0;
|
||||
busy_reg <= 1'b0;
|
||||
end else begin
|
||||
state_reg <= state_next;
|
||||
|
||||
frame_ptr_reg <= frame_ptr_next;
|
||||
@ -242,6 +234,14 @@ always @(posedge clk) begin
|
||||
output_tuser_reg <= output_tuser_next;
|
||||
|
||||
busy_reg <= state_next != STATE_IDLE;
|
||||
|
||||
if (rst) begin
|
||||
state_reg <= STATE_IDLE;
|
||||
frame_ptr_reg <= {CL_TAG_WORD_WIDTH{1'b0}};
|
||||
port_sel_reg <= {CL_S_COUNT{1'b0}};
|
||||
s_axis_tready_reg <= {S_COUNT{1'b0}};
|
||||
output_tuser_reg <= 1'b0;
|
||||
busy_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
@ -266,8 +266,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -298,15 +298,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -324,6 +318,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -543,8 +543,8 @@ assign m_axis_tid = ID_ENABLE ? m_axis_tid_reg : {ID_WIDTH{1'b0}};
|
||||
assign m_axis_tdest = DEST_ENABLE ? m_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -575,15 +575,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -610,6 +604,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= m_axis_tdest_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -152,14 +152,14 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
select_reg <= select_next;
|
||||
frame_reg <= frame_next;
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
|
||||
if (rst) begin
|
||||
select_reg <= 0;
|
||||
frame_reg <= 1'b0;
|
||||
s_axis_tready_reg <= 0;
|
||||
end else begin
|
||||
select_reg <= select_next;
|
||||
frame_reg <= frame_next;
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
end
|
||||
end
|
||||
|
||||
@ -193,8 +193,8 @@ assign m_axis_tid = ID_ENABLE ? m_axis_tid_reg : {ID_WIDTH{1'b0}};
|
||||
assign m_axis_tdest = DEST_ENABLE ? m_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -225,15 +225,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -260,6 +254,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= m_axis_tdest_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -145,14 +145,14 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
acc_reg <= acc_next;
|
||||
frame_reg <= frame_next;
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
|
||||
if (rst) begin
|
||||
acc_reg <= 24'd0;
|
||||
frame_reg <= 1'b0;
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
end else begin
|
||||
acc_reg <= acc_next;
|
||||
frame_reg <= frame_next;
|
||||
s_axis_tready_reg <= s_axis_tready_next;
|
||||
end
|
||||
end
|
||||
|
||||
@ -186,8 +186,8 @@ assign m_axis_tid = ID_ENABLE ? m_axis_tid_reg : {ID_WIDTH{1'b0}};
|
||||
assign m_axis_tdest = DEST_ENABLE ? m_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -218,15 +218,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -253,6 +247,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= m_axis_tdest_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -125,8 +125,8 @@ if (REG_TYPE > 1) begin
|
||||
assign m_axis_tdest = DEST_ENABLE ? m_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
wire s_axis_tready_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !s_axis_tvalid));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
wire s_axis_tready_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -157,15 +157,9 @@ if (REG_TYPE > 1) begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
s_axis_tready_reg <= s_axis_tready_early;
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_input_to_output) begin
|
||||
@ -192,6 +186,12 @@ if (REG_TYPE > 1) begin
|
||||
temp_m_axis_tdest_reg <= s_axis_tdest;
|
||||
temp_m_axis_tuser_reg <= s_axis_tuser;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
end else if (REG_TYPE == 1) begin
|
||||
@ -239,13 +239,8 @@ end else if (REG_TYPE == 1) begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
s_axis_tready_reg <= s_axis_tready_early;
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_input_to_output) begin
|
||||
@ -256,6 +251,11 @@ end else if (REG_TYPE == 1) begin
|
||||
m_axis_tdest_reg <= s_axis_tdest;
|
||||
m_axis_tuser_reg <= s_axis_tuser;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
s_axis_tready_reg <= 1'b0;
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
end else begin
|
||||
|
@ -169,11 +169,6 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
ptr_reg <= 0;
|
||||
full_reg <= 1'b0;
|
||||
empty_reg <= 1'b1;
|
||||
end else begin
|
||||
if (inc) begin
|
||||
ptr_reg <= ptr_reg + 1;
|
||||
end else if (dec) begin
|
||||
@ -184,7 +179,6 @@ always @(posedge clk) begin
|
||||
|
||||
full_reg <= full_next;
|
||||
empty_reg <= empty_next;
|
||||
end
|
||||
|
||||
if (shift) begin
|
||||
data_reg[0] <= s_axis;
|
||||
@ -192,6 +186,12 @@ always @(posedge clk) begin
|
||||
data_reg[i+1] <= data_reg[i];
|
||||
end
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
ptr_reg <= 0;
|
||||
full_reg <= 1'b0;
|
||||
empty_reg <= 1'b1;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -129,10 +129,6 @@ initial begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
ptr_reg <= 0;
|
||||
full_reg <= 0;
|
||||
end else begin
|
||||
// transfer empty to full
|
||||
full_reg <= !m_axis_tready && m_axis_tvalid;
|
||||
|
||||
@ -150,6 +146,10 @@ always @(posedge clk) begin
|
||||
if (m_axis_tready) begin
|
||||
ptr_reg <= 0;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
ptr_reg <= 0;
|
||||
full_reg <= 0;
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -258,15 +258,6 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
state_reg <= STATE_IDLE;
|
||||
tick_count_reg <= 0;
|
||||
byte_count_reg <= 0;
|
||||
frame_count_reg <= 0;
|
||||
frame_reg <= 1'b0;
|
||||
frame_ptr_reg <= 0;
|
||||
busy_reg <= 1'b0;
|
||||
end else begin
|
||||
state_reg <= state_next;
|
||||
tick_count_reg <= tick_count_next;
|
||||
byte_count_reg <= byte_count_next;
|
||||
@ -275,13 +266,22 @@ always @(posedge clk) begin
|
||||
frame_ptr_reg <= frame_ptr_next;
|
||||
|
||||
busy_reg <= state_next != STATE_IDLE;
|
||||
end
|
||||
|
||||
if (store_output) begin
|
||||
tick_count_output_reg <= tick_count_reg;
|
||||
byte_count_output_reg <= byte_count_reg;
|
||||
frame_count_output_reg <= frame_count_reg;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
state_reg <= STATE_IDLE;
|
||||
tick_count_reg <= 0;
|
||||
byte_count_reg <= 0;
|
||||
frame_count_reg <= 0;
|
||||
frame_reg <= 1'b0;
|
||||
frame_ptr_reg <= 0;
|
||||
busy_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
// output datapath logic
|
||||
@ -305,8 +305,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -337,15 +337,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -363,6 +357,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -258,14 +258,13 @@ generate
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
select_valid_reg <= 1'b0;
|
||||
end else begin
|
||||
select_valid_reg <= select_valid_next;
|
||||
end
|
||||
|
||||
select_reg <= select_next;
|
||||
drop_reg <= drop_next;
|
||||
select_valid_reg <= select_valid_next;
|
||||
|
||||
if (rst) begin
|
||||
select_valid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
// forwarding
|
||||
|
@ -213,19 +213,19 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
state_reg <= STATE_IDLE;
|
||||
frame_reg <= 1'b0;
|
||||
end else begin
|
||||
state_reg <= state_next;
|
||||
frame_reg <= frame_next;
|
||||
end
|
||||
|
||||
if (store_last_word) begin
|
||||
last_word_id_reg <= tap_axis_tid;
|
||||
last_word_dest_reg <= tap_axis_tdest;
|
||||
last_word_user_reg <= tap_axis_tuser;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
state_reg <= STATE_IDLE;
|
||||
frame_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
// output datapath logic
|
||||
@ -258,8 +258,8 @@ assign m_axis_tid = ID_ENABLE ? m_axis_tid_reg : {ID_WIDTH{1'b0}};
|
||||
assign m_axis_tdest = DEST_ENABLE ? m_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_axis_tuser = USER_ENABLE ? m_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -290,15 +290,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -325,6 +319,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tdest_reg <= m_axis_tdest_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -296,8 +296,8 @@ assign m_eth_payload_axis_tvalid = m_eth_payload_axis_tvalid_reg;
|
||||
assign m_eth_payload_axis_tlast = m_eth_payload_axis_tlast_reg;
|
||||
assign m_eth_payload_axis_tuser = m_eth_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && (!m_eth_payload_axis_tvalid_reg || !m_eth_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && !m_eth_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -328,15 +328,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_eth_payload_axis_tvalid_reg <= m_eth_payload_axis_tvalid_next;
|
||||
m_eth_payload_axis_tready_int_reg <= m_eth_payload_axis_tready_int_early;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= temp_m_eth_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_eth_payload_int_to_output) begin
|
||||
@ -357,6 +351,12 @@ always @(posedge clk) begin
|
||||
temp_m_eth_payload_axis_tlast_reg <= m_eth_payload_axis_tlast_int;
|
||||
temp_m_eth_payload_axis_tuser_reg <= m_eth_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -280,8 +280,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -312,15 +312,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -338,6 +332,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -414,8 +414,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -446,15 +446,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -475,6 +469,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -307,8 +307,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -339,15 +339,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -365,6 +359,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -653,8 +653,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -685,15 +685,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -714,6 +708,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -120,7 +120,7 @@ reg [DATA_WIDTH-1:0] m_axis_tdata_reg = {DATA_WIDTH{1'b0}}, m_axis_tdata_next;
|
||||
reg [KEEP_WIDTH-1:0] m_axis_tkeep_reg = {KEEP_WIDTH{1'b0}}, m_axis_tkeep_next;
|
||||
reg m_axis_tvalid_reg = 1'b0, m_axis_tvalid_next;
|
||||
reg m_axis_tlast_reg = 1'b0, m_axis_tlast_next;
|
||||
reg m_axis_tuser_reg = 1'b0, m_axis_tuser_next;
|
||||
reg [USER_WIDTH-1:0] m_axis_tuser_reg = {USER_WIDTH{1'b0}}, m_axis_tuser_next;
|
||||
|
||||
reg start_packet_reg = 1'b0, start_packet_next;
|
||||
reg error_bad_frame_reg = 1'b0, error_bad_frame_next;
|
||||
@ -149,7 +149,7 @@ assign m_axis_tdata = m_axis_tdata_reg;
|
||||
assign m_axis_tkeep = m_axis_tkeep_reg;
|
||||
assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = PTP_TS_ENABLE ? {ptp_ts_reg, m_axis_tuser_reg} : m_axis_tuser_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
assign start_packet = start_packet_reg;
|
||||
assign error_bad_frame = error_bad_frame_reg;
|
||||
@ -272,7 +272,8 @@ always @* begin
|
||||
m_axis_tkeep_next = {KEEP_WIDTH{1'b1}};
|
||||
m_axis_tvalid_next = 1'b0;
|
||||
m_axis_tlast_next = 1'b0;
|
||||
m_axis_tuser_next = 1'b0;
|
||||
m_axis_tuser_next = m_axis_tuser_reg;
|
||||
m_axis_tuser_next[0] = 1'b0;
|
||||
|
||||
start_packet_next = 1'b0;
|
||||
error_bad_frame_next = 1'b0;
|
||||
@ -285,6 +286,10 @@ always @* begin
|
||||
// idle state - wait for packet
|
||||
reset_crc = 1'b1;
|
||||
|
||||
if (PTP_TS_ENABLE) begin
|
||||
m_axis_tuser_next[1 +: PTP_TS_WIDTH] = ptp_ts_reg;
|
||||
end
|
||||
|
||||
if (xgmii_rxc_d2[0] && xgmii_rxd_d2[7:0] == XGMII_START) begin
|
||||
// start condition
|
||||
if (control_masked) begin
|
||||
@ -293,7 +298,7 @@ always @* begin
|
||||
m_axis_tkeep_next = 4'h1;
|
||||
m_axis_tvalid_next = 1'b1;
|
||||
m_axis_tlast_next = 1'b1;
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
state_next = STATE_IDLE;
|
||||
end else begin
|
||||
@ -316,14 +321,14 @@ always @* begin
|
||||
m_axis_tkeep_next = {KEEP_WIDTH{1'b1}};
|
||||
m_axis_tvalid_next = 1'b1;
|
||||
m_axis_tlast_next = 1'b0;
|
||||
m_axis_tuser_next = 1'b0;
|
||||
m_axis_tuser_next[0] = 1'b0;
|
||||
|
||||
last_cycle_tkeep_next = tkeep_mask;
|
||||
|
||||
if (control_masked) begin
|
||||
// control or error characters in packet
|
||||
m_axis_tlast_next = 1'b1;
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
reset_crc = 1'b1;
|
||||
state_next = STATE_IDLE;
|
||||
@ -336,7 +341,7 @@ always @* begin
|
||||
if (detect_term[0] && crc_valid3_save) begin
|
||||
// CRC valid
|
||||
end else begin
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
error_bad_fcs_next = 1'b1;
|
||||
end
|
||||
@ -355,7 +360,7 @@ always @* begin
|
||||
m_axis_tkeep_next = last_cycle_tkeep_reg;
|
||||
m_axis_tvalid_next = 1'b1;
|
||||
m_axis_tlast_next = 1'b1;
|
||||
m_axis_tuser_next = 1'b0;
|
||||
m_axis_tuser_next[0] = 1'b0;
|
||||
|
||||
reset_crc = 1'b1;
|
||||
|
||||
@ -364,7 +369,7 @@ always @* begin
|
||||
(detect_term_save[3] && crc_valid2_save)) begin
|
||||
// CRC valid
|
||||
end else begin
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
error_bad_fcs_next = 1'b1;
|
||||
end
|
||||
|
@ -125,7 +125,7 @@ reg [DATA_WIDTH-1:0] m_axis_tdata_reg = {DATA_WIDTH{1'b0}}, m_axis_tdata_next;
|
||||
reg [KEEP_WIDTH-1:0] m_axis_tkeep_reg = {KEEP_WIDTH{1'b0}}, m_axis_tkeep_next;
|
||||
reg m_axis_tvalid_reg = 1'b0, m_axis_tvalid_next;
|
||||
reg m_axis_tlast_reg = 1'b0, m_axis_tlast_next;
|
||||
reg m_axis_tuser_reg = 1'b0, m_axis_tuser_next;
|
||||
reg [USER_WIDTH-1:0] m_axis_tuser_reg = {USER_WIDTH{1'b0}}, m_axis_tuser_next;
|
||||
|
||||
reg [1:0] start_packet_reg = 2'b00;
|
||||
reg error_bad_frame_reg = 1'b0, error_bad_frame_next;
|
||||
@ -154,7 +154,7 @@ assign m_axis_tdata = m_axis_tdata_reg;
|
||||
assign m_axis_tkeep = m_axis_tkeep_reg;
|
||||
assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = PTP_TS_ENABLE ? {ptp_ts_reg, m_axis_tuser_reg} : m_axis_tuser_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
assign start_packet = start_packet_reg;
|
||||
assign error_bad_frame = error_bad_frame_reg;
|
||||
@ -308,7 +308,8 @@ always @* begin
|
||||
m_axis_tkeep_next = {KEEP_WIDTH{1'b1}};
|
||||
m_axis_tvalid_next = 1'b0;
|
||||
m_axis_tlast_next = 1'b0;
|
||||
m_axis_tuser_next = 1'b0;
|
||||
m_axis_tuser_next = m_axis_tuser_reg;
|
||||
m_axis_tuser_next[0] = 1'b0;
|
||||
|
||||
error_bad_frame_next = 1'b0;
|
||||
error_bad_fcs_next = 1'b0;
|
||||
@ -320,13 +321,18 @@ always @* begin
|
||||
|
||||
if (xgmii_rxc_d1[0] && xgmii_rxd_d1[7:0] == XGMII_START) begin
|
||||
// start condition
|
||||
|
||||
if (PTP_TS_ENABLE) begin
|
||||
m_axis_tuser_next[1 +: PTP_TS_WIDTH] = ptp_ts_reg;
|
||||
end
|
||||
|
||||
if (control_masked) begin
|
||||
// control or error characters in first data word
|
||||
m_axis_tdata_next = {DATA_WIDTH{1'b0}};
|
||||
m_axis_tkeep_next = 8'h01;
|
||||
m_axis_tvalid_next = 1'b1;
|
||||
m_axis_tlast_next = 1'b1;
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
state_next = STATE_IDLE;
|
||||
end else begin
|
||||
@ -343,14 +349,14 @@ always @* begin
|
||||
m_axis_tkeep_next = {KEEP_WIDTH{1'b1}};
|
||||
m_axis_tvalid_next = 1'b1;
|
||||
m_axis_tlast_next = 1'b0;
|
||||
m_axis_tuser_next = 1'b0;
|
||||
m_axis_tuser_next[0] = 1'b0;
|
||||
|
||||
last_cycle_tkeep_next = {4'b0000, tkeep_mask[7:4]};
|
||||
|
||||
if (control_masked) begin
|
||||
// control or error characters in packet
|
||||
m_axis_tlast_next = 1'b1;
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
reset_crc = 1'b1;
|
||||
state_next = STATE_IDLE;
|
||||
@ -367,7 +373,7 @@ always @* begin
|
||||
(detect_term[4] && crc_valid3)) begin
|
||||
// CRC valid
|
||||
end else begin
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
error_bad_fcs_next = 1'b1;
|
||||
end
|
||||
@ -387,7 +393,7 @@ always @* begin
|
||||
m_axis_tkeep_next = last_cycle_tkeep_reg;
|
||||
m_axis_tvalid_next = 1'b1;
|
||||
m_axis_tlast_next = 1'b1;
|
||||
m_axis_tuser_next = 1'b0;
|
||||
m_axis_tuser_next[0] = 1'b0;
|
||||
|
||||
reset_crc = 1'b1;
|
||||
|
||||
@ -396,7 +402,7 @@ always @* begin
|
||||
(detect_term_save[7] && crc_valid2)) begin
|
||||
// CRC valid
|
||||
end else begin
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
error_bad_fcs_next = 1'b1;
|
||||
end
|
||||
@ -409,7 +415,7 @@ always @* begin
|
||||
m_axis_tkeep_next = 8'h01;
|
||||
m_axis_tvalid_next = 1'b1;
|
||||
m_axis_tlast_next = 1'b1;
|
||||
m_axis_tuser_next = 1'b1;
|
||||
m_axis_tuser_next[0] = 1'b1;
|
||||
error_bad_frame_next = 1'b1;
|
||||
state_next = STATE_IDLE;
|
||||
end else begin
|
||||
|
@ -241,8 +241,8 @@ assign m_eth_payload_axis_tid = ID_ENABLE ? m_eth_payload_axis_tid_reg :
|
||||
assign m_eth_payload_axis_tdest = DEST_ENABLE ? m_eth_payload_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_eth_payload_axis_tuser = USER_ENABLE ? m_eth_payload_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && (!m_eth_payload_axis_tvalid_reg || !m_eth_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && !m_eth_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -273,15 +273,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_eth_payload_axis_tvalid_reg <= m_eth_payload_axis_tvalid_next;
|
||||
m_eth_payload_axis_tready_int_reg <= m_eth_payload_axis_tready_int_early;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= temp_m_eth_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -308,6 +302,12 @@ always @(posedge clk) begin
|
||||
temp_m_eth_payload_axis_tdest_reg <= m_eth_payload_axis_tdest_int;
|
||||
temp_m_eth_payload_axis_tuser_reg <= m_eth_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -333,8 +333,8 @@ assign m_eth_payload_axis_tvalid = m_eth_payload_axis_tvalid_reg;
|
||||
assign m_eth_payload_axis_tlast = m_eth_payload_axis_tlast_reg;
|
||||
assign m_eth_payload_axis_tuser = m_eth_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && (!m_eth_payload_axis_tvalid_reg || !m_eth_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && !m_eth_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -365,15 +365,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_eth_payload_axis_tvalid_reg <= m_eth_payload_axis_tvalid_next;
|
||||
m_eth_payload_axis_tready_int_reg <= m_eth_payload_axis_tready_int_early;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= temp_m_eth_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_eth_payload_int_to_output) begin
|
||||
@ -394,6 +388,12 @@ always @(posedge clk) begin
|
||||
temp_m_eth_payload_axis_tlast_reg <= m_eth_payload_axis_tlast_int;
|
||||
temp_m_eth_payload_axis_tuser_reg <= m_eth_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -337,8 +337,8 @@ assign m_axis_tvalid = m_axis_tvalid_reg;
|
||||
assign m_axis_tlast = m_axis_tlast_reg;
|
||||
assign m_axis_tuser = m_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && (!m_axis_tvalid_reg || !m_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_axis_tready_int_early = m_axis_tready || (!temp_m_axis_tvalid_reg && !m_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -369,15 +369,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_axis_tvalid_reg <= m_axis_tvalid_next;
|
||||
m_axis_tready_int_reg <= m_axis_tready_int_early;
|
||||
temp_m_axis_tvalid_reg <= temp_m_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -398,6 +392,12 @@ always @(posedge clk) begin
|
||||
temp_m_axis_tlast_reg <= m_axis_tlast_int;
|
||||
temp_m_axis_tuser_reg <= m_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_axis_tvalid_reg <= 1'b0;
|
||||
m_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -235,8 +235,8 @@ assign m_eth_payload_axis_tid = ID_ENABLE ? {M_COUNT{m_eth_payload_axis_tid
|
||||
assign m_eth_payload_axis_tdest = DEST_ENABLE ? {M_COUNT{m_eth_payload_axis_tdest_reg}} : {M_COUNT*DEST_WIDTH{1'b0}};
|
||||
assign m_eth_payload_axis_tuser = USER_ENABLE ? {M_COUNT{m_eth_payload_axis_tuser_reg}} : {M_COUNT*USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_eth_payload_axis_tready_int_early = (m_eth_payload_axis_tready & m_eth_payload_axis_tvalid) || (!temp_m_eth_payload_axis_tvalid_reg && (!m_eth_payload_axis_tvalid || !m_eth_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_eth_payload_axis_tready_int_early = (m_eth_payload_axis_tready & m_eth_payload_axis_tvalid) || (!temp_m_eth_payload_axis_tvalid_reg && !m_eth_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -267,15 +267,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_eth_payload_axis_tvalid_reg <= m_eth_payload_axis_tvalid_next;
|
||||
m_eth_payload_axis_tready_int_reg <= m_eth_payload_axis_tready_int_early;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= temp_m_eth_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -302,6 +296,12 @@ always @(posedge clk) begin
|
||||
temp_m_eth_payload_axis_tdest_reg <= m_eth_payload_axis_tdest_int;
|
||||
temp_m_eth_payload_axis_tuser_reg <= m_eth_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -229,8 +229,8 @@ assign m_eth_payload_axis_tid = ID_ENABLE ? m_eth_payload_axis_tid_reg :
|
||||
assign m_eth_payload_axis_tdest = DEST_ENABLE ? m_eth_payload_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_eth_payload_axis_tuser = USER_ENABLE ? m_eth_payload_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && (!m_eth_payload_axis_tvalid_reg || !m_eth_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && !m_eth_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -261,15 +261,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_eth_payload_axis_tvalid_reg <= m_eth_payload_axis_tvalid_next;
|
||||
m_eth_payload_axis_tready_int_reg <= m_eth_payload_axis_tready_int_early;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= temp_m_eth_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -296,6 +290,12 @@ always @(posedge clk) begin
|
||||
temp_m_eth_payload_axis_tdest_reg <= m_eth_payload_axis_tdest_int;
|
||||
temp_m_eth_payload_axis_tuser_reg <= m_eth_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -332,8 +332,8 @@ assign m_ip_payload_axis_tid = ID_ENABLE ? m_ip_payload_axis_tid_reg : {I
|
||||
assign m_ip_payload_axis_tdest = DEST_ENABLE ? m_ip_payload_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_ip_payload_axis_tuser = USER_ENABLE ? m_ip_payload_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && (!m_ip_payload_axis_tvalid_reg || !m_ip_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && !m_ip_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -364,15 +364,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_ip_payload_axis_tvalid_reg <= m_ip_payload_axis_tvalid_next;
|
||||
m_ip_payload_axis_tready_int_reg <= m_ip_payload_axis_tready_int_early;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= temp_m_ip_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -399,6 +393,12 @@ always @(posedge clk) begin
|
||||
temp_m_ip_payload_axis_tdest_reg <= m_ip_payload_axis_tdest_int;
|
||||
temp_m_ip_payload_axis_tuser_reg <= m_ip_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -326,8 +326,8 @@ assign m_ip_payload_axis_tid = ID_ENABLE ? {M_COUNT{m_ip_payload_axis_tid_r
|
||||
assign m_ip_payload_axis_tdest = DEST_ENABLE ? {M_COUNT{m_ip_payload_axis_tdest_reg}} : {M_COUNT*DEST_WIDTH{1'b0}};
|
||||
assign m_ip_payload_axis_tuser = USER_ENABLE ? {M_COUNT{m_ip_payload_axis_tuser_reg}} : {M_COUNT*USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_ip_payload_axis_tready_int_early = (m_ip_payload_axis_tready & m_ip_payload_axis_tvalid) || (!temp_m_ip_payload_axis_tvalid_reg && (!m_ip_payload_axis_tvalid || !m_ip_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_ip_payload_axis_tready_int_early = (m_ip_payload_axis_tready & m_ip_payload_axis_tvalid) || (!temp_m_ip_payload_axis_tvalid_reg && !m_ip_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -358,15 +358,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_ip_payload_axis_tvalid_reg <= m_ip_payload_axis_tvalid_next;
|
||||
m_ip_payload_axis_tready_int_reg <= m_ip_payload_axis_tready_int_early;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= temp_m_ip_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -393,6 +387,12 @@ always @(posedge clk) begin
|
||||
temp_m_ip_payload_axis_tdest_reg <= m_ip_payload_axis_tdest_int;
|
||||
temp_m_ip_payload_axis_tuser_reg <= m_ip_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -516,8 +516,8 @@ assign m_ip_payload_axis_tvalid = m_ip_payload_axis_tvalid_reg;
|
||||
assign m_ip_payload_axis_tlast = m_ip_payload_axis_tlast_reg;
|
||||
assign m_ip_payload_axis_tuser = m_ip_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && (!m_ip_payload_axis_tvalid_reg || !m_ip_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && !m_ip_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -548,15 +548,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_ip_payload_axis_tvalid_reg <= m_ip_payload_axis_tvalid_next;
|
||||
m_ip_payload_axis_tready_int_reg <= m_ip_payload_axis_tready_int_early;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= temp_m_ip_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_ip_payload_int_to_output) begin
|
||||
@ -574,6 +568,12 @@ always @(posedge clk) begin
|
||||
temp_m_ip_payload_axis_tlast_reg <= m_ip_payload_axis_tlast_int;
|
||||
temp_m_ip_payload_axis_tuser_reg <= m_ip_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -622,8 +622,8 @@ assign m_ip_payload_axis_tvalid = m_ip_payload_axis_tvalid_reg;
|
||||
assign m_ip_payload_axis_tlast = m_ip_payload_axis_tlast_reg;
|
||||
assign m_ip_payload_axis_tuser = m_ip_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && (!m_ip_payload_axis_tvalid_reg || !m_ip_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && !m_ip_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -654,15 +654,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_ip_payload_axis_tvalid_reg <= m_ip_payload_axis_tvalid_next;
|
||||
m_ip_payload_axis_tready_int_reg <= m_ip_payload_axis_tready_int_early;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= temp_m_ip_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_ip_payload_int_to_output) begin
|
||||
@ -683,6 +677,12 @@ always @(posedge clk) begin
|
||||
temp_m_ip_payload_axis_tlast_reg <= m_ip_payload_axis_tlast_int;
|
||||
temp_m_ip_payload_axis_tuser_reg <= m_ip_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -436,8 +436,8 @@ assign m_eth_payload_axis_tvalid = m_eth_payload_axis_tvalid_reg;
|
||||
assign m_eth_payload_axis_tlast = m_eth_payload_axis_tlast_reg;
|
||||
assign m_eth_payload_axis_tuser = m_eth_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && (!m_eth_payload_axis_tvalid_reg || !m_eth_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && !m_eth_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -468,15 +468,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_eth_payload_axis_tvalid_reg <= m_eth_payload_axis_tvalid_next;
|
||||
m_eth_payload_axis_tready_int_reg <= m_eth_payload_axis_tready_int_early;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= temp_m_eth_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_eth_payload_int_to_output) begin
|
||||
@ -494,6 +488,12 @@ always @(posedge clk) begin
|
||||
temp_m_eth_payload_axis_tlast_reg <= m_eth_payload_axis_tlast_int;
|
||||
temp_m_eth_payload_axis_tuser_reg <= m_eth_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -584,8 +584,8 @@ assign m_eth_payload_axis_tvalid = m_eth_payload_axis_tvalid_reg;
|
||||
assign m_eth_payload_axis_tlast = m_eth_payload_axis_tlast_reg;
|
||||
assign m_eth_payload_axis_tuser = m_eth_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready | (!temp_m_eth_payload_axis_tvalid_reg && (!m_eth_payload_axis_tvalid_reg | !m_eth_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_eth_payload_axis_tready_int_early = m_eth_payload_axis_tready || (!temp_m_eth_payload_axis_tvalid_reg && !m_eth_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -616,15 +616,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_eth_payload_axis_tvalid_reg <= m_eth_payload_axis_tvalid_next;
|
||||
m_eth_payload_axis_tready_int_reg <= m_eth_payload_axis_tready_int_early;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= temp_m_eth_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_eth_payload_int_to_output) begin
|
||||
@ -645,6 +639,12 @@ always @(posedge clk) begin
|
||||
temp_m_eth_payload_axis_tlast_reg <= m_eth_payload_axis_tlast_int;
|
||||
temp_m_eth_payload_axis_tuser_reg <= m_eth_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_eth_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_eth_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -320,8 +320,8 @@ assign m_ip_payload_axis_tid = ID_ENABLE ? m_ip_payload_axis_tid_reg : {I
|
||||
assign m_ip_payload_axis_tdest = DEST_ENABLE ? m_ip_payload_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_ip_payload_axis_tuser = USER_ENABLE ? m_ip_payload_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && (!m_ip_payload_axis_tvalid_reg || !m_ip_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && !m_ip_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -352,15 +352,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_ip_payload_axis_tvalid_reg <= m_ip_payload_axis_tvalid_next;
|
||||
m_ip_payload_axis_tready_int_reg <= m_ip_payload_axis_tready_int_early;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= temp_m_ip_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -387,6 +381,12 @@ always @(posedge clk) begin
|
||||
temp_m_ip_payload_axis_tdest_reg <= m_ip_payload_axis_tdest_int;
|
||||
temp_m_ip_payload_axis_tuser_reg <= m_ip_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -360,8 +360,8 @@ assign m_udp_payload_axis_tid = ID_ENABLE ? m_udp_payload_axis_tid_reg :
|
||||
assign m_udp_payload_axis_tdest = DEST_ENABLE ? m_udp_payload_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_udp_payload_axis_tuser = USER_ENABLE ? m_udp_payload_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && (!m_udp_payload_axis_tvalid_reg || !m_udp_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && !m_udp_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -392,15 +392,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_udp_payload_axis_tvalid_reg <= m_udp_payload_axis_tvalid_next;
|
||||
m_udp_payload_axis_tready_int_reg <= m_udp_payload_axis_tready_int_early;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= temp_m_udp_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -427,6 +421,12 @@ always @(posedge clk) begin
|
||||
temp_m_udp_payload_axis_tdest_reg <= m_udp_payload_axis_tdest_int;
|
||||
temp_m_udp_payload_axis_tuser_reg <= m_udp_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -354,8 +354,8 @@ assign m_udp_payload_axis_tid = ID_ENABLE ? {M_COUNT{m_udp_payload_axis_tid
|
||||
assign m_udp_payload_axis_tdest = DEST_ENABLE ? {M_COUNT{m_udp_payload_axis_tdest_reg}} : {M_COUNT*DEST_WIDTH{1'b0}};
|
||||
assign m_udp_payload_axis_tuser = USER_ENABLE ? {M_COUNT{m_udp_payload_axis_tuser_reg}} : {M_COUNT*USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_udp_payload_axis_tready_int_early = (m_udp_payload_axis_tready & m_udp_payload_axis_tvalid) || (!temp_m_udp_payload_axis_tvalid_reg && (!m_udp_payload_axis_tvalid || !m_udp_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_udp_payload_axis_tready_int_early = (m_udp_payload_axis_tready & m_udp_payload_axis_tvalid) || (!temp_m_udp_payload_axis_tvalid_reg && !m_udp_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -386,15 +386,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_udp_payload_axis_tvalid_reg <= m_udp_payload_axis_tvalid_next;
|
||||
m_udp_payload_axis_tready_int_reg <= m_udp_payload_axis_tready_int_early;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= temp_m_udp_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -421,6 +415,12 @@ always @(posedge clk) begin
|
||||
temp_m_udp_payload_axis_tdest_reg <= m_udp_payload_axis_tdest_int;
|
||||
temp_m_udp_payload_axis_tuser_reg <= m_udp_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= {M_COUNT{1'b0}};
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -471,8 +471,8 @@ assign m_udp_payload_axis_tvalid = m_udp_payload_axis_tvalid_reg;
|
||||
assign m_udp_payload_axis_tlast = m_udp_payload_axis_tlast_reg;
|
||||
assign m_udp_payload_axis_tuser = m_udp_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && (!m_udp_payload_axis_tvalid_reg || !m_udp_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && !m_udp_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -503,15 +503,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_udp_payload_axis_tvalid_reg <= m_udp_payload_axis_tvalid_next;
|
||||
m_udp_payload_axis_tready_int_reg <= m_udp_payload_axis_tready_int_early;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= temp_m_udp_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_udp_payload_int_to_output) begin
|
||||
@ -529,6 +523,12 @@ always @(posedge clk) begin
|
||||
temp_m_udp_payload_axis_tlast_reg <= m_udp_payload_axis_tlast_int;
|
||||
temp_m_udp_payload_axis_tuser_reg <= m_udp_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -496,8 +496,8 @@ assign m_udp_payload_axis_tvalid = m_udp_payload_axis_tvalid_reg;
|
||||
assign m_udp_payload_axis_tlast = m_udp_payload_axis_tlast_reg;
|
||||
assign m_udp_payload_axis_tuser = m_udp_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && (!m_udp_payload_axis_tvalid_reg || !m_udp_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && !m_udp_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -528,15 +528,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_udp_payload_axis_tvalid_reg <= m_udp_payload_axis_tvalid_next;
|
||||
m_udp_payload_axis_tready_int_reg <= m_udp_payload_axis_tready_int_early;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= temp_m_udp_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_udp_payload_int_to_output) begin
|
||||
@ -557,6 +551,12 @@ always @(posedge clk) begin
|
||||
temp_m_udp_payload_axis_tlast_reg <= m_udp_payload_axis_tlast_int;
|
||||
temp_m_udp_payload_axis_tuser_reg <= m_udp_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -432,8 +432,8 @@ assign m_ip_payload_axis_tvalid = m_ip_payload_axis_tvalid_reg;
|
||||
assign m_ip_payload_axis_tlast = m_ip_payload_axis_tlast_reg;
|
||||
assign m_ip_payload_axis_tuser = m_ip_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && (!m_ip_payload_axis_tvalid_reg || !m_ip_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && !m_ip_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -464,15 +464,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_ip_payload_axis_tvalid_reg <= m_ip_payload_axis_tvalid_next;
|
||||
m_ip_payload_axis_tready_int_reg <= m_ip_payload_axis_tready_int_early;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= temp_m_ip_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_ip_payload_int_to_output) begin
|
||||
@ -490,6 +484,12 @@ always @(posedge clk) begin
|
||||
temp_m_ip_payload_axis_tlast_reg <= m_ip_payload_axis_tlast_int;
|
||||
temp_m_ip_payload_axis_tuser_reg <= m_ip_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -485,8 +485,8 @@ assign m_ip_payload_axis_tvalid = m_ip_payload_axis_tvalid_reg;
|
||||
assign m_ip_payload_axis_tlast = m_ip_payload_axis_tlast_reg;
|
||||
assign m_ip_payload_axis_tuser = m_ip_payload_axis_tuser_reg;
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && (!m_ip_payload_axis_tvalid_reg || !m_ip_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_ip_payload_axis_tready_int_early = m_ip_payload_axis_tready || (!temp_m_ip_payload_axis_tvalid_reg && !m_ip_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -517,15 +517,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_ip_payload_axis_tvalid_reg <= m_ip_payload_axis_tvalid_next;
|
||||
m_ip_payload_axis_tready_int_reg <= m_ip_payload_axis_tready_int_early;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= temp_m_ip_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_ip_payload_int_to_output) begin
|
||||
@ -546,6 +540,12 @@ always @(posedge clk) begin
|
||||
temp_m_ip_payload_axis_tlast_reg <= m_ip_payload_axis_tlast_int;
|
||||
temp_m_ip_payload_axis_tuser_reg <= m_ip_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_ip_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_ip_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
@ -348,8 +348,8 @@ assign m_udp_payload_axis_tid = ID_ENABLE ? m_udp_payload_axis_tid_reg :
|
||||
assign m_udp_payload_axis_tdest = DEST_ENABLE ? m_udp_payload_axis_tdest_reg : {DEST_WIDTH{1'b0}};
|
||||
assign m_udp_payload_axis_tuser = USER_ENABLE ? m_udp_payload_axis_tuser_reg : {USER_WIDTH{1'b0}};
|
||||
|
||||
// enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input)
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && (!m_udp_payload_axis_tvalid_reg || !m_udp_payload_axis_tvalid_int));
|
||||
// enable ready input next cycle if output is ready or if both output registers are empty
|
||||
assign m_udp_payload_axis_tready_int_early = m_udp_payload_axis_tready || (!temp_m_udp_payload_axis_tvalid_reg && !m_udp_payload_axis_tvalid_reg);
|
||||
|
||||
always @* begin
|
||||
// transfer sink ready state to source
|
||||
@ -380,15 +380,9 @@ always @* begin
|
||||
end
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end else begin
|
||||
m_udp_payload_axis_tvalid_reg <= m_udp_payload_axis_tvalid_next;
|
||||
m_udp_payload_axis_tready_int_reg <= m_udp_payload_axis_tready_int_early;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= temp_m_udp_payload_axis_tvalid_next;
|
||||
end
|
||||
|
||||
// datapath
|
||||
if (store_axis_int_to_output) begin
|
||||
@ -415,6 +409,12 @@ always @(posedge clk) begin
|
||||
temp_m_udp_payload_axis_tdest_reg <= m_udp_payload_axis_tdest_int;
|
||||
temp_m_udp_payload_axis_tuser_reg <= m_udp_payload_axis_tuser_int;
|
||||
end
|
||||
|
||||
if (rst) begin
|
||||
m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
m_udp_payload_axis_tready_int_reg <= 1'b0;
|
||||
temp_m_udp_payload_axis_tvalid_reg <= 1'b0;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
Loading…
x
Reference in New Issue
Block a user