diff options
-rw-r--r-- | config/grc_vrt.m4 | 13 | ||||
-rw-r--r-- | gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py | 7 | ||||
-rw-r--r-- | gnuradio-examples/python/pfb/Makefile.am | 3 | ||||
-rw-r--r-- | gnuradio-examples/python/pfb/resampler_demo.grc | 598 | ||||
-rw-r--r-- | grc/blocks/Makefile.am | 1 | ||||
-rw-r--r-- | grc/blocks/blks2_pfb_arb_resampler.xml | 42 | ||||
-rw-r--r-- | grc/blocks/block_tree.xml | 2 | ||||
-rw-r--r-- | omnithread/Makefile.am | 3 | ||||
-rw-r--r-- | omnithread/README | 2 |
9 files changed, 666 insertions, 5 deletions
diff --git a/config/grc_vrt.m4 b/config/grc_vrt.m4 index d473c5581..982c8863a 100644 --- a/config/grc_vrt.m4 +++ b/config/grc_vrt.m4 @@ -34,6 +34,19 @@ AC_DEFUN([GRC_VRT],[ VRT_LA="\${abs_top_builddir}/vrt/lib/libvrt.la" fi + # Test host OS compatibility + AC_MSG_CHECKING([whether host_os is linux*]) + case "$host_os" in + linux*) + AC_MSG_RESULT([yes]) + ;; + *) + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([libvrt currently requires Linux host OS, not found]) + passed="no" + ;; + esac + dnl Include the vrt INCLUDES and LA AC_SUBST(VRT_INCLUDES) AC_SUBST(VRT_LA) diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py index b1b3dfcab..e40d9636a 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py @@ -24,7 +24,7 @@ from gnuradio import gr class pfb_arb_resampler_ccf(gr.hier_block2): ''' - Convinience wrapper for the polyphase filterbank arbitrary resampler. + Convenience wrapper for the polyphase filterbank arbitrary resampler. The block takes a single complex stream in and outputs a single complex stream out. As such, it requires no extra glue to handle the input/output @@ -45,6 +45,5 @@ class pfb_arb_resampler_ccf(gr.hier_block2): self.connect(self, self.pfb) self.connect(self.pfb, self) - - - + def set_taps(self, taps): + self.pfb.set_taps(taps) diff --git a/gnuradio-examples/python/pfb/Makefile.am b/gnuradio-examples/python/pfb/Makefile.am index 4aa9248ea..0b91d0a2d 100644 --- a/gnuradio-examples/python/pfb/Makefile.am +++ b/gnuradio-examples/python/pfb/Makefile.am @@ -29,3 +29,6 @@ dist_ourdata_SCRIPTS = \ decimate.py \ interpolate.py \ fmtest.py + +dist_ourdata_DATA = \ + resampler_demo.grc diff --git a/gnuradio-examples/python/pfb/resampler_demo.grc b/gnuradio-examples/python/pfb/resampler_demo.grc new file mode 100644 index 000000000..468636a5c --- /dev/null +++ b/gnuradio-examples/python/pfb/resampler_demo.grc @@ -0,0 +1,598 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sun Aug 23 11:39:47 2009</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>resampler_demo</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value></value> + </param> + <param> + <key>author</key> + <value></value> + </param> + <param> + <key>description</key> + <value></value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>import</key> + <param> + <key>id</key> + <value>import_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>import</key> + <value>import math</value> + </param> + <param> + <key>_coordinate</key> + <value>(11, 59)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>rs_taps</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>firdes.low_pass(nphases, nphases, frac_bw, 0.5-frac_bw)</value> + </param> + <param> + <key>_coordinate</key> + <value>(273, 154)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_add_const_vxx</key> + <param> + <key>id</key> + <value>adder</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>const</key> + <value>-1.0</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(227, 303)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>throttle</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>samples_per_second</key> + <value>samp_rate</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(227, 493)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>orig_fft</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Original Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>30</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 3</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(409, 289)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>resamp_fft</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Resampled Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>new_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>30</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>True</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>grid_pos</key> + <value>2, 0, 1, 3</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(640, 256)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>gr_sig_source_x</key> + <param> + <key>id</key> + <value>tri_source</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>waveform</key> + <value>gr.GR_TRI_WAVE</value> + </param> + <param> + <key>freq</key> + <value>0.05</value> + </param> + <param> + <key>amp</key> + <value>2.0</value> + </param> + <param> + <key>offset</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(21, 271)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_frequency_modulator_fc</key> + <param> + <key>id</key> + <value>fm_mod</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>sensitivity</key> + <value>math.pi</value> + </param> + <param> + <key>_coordinate</key> + <value>(411, 493)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_pfb_arb_resampler_ccf</key> + <param> + <key>id</key> + <value>resampler</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>rate</key> + <value>float(new_rate)/samp_rate</value> + </param> + <param> + <key>taps</key> + <value>rs_taps</value> + </param> + <param> + <key>size</key> + <value>nphases</value> + </param> + <param> + <key>_coordinate</key> + <value>(641, 477)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>nphases</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>32</value> + </param> + <param> + <key>_coordinate</key> + <value>(185, 153)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_static_text</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>44100</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>formatter</key> + <value>None</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(179, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_static_text</key> + <param> + <key>id</key> + <value>new_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Resampled Rate</value> + </param> + <param> + <key>value</key> + <value>48000</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>formatter</key> + <value>None</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 1, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(328, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_static_text</key> + <param> + <key>id</key> + <value>frac_bw</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Fractional Bandwidth</value> + </param> + <param> + <key>value</key> + <value>0.45</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>formatter</key> + <value>lambda x: "%0.2f"%x</value> + </param> + <param> + <key>grid_pos</key> + <value>0,2,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(473, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>tri_source</source_block_id> + <sink_block_id>adder</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>adder</source_block_id> + <sink_block_id>throttle</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>resampler</source_block_id> + <sink_block_id>resamp_fft</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>fm_mod</source_block_id> + <sink_block_id>resampler</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>fm_mod</source_block_id> + <sink_block_id>orig_fft</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>throttle</source_block_id> + <sink_block_id>fm_mod</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am index fbd8f4bb4..caae6ce75 100644 --- a/grc/blocks/Makefile.am +++ b/grc/blocks/Makefile.am @@ -45,6 +45,7 @@ dist_ourdata_DATA = \ blks2_ofdm_mod.xml \ blks2_packet_decoder.xml \ blks2_packet_encoder.xml \ + blks2_pfb_arb_resampler.xml \ blks2_qamx_demod.xml \ blks2_qamx_mod.xml \ blks2_rational_resampler_xxx.xml \ diff --git a/grc/blocks/blks2_pfb_arb_resampler.xml b/grc/blocks/blks2_pfb_arb_resampler.xml new file mode 100644 index 000000000..062b0dd98 --- /dev/null +++ b/grc/blocks/blks2_pfb_arb_resampler.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Polyphase Arbitrary Resampler +################################################### + --> +<block> + <name>Polyphase Resampler</name> + <key>blks2_pfb_arb_resampler_ccf</key> + <import>from gnuradio import blks2</import> + <import>from gnuradio.gr import firdes</import> + <make>blks2.pfb_arb_resampler_ccf( + $rate, + $taps, + $size, +)</make> + <callback>set_taps($taps)</callback> + <param> + <name>Resample Rate</name> + <key>rate</key> + <type>real</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>real_vector</type> + </param> + <param> + <name>Size (# phases)</name> + <key>size</key> + <value>32</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index 2cedb45a2..5b45466f5 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -176,6 +176,8 @@ <!-- Filter banks --> <block>blks2_synthesis_filterbank</block> <block>blks2_analysis_filterbank</block> + <!-- Polyphase filers --> + <block>blks2_pfb_arb_resampler_ccf</block> <!-- Other filters --> <block>gr_single_pole_iir_filter_xx</block> <block>gr_hilbert_fc</block> diff --git a/omnithread/Makefile.am b/omnithread/Makefile.am index 88df2714d..291cc8beb 100644 --- a/omnithread/Makefile.am +++ b/omnithread/Makefile.am @@ -67,4 +67,5 @@ EXTRA_DIST = \ solaris.cc \ threaddata.cc \ vxWorks.cc \ - dir.mk + dir.mk \ + README diff --git a/omnithread/README b/omnithread/README new file mode 100644 index 000000000..1943d0ed5 --- /dev/null +++ b/omnithread/README @@ -0,0 +1,2 @@ +The code in this directory is deprecated, please use the Boost thread +library for new code. |