Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from UPV #49

Open
wants to merge 14 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added PDSCH EVM measurement, deleted BER
jsroldan committed Mar 13, 2023
commit f990bf32fe3713846ffe7be55f5aba8e3a3b7087
1 change: 1 addition & 0 deletions src/CasFrameProcessor.cpp
Original file line number Diff line number Diff line change
@@ -150,6 +150,7 @@ auto CasFrameProcessor::process(uint32_t tti) -> bool {
_rest._pdsch.errors++;
} else {
spdlog::debug("Decoded PDSCH");
_rest._pdsch.evm_rms = pdsch_res[0].evm; // evm of the first codeword
for (int i = 0; i < SRSRAN_MAX_CODEWORDS; i++) {
// .. and pass received PDUs to RLC for further processing
if (pdsch_cfg->grant.tb[i].enabled && pdsch_res[i].crc) {
1 change: 1 addition & 0 deletions src/RestHandler.h
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ class RestHandler {
bool present = false;
int mcs = 0;
double ber;
float evm_rms = 0.0f;
unsigned total = 1;
unsigned errors = 0;
private:
18 changes: 8 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -591,18 +591,18 @@ auto main(int argc, char **argv) -> int {
spdlog::info("CINR {:.2f} dB", rest_handler.cinr_db() );
cols.push_back(std::to_string(rest_handler.cinr_db()));

spdlog::info("PDSCH: MCS {}, BLER {}, BER {}",
spdlog::info("PDSCH: MCS {}, BLER {}, EVM {}, CFO {}",
rest_handler._pdsch.mcs,
((rest_handler._pdsch.errors * 1.0) / (rest_handler._pdsch.total * 1.0)),
rest_handler._pdsch.ber);
rest_handler._pdsch.evm_rms,
phy.cfo());
cols.push_back(std::to_string(rest_handler._pdsch.mcs));
cols.push_back(std::to_string(((rest_handler._pdsch.errors * 1.0) / (rest_handler._pdsch.total * 1.0))));
cols.push_back(std::to_string(rest_handler._pdsch.ber));
cols.push_back(std::to_string(rest_handler._pdsch.evm_rms));

spdlog::info("MCCH: MCS {}, BLER {}, BER {}",
spdlog::info("MCCH: MCS {}, BLER {}",
rest_handler._mcch.mcs,
((rest_handler._mcch.errors * 1.0) / (rest_handler._mcch.total * 1.0)),
rest_handler._mcch.ber);
((rest_handler._mcch.errors * 1.0) / (rest_handler._mcch.total * 1.0)));

cols.push_back(std::to_string(rest_handler._mcch.mcs));
cols.push_back(std::to_string(((rest_handler._mcch.errors * 1.0) / (rest_handler._mcch.total * 1.0))));
@@ -611,15 +611,13 @@ auto main(int argc, char **argv) -> int {
auto mch_info = phy.mch_info();
int mch_idx = 0;
std::for_each(std::begin(mch_info), std::end(mch_info), [&cols, &mch_idx, &rest_handler](Phy::mch_info_t const& mch) {
spdlog::info("MCH {}: MCS {}, BLER {}, BER {}",
spdlog::info("MCH {}: MCS {}, BLER {}",
mch_idx,
mch.mcs,
(rest_handler._mch[mch_idx].errors * 1.0) / (rest_handler._mch[mch_idx].total * 1.0),
rest_handler._mch[mch_idx].ber);
(rest_handler._mch[mch_idx].errors * 1.0) / (rest_handler._mch[mch_idx].total * 1.0));
cols.push_back(std::to_string(mch_idx));
cols.push_back(std::to_string(mch.mcs));
cols.push_back(std::to_string((rest_handler._mch[mch_idx].errors * 1.0) / (rest_handler._mch[mch_idx].total * 1.0)));
cols.push_back(std::to_string(rest_handler._mch[mch_idx].ber));

int mtch_idx = 0;
std::for_each(std::begin(mch.mtchs), std::end(mch.mtchs), [&mtch_idx](Phy::mtch_info_t const& mtch) {