commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r6498 - gnuradio/branches/developers/matt/u2f/eth/rtl/


From: matt
Subject: [Commit-gnuradio] r6498 - gnuradio/branches/developers/matt/u2f/eth/rtl/verilog/MAC_tx
Date: Thu, 20 Sep 2007 17:57:07 -0600 (MDT)

Author: matt
Date: 2007-09-20 17:57:06 -0600 (Thu, 20 Sep 2007)
New Revision: 6498

Modified:
   gnuradio/branches/developers/matt/u2f/eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v
Log:
changes to rmon interface, from Claus


Modified: 
gnuradio/branches/developers/matt/u2f/eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v
===================================================================
--- gnuradio/branches/developers/matt/u2f/eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v  
2007-09-20 23:55:21 UTC (rev 6497)
+++ gnuradio/branches/developers/matt/u2f/eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v  
2007-09-20 23:57:06 UTC (rev 6498)
@@ -186,8 +186,6 @@
 reg             TxEn_tmp            ;   
 reg [15:0]      Tx_pkt_length_rmon  ;
 reg             Tx_apply_rmon       ;
-reg             Tx_apply_rmon_tmp   ;
-reg             Tx_apply_rmon_tmp_pl1;
 reg [2:0]       Tx_pkt_err_type_rmon;   
 reg [3:0]       RetryCnt            ;
 reg             Random_init         ;
@@ -534,34 +532,30 @@
     else if 
(Current_state==StateData||Current_state==StateSendPauseFrame||Current_state==StatePAD||Current_state==StateFCS)
         Tx_pkt_length_rmon      <=Tx_pkt_length_rmon+1;
         
-always @ (posedge Clk or posedge Reset)
-    if (Reset)
-        Tx_apply_rmon_tmp       <=0;
-    else if ((Fifo_eop&&Current_state==StateJamDrop)||
-             (Fifo_eop&&Current_state==StateFFEmptyDrop)||
-             CRC_end)
-        Tx_apply_rmon_tmp       <=1;
-    else
-        Tx_apply_rmon_tmp       <=0; 
 
+reg [2:0] Tx_apply_rmon_reg;
+
+always @( posedge Clk or posedge Reset )
+  if ( Reset )
+    begin
+      Tx_apply_rmon <= 0;
+      Tx_apply_rmon_reg <= 'b0;
+    end
+  else
+    begin
+      if ( (Fifo_eop&&Current_state==StateJamDrop)     ||
+           (Fifo_eop&&Current_state==StateFFEmptyDrop) ||
+           CRC_end )
+        Tx_apply_rmon <= 1;
+      else
+        if ( Tx_apply_rmon_reg[2] )
+          Tx_apply_rmon <= 0;
+
+      Tx_apply_rmon_reg <= { Tx_apply_rmon_reg[1:0], Tx_apply_rmon  };
+    end
+
 always @ (posedge Clk or posedge Reset)
     if (Reset)
-        Tx_apply_rmon_tmp_pl1   <=0;
-    else
-        Tx_apply_rmon_tmp_pl1   <=Tx_apply_rmon_tmp;
-        
-always @ (posedge Clk or posedge Reset)
-    if (Reset)
-        Tx_apply_rmon       <=0;
-    else if ((Fifo_eop&&Current_state==StateJamDrop)||
-             (Fifo_eop&&Current_state==StateFFEmptyDrop)||
-             CRC_end)
-        Tx_apply_rmon       <=1;
-    else if (Tx_apply_rmon_tmp_pl1)
-        Tx_apply_rmon       <=0;
-        
-always @ (posedge Clk or posedge Reset)
-    if (Reset)
         Tx_pkt_err_type_rmon    <=0;    
     else if(Fifo_eop&&Current_state==StateJamDrop)
         Tx_pkt_err_type_rmon    <=3'b001;//
@@ -616,6 +610,13 @@
     else
         MAC_tx_addr_init=0;
 
+//**************************************************************************************************************
+// CFH: this implementation delays the time it sends an entire Ethernet frame 
with 512 bits for every pause
+//      request of 512 bits. Actually, it should only delay the time it takes 
to transmit 512 bits, not counting
+//      Ethernet header, CRC, Interframe Gap etc.
+//      Hence the current implementation waits longer than the pause frame 
actually requests (~20% more)
+//**************************************************************************************************************
+
 //flow control
 always @ (posedge Clk or posedge Reset)
     if (Reset)





reply via email to

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