diff options
author | Tom Rondeau <tom@trondeau.com> | 2013-07-18 18:14:01 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2013-09-04 17:00:57 -0400 |
commit | e0eab960ad32fdc20bfb1ea42eaacc79135e1208 (patch) | |
tree | 9b6c54c3c3eb656c8fc23cf85ff3fc3457583a96 | |
parent | e0561eaf4bdf8ad8467aa7765d7f601e9b792ddc (diff) |
digital: added a constellation modulator that uses a constellation object to modulate samples.
The constellation object knows the constellation and symbol mappings for any constellation, not just PSK or QAM.
-rw-r--r-- | gr-digital/grc/digital_block_tree.xml | 1 | ||||
-rw-r--r-- | gr-digital/grc/digital_constellation.xml | 14 | ||||
-rw-r--r-- | gr-digital/grc/digital_constellation_modulator.xml | 111 |
3 files changed, 119 insertions, 7 deletions
diff --git a/gr-digital/grc/digital_block_tree.xml b/gr-digital/grc/digital_block_tree.xml index 4f4618d0a2..a5fba4ff4d 100644 --- a/gr-digital/grc/digital_block_tree.xml +++ b/gr-digital/grc/digital_block_tree.xml @@ -59,6 +59,7 @@ <block>digital_psk_demod</block> <block>digital_qam_mod</block> <block>digital_qam_demod</block> + <block>digital_constellation_modulator</block> <block>digital_constellation_receiver_cb</block> <block>variable_constellation</block> <block>variable_constellation_rect</block> diff --git a/gr-digital/grc/digital_constellation.xml b/gr-digital/grc/digital_constellation.xml index 82019d0d86..8d2a34f1fa 100644 --- a/gr-digital/grc/digital_constellation.xml +++ b/gr-digital/grc/digital_constellation.xml @@ -12,10 +12,10 @@ <category>Modulators</category> <import>from gnuradio import digital</import> <var_make>self.$(id) = $(id) = digital.constellation_calcdist($const_points, $sym_map, $rot_sym, $dims).base() -#if str($softbits_lut).lower() == 'auto' +#if str($soft_dec_lut).lower() == '"auto"' or str($soft_dec_lut).lower() == "'auto'" self.$(id).gen_soft_dec_lut($precision) -#else if str($softbits_lut) != 'None' -self.$(id).set_softbits($softbits_lut, $precision) +#else if str($soft_dec_lut) != 'None' +self.$(id).set_soft_dec_lut($soft_dec_lut, $precision) #end if </var_make> <make></make> @@ -55,17 +55,17 @@ self.$(id).set_softbits($softbits_lut, $precision) <type>int</type> </param> <param> - <name>Soft bits precision</name> + <name>Soft Decisions Precision</name> <key>precision</key> <value>8</value> <type>int</type> <hide>part</hide> </param> <param> - <name>Soft bits LUT</name> - <key>softbits_lut</key> + <name>Soft Decisions LUT</name> + <key>soft_dec_lut</key> <value>None</value> <type>raw</type> - <hide>#if str($softbits_lut) == 'None' then 'part' else 'none'#</hide> + <hide>#if str($soft_dec_lut) == 'None' then 'part' else 'none'#</hide> </param> </block> diff --git a/gr-digital/grc/digital_constellation_modulator.xml b/gr-digital/grc/digital_constellation_modulator.xml new file mode 100644 index 0000000000..7b7ce24e47 --- /dev/null +++ b/gr-digital/grc/digital_constellation_modulator.xml @@ -0,0 +1,111 @@ +<?xml version="1.0"?> + +<!-- + Copyright 2013 Free Software Foundation, Inc. + + This file is part of GNU Radio + + GNU Radio is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + GNU Radio is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Radio; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, + Boston, MA 02110-1301, USA. +--> + +<!-- +################################################### +## Modulates any given constellation object +################################################### + --> +<block> + <name>Constellation Modulator</name> + <key>digital_constellation_modulator</key> + <import>from gnuradio import digital</import> + <make>digital.generic_mod( + constellation=$constellation, + differential=$differential, + samples_per_symbol=$samples_per_symbol, + pre_diff_code=True, + excess_bw=$excess_bw, + verbose=$verbose, + log=$log, + )</make> + <param> + <name>Constellation</name> + <key>constellation</key> + <type>raw</type> + </param> + <param> + <name>Differential Encoding</name> + <key>differential</key> + <value>True</value> + <type>bool</type> + <option> + <name>Yes</name> + <key>True</key> + </option> + <option> + <name>No</name> + <key>False</key> + </option> + </param> + <param> + <name>Samples/Symbol</name> + <key>samples_per_symbol</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Excess BW</name> + <key>excess_bw</key> + <value>0.35</value> + <type>real</type> + </param> + <param> + <name>Verbose</name> + <key>verbose</key> + <value>False</value> + <type>bool</type> + <hide>#if str($verbose) == 'False' then 'part' else 'none'#</hide> + <option> + <name>On</name> + <key>True</key> + </option> + <option> + <name>Off</name> + <key>False</key> + </option> + </param> + <param> + <name>Logging</name> + <key>log</key> + <value>False</value> + <type>bool</type> + <hide>#if str($log) == 'False' then 'part' else 'none'#</hide> + <option> + <name>On</name> + <key>True</key> + </option> + <option> + <name>Off</name> + <key>False</key> + </option> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> |