X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/43282fcf13e571f4a57dd8df10ea9b4f7f8d1bca..a6035e0c1b5785205c73dd6510e0b83631bda75b:/Ethernet.v diff --git a/Ethernet.v b/Ethernet.v index d961585..bd3fdc7 100644 --- a/Ethernet.v +++ b/Ethernet.v @@ -259,16 +259,18 @@ module EnetRX( reg [2:0] transition_timeout; always @(posedge rxclk) if(in_data[2]^in_data[1]) transition_timeout<=0; else if(~&cnt) transition_timeout<=transition_timeout+1; always @(posedge rxclk) end_of_Ethernet_frame <= &transition_timeout; + reg [11:0] iaddr; ///////////////////////////////////////////////// always @(posedge rxclk) if (new_byte_available && !pktrdy) begin odata <= data; - oaddr <= oaddr + 1; + oaddr <= iaddr; + iaddr <= iaddr + 1; wr <= 1; - end else if (end_of_Ethernet_frame && (oaddr > 1)) begin - olength <= oaddr; - oaddr <= 0; + end else if (end_of_Ethernet_frame && (iaddr > 1)) begin + olength <= iaddr; + iaddr <= 0; wr <= 0; pktrdy <= 1; end else if (pktclear) begin