summaryrefslogtreecommitdiff
path: root/gr-digital
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital')
-rw-r--r--gr-digital/examples/CMakeLists.txt14
-rw-r--r--gr-digital/grc/CMakeLists.txt1
-rw-r--r--gr-digital/grc/Makefile.am1
-rw-r--r--gr-digital/grc/digital_block_tree.xml1
-rw-r--r--gr-digital/grc/digital_constellation_receiver_cb.xml40
-rw-r--r--gr-digital/grc/digital_qam_demod.xml2
-rw-r--r--gr-digital/include/digital_costas_loop_cc.h9
-rw-r--r--gr-digital/include/digital_mpsk_receiver_cc.h43
-rw-r--r--gr-digital/lib/digital_mpsk_receiver_cc.cc17
-rw-r--r--gr-digital/swig/digital_mpsk_receiver_cc.i5
10 files changed, 111 insertions, 22 deletions
diff --git a/gr-digital/examples/CMakeLists.txt b/gr-digital/examples/CMakeLists.txt
index 7b94f745c..5c652fc83 100644
--- a/gr-digital/examples/CMakeLists.txt
+++ b/gr-digital/examples/CMakeLists.txt
@@ -44,3 +44,17 @@ GR_PYTHON_INSTALL(PROGRAMS
DESTINATION ${GR_PKG_DATA_DIR}/examples/digital/narrowband
COMPONENT "digital_python"
)
+
+GR_PYTHON_INSTALL(PROGRAMS
+ ofdm/benchmark_add_channel.py
+ ofdm/benchmark_rx.py
+ ofdm/benchmark_tx.py
+ ofdm/gr_plot_ofdm.py
+ ofdm/ofdm_mod_demod_test.py
+ ofdm/receive_path.py
+ ofdm/transmit_path.py
+ ofdm/tunnel.py
+ ofdm/uhd_interface.py
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/digital/ofdm
+ COMPONENT "digital_python"
+)
diff --git a/gr-digital/grc/CMakeLists.txt b/gr-digital/grc/CMakeLists.txt
index e25c98faa..e94c53556 100644
--- a/gr-digital/grc/CMakeLists.txt
+++ b/gr-digital/grc/CMakeLists.txt
@@ -22,6 +22,7 @@ install(FILES
digital_binary_slicer_fb.xml
digital_clock_recovery_mm_xx.xml
digital_constellation_decoder_cb.xml
+ digital_constellation_receiver_cb.xml
digital_correlate_access_code_bb.xml
digital_costas_loop_cc.xml
digital_cma_equalizer_cc.xml
diff --git a/gr-digital/grc/Makefile.am b/gr-digital/grc/Makefile.am
index b1ebba463..e6dd2aa92 100644
--- a/gr-digital/grc/Makefile.am
+++ b/gr-digital/grc/Makefile.am
@@ -28,6 +28,7 @@ dist_grcblocks_DATA = \
digital_binary_slicer_fb.xml \
digital_clock_recovery_mm_xx.xml \
digital_constellation_decoder_cb.xml \
+ digital_constellation_receiver_cb.xml \
digital_correlate_access_code_bb.xml \
digital_costas_loop_cc.xml \
digital_cma_equalizer_cc.xml \
diff --git a/gr-digital/grc/digital_block_tree.xml b/gr-digital/grc/digital_block_tree.xml
index 84151c190..49a01973f 100644
--- a/gr-digital/grc/digital_block_tree.xml
+++ b/gr-digital/grc/digital_block_tree.xml
@@ -34,6 +34,7 @@
<block>digital_clock_recovery_mm_xx</block>
<block>digital_cma_equalizer_cc</block>
<block>digital_constellation_decoder_cb</block>
+ <block>digital_constellation_receiver_cb</block>
<block>digital_correlate_access_code_bb</block>
<block>digital_costas_loop_cc</block>
<block>digital_fll_band_edge_cc</block>
diff --git a/gr-digital/grc/digital_constellation_receiver_cb.xml b/gr-digital/grc/digital_constellation_receiver_cb.xml
new file mode 100644
index 000000000..36c8e1b30
--- /dev/null
+++ b/gr-digital/grc/digital_constellation_receiver_cb.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Constellation Receiver
+###################################################
+ -->
+<block>
+ <name>Constellation Receiver</name>
+ <key>digital_constellation_receiver_cb</key>
+ <import>from gnuradio import digital</import>
+ <make>digital.constellation_receiver_cb($constellation, $loop_bw, $fmin, $fmax)</make>
+ <param>
+ <name>Constellation Object</name>
+ <key>constellation</key>
+ <type>raw</type>
+ </param>
+ <param>
+ <name>Loop Bandwidth</name>
+ <key>loop_bw</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Minimum Freq Deviation</name>
+ <key>fmin</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Maximum Freq Deviation</name>
+ <key>fmax</key>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+</block>
diff --git a/gr-digital/grc/digital_qam_demod.xml b/gr-digital/grc/digital_qam_demod.xml
index 4db1327e8..86080fff7 100644
--- a/gr-digital/grc/digital_qam_demod.xml
+++ b/gr-digital/grc/digital_qam_demod.xml
@@ -94,7 +94,7 @@
</param>
<param>
<name>Gray Code</name>
- <key>gray_coded</key>
+ <key>mod_code</key>
<type>enum</type>
<option>
<name>Yes</name>
diff --git a/gr-digital/include/digital_costas_loop_cc.h b/gr-digital/include/digital_costas_loop_cc.h
index c8c722c93..4aab22fb4 100644
--- a/gr-digital/include/digital_costas_loop_cc.h
+++ b/gr-digital/include/digital_costas_loop_cc.h
@@ -50,11 +50,8 @@
*
* http://rfdesign.com/images/archive/0102Feigin20.pdf
*
- * \param alpha the loop gain used for phase adjustment
- * \param beta the loop gain for frequency adjustments
- * \param max_freq the maximum frequency deviation (radians/sample) the loop can handle
- * \param min_freq the minimum frequency deviation (radians/sample) the loop can handle
- * \param order the loop order, either 2 or 4
+ * \param loop_bw internal 2nd order loop bandwidth (~ 2pi/100)
+ * \param order the loop order, either 2, 4, or 8
*/
#include <digital_api.h>
@@ -76,7 +73,7 @@ digital_make_costas_loop_cc (float loop_bw, int order
* stream 1 is the baseband I and Q;
* stream 2 is the normalized frequency of the loop
*
- * \p order must be 2 or 4.
+ * \p order must be 2, 4, or 8.
*/
class DIGITAL_API digital_costas_loop_cc : public gr_sync_block, public gri_control_loop
{
diff --git a/gr-digital/include/digital_mpsk_receiver_cc.h b/gr-digital/include/digital_mpsk_receiver_cc.h
index e70495bfa..02cea8d25 100644
--- a/gr-digital/include/digital_mpsk_receiver_cc.h
+++ b/gr-digital/include/digital_mpsk_receiver_cc.h
@@ -91,23 +91,37 @@ class DIGITAL_API digital_mpsk_receiver_cc : public gr_block, public gri_control
gr_vector_void_star &output_items);
- // Member functions related to the symbol tracking portion of the receiver
- //! (M&M) Returns current value of mu
- float mu() const { return d_mu;}
+ //! Returns the modulation order (M) currently set
+ float modulation_order() const { return d_M; }
- //! (M&M) Returns current value of omega
- float omega() const { return d_omega;}
+ //! Returns current value of theta
+ float theta() const { return d_theta; }
- //! (M&M) Returns mu gain factor
- float gain_mu() const { return d_gain_mu;}
+ //! Returns current value of mu
+ float mu() const { return d_mu; }
- //! (M&M) Returns omega gain factor
- float gain_omega() const { return d_gain_omega;}
+ //! Returns current value of omega
+ float omega() const { return d_omega; }
- //! (M&M) Sets value of mu
+ //! Returns mu gain factor
+ float gain_mu() const { return d_gain_mu; }
+
+ //! Returns omega gain factor
+ float gain_omega() const { return d_gain_omega; }
+
+ //! Returns the relative omega limit
+ float gain_omega_rel() const {return d_omega_rel; }
+
+ //! Sets the modulation order (M) currently
+ void set_modulation_order(unsigned int M);
+
+ //! Sets value of theta
+ void set_theta(float theta) { d_theta = theta; }
+
+ //! Sets value of mu
void set_mu (float mu) { d_mu = mu; }
- //! (M&M) Sets value of omega and its min and max values
+ //! Sets value of omega and its min and max values
void set_omega (float omega) {
d_omega = omega;
d_min_omega = omega*(1.0 - d_omega_rel);
@@ -115,12 +129,15 @@ class DIGITAL_API digital_mpsk_receiver_cc : public gr_block, public gri_control
d_omega_mid = 0.5*(d_min_omega+d_max_omega);
}
- //! (M&M) Sets value for mu gain factor
+ //! Sets value for mu gain factor
void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; }
- //! (M&M) Sets value for omega gain factor
+ //! Sets value for omega gain factor
void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; }
+ //! Sets the relative omega limit and resets omega min/max values
+ void set_gain_omega_rel(float omega_rel);
+
protected:
/*!
diff --git a/gr-digital/lib/digital_mpsk_receiver_cc.cc b/gr-digital/lib/digital_mpsk_receiver_cc.cc
index 363b86c9f..6d2bab8a4 100644
--- a/gr-digital/lib/digital_mpsk_receiver_cc.cc
+++ b/gr-digital/lib/digital_mpsk_receiver_cc.cc
@@ -85,7 +85,18 @@ digital_mpsk_receiver_cc::digital_mpsk_receiver_cc (unsigned int M, float theta,
// zero double length delay line.
for (unsigned int i = 0; i < 2 * DLLEN; i++)
d_dl[i] = gr_complex(0.0,0.0);
+
+ set_modulation_order(d_M);
+}
+
+digital_mpsk_receiver_cc::~digital_mpsk_receiver_cc ()
+{
+ delete d_interp;
+}
+void
+digital_mpsk_receiver_cc::set_modulation_order(unsigned int M)
+{
// build the constellation vector from M
make_constellation();
@@ -108,9 +119,11 @@ digital_mpsk_receiver_cc::digital_mpsk_receiver_cc (unsigned int M, float theta,
}
}
-digital_mpsk_receiver_cc::~digital_mpsk_receiver_cc ()
+void
+digital_mpsk_receiver_cc::set_gain_omega_rel(float omega_rel)
{
- delete d_interp;
+ d_omega_rel = omega_rel;
+ set_omega(d_omega);
}
void
diff --git a/gr-digital/swig/digital_mpsk_receiver_cc.i b/gr-digital/swig/digital_mpsk_receiver_cc.i
index b51411f6f..2338a1854 100644
--- a/gr-digital/swig/digital_mpsk_receiver_cc.i
+++ b/gr-digital/swig/digital_mpsk_receiver_cc.i
@@ -37,16 +37,21 @@ class digital_mpsk_receiver_cc : public gr_block, public gri_control_loop
float mu, float gain_mu,
float omega, float gain_omega, float omega_rel);
public:
+ float modulation_order() const { return d_M; }
float mu() const { return d_mu;}
float omega() const { return d_omega;}
float gain_mu() const { return d_gain_mu;}
float gain_omega() const { return d_gain_omega;}
+ float gain_omega_rel() const {return d_omega_rel; }
+ void set_modulation_order(unsigned int M);
void set_mu (float mu) { d_mu = mu; }
void set_omega (float omega) {
d_omega = omega;
d_min_omega = omega*(1.0 - d_omega_rel);
d_max_omega = omega*(1.0 + d_omega_rel);
}
+ void set_theta(float theta) { d_theta = theta; }
void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; }
void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; }
+ void set_gain_omega_rel(float omega_rel);
};