Author: eb
Date: 2008-01-14 13:54:47 -0700 (Mon, 14 Jan 2008)
New Revision: 7438

Modified:
   usrp2/trunk/firmware/apps/gen_eth_packets.c
Log:
gen_eth_packets now prints RMON regs every other packet

Modified: usrp2/trunk/firmware/apps/gen_eth_packets.c
===================================================================
--- usrp2/trunk/firmware/apps/gen_eth_packets.c 2008-01-14 19:53:44 UTC (rev 
7437)
+++ usrp2/trunk/firmware/apps/gen_eth_packets.c 2008-01-14 20:54:47 UTC (rev 
7438)
@@ -29,6 +29,7 @@
 #include "nonstdio.h"
 #include "usrp2_eth_packet.h"
 #include "memcpy_wa.h"
+#include "print_rmon_regs.h"
 #include <stddef.h>
 #include <stdlib.h>
 
@@ -114,6 +115,8 @@
 int
 main(void)
 {
+  int npackets_sent = 0;
+
   u2_init();
 
   // setup tx gpio bits for GPIOM_FPGA_1 -- fpga debug output
@@ -153,8 +156,12 @@
       bp_receive_to_buf(CPU_RX_BUF, PORT_ETH, 1, 0, BP_LAST_LINE);
     }
 
-    if (status & (BPS_DONE(CPU_TX_BUF) | BPS_ERROR(CPU_TX_BUF)))
+    if (status & (BPS_DONE(CPU_TX_BUF) | BPS_ERROR(CPU_TX_BUF))){
       bp_clear_buf(CPU_TX_BUF);
+      npackets_sent++;
+      if ((npackets_sent & 0x1) == 0)  // print after every other packet
+       print_rmon_regs();
+    }
 
     if (link_is_up && send_packet_now && (status & BPS_IDLE(CPU_TX_BUF))){
       send_packet_now = false;



_______________________________________________
Commit-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnuradio

Reply via email to