commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 33/148: got firmware compiling with vrt rx


From: git
Subject: [Commit-gnuradio] [gnuradio] 33/148: got firmware compiling with vrt rx
Date: Mon, 15 Aug 2016 00:47:22 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

nwest pushed a commit to annotated tag old_usrp_devel_udp
in repository gnuradio.

commit e18b55d8b7daf4352a8981a00bc0ecbe0a8874f3
Author: Josh Blum <address@hidden>
Date:   Fri Nov 6 14:36:10 2009 -0800

    got firmware compiling with vrt rx
---
 usrp2/firmware/apps/Makefile.am           |  4 ++--
 usrp2/firmware/apps/txrx.c                | 20 ++++++++++----------
 usrp2/firmware/include/usrp2_eth_packet.h |  5 -----
 usrp2/firmware/lib/dbsm.c                 |  2 +-
 usrp2/firmware/lib/memory_map.h           |  2 +-
 5 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/usrp2/firmware/apps/Makefile.am b/usrp2/firmware/apps/Makefile.am
index 66f5753..24093fd 100644
--- a/usrp2/firmware/apps/Makefile.am
+++ b/usrp2/firmware/apps/Makefile.am
@@ -27,7 +27,6 @@ noinst_PROGRAMS = \
        can_i_sub \
        echo \
        hello \
-       ibs_rx_test \
        ibs_tx_test \
        read_dbids \
        set_hw_rev \
@@ -55,7 +54,8 @@ nononono =  \
        factory_test \
        serdes_txrx \
        mimo_tx \
-       mimo_tx_slave
+       mimo_tx_slave \
+       ibs_rx_test
 
 # tx_drop_SOURCES = tx_drop.c app_common.c
 # tx_drop_rate_limited_SOURCES = tx_drop_rate_limited.c app_common.c
diff --git a/usrp2/firmware/apps/txrx.c b/usrp2/firmware/apps/txrx.c
index 2d4aaf8..78b771e 100644
--- a/usrp2/firmware/apps/txrx.c
+++ b/usrp2/firmware/apps/txrx.c
@@ -133,28 +133,28 @@ void
 restart_streaming(void)
 {
   // setup RX DSP regs
-  dsp_rx_regs->clear_state = 1;                        // reset
+  sr_rx_ctrl->nsamples_per_pkt = streaming_items_per_frame;
+  sr_rx_ctrl->nchannels = 1;
+  sr_rx_ctrl->clear_overrun = 1;                       // reset
 
   streaming_p = true;
   streaming_frame_count = FRAMES_PER_CMD;
 
-  dsp_rx_regs->rx_command =
+  sr_rx_ctrl->cmd =
     MK_RX_CMD(FRAMES_PER_CMD * streaming_items_per_frame,
-             streaming_items_per_frame,
              1, 1);                    // set "chain" bit
 
   // kick off the state machine
   dbsm_start(&dsp_rx_sm);
 
-  dsp_rx_regs->rx_time = 0;            // enqueue first of two commands
+  sr_rx_ctrl->time_ticks = 0;          // enqueue first of two commands
 
   // make sure this one and the rest have the "now" and "chain" bits set.
-  dsp_rx_regs->rx_command =
+  sr_rx_ctrl->cmd =
     MK_RX_CMD(FRAMES_PER_CMD * streaming_items_per_frame,
-             streaming_items_per_frame,
-             1, 1);                            
+             1, 1);
 
-  dsp_rx_regs->rx_time = 0;            // enqueue second command
+  sr_rx_ctrl->time_ticks = 0;          // enqueue second command
 }
 
 void
@@ -189,7 +189,7 @@ void
 stop_rx_cmd(void)
 {
   streaming_p = false;
-  dsp_rx_regs->clear_state = 1;        // flush cmd queue
+  sr_rx_ctrl->clear_overrun = 1;       // flush cmd queue
   bp_clear_buf(DSP_RX_BUF_0);
   bp_clear_buf(DSP_RX_BUF_1);
 }
@@ -236,7 +236,7 @@ fw_sets_seqno_inspector(dbsm_t *sm, int buf_this)   // 
returns false
   // queue up another rx command when required
   if (streaming_p && --streaming_frame_count == 0){
     streaming_frame_count = FRAMES_PER_CMD;
-    dsp_rx_regs->rx_time = 0;
+    sr_rx_ctrl->time_ticks = 0;
   }
 
   return false;                // we didn't handle the packet
diff --git a/usrp2/firmware/include/usrp2_eth_packet.h 
b/usrp2/firmware/include/usrp2_eth_packet.h
index ae66ddc..df12761 100644
--- a/usrp2/firmware/include/usrp2_eth_packet.h
+++ b/usrp2/firmware/include/usrp2_eth_packet.h
@@ -161,11 +161,6 @@ typedef struct {
 #define U2_MAX_SAMPLES 370
 #define        U2_MIN_SAMPLES   10
 
-typedef struct {
-  u2_eth_packet_t      hdrs;
-  uint32_t             samples[U2_MAX_SAMPLES];
-} u2_eth_samples_t;
-
 /*
  * Opcodes for control channel
  *
diff --git a/usrp2/firmware/lib/dbsm.c b/usrp2/firmware/lib/dbsm.c
index 96484d5..75fb5d0 100644
--- a/usrp2/firmware/lib/dbsm.c
+++ b/usrp2/firmware/lib/dbsm.c
@@ -267,7 +267,7 @@ dbsm_handle_tx_underrun(dbsm_t *sm)
 void
 dbsm_handle_rx_overrun(dbsm_t *sm)
 {
-  dsp_rx_regs->clear_state = 1;
+  sr_rx_ctrl->clear_overrun = 1;
 
   // If there's a buffer that's filling, clear it.
   // Any restart will be the job of the caller.
diff --git a/usrp2/firmware/lib/memory_map.h b/usrp2/firmware/lib/memory_map.h
index 928348f..46e9f2d 100644
--- a/usrp2/firmware/lib/memory_map.h
+++ b/usrp2/firmware/lib/memory_map.h
@@ -309,7 +309,7 @@ hwconfig_wishbone_divisor(void)
 #define SR_TIME64 192
 #define SR_LAST 255
 
-#define        _SR_ADDR(sr)    (SETTINGS_BASE + (sr) * sizeof(uint32_t))
+#define        _SR_ADDR(sr)    (MISC_OUTPUT_BASE + (sr) * sizeof(uint32_t))
 
 // --- buffer pool control regs ---
 



reply via email to

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