diff options
author | Maximilian Stiefel <stiefel.maximilian@online.de> | 2020-01-07 17:03:59 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-08 10:19:44 -0800 |
commit | 445aa4792dcdf4a8bf14600e6d931451e36f0eaa (patch) | |
tree | 8a011d807a5f30fdf8cac945b5ba294a0937d5af /gr-digital/include | |
parent | 90c49ef6d4d215f1db01f591d682947fea727655 (diff) |
digital: ofdm: Allow multiple CP lengths for cyclic prefixer
This allows to specify multiple CP lengths that can be used one
after another, for example for LTE modulators.
- Improve sanity checking
- Maintains old API
Diffstat (limited to 'gr-digital/include')
-rw-r--r-- | gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h b/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h index f0f0d16097..be4c1e1e77 100644 --- a/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h +++ b/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2013 Free Software Foundation, Inc. + * Copyright 2013, 2018 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -30,7 +30,7 @@ namespace gr { namespace digital { /*! - * \brief Adds a cyclic prefix and performs pulse shaping on OFDM symbols. + * \brief Adds a cyclic prefix and performs optional pulse shaping on OFDM symbols. * \ingroup ofdm_blk * * \details @@ -45,6 +45,19 @@ namespace digital { * the pulse shaping. * * The pulse shape is a raised cosine in the time domain. + * + * Different CP lengths as for instance needed in LTE are supported. This + * is why one of the inputs is std::vector<int>. After every CP given has + * been prepended to symbols, each with the length of the IFFT operation, + * the mechanism will wrap around and start over. To give an example, the + * input tuple for LTE with an FFT length of 2048 would be (160,) + + * (144,)*6, which is equal to (160, 144, 144, 144, 144, 144, 144). A + * uniform CP would be indicated by (uniform_cp_length, ). + * + * This block does some sanity checking: 1. It is not allowed to have a + * vector of CP lengths, which are only 0. 2. Not a single CP in the + * vector must be longer than the rolloff. 3. Not a single CP is allowed to + * be < 0. */ class DIGITAL_API ofdm_cyclic_prefixer : virtual public tagged_stream_block { @@ -52,15 +65,26 @@ public: typedef boost::shared_ptr<ofdm_cyclic_prefixer> sptr; /*! - * \param input_size FFT length (i.e. length of the OFDM symbols) - * \param output_size FFT length + cyclic prefix length (in samples) - * \param rolloff_len Length of the rolloff flank in samples - * \param len_tag_key For framed processing the key of the length tag + * \param input_size IFFT length (i.e. length of the OFDM symbols). + * \param output_size FFT length + cyclic prefix length (in samples). + * \param rolloff_len Length of the rolloff flank in samples. + * \param len_tag_key For framed processing the key of the length tag. */ static sptr make(size_t input_size, size_t output_size, int rolloff_len = 0, const std::string& len_tag_key = ""); + + /*! + * \param fft_len IFFT length (i.e. length of the OFDM symbols). + * \param cp_lengths CP lengths. Wraps around after reaching the end. + * \param rolloff_len Length of the rolloff flank in samples. + * \param len_tag_key For framed processing the key of the length tag. + */ + static sptr make(int fft_len, + const std::vector<int>& cp_lengths, + int rolloff_len = 0, + const std::string& len_tag_key = ""); }; } // namespace digital |