Josh Sanz [email protected]
The cyclic prefix block can add or remove cyclic prefixes from OFDM symbols.
It uses the pktStart
and pktEnd
flags to determine where symbols occur for alignment purposes.
When removing prefixes, the block simply drops the first prefixLength
samples it receives and
passes the next symbolLength
samples in a cycle.
When adding prefixes, the block first buffers in symbolLength
samples. It then sends out the
final prefixLength
samples of the buffer, then flushes the buffer from the beginning.
An example with prefixLength
=2 and symbolLength
=6 is shown below
Add = True
|-------------|
fedcba --> |Cyclic Prefix| --> fedcbafe
|-------------|
Add = False
|-------------|
fedcbafe --> |Cyclic Prefix| --> fedcba
|-------------|
protoIQ: DspComplex[T]
- prototype for IQ dataprefixLength: Int
- number of samples in the prefix/guard interval of an OFDM symbolsymbolLength: Int
- number of samples in an OFDM symbol
Decoupled interface
add: Bool
- block will add cyclic prefixes when true and remove them when false; the flag should only be changed between packetsiq: Vec[DspComplex[T]]
- incoming IQ, vector has width 1pktStart: Bool
- packet start flagpktEnd: Bool
- packet end flag
Decoupled interface
iq: Vec[DspComplex[T]]
- outgoing IQ, vector has width 1pktStart: Bool
- packet start flagpktEnd: Bool
- packet end flag
sbt test
The block's tests include whether it
- Removes the prefix from a single symbol
- Removes the prefixes from multiple symbols
- Adds a prefix to a single symbol
- Adds a prefix to multiple symbols
- Can switch between adding and removing prefixes betwen packets