diff options
author | Johnathan Corgan | 2009-10-29 11:07:15 -0700 |
---|---|---|
committer | Johnathan Corgan | 2009-11-03 07:21:42 -0800 |
commit | 34c64290e3146b50053494839847e9f894d98493 (patch) | |
tree | 5b1b0e195fc11055fc4e9c6a2627d05e22068fd6 | |
parent | 2e9af20a77f56263255c4e2395953aec8573fcb1 (diff) | |
download | gnuradio-34c64290e3146b50053494839847e9f894d98493.tar.gz gnuradio-34c64290e3146b50053494839847e9f894d98493.tar.bz2 gnuradio-34c64290e3146b50053494839847e9f894d98493.zip |
Added GRC block wrappers for pager blocks
pager.slicer_fb
pager.flex_sync
pager.flex_deinterleave
-rw-r--r-- | config/grc_gr_pager.m4 | 1 | ||||
-rw-r--r-- | gr-pager/Makefile.am | 2 | ||||
-rw-r--r-- | gr-pager/apps/usrp_rx_flex.grc | 581 | ||||
-rwxr-xr-x | gr-pager/apps/usrp_rx_flex.py | 73 | ||||
-rw-r--r-- | gr-pager/grc/.gitignore | 1 | ||||
-rw-r--r-- | gr-pager/grc/Makefile.am | 29 | ||||
-rw-r--r-- | gr-pager/grc/pager_flex_deinterleave.xml | 23 | ||||
-rw-r--r-- | gr-pager/grc/pager_flex_sync.xml | 36 | ||||
-rw-r--r-- | gr-pager/grc/pager_slicer_fb.xml | 31 |
9 files changed, 625 insertions, 152 deletions
diff --git a/config/grc_gr_pager.m4 b/config/grc_gr_pager.m4 index 3f36dfffb..cdd6177af 100644 --- a/config/grc_gr_pager.m4 +++ b/config/grc_gr_pager.m4 @@ -27,6 +27,7 @@ AC_DEFUN([GRC_GR_PAGER],[ gr-pager/Makefile \ gr-pager/gnuradio-pager.pc \ gr-pager/apps/Makefile \ + gr-pager/grc/Makefile \ gr-pager/lib/Makefile \ gr-pager/python/Makefile \ gr-pager/python/run_tests \ diff --git a/gr-pager/Makefile.am b/gr-pager/Makefile.am index c302cd5df..002387c0c 100644 --- a/gr-pager/Makefile.am +++ b/gr-pager/Makefile.am @@ -24,7 +24,7 @@ include $(top_srcdir)/Makefile.common SUBDIRS = lib if PYTHON -SUBDIRS += swig python apps +SUBDIRS += swig python apps grc endif pkgconfigdir = $(libdir)/pkgconfig diff --git a/gr-pager/apps/usrp_rx_flex.grc b/gr-pager/apps/usrp_rx_flex.grc index bf3d9abce..b9461a57f 100644 --- a/gr-pager/apps/usrp_rx_flex.grc +++ b/gr-pager/apps/usrp_rx_flex.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Thu Oct 29 08:08:45 2009</timestamp> + <timestamp>Thu Oct 29 11:01:22 2009</timestamp> <block> <key>options</key> <param> @@ -369,73 +369,6 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> - <param> - <key>id</key> - <value>wxgui_scopesink2_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>title</key> - <value>Channel Waveform</value> - </param> - <param> - <key>samp_rate</key> - <value>channel_rate</value> - </param> - <param> - <key>v_scale</key> - <value>8e3</value> - </param> - <param> - <key>v_offset</key> - <value>0</value> - </param> - <param> - <key>t_scale</key> - <value>20.0/channel_rate</value> - </param> - <param> - <key>ac_couple</key> - <value>False</value> - </param> - <param> - <key>xy_mode</key> - <value>False</value> - </param> - <param> - <key>num_inputs</key> - <value>1</value> - </param> - <param> - <key>win_size</key> - <value></value> - </param> - <param> - <key>grid_pos</key> - <value>0, 0, 1, 1</value> - </param> - <param> - <key>notebook</key> - <value>displays, 1</value> - </param> - <param> - <key>_coordinate</key> - <value>(594, 620)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>wxgui_fftsink2</key> <param> <key>id</key> @@ -1153,6 +1086,75 @@ </param> </block> <block> + <key>gr_quadrature_demod_cf</key> + <param> + <key>id</key> + <value>fm_demod</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>gain</key> + <value>demod_k</value> + </param> + <param> + <key>_coordinate</key> + <value>(599, 774)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>baseband_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>16000</value> + </param> + <param> + <key>_coordinate</key> + <value>(1019, 17)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>nchan_taps</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>len(channel_taps)</value> + </param> + <param> + <key>_coordinate</key> + <value>(412, 931)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> <key>variable</key> <param> <key>id</key> @@ -1164,11 +1166,119 @@ </param> <param> <key>value</key> - <value>channel_rate/symbol_rate</value> + <value>int(channel_rate/symbol_rate)</value> + </param> + <param> + <key>_coordinate</key> + <value>(850, 863)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>bb_interp</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>5</value> + </param> + <param> + <key>_coordinate</key> + <value>(938, 862)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>virtual_sink</key> + <param> + <key>id</key> + <value>virtual_sink_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>stream_id</key> + <value>baseband</value> + </param> + <param> + <key>_coordinate</key> + <value>(1100, 774)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_rational_resampler_xxx</key> + <param> + <key>id</key> + <value>resampler</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>fff</value> + </param> + <param> + <key>decim</key> + <value>bb_decim</value> + </param> + <param> + <key>interp</key> + <value>bb_interp</value> + </param> + <param> + <key>taps</key> + <value>[1.0/ma_ntaps,]*ma_ntaps*bb_interp</value> + </param> + <param> + <key>fractional_bw</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(851, 750)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>bb_decim</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>8</value> </param> <param> <key>_coordinate</key> - <value>(833, 851)</value> + <value>(1027, 864)</value> </param> <param> <key>_rotation</key> @@ -1227,7 +1337,7 @@ </param> <param> <key>grid_pos</key> - <value>1, 0, 1, 1</value> + <value>0, 0, 1, 1</value> </param> <param> <key>notebook</key> @@ -1235,7 +1345,7 @@ </param> <param> <key>_coordinate</key> - <value>(1029, 586)</value> + <value>(851, 586)</value> </param> <param> <key>_rotation</key> @@ -1243,22 +1353,45 @@ </param> </block> <block> - <key>gr_quadrature_demod_cf</key> + <key>virtual_source</key> <param> <key>id</key> - <value>fm_demod</value> + <value>virtual_source_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>gain</key> - <value>demod_k</value> + <key>stream_id</key> + <value>baseband</value> </param> <param> <key>_coordinate</key> - <value>(599, 774)</value> + <value>(79, 1186)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>pager_slicer_fb</key> + <param> + <key>id</key> + <value>pager_slicer_fb_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>alpha</key> + <value>1e-6</value> + </param> + <param> + <key>_coordinate</key> + <value>(304, 1186)</value> </param> <param> <key>_rotation</key> @@ -1266,10 +1399,10 @@ </param> </block> <block> - <key>gr_moving_average_xx</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>gr_moving_average_xx_0</value> + <value>wxgui_scopesink2_0</value> </param> <param> <key>_enabled</key> @@ -1280,20 +1413,90 @@ <value>float</value> </param> <param> - <key>length</key> - <value>8</value> + <key>title</key> + <value>Slicer Output</value> </param> <param> - <key>scale</key> - <value>1.0/8.0</value> + <key>samp_rate</key> + <value>baseband_rate</value> </param> <param> - <key>max_iter</key> - <value>4000</value> + <key>v_scale</key> + <value>1</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>40.0/baseband_rate</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1,0,1,1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 1</value> + </param> + <param> + <key>_coordinate</key> + <value>(75, 1044)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>gr_char_to_float</key> + <param> + <key>id</key> + <value>gr_char_to_float_0</value> + </param> + <param> + <key>_enabled</key> + <value>False</value> + </param> + <param> + <key>_coordinate</key> + <value>(325, 1088)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>pager_flex_sync</key> + <param> + <key>id</key> + <value>pager_flex_sync_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> </param> <param> <key>_coordinate</key> - <value>(815, 676)</value> + <value>(529, 1139)</value> </param> <param> <key>_rotation</key> @@ -1301,10 +1504,29 @@ </param> </block> <block> - <key>blks2_rational_resampler_xxx</key> + <key>pager_flex_deinterleave</key> <param> <key>id</key> - <value>blks2_rational_resampler_xxx_0</value> + <value>pager_flex_deinterleave_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(777, 1116)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_null_sink</key> + <param> + <key>id</key> + <value>gr_null_sink_0</value> </param> <param> <key>_enabled</key> @@ -1312,27 +1534,53 @@ </param> <param> <key>type</key> - <value>fff</value> + <value>int</value> </param> <param> - <key>decim</key> - <value>8</value> + <key>vlen</key> + <value>1</value> </param> <param> - <key>interp</key> - <value>5</value> + <key>_coordinate</key> + <value>(1042, 1116)</value> </param> <param> - <key>taps</key> - <value>[1.0/8.0,]*40</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>pager_flex_deinterleave</key> <param> - <key>fractional_bw</key> + <key>id</key> + <value>pager_flex_deinterleave_0_1_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(778, 1168)</value> + </param> + <param> + <key>_rotation</key> <value>0</value> </param> + </block> + <block> + <key>pager_flex_deinterleave</key> + <param> + <key>id</key> + <value>pager_flex_deinterleave_0_1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> <param> <key>_coordinate</key> - <value>(1029, 750)</value> + <value>(776, 1225)</value> </param> <param> <key>_rotation</key> @@ -1340,22 +1588,45 @@ </param> </block> <block> - <key>virtual_sink</key> + <key>pager_flex_deinterleave</key> <param> <key>id</key> - <value>virtual_sink_0</value> + <value>pager_flex_deinterleave_0_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>stream_id</key> - <value>baseband</value> + <key>_coordinate</key> + <value>(776, 1273)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_null_sink</key> + <param> + <key>id</key> + <value>gr_null_sink_0_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>int</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(1260, 774)</value> + <value>(1042, 1168)</value> </param> <param> <key>_rotation</key> @@ -1363,22 +1634,26 @@ </param> </block> <block> - <key>variable</key> + <key>gr_null_sink</key> <param> <key>id</key> - <value>baseband_rate</value> + <value>gr_null_sink_0_1</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>16000</value> + <key>type</key> + <value>int</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(1019, 17)</value> + <value>(1041, 1225)</value> </param> <param> <key>_rotation</key> @@ -1386,22 +1661,26 @@ </param> </block> <block> - <key>variable</key> + <key>gr_null_sink</key> <param> <key>id</key> - <value>nchan_taps</value> + <value>gr_null_sink_0_2</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>len(channel_taps)</value> + <key>type</key> + <value>int</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(412, 931)</value> + <value>(1040, 1273)</value> </param> <param> <key>_rotation</key> @@ -1428,43 +1707,97 @@ </connection> <connection> <source_block_id>gr_freq_xlating_fir_filter_xxx_0</source_block_id> - <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <sink_block_id>fm_demod</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_freq_xlating_fir_filter_xxx_0</source_block_id> - <sink_block_id>fm_demod</sink_block_id> + <source_block_id>resampler</source_block_id> + <sink_block_id>wxgui_scopesink2_0_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>fm_demod</source_block_id> - <sink_block_id>gr_moving_average_xx_0</sink_block_id> + <sink_block_id>resampler</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_moving_average_xx_0</source_block_id> - <sink_block_id>blks2_rational_resampler_xxx_0</sink_block_id> + <source_block_id>resampler</source_block_id> + <sink_block_id>virtual_sink_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_rational_resampler_xxx_0</source_block_id> - <sink_block_id>wxgui_scopesink2_0_0</sink_block_id> + <source_block_id>pager_slicer_fb_0</source_block_id> + <sink_block_id>pager_flex_sync_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>fm_demod</source_block_id> - <sink_block_id>blks2_rational_resampler_xxx_0</sink_block_id> + <source_block_id>virtual_source_0</source_block_id> + <sink_block_id>pager_slicer_fb_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_rational_resampler_xxx_0</source_block_id> - <sink_block_id>virtual_sink_0</sink_block_id> + <source_block_id>pager_slicer_fb_0</source_block_id> + <sink_block_id>gr_char_to_float_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_char_to_float_0</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_sync_0</source_block_id> + <sink_block_id>pager_flex_deinterleave_0_1_0</sink_block_id> + <source_key>1</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_sync_0</source_block_id> + <sink_block_id>pager_flex_deinterleave_0_1</sink_block_id> + <source_key>2</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_sync_0</source_block_id> + <sink_block_id>pager_flex_deinterleave_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_sync_0</source_block_id> + <sink_block_id>pager_flex_deinterleave_0_0</sink_block_id> + <source_key>3</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_deinterleave_0</source_block_id> + <sink_block_id>gr_null_sink_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_deinterleave_0_1_0</source_block_id> + <sink_block_id>gr_null_sink_0_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_deinterleave_0_1</source_block_id> + <sink_block_id>gr_null_sink_0_1</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>pager_flex_deinterleave_0_0</source_block_id> + <sink_block_id>gr_null_sink_0_2</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gr-pager/apps/usrp_rx_flex.py b/gr-pager/apps/usrp_rx_flex.py index cdc5da200..47bf5a3df 100755 --- a/gr-pager/apps/usrp_rx_flex.py +++ b/gr-pager/apps/usrp_rx_flex.py @@ -2,12 +2,13 @@ ################################################## # Gnuradio Python Flow Graph # Title: USRP FLEX Pager Receiver (Single Channel) -# Generated: Thu Oct 29 08:04:51 2009 +# Generated: Thu Oct 29 11:03:16 2009 ################################################## from gnuradio import blks2 from gnuradio import eng_notation from gnuradio import gr +from gnuradio import pager from gnuradio import window from gnuradio.eng_option import eng_option from gnuradio.gr import firdes @@ -64,10 +65,13 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self.rx_gain = rx_gain = saved_rx_gain self.offset = offset = saved_offset self.nchan_taps = nchan_taps = len(channel_taps) - self.ma_ntaps = ma_ntaps = channel_rate/symbol_rate + self.ma_ntaps = ma_ntaps = int(channel_rate/symbol_rate) self.freq_text = freq_text = freq self.demod_k = demod_k = 3*channel_rate/(2*math.pi*deviation) self.channel_decim = channel_decim = int(sample_rate/channel_rate) + self.bb_interp = bb_interp = 5 + self.bb_decim = bb_decim = 8 + self.baseband_rate = baseband_rate = 16000 ################################################## # Notebooks @@ -169,14 +173,24 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): ################################################## # Blocks ################################################## - self.blks2_rational_resampler_xxx_0 = blks2.rational_resampler_fff( - interpolation=5, - decimation=8, - taps=([1.0/8.0,]*40), - fractional_bw=None, - ) self.fm_demod = gr.quadrature_demod_cf(demod_k) self.gr_freq_xlating_fir_filter_xxx_0 = gr.freq_xlating_fir_filter_ccc(channel_decim, (channel_taps), band_freq-freq+offset, sample_rate) + self.gr_null_sink_0 = gr.null_sink(gr.sizeof_int*1) + self.gr_null_sink_0_0 = gr.null_sink(gr.sizeof_int*1) + self.gr_null_sink_0_1 = gr.null_sink(gr.sizeof_int*1) + self.gr_null_sink_0_2 = gr.null_sink(gr.sizeof_int*1) + self.pager_flex_deinterleave_0 = pager.flex_deinterleave() + self.pager_flex_deinterleave_0_0 = pager.flex_deinterleave() + self.pager_flex_deinterleave_0_1 = pager.flex_deinterleave() + self.pager_flex_deinterleave_0_1_0 = pager.flex_deinterleave() + self.pager_flex_sync_0 = pager.flex_sync() + self.pager_slicer_fb_0 = pager.slicer_fb(1e-6) + self.resampler = blks2.rational_resampler_fff( + interpolation=bb_interp, + decimation=bb_decim, + taps=([1.0/ma_ntaps,]*ma_ntaps*bb_interp), + fractional_bw=None, + ) self.usrp_source = grc_usrp.simple_source_c(which=0, side="A", rx_ant="RXA") self.usrp_source.set_decim_rate(decim) self.usrp_source.set_frequency(band_freq, verbose=True) @@ -213,18 +227,6 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): peak_hold=False, ) self.displays.GetPage(0).GridAdd(self.wxgui_fftsink2_1.win, 1, 0, 1, 1) - self.wxgui_scopesink2_0 = scopesink2.scope_sink_c( - self.displays.GetPage(1).GetWin(), - title="Channel Waveform", - sample_rate=channel_rate, - v_scale=8e3, - v_offset=0, - t_scale=20.0/channel_rate, - ac_couple=False, - xy_mode=False, - num_inputs=1, - ) - self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0.win, 0, 0, 1, 1) self.wxgui_scopesink2_0_0 = scopesink2.scope_sink_f( self.displays.GetPage(1).GetWin(), title="Baseband", @@ -236,7 +238,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): xy_mode=False, num_inputs=1, ) - self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0_0.win, 1, 0, 1, 1) + self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0_0.win, 0, 0, 1, 1) ################################################## # Connections @@ -244,10 +246,19 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self.connect((self.gr_freq_xlating_fir_filter_xxx_0, 0), (self.wxgui_fftsink2_1, 0)) self.connect((self.usrp_source, 0), (self.gr_freq_xlating_fir_filter_xxx_0, 0)) self.connect((self.usrp_source, 0), (self.wxgui_fftsink2_0, 0)) - self.connect((self.gr_freq_xlating_fir_filter_xxx_0, 0), (self.wxgui_scopesink2_0, 0)) self.connect((self.gr_freq_xlating_fir_filter_xxx_0, 0), (self.fm_demod, 0)) - self.connect((self.blks2_rational_resampler_xxx_0, 0), (self.wxgui_scopesink2_0_0, 0)) - self.connect((self.fm_demod, 0), (self.blks2_rational_resampler_xxx_0, 0)) + self.connect((self.resampler, 0), (self.wxgui_scopesink2_0_0, 0)) + self.connect((self.fm_demod, 0), (self.resampler, 0)) + self.connect((self.pager_slicer_fb_0, 0), (self.pager_flex_sync_0, 0)) + self.connect((self.resampler, 0), (self.pager_slicer_fb_0, 0)) + self.connect((self.pager_flex_sync_0, 1), (self.pager_flex_deinterleave_0_1_0, 0)) + self.connect((self.pager_flex_sync_0, 2), (self.pager_flex_deinterleave_0_1, 0)) + self.connect((self.pager_flex_sync_0, 0), (self.pager_flex_deinterleave_0, 0)) + self.connect((self.pager_flex_sync_0, 3), (self.pager_flex_deinterleave_0_0, 0)) + self.connect((self.pager_flex_deinterleave_0, 0), (self.gr_null_sink_0, 0)) + self.connect((self.pager_flex_deinterleave_0_1_0, 0), (self.gr_null_sink_0_0, 0)) + self.connect((self.pager_flex_deinterleave_0_1, 0), (self.gr_null_sink_0_1, 0)) + self.connect((self.pager_flex_deinterleave_0_0, 0), (self.gr_null_sink_0_2, 0)) def set_config_filename(self, config_filename): self.config_filename = config_filename @@ -279,7 +290,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): def set_symbol_rate(self, symbol_rate): self.symbol_rate = symbol_rate self.set_passband(2*(self.deviation+self.symbol_rate)) - self.set_ma_ntaps(self.channel_rate/self.symbol_rate) + self.set_ma_ntaps(int(self.channel_rate/self.symbol_rate)) def set_saved_channel(self, saved_channel): self.saved_channel = saved_channel @@ -315,12 +326,11 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): def set_channel_rate(self, channel_rate): self.channel_rate = channel_rate - self.wxgui_scopesink2_0.set_sample_rate(self.channel_rate) self.wxgui_fftsink2_1.set_sample_rate(self.channel_rate) self.set_channel_decim(int(self.sample_rate/self.channel_rate)) self.set_demod_k(3*self.channel_rate/(2*math.pi*self.deviation)) self.set_channel_taps(firdes.low_pass(10, self.sample_rate, self.passband/2.0, (self.channel_rate-self.passband)/2.0)) - self.set_ma_ntaps(self.channel_rate/self.symbol_rate) + self.set_ma_ntaps(int(self.channel_rate/self.symbol_rate)) def set_channel(self, channel): self.channel = channel @@ -407,6 +417,15 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): def set_channel_decim(self, channel_decim): self.channel_decim = channel_decim + def set_bb_interp(self, bb_interp): + self.bb_interp = bb_interp + + def set_bb_decim(self, bb_decim): + self.bb_decim = bb_decim + + def set_baseband_rate(self, baseband_rate): + self.baseband_rate = baseband_rate + if __name__ == '__main__': parser = OptionParser(option_class=eng_option, usage="%prog: [options]") (options, args) = parser.parse_args() diff --git a/gr-pager/grc/.gitignore b/gr-pager/grc/.gitignore new file mode 100644 index 000000000..70845e08e --- /dev/null +++ b/gr-pager/grc/.gitignore @@ -0,0 +1 @@ +Makefile.in diff --git a/gr-pager/grc/Makefile.am b/gr-pager/grc/Makefile.am new file mode 100644 index 000000000..8c84f89ac --- /dev/null +++ b/gr-pager/grc/Makefile.am @@ -0,0 +1,29 @@ +# +# Copyright 2009 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. +# + +include $(top_srcdir)/Makefile.common + +grcblocksdir = $(grc_blocksdir) + +dist_grcblocks_DATA = \ + pager_slicer_fb.xml \ + pager_flex_sync.xml \ + pager_flex_deinterleave.xml diff --git a/gr-pager/grc/pager_flex_deinterleave.xml b/gr-pager/grc/pager_flex_deinterleave.xml new file mode 100644 index 000000000..14e5782da --- /dev/null +++ b/gr-pager/grc/pager_flex_deinterleave.xml @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<!-- +################################################### +## FLEX Pager Deinterleaver +################################################### + --> +<block> + <name>FLEX Deinterleave</name> + <key>pager_flex_deinterleave</key> + <category>Pager</category> + <import>from gnuradio import pager</import> + <make>pager.flex_deinterleave()</make> + + <sink> + <name>bits</name> + <type>byte</type> + </sink> + + <source> + <name>codes</name> + <type>int</type> + </source> +</block> diff --git a/gr-pager/grc/pager_flex_sync.xml b/gr-pager/grc/pager_flex_sync.xml new file mode 100644 index 000000000..ec22321aa --- /dev/null +++ b/gr-pager/grc/pager_flex_sync.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- +################################################### +## FLEX Pager Synchronizer +################################################### + --> +<block> + <name>FLEX Synchronizer</name> + <key>pager_flex_sync</key> + <category>Pager</category> + <import>from gnuradio import pager</import> + <make>pager.flex_sync()</make> + + <sink> + <name>dibits</name> + <type>byte</type> + </sink> + + <source> + <name>A</name> + <type>byte</type> + </source> + <source> + <name>B</name> + <type>byte</type> + </source> + <source> + <name>C</name> + <type>byte</type> + </source> + <source> + <name>D</name> + <type>byte</type> + </source> + +</block> diff --git a/gr-pager/grc/pager_slicer_fb.xml b/gr-pager/grc/pager_slicer_fb.xml new file mode 100644 index 000000000..25642cb48 --- /dev/null +++ b/gr-pager/grc/pager_slicer_fb.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +################################################### +## FLEX Pager Slicer w/DC offset removal +################################################### + --> +<block> + <name>4-Level Slicer/DCR</name> + <key>pager_slicer_fb</key> + <category>Pager</category> + <import>from gnuradio import pager</import> + <make>pager.slicer_fb($alpha)</make> + + <param> + <name>Alpha</name> + <key>alpha</key> + <value>1e-6</value> + <type>real</type> + </param> + + <sink> + <name>bb</name> + <type>float</type> + </sink> + + <source> + <name>dibits</name> + <type>byte</type> + </source> + +</block> |