[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/12: digital: Allow for different lengths
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/12: digital: Allow for different lengths of pilot carrier- and -symbol allocations |
Date: |
Thu, 16 Jan 2014 20:33:25 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit c9c4ffc9153a2b57dd25451bdbcfc06991e1f24b
Author: Martin Braun <address@hidden>
Date: Wed Jan 15 16:14:17 2014 +0100
digital: Allow for different lengths of pilot carrier- and -symbol
allocations
---
.../include/gnuradio/digital/ofdm_carrier_allocator_cvc.h | 5 +++++
gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc | 14 +++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/gr-digital/include/gnuradio/digital/ofdm_carrier_allocator_cvc.h
b/gr-digital/include/gnuradio/digital/ofdm_carrier_allocator_cvc.h
index 1ea90a6..ab371a9 100644
--- a/gr-digital/include/gnuradio/digital/ofdm_carrier_allocator_cvc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_carrier_allocator_cvc.h
@@ -56,6 +56,11 @@ namespace gr {
* with negative numbers, or with indexes larger than \p fft_len/2. Index
-1 and index
* \p fft_len-1 both identify the carrier below the DC carrier.
*
+ * There are some basic checks in place during initialization which check
that the
+ * carrier allocation table is valid. However, it is possible to overwrite
data symbols
+ * with pilot symbols, or provide a carrier allocation that has
mismatching pilot symbol
+ * positions and -values.
+ *
* Tags are propagated such that a tag on an incoming complex symbol is
mapped to the
* corresponding OFDM symbol. There is one exception: If a tag is on the
first OFDM
* symbol, it is assumed that this tag should stay there, so it is moved
to the front
diff --git a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc
b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc
index 171fd95..7c094ab 100644
--- a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc
+++ b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc
@@ -87,9 +87,6 @@ namespace gr {
}
}
for (unsigned i = 0; i < d_pilot_carriers.size(); i++) {
- if (d_pilot_carriers[i].size() != pilot_symbols[i].size()) {
- throw std::invalid_argument("pilot_carriers do not match
pilot_symbols");
- }
for (unsigned j = 0; j < d_pilot_carriers[i].size(); j++) {
if (d_pilot_carriers[i][j] < 0) {
d_pilot_carriers[i][j] += d_fft_len;
@@ -102,6 +99,11 @@ namespace gr {
}
}
}
+ for (unsigned i = 0; i < std::max(d_pilot_carriers.size(),
d_pilot_symbols.size()); i++) {
+ if (d_pilot_carriers[i % d_pilot_carriers.size()].size() !=
d_pilot_symbols[i % d_pilot_symbols.size()].size()) {
+ throw std::invalid_argument("pilot_carriers do not match
pilot_symbols");
+ }
+ }
for (unsigned i = 0; i < d_sync_words.size(); i++) {
if (d_sync_words[i].size() != (unsigned) d_fft_len) {
throw std::invalid_argument("sync words must be fft length");
@@ -180,12 +182,10 @@ namespace gr {
}
}
// Copy pilot symbols
- curr_set = 0;
for (int i = 0; i < n_ofdm_symbols; i++) {
- for (unsigned k = 0; k < d_pilot_carriers[curr_set].size(); k++) {
- out[i * d_fft_len + d_pilot_carriers[curr_set][k]] =
d_pilot_symbols[curr_set][k];
+ for (unsigned k = 0; k < d_pilot_carriers[i %
d_pilot_carriers.size()].size(); k++) {
+ out[i * d_fft_len + d_pilot_carriers[i % d_pilot_carriers.size()][k]]
= d_pilot_symbols[i % d_pilot_symbols.size()][k];
}
- curr_set = (curr_set + 1) % d_pilot_carriers.size();
}
return n_ofdm_symbols + d_sync_words.size();
- [Commit-gnuradio] [gnuradio] branch master updated (f7f28bb -> 67aa043), git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 09/12: Merge remote-tracking branch 'softerhardware/master', git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 06/12: volk: add 32f_invsqrt_32f avx proto kernel, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 04/12: digital: Allow for different lengths of pilot carrier- and -symbol allocations,
git <=
- [Commit-gnuradio] [gnuradio] 12/12: Merge remote-tracking branch 'martin/ofdm-fixes', git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 01/12: Support for >1 jack port, various sizes of jack buffers, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 03/12: digital: allow to change packet length tag name in GRC, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 08/12: volk: add 32fc_32f_multiply_32fc_a_avx protokernel, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 07/12: volk: add 32fc_32f_dot_prod_32fc u/a_avx protokernel, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 05/12: modtool: linkage info for OSX, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 11/12: Merge remote-tracking branch 'martin/modtool_osx', git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 02/12: digital: propagate tags to packet_header, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 10/12: Merge remote-tracking branch 'nwest/volk_avx', git, 2014/01/16