mirror of
https://github.com/corundum/corundum.git
synced 2025-01-30 08:32:52 +08:00
More critical path optimizations
This commit is contained in:
parent
134ce04777
commit
eb1f38a749
@ -396,10 +396,15 @@ always @* begin
|
||||
// word transfer through
|
||||
word_count_next = word_count_reg - 16'd8;
|
||||
transfer_in_save = 1'b1;
|
||||
if (word_count_reg <= keep2count(shift_eth_payload_axis_tkeep)) begin
|
||||
if (word_count_reg <= 8) begin
|
||||
// have entire payload
|
||||
m_ip_payload_axis_tkeep_int = shift_eth_payload_axis_tkeep & count2keep(word_count_reg);
|
||||
if (shift_eth_payload_axis_tlast) begin
|
||||
if (keep2count(shift_eth_payload_axis_tkeep) < word_count_reg[4:0]) begin
|
||||
// end of frame, but length does not match
|
||||
error_payload_early_termination_next = 1'b1;
|
||||
m_ip_payload_axis_tuser_int = 1'b1;
|
||||
end
|
||||
s_eth_payload_axis_tready_next = 1'b0;
|
||||
flush_save = 1'b1;
|
||||
s_eth_hdr_ready_next = !m_ip_hdr_valid_reg && !check_hdr_reg;
|
||||
|
@ -416,10 +416,15 @@ always @* begin
|
||||
// word transfer through
|
||||
word_count_next = word_count_reg - 16'd8;
|
||||
transfer_in_save = 1'b1;
|
||||
if (keep2count(shift_ip_payload_axis_tkeep) >= word_count_reg) begin
|
||||
if (word_count_reg <= 8) begin
|
||||
// have entire payload
|
||||
m_eth_payload_axis_tkeep_int = count2keep(word_count_reg);
|
||||
if (shift_ip_payload_axis_tlast) begin
|
||||
if (keep2count(shift_ip_payload_axis_tkeep) < word_count_reg[4:0]) begin
|
||||
// end of frame, but length does not match
|
||||
error_payload_early_termination_next = 1'b1;
|
||||
m_eth_payload_axis_tuser_int = 1'b1;
|
||||
end
|
||||
s_ip_payload_axis_tready_next = 1'b0;
|
||||
flush_save = 1'b1;
|
||||
s_ip_hdr_ready_next = !m_eth_hdr_valid_next;
|
||||
|
@ -335,10 +335,15 @@ always @* begin
|
||||
if (s_ip_payload_axis_tready && s_ip_payload_axis_tvalid) begin
|
||||
// word transfer through
|
||||
word_count_next = word_count_reg - 16'd8;
|
||||
if (keep2count(s_ip_payload_axis_tkeep) >= word_count_reg) begin
|
||||
if (word_count_reg <= 8) begin
|
||||
// have entire payload
|
||||
m_udp_payload_axis_tkeep_int = s_ip_payload_axis_tkeep & count2keep(word_count_reg);
|
||||
if (s_ip_payload_axis_tlast) begin
|
||||
if (keep2count(s_ip_payload_axis_tkeep) < word_count_reg[4:0]) begin
|
||||
// end of frame, but length does not match
|
||||
error_payload_early_termination_next = 1'b1;
|
||||
m_udp_payload_axis_tuser_int = 1'b1;
|
||||
end
|
||||
s_ip_payload_axis_tready_next = 1'b0;
|
||||
s_ip_hdr_ready_next = !m_udp_hdr_valid_next;
|
||||
state_next = STATE_IDLE;
|
||||
|
@ -332,10 +332,15 @@ always @* begin
|
||||
if (m_ip_payload_axis_tready_int_reg && s_udp_payload_axis_tvalid) begin
|
||||
// word transfer through
|
||||
word_count_next = word_count_reg - 16'd8;
|
||||
if (keep2count(s_udp_payload_axis_tkeep) >= word_count_reg) begin
|
||||
if (word_count_reg <= 8) begin
|
||||
// have entire payload
|
||||
m_ip_payload_axis_tkeep_int = count2keep(word_count_reg);
|
||||
if (s_udp_payload_axis_tlast) begin
|
||||
if (keep2count(s_udp_payload_axis_tkeep) < word_count_reg[4:0]) begin
|
||||
// end of frame, but length does not match
|
||||
error_payload_early_termination_next = 1'b1;
|
||||
m_ip_payload_axis_tuser_int = 1'b1;
|
||||
end
|
||||
s_udp_payload_axis_tready_next = 1'b0;
|
||||
s_udp_hdr_ready_next = !m_ip_hdr_valid_next;
|
||||
state_next = STATE_IDLE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user