Addressing MR review comments
- OPENAIR_DIR replaced with AWGN_RESULTS_DIR - Copying UCI_2_3_4 PDU with rx'd PDU from proxy - Reverting hacks/whitespace changes
This commit is contained in:
@@ -552,50 +552,43 @@ int main( int argc, char **argv ) {
|
||||
}
|
||||
|
||||
// Read in each MCS file and build BLER-SINR-TB table
|
||||
static void init_bler_table(void)
|
||||
{
|
||||
const char *openair_dir = getenv("OPENAIR_DIR");
|
||||
if (!openair_dir)
|
||||
{
|
||||
LOG_E(MAC, "No $OPENAIR_DIR\n");
|
||||
abort();
|
||||
static void init_bler_table(void) {
|
||||
memset(nr_bler_data, 0, sizeof(nr_bler_data));
|
||||
|
||||
const char *awgn_results_dir = getenv("AWGN_RESULTS_DIR");
|
||||
if (!awgn_results_dir) {
|
||||
LOG_W(NR_MAC, "No $AWGN_RESULTS_DIR\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < NR_NUM_MCS; i++)
|
||||
{
|
||||
for (unsigned int i = 0; i < NR_NUM_MCS; i++) {
|
||||
char fName[1024];
|
||||
snprintf(fName, sizeof(fName), "%s/openair1/SIMULATION/NR_PHY/BLER_SIMULATIONS/AWGN/AWGN_results/mcs%d_awgn_5G.csv", openair_dir, i);
|
||||
snprintf(fName, sizeof(fName), "%s/mcs%d_awgn_5G.csv", awgn_results_dir, i);
|
||||
FILE *pFile = fopen(fName, "r");
|
||||
if (!pFile)
|
||||
{
|
||||
LOG_E(MAC, "Bler File ERROR! - fopen(), file: %s\n", fName);
|
||||
abort();
|
||||
if (!pFile) {
|
||||
LOG_E(NR_MAC, "%s: open %s: %s\n", __func__, fName, strerror(errno));
|
||||
continue;
|
||||
}
|
||||
size_t bufSize = 1024;
|
||||
char * line = NULL;
|
||||
char * token;
|
||||
char * temp = NULL;
|
||||
int nlines = 0;
|
||||
while (getline(&line, &bufSize, pFile) > 0)
|
||||
{
|
||||
if (!strncmp(line, "SNR", 3))
|
||||
{
|
||||
while (getline(&line, &bufSize, pFile) > 0) {
|
||||
if (!strncmp(line, "SNR", 3)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nlines > NUM_SINR)
|
||||
{
|
||||
LOG_E(MAC, "BLER FILE ERROR - num lines greater than expected - file: %s\n", fName);
|
||||
if (nlines > NUM_SINR) {
|
||||
LOG_E(NR_MAC, "BLER FILE ERROR - num lines greater than expected - file: %s\n", fName);
|
||||
abort();
|
||||
}
|
||||
|
||||
token = strtok_r(line, ";", &temp);
|
||||
int ncols = 0;
|
||||
while (token != NULL)
|
||||
{
|
||||
if (ncols > NUM_BLER_COL)
|
||||
{
|
||||
LOG_E(MAC, "BLER FILE ERROR - num of cols greater than expected\n");
|
||||
while (token != NULL) {
|
||||
if (ncols > NUM_BLER_COL) {
|
||||
LOG_E(NR_MAC, "BLER FILE ERROR - num of cols greater than expected\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
@@ -787,8 +787,8 @@ int phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
|
||||
if (ind_pdu->harq) {
|
||||
uci_ind_pdu->harq = CALLOC(1, sizeof(*uci_ind_pdu->harq));
|
||||
AssertFatal(uci_ind_pdu->harq != NULL, "Memory not allocated for uci_ind_pdu->harq in phy_nr_uci_indication.");
|
||||
|
||||
*uci_ind_pdu->harq = *ind_pdu->harq;
|
||||
|
||||
uci_ind_pdu->harq->harq_list = CALLOC(uci_ind_pdu->harq->num_harq, sizeof(*uci_ind_pdu->harq->harq_list));
|
||||
AssertFatal(uci_ind_pdu->harq->harq_list != NULL, "Memory not allocated for uci_ind_pdu->harq->harq_list in phy_nr_uci_indication.");
|
||||
for (int j = 0; j < uci_ind_pdu->harq->num_harq; j++)
|
||||
@@ -800,6 +800,7 @@ int phy_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
|
||||
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: {
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_ind_pdu = &uci_ind->uci_list[i].pucch_pdu_format_2_3_4;
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *ind_pdu = &ind->uci_list[i].pucch_pdu_format_2_3_4;
|
||||
*uci_ind_pdu = *ind_pdu;
|
||||
if (ind_pdu->harq.harq_payload) {
|
||||
uci_ind_pdu->harq.harq_payload = CALLOC(1, sizeof(*uci_ind_pdu->harq.harq_payload));
|
||||
AssertFatal(uci_ind_pdu->harq.harq_payload != NULL, "Memory not allocated for uci_ind_pdu->harq.harq_payload in phy_nr_uci_indication.");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
export OPENAIR_HOME=$(pwd)
|
||||
export OPENAIR_DIR=$(pwd)
|
||||
export AWGN_RESULTS_DIR=$OPENAIR_DIR/openair1/SIMULATION/NR_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
|
||||
export OPENAIR1_DIR=$OPENAIR_HOME/openair1
|
||||
export OPENAIR2_DIR=$OPENAIR_HOME/openair2
|
||||
export OPENAIR3_DIR=$OPENAIR_HOME/openair3
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3; dci_err
|
||||
16.000000;27;15840;0.704000;5002;5002;0;0;0;0;0;0;0
|
||||
16.100000;27;15840;0.704000;5002;5002;0;0;0;0;0;0;0
|
||||
16.200000;27;15840;0.704000;5002;5002;0;0;0;0;0;0;0
|
||||
16.300000;27;15840;0.704000;5002;5002;0;0;0;0;0;0;0
|
||||
16.400000;27;15840;0.704000;4999;5002;0;0;0;0;0;0;0
|
||||
16.500000;27;15840;0.704000;4981;5002;0;0;0;0;0;0;0
|
||||
16.600000;27;15840;0.704000;4887;5002;0;0;0;0;0;0;0
|
||||
16.700000;27;15840;0.704000;4688;5002;0;0;0;0;0;0;0
|
||||
16.800000;27;15840;0.704000;4176;5002;0;0;0;0;0;0;0
|
||||
16.900000;27;15840;0.704000;3340;5002;0;0;0;0;0;0;0
|
||||
17.000000;27;15840;0.704000;2386;5002;0;0;0;0;0;0;0
|
||||
17.100000;27;15840;0.704000;1510;5002;0;0;0;0;0;0;0
|
||||
17.200000;27;15840;0.704000;1000;5552;0;0;0;0;0;0;0
|
||||
17.300000;27;15840;0.704000;926;10000;0;0;0;0;0;0;0
|
||||
17.400000;27;15840;0.704000;516;10000;0;0;0;0;0;0;0
|
||||
17.500000;27;15840;0.704000;287;10000;0;0;0;0;0;0;0
|
||||
17.600000;27;15840;0.704000;198;10000;0;0;0;0;0;0;0
|
||||
17.700000;27;15840;0.704000;135;10000;0;0;0;0;0;0;0
|
||||
17.800000;27;15840;0.704000;102;10000;0;0;0;0;0;0;0
|
||||
17.900000;27;15840;0.704000;94;10000;0;0;0;0;0;0;0
|
||||
|
@@ -1650,13 +1650,9 @@ int nr_acknack_scheduling(int mod_id,
|
||||
/* we need to find a new PUCCH occasion */
|
||||
|
||||
/*(Re)Inizialization of timing information*/
|
||||
/* TODO: This is something of a hack. The last condition in the
|
||||
if statement below was added. OAI is looking into this and is
|
||||
expected to provide a solution. Without the hack, the gNB will
|
||||
incorrectly schedule more than 2 ACK/nACKs in a single SFN/Slot. */
|
||||
if ((pucch->frame == 0 && pucch->ul_slot == 0) ||
|
||||
((pucch->frame*n_slots_frame + pucch->ul_slot) <
|
||||
(frame * n_slots_frame + slot)) && (frame != 1023)) {
|
||||
(frame*n_slots_frame + slot))) {
|
||||
AssertFatal(pucch->sr_flag + pucch->dai_c == 0,
|
||||
"expected no SR/AckNack for UE %d in %4d.%2d, but has %d/%d for %4d.%2d\n",
|
||||
UE_id, frame, slot, pucch->sr_flag, pucch->dai_c, pucch->frame, pucch->ul_slot);
|
||||
|
||||
Reference in New Issue
Block a user