Agora  1.2.0
Agora project
DataGenerator Class Reference

Building blocks for generating end-to-end or unit test workloads for Agora. More...

#include <data_generator.h>

Collaboration diagram for DataGenerator:

Public Types

enum  Profile { Profile::kRandom, Profile::kProfile123 }
 

Public Member Functions

 DataGenerator (Config *cfg, uint64_t seed=0, Profile profile=Profile::kRandom)
 
void DoDataGeneration (const std::string &directory)
 
void GenMacData (MacPacketPacked *mac, size_t ue_id)
 Generate random Mac payload bit sequence. More...
 
void GenRawData (Direction dir, std::vector< int8_t > &information, size_t ue_id)
 Generate one raw information bit sequence. More...
 
void GenCodeblock (Direction dir, const int8_t *input_ptr, std::vector< int8_t > &encoded_codeword)
 Generate the encoded bit sequence for one code block for the active LDPC configuration from the input bit sequence. More...
 
std::vector< complex_floatGetModulation (const std::vector< int8_t > &encoded_codeword)
 Return the output of modulating the encoded codeword. More...
 
std::vector< complex_floatGetDLModulation (const std::vector< int8_t > &encoded_codeword, complex_float *pilot_seq)
 
std::vector< complex_floatGetModulation (const int8_t *encoded_codeword, size_t num_bits)
 
std::vector< complex_floatBinForIfft (const std::vector< complex_float > &modulated_codeword) const
 An array with OfdmDataNum() elements with the OfdmDataNum() modulated elements binned at the center. More...
 
std::vector< complex_floatGetCommonPilotTimeDomain () const
 Return the time-domain pilot symbol with OfdmCaNum complex floats. More...
 

Private Attributes

FastRand fast_rand_
 
Configcfg_
 
const Profile profile_
 

Detailed Description

Building blocks for generating end-to-end or unit test workloads for Agora.

Member Enumeration Documentation

◆ Profile

Enumerator
kRandom 
kProfile123 

Constructor & Destructor Documentation

◆ DataGenerator()

DataGenerator::DataGenerator ( Config cfg,
uint64_t  seed = 0,
Profile  profile = Profile::kRandom 
)
inlineexplicit

Member Function Documentation

◆ BinForIfft()

std::vector<complex_float> DataGenerator::BinForIfft ( const std::vector< complex_float > &  modulated_codeword) const
inline

An array with OfdmDataNum() elements with the OfdmDataNum() modulated elements binned at the center.

Parameters
modulated_codewordThe modulated codeword with OfdmDataNum() elements
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDataGeneration()

void DataGenerator::DoDataGeneration ( const std::string &  directory)

◆ GenCodeblock()

void DataGenerator::GenCodeblock ( Direction  dir,
const int8_t *  input_ptr,
std::vector< int8_t > &  encoded_codeword 
)
inline

Generate the encoded bit sequence for one code block for the active LDPC configuration from the input bit sequence.

Parameters
input_ptrThe input bit sequence to be encoded
encoded_codewordThe generated encoded codeword bit sequence
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenMacData()

void DataGenerator::GenMacData ( MacPacketPacked mac,
size_t  ue_id 
)
inline

Generate random Mac payload bit sequence.

Parameters
informationThe generated input bit sequence
ue_idID of the UE that this codeblock belongs to
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenRawData()

void DataGenerator::GenRawData ( Direction  dir,
std::vector< int8_t > &  information,
size_t  ue_id 
)
inline

Generate one raw information bit sequence.

Parameters
informationThe generated input bit sequence
ue_idID of the UE that this codeblock belongs to
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCommonPilotTimeDomain()

std::vector<complex_float> DataGenerator::GetCommonPilotTimeDomain ( ) const
inline

Return the time-domain pilot symbol with OfdmCaNum complex floats.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDLModulation()

std::vector<complex_float> DataGenerator::GetDLModulation ( const std::vector< int8_t > &  encoded_codeword,
complex_float pilot_seq 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetModulation() [1/2]

std::vector<complex_float> DataGenerator::GetModulation ( const int8_t *  encoded_codeword,
size_t  num_bits 
)
inline
Here is the call graph for this function:

◆ GetModulation() [2/2]

std::vector<complex_float> DataGenerator::GetModulation ( const std::vector< int8_t > &  encoded_codeword)
inline

Return the output of modulating the encoded codeword.

Parameters
encoded_codewordThe encoded LDPC codeword bit sequence
Returns
An array of complex floats with OfdmDataNum() elements
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ cfg_

Config* DataGenerator::cfg_
private

◆ fast_rand_

FastRand DataGenerator::fast_rand_
private

◆ profile_

const Profile DataGenerator::profile_
private

The documentation for this class was generated from the following files: