commit-gnuradio
[Top][All Lists]
Advanced

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

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


From: matt
Subject: [Commit-gnuradio] r10743 - gnuradio/trunk/usrp2/fpga/simple_gemac
Date: Thu, 2 Apr 2009 02:16:12 -0600 (MDT)

Author: matt
Date: 2009-04-02 02:16:11 -0600 (Thu, 02 Apr 2009)
New Revision: 10743

Modified:
   gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v
Log:
added a state to ensure the error signal propagates, and now we assert src_rdy 
if we have an error to propagate


Modified: gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v       2009-04-02 
07:57:20 UTC (rev 10742)
+++ gnuradio/trunk/usrp2/fpga/simple_gemac/rxmac_to_ll8.v       2009-04-02 
08:16:11 UTC (rev 10743)
@@ -4,19 +4,20 @@
    input [7:0] rx_data, input rx_valid, input rx_error, input rx_ack,
    output [7:0] ll_data, output ll_sof, output ll_eof, output ll_error, output 
ll_src_rdy, input ll_dst_rdy );
 
-   reg [1:0] xfer_state;
+   reg [2:0] xfer_state;
 
-   assign ll_data     = rx_data;
-   assign ll_src_rdy  = rx_valid;
-   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_data          = rx_data;
+   assign ll_src_rdy       = rx_valid | (xfer_state == XFER_ERROR);
+   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);
    
    localparam XFER_IDLE     = 0;
    localparam XFER_ACTIVE   = 1;
    localparam XFER_ERROR    = 2;
-   localparam XFER_OVERRUN  = 3;
-   
+   localparam XFER_ERROR_2  = 3;
+   localparam XFER_OVERRUN  = 4;
+      
    always @(posedge clk)
      if(reset | clear)
        xfer_state         <= XFER_IDLE;
@@ -33,7 +34,10 @@
           else if(~ll_dst_rdy)
             xfer_state <= XFER_OVERRUN;
         XFER_ERROR :
-          if(~rx_valid)
+          if(ll_dst_rdy)
+            xfer_state <= XFER_ERROR_2;
+        XFER_ERROR_2 :
+          if(~rx_error)
             xfer_state <= XFER_IDLE;
         XFER_OVERRUN :
           if(ll_dst_rdy & ~rx_valid)





reply via email to

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