commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r7072 - usrp2/trunk/fpga/serdes


From: matt
Subject: [Commit-gnuradio] r7072 - usrp2/trunk/fpga/serdes
Date: Tue, 4 Dec 2007 17:52:51 -0700 (MST)

Author: matt
Date: 2007-12-04 17:52:51 -0700 (Tue, 04 Dec 2007)
New Revision: 7072

Modified:
   usrp2/trunk/fpga/serdes/serdes_rx.v
Log:
this should complete the whole flow control thing.  We need a real app to test 
this to go any further


Modified: usrp2/trunk/fpga/serdes/serdes_rx.v
===================================================================
--- usrp2/trunk/fpga/serdes/serdes_rx.v 2007-12-04 23:44:13 UTC (rev 7071)
+++ usrp2/trunk/fpga/serdes/serdes_rx.v 2007-12-05 00:52:51 UTC (rev 7072)
@@ -101,6 +101,10 @@
    assign      xon_rcvd = (chosen_data == {2'b11,K_XON,K_XON});
    assign      xoff_rcvd = (chosen_data == {2'b11,K_XOFF,K_XOFF});
 
+   wire        wait_here = ((chosen_data == {2'b11,K_COMMA,K_COMMA})||
+                           (chosen_data == {2'b11,K_XON,K_XON})||
+                           (chosen_data == {2'b11,K_XOFF,K_XOFF}) );
+
    always @(posedge clk)
      if(rst) sop_i <= 0;
      else if(state == FIRSTLINE1) sop_i <= 1;
@@ -142,7 +146,7 @@
                halfline <= chosen_data[15:0];
                state <= FIRSTLINE2;
             end
-          else if(chosen_data == {2'b11,K_COMMA,K_COMMA})
+          else if(wait_here)
             ;  // Flow Controlled, so wait here and do nothing
           else
             state <= ERROR;
@@ -159,7 +163,7 @@
                     write_pre <= 1;
                  end
             end // if (chosen_data[17:16] == 0)
-          else if(chosen_data == {2'b11,K_COMMA,K_COMMA})
+          else if(wait_here)
             ;  // Flow Controlled, so wait here and do nothing
           else
             state <= ERROR;
@@ -172,7 +176,7 @@
                   halfline <= chosen_data[15:0];
                   state <= PKT2;
                end
-             else if(chosen_data == {2'b11,K_COMMA,K_COMMA})
+             else if(wait_here)
                ;  // Flow Controlled
              else if(chosen_data == {2'b11,K_PKT_END,K_PKT_END})
                state <= CRC_CHECK;
@@ -192,7 +196,7 @@
                     write_pre <= 1;
                  end
             end // if (chosen_data[17:16] == 0)
-          else if(chosen_data == {2'b11,K_COMMA,K_COMMA})
+          else if(wait_here)
             ;  // Flow Controlled
           else
             state <= ERROR;
@@ -203,6 +207,8 @@
                state <= DONE;
                eop_i <= 1;
             end
+          else if(wait_here)
+            ;
           else
             state <= ERROR;
         





reply via email to

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