commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r7592 - usrp2/trunk/firmware/lib


From: eb
Subject: [Commit-gnuradio] r7592 - usrp2/trunk/firmware/lib
Date: Wed, 6 Feb 2008 16:48:37 -0700 (MST)

Author: eb
Date: 2008-02-06 16:48:37 -0700 (Wed, 06 Feb 2008)
New Revision: 7592

Modified:
   usrp2/trunk/firmware/lib/dbsm.c
   usrp2/trunk/firmware/lib/dbsm.h
Log:
drop last 2 lines of buffer when receiving from ethernet

Modified: usrp2/trunk/firmware/lib/dbsm.c
===================================================================
--- usrp2/trunk/firmware/lib/dbsm.c     2008-02-06 20:36:38 UTC (rev 7591)
+++ usrp2/trunk/firmware/lib/dbsm.c     2008-02-06 23:48:37 UTC (rev 7592)
@@ -60,6 +60,10 @@
 
   sm->inspect = inspect;
 
+  // How much to adjust the last_line register.
+  // It's 1 for everything but the ethernet.
+  sm->last_line_adj = recv->port == PORT_ETH ? 3 : 1;
+
   buffer_state[sm->buf0] = BS_EMPTY;
   buffer_state[sm->buf0 ^ 1] = BS_EMPTY;
 
@@ -108,7 +112,7 @@
 {
   buffer_pool_ctrl->ctrl =
     (sm->precomputed_send_from_buf_ctrl_word[bufno & 1]
-     | BPC_LAST_LINE(buffer_pool_status->last_line[bufno] - 1));
+     | BPC_LAST_LINE(buffer_pool_status->last_line[bufno] - 
sm->last_line_adj));
 }
 
 void

Modified: usrp2/trunk/firmware/lib/dbsm.h
===================================================================
--- usrp2/trunk/firmware/lib/dbsm.h     2008-02-06 20:36:38 UTC (rev 7591)
+++ usrp2/trunk/firmware/lib/dbsm.h     2008-02-06 23:48:37 UTC (rev 7592)
@@ -61,6 +61,7 @@
   inspector_t    inspect;
   uint32_t       precomputed_receive_to_buf_ctrl_word[2];
   uint32_t       precomputed_send_from_buf_ctrl_word[2];
+  int            last_line_adj;
 };
 
 void dbsm_init(dbsm_t *sm, int buf0,





reply via email to

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