commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10751 - gnuradio/trunk/usrp2/fpga/simple_gemac


From: matt
Subject: [Commit-gnuradio] r10751 - gnuradio/trunk/usrp2/fpga/simple_gemac
Date: Thu, 2 Apr 2009 17:35:13 -0600 (MDT)

Author: matt
Date: 2009-04-02 17:35:12 -0600 (Thu, 02 Apr 2009)
New Revision: 10751

Modified:
   gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v
Log:
Properly signals an error and drops the remainder of the packet if there is an 
overrun.  ERROR_2 changed to ERROR2.


Modified: gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v       2009-04-02 
23:33:43 UTC (rev 10750)
+++ gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v       2009-04-02 
23:35:12 UTC (rev 10751)
@@ -7,16 +7,19 @@
    reg [2:0] xfer_state;
 
    assign ll_data          = rx_data;
-   assign ll_src_rdy       = rx_valid | (xfer_state == XFER_ERROR);
+   assign ll_src_rdy       = ((rx_valid & (xfer_state != XFER_OVERRUN2) )
+                              | (xfer_state == XFER_ERROR) 
+                              | (xfer_state == XFER_OVERRUN));
    assign ll_sof           = 
((xfer_state==XFER_IDLE)|(xfer_state==XFER_ERROR)|(xfer_state==XFER_OVERRUN));
    assign ll_eof           = (rx_ack | (xfer_state==XFER_ERROR) | 
(xfer_state==XFER_OVERRUN));
-   assign ll_error         = (xfer_state == XFER_ERROR);
+   assign ll_error         = (xfer_state == 
XFER_ERROR)|(xfer_state==XFER_OVERRUN);
    
    localparam XFER_IDLE     = 0;
    localparam XFER_ACTIVE   = 1;
    localparam XFER_ERROR    = 2;
-   localparam XFER_ERROR_2  = 3;
+   localparam XFER_ERROR2   = 3;
    localparam XFER_OVERRUN  = 4;
+   localparam XFER_OVERRUN2 = 5;
       
    always @(posedge clk)
      if(reset | clear)
@@ -35,12 +38,15 @@
             xfer_state <= XFER_OVERRUN;
         XFER_ERROR :
           if(ll_dst_rdy)
-            xfer_state <= XFER_ERROR_2;
-        XFER_ERROR_2 :
+            xfer_state <= XFER_ERROR2;
+        XFER_ERROR2 :
           if(~rx_error)
             xfer_state <= XFER_IDLE;
         XFER_OVERRUN :
-          if(ll_dst_rdy & ~rx_valid)
+          if(ll_dst_rdy)
+            xfer_state <= XFER_OVERRUN2;
+        XFER_OVERRUN2 :
+          if(~rx_valid)
             xfer_state <= XFER_IDLE;
        endcase // case (xfer_state)
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]