[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7051 - in gnuradio/branches/developers/trondeau/ofdm2
From: |
trondeau |
Subject: |
[Commit-gnuradio] r7051 - in gnuradio/branches/developers/trondeau/ofdm2: gnuradio-core/src/python/gnuradio/blks2impl gnuradio-examples/python/ofdm |
Date: |
Wed, 28 Nov 2007 10:04:29 -0700 (MST) |
Author: trondeau
Date: 2007-11-28 10:04:28 -0700 (Wed, 28 Nov 2007)
New Revision: 7051
Modified:
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/benchmark_ofdm.py
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/receive_path.py
Log:
Slight work-around of small bug. Loopback OFDM benchmark works with hier_block2
in this commit; only works with PN correlator synchronization routine; have not
yet converted the others.
Modified:
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
===================================================================
---
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
2007-11-28 17:03:03 UTC (rev 7050)
+++
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
2007-11-28 17:04:28 UTC (rev 7051)
@@ -1,4 +1,4 @@
-
+#!/usr/bin/env python
#
# Copyright 2006,2007 Free Software Foundation, Inc.
#
@@ -115,6 +115,10 @@
if options.log:
self.connect(self._pkt_input,
gr.file_sink(gr.sizeof_gr_complex*options.fft_length,
"ofdm_mapper_c.dat"))
+ self.connect(self.ifft,
gr.file_sink(gr.sizeof_gr_complex*options.fft_length,
+ "ofdm_ifft_c.dat"))
+ self.connect(self.cp_adder, gr.file_sink(gr.sizeof_gr_complex,
+ "ofdm_cp_adder_c.dat"))
def send_pkt(self, payload='', eof=False):
"""
@@ -182,7 +186,7 @@
"""
gr.hier_block2.__init__(self, "ofdm_demod",
gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature(0, 0, 0)) #
Output signature
+ gr.io_signature(1, 1, gr.sizeof_gr_complex)) #
Output signature
self._rcvd_pktq = gr.msg_queue() # holds packets from the PHY
@@ -193,7 +197,6 @@
self._cp_length = options.cp_length
self._snr = options.snr
-
# Use freq domain to get doubled-up known symbol for correlation in
time domain
ksfreq = known_symbols_4512_3[0:self._occupied_tones]
for i in range(len(ksfreq)):
@@ -240,12 +243,15 @@
self.connect((self.ofdm_recv, 0), (self.ofdm_demod, 0))
self.connect((self.ofdm_recv, 1), (self.ofdm_demod, 1))
+ # added output signature to work around bug, though it might not be a
bad
+ # thing to export, anyway
+ self.connect(self.ofdm_recv.chan_filt, self)
+
if options.verbose:
self._print_verbage()
self._watcher = _queue_watcher_thread(self._rcvd_pktq, callback)
-
def add_options(normal, expert):
"""
Adds OFDM-specific options to the Options Parser
Modified:
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
===================================================================
---
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
2007-11-28 17:03:03 UTC (rev 7050)
+++
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
2007-11-28 17:04:28 UTC (rev 7051)
@@ -57,9 +57,9 @@
@type logging: bool
"""
- gr.hier_block2.__init__(self, "ofdm_demod",
+ gr.hier_block2.__init__(self, "ofdm_receiver",
gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature2(2, 2,
gr.sizeof_gr_complex*occupied_tones, gr.sizeof_char)) # Output signature
+ gr.io_signature2(2, 2,
gr.sizeof_gr_complex*occupied_tones, gr.sizeof_char)) # Output signature
bw = (float(occupied_tones) / float(fft_length)) / 2.0
tb = bw*0.08
@@ -82,13 +82,14 @@
self.ofdm_sync = ofdm_sync_pn(fft_length, cp_length, logging)
self.fft_demod = gr.fft_vcc(fft_length, True, win, True)
- self.ofdm_corr = gr.ofdm_correlator(occupied_tones, fft_length,
- cp_length, ks[1], ks[2])
+ self.ofdm_corr = gr.ofdm_correlator(occupied_tones, fft_length,
+ cp_length, ks[1], ks[2])
self.connect(self, self.chan_filt)
self.connect(self.chan_filt, self.ofdm_sync, self.fft_demod,
self.ofdm_corr)
- self.connect(self.ofdm_corr, self)
-
+ self.connect((self.ofdm_corr,0), (self,0))
+ self.connect((self.ofdm_corr,1), (self,1))
+
if logging:
self.connect(self.chan_filt, gr.file_sink(gr.sizeof_gr_complex,
"chan_filt_c.dat"))
self.connect(self.fft_demod,
gr.file_sink(gr.sizeof_gr_complex*fft_length, "fft_out_c.dat"))
Modified:
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/benchmark_ofdm.py
===================================================================
---
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/benchmark_ofdm.py
2007-11-28 17:03:03 UTC (rev 7050)
+++
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/benchmark_ofdm.py
2007-11-28 17:04:28 UTC (rev 7051)
@@ -69,20 +69,22 @@
self.zeros = gr.vector_source_c(z, True)
self.txpath = transmit_path(options)
- self.mux = gr.stream_mux(gr.sizeof_gr_complex, stream_size)
+ #self.mux = gr.stream_mux(gr.sizeof_gr_complex, stream_size)
self.throttle = gr.throttle(gr.sizeof_gr_complex, options.sample_rate)
- self.channel = blks2.channel_model(noise_voltage, frequency_offset,
- options.clockrate_ratio, taps)
+ #self.channel = blks2.channel_model(noise_voltage, frequency_offset,
+ # options.clockrate_ratio, taps)
self.rxpath = receive_path(callback, options)
- self.connect(self.zeros, (self.mux,0))
- self.connect(self.txpath, (self.mux,1))
- self.connect(self.mux, self.throttle, self.channel, self.rxpath)
-
+ #self.connect(self.zeros, (self.mux,0))
+ #self.connect(self.txpath, (self.mux,1))
+ #self.connect(self.mux, self.throttle, self.channel, self.rxpath)
+ #self.connect(self.mux, self.throttle, self.rxpath)
+ self.connect(self.txpath, self.throttle, self.rxpath)
+
if options.log:
self.connect(self.txpath, gr.file_sink(gr.sizeof_gr_complex,
"txpath.dat"))
- self.connect(self.mux, gr.file_sink(gr.sizeof_gr_complex,
"mux.dat"))
- self.connect(self.channel, gr.file_sink(gr.sizeof_gr_complex,
"channel.dat"))
+ #self.connect(self.mux, gr.file_sink(gr.sizeof_gr_complex,
"mux.dat"))
+ #self.connect(self.channel, gr.file_sink(gr.sizeof_gr_complex,
"channel.dat"))
# /////////////////////////////////////////////////////////////////////////////
# main
Modified:
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/receive_path.py
===================================================================
---
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/receive_path.py
2007-11-28 17:03:03 UTC (rev 7050)
+++
gnuradio/branches/developers/trondeau/ofdm2/gnuradio-examples/python/ofdm/receive_path.py
2007-11-28 17:04:28 UTC (rev 7051)
@@ -57,7 +57,7 @@
self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha)
self.connect(self, self.ofdm_rx)
- self.connect(self.ofdm_rx.ofdm_recv.chan_filt, self.probe)
+ self.connect(self.ofdm_rx, self.probe)
# Display some information about the setup
if self._verbose:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7051 - in gnuradio/branches/developers/trondeau/ofdm2: gnuradio-core/src/python/gnuradio/blks2impl gnuradio-examples/python/ofdm,
trondeau <=