Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions hw/vendor/ethernet/framing_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ reg byte_sync, sync, irq_en, tx_busy;
logic [2:0] rx_buf_offset;

always_ff @(posedge clk_int) begin
if (rst_int) rx_use_incr_buf_offset <= 1'b1;
else rx_use_incr_buf_offset <= (rx_addr_axis < 7);
if (rst_int) rx_use_incr_buf_offset <= 1'b1;
else if (rx_addr_axis < 7) rx_use_incr_buf_offset <= 1'b1;
else if (rx_addr_axis == 7) rx_use_incr_buf_offset <= !sync;
Comment thread
marnovandermaas marked this conversation as resolved.
end

assign rx_buf_offset = rx_use_incr_buf_offset ? (nextbuf[2:0] + 3'b1) : nextbuf[2:0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
diff --git a/framing_top.sv b/framing_top.sv
index 93c87c0..5a2267e 100644
index 93c87c0..49c6ace 100644
--- a/framing_top.sv
+++ b/framing_top.sv
@@ -116,11 +116,21 @@ reg byte_sync, sync, irq_en, tx_busy;
@@ -116,11 +116,22 @@ reg byte_sync, sync, irq_en, tx_busy;
assign tx_axis_tdata = douta >> {tx_frame_addr[2],3'b000};
assign phy_mdc = phy_mdclk;

+ logic rx_use_incr_buf_offset;
+ logic [2:0] rx_buf_offset;
+
+ always_ff @(posedge clk_int) begin
+ if (rst_int) rx_use_incr_buf_offset <= 1'b1;
+ else rx_use_incr_buf_offset <= (rx_addr_axis < 7);
+ if (rst_int) rx_use_incr_buf_offset <= 1'b1;
+ else if (rx_addr_axis < 7) rx_use_incr_buf_offset <= 1'b1;
+ else if (rx_addr_axis == 7) rx_use_incr_buf_offset <= !sync;
+ end
+
+ assign rx_buf_offset = rx_use_incr_buf_offset ? (nextbuf[2:0] + 3'b1) : nextbuf[2:0];
Expand Down