From edccb986916cd0fb648659cc398c027b869e5237 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 17 Feb 2021 20:16:03 +0000 Subject: [PATCH 01/94] First draft implementation of CBRA --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 17 +++++++++++++---- openair2/LAYER2/NR_MAC_UE/config_ue.c | 12 +++++++----- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 14 ++++++++++++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 12 ++++++++---- openair2/RRC/NR/rrc_gNB_reconfig.c | 11 ++++++++--- 5 files changed, 48 insertions(+), 18 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index b5a3c061e9..231c9c8cc0 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -678,10 +678,19 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, } else { - preamble_shift -= NCS; - - if (preamble_shift < 0) - preamble_shift+=N_ZC; + + // FIXME: It is working, but we need to differentiate between odd and even preamble index + // Check why preamble_shift does not match with UE + // TS 38.211 Section 6.3.3.1 Sequence generation + if(preamble_index%2==0) { + preamble_shift = (NCS==0)? 0 : (preamble_index % (N_ZC/NCS)); + preamble_shift *= NCS; + } else { + preamble_shift -= 2*NCS; + if (preamble_shift < 0) + preamble_shift+=N_ZC; + } + } } else { // This is the high-speed case new_dft = 0; diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index f6bd5436bc..63a3dc7897 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -529,11 +529,13 @@ int nr_rrc_mac_config_req_ue( mac->servCellIndex = *cell_group_config->spCellConfig->servCellIndex; config_control_ue(mac); if (cell_group_config->spCellConfig->reconfigurationWithSync) { - ra->rach_ConfigDedicated = cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink; - mac->scc = cell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon; - config_common_ue(mac,module_id,cc_idP); - mac->crnti = cell_group_config->spCellConfig->reconfigurationWithSync->newUE_Identity; - LOG_I(MAC,"Configuring CRNTI %x\n",mac->crnti); + if (cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated) { + ra->rach_ConfigDedicated = cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink; + } + mac->scc = cell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon; + config_common_ue(mac,module_id,cc_idP); + mac->crnti = cell_group_config->spCellConfig->reconfigurationWithSync->newUE_Identity; + LOG_I(MAC,"Configuring CRNTI %x\n",mac->crnti); } // Setup the SSB to Rach Occasions mapping according to the config diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 61b5efe39c..aa68bd1ef2 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -79,8 +79,8 @@ void init_RA(module_id_t mod_id, if (rach_ConfigDedicated) { if (rach_ConfigDedicated->cfra){ - LOG_I(MAC, "Initialization of 4-step contention-free random access procedure\n"); - prach_resources->RA_TYPE = RA_4STEP; + LOG_I(MAC, "Initialization of 2-step contention-free random access procedure\n"); + prach_resources->RA_TYPE = RA_2STEP; ra->cfra = 1; } else if (rach_ConfigDedicated->ext1){ if (rach_ConfigDedicated->ext1->cfra_TwoStep_r16){ @@ -93,6 +93,10 @@ void init_RA(module_id_t mod_id, } else { LOG_E(MAC, "In %s: config not handled\n", __FUNCTION__); } + } else if (nr_rach_ConfigCommon){ + LOG_I(MAC, "Initialization of 4-step contention-based random access procedure\n"); + prach_resources->RA_TYPE = RA_4STEP; + ra->cfra = 0; } else { LOG_E(MAC, "In %s: config not handled\n", __FUNCTION__); } @@ -366,6 +370,12 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + ((taus()) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); ra->RA_usedGroupA = 0; } + + // TODO: Remove to generate random ra_PreambleIndex + printf("prach_resources->ra_PreambleIndex = %i\n", prach_resources->ra_PreambleIndex); + prach_resources->ra_PreambleIndex = 21; + ra->RA_usedGroupA = 1; + } else { // Msg3 is being retransmitted if (ra->RA_usedGroupA && noGroupB) { prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % ra->cb_preambles_per_ssb); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 2b78788e53..037b0f16af 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -454,11 +454,15 @@ void nr_initiate_ra_proc(module_id_t module_idP, // if the preamble received correspond to one of the listed // the UE sent a RACH either for starting RA procedure or RA procedure failed and UE retries int pr_found=0; - for (int i = 0; i < ra->preambles.num_preambles; i++) { - if (preamble_index == ra->preambles.preamble_list[i]) { - pr_found=1; - break; + if(ra->preambles.num_preambles > 0) { + for (int i = 0; i < ra->preambles.num_preambles; i++) { + if (preamble_index == ra->preambles.preamble_list[i]) { + pr_found=1; + break; + } } + } else { + pr_found=1; } if (!pr_found) { diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 4fc4d8c023..95dcfcc3e8 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -226,7 +226,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->spCellConfig->reconfigurationWithSync->t304=NR_ReconfigurationWithSync__t304_ms2000; secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated = NULL; secondaryCellGroup->spCellConfig->reconfigurationWithSync->ext1 = NULL; - /* contention free ra */ + + // For 2-step contention-free random access procedure +#if 0 secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated = calloc(1,sizeof(struct NR_ReconfigurationWithSync__rach_ConfigDedicated)); secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->present= NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink; secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink= calloc(1,sizeof(struct NR_RACH_ConfigDedicated)); @@ -240,12 +242,13 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.present = NR_CFRA__resources_PR_ssb; secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb = calloc(1,sizeof(struct NR_CFRA__resources__ssb)); secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ra_ssb_OccasionMaskIndex = 0; + struct NR_CFRA_SSB_Resource *ssbElem[8]; + ssbElem[0] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); ssbElem[0]->ssb = 0; ssbElem[0]->ra_PreambleIndex = 63; ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[0]); -#if 0 ssbElem[1] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); ssbElem[1]->ssb = 1; ssbElem[1]->ra_PreambleIndex = 62; @@ -274,8 +277,10 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ssbElem[7]->ssb = 7; ssbElem[7]->ra_PreambleIndex = 63; ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[7]); -#endif + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->ext1 = NULL; +#endif + secondaryCellGroup->spCellConfig->rlf_TimersAndConstants = calloc(1,sizeof(*secondaryCellGroup->spCellConfig->rlf_TimersAndConstants)); secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->present = NR_SetupRelease_RLF_TimersAndConstants_PR_setup; secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup=calloc(1,sizeof(*secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup)); From a6136177375f220d1e7835c5352917607df5494f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 21 Feb 2021 04:05:29 +0000 Subject: [PATCH 02/94] Fix preamble shift at gNB for RA works with all preambles --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 15 ++---- openair2/LAYER2/NR_MAC_UE/mac_defs.h | 2 + openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 49 ++++++++++---------- 3 files changed, 29 insertions(+), 37 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 231c9c8cc0..0c1fde07a2 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -678,19 +678,10 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, } else { + preamble_shift -= NCS; - // FIXME: It is working, but we need to differentiate between odd and even preamble index - // Check why preamble_shift does not match with UE - // TS 38.211 Section 6.3.3.1 Sequence generation - if(preamble_index%2==0) { - preamble_shift = (NCS==0)? 0 : (preamble_index % (N_ZC/NCS)); - preamble_shift *= NCS; - } else { - preamble_shift -= 2*NCS; - if (preamble_shift < 0) - preamble_shift+=N_ZC; - } - + if (preamble_shift < 0) + preamble_shift+=((N_ZC/NCS)*NCS); } } else { // This is the high-speed case new_dft = 0; diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index dd0aa15c52..cf157e108a 100755 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -257,6 +257,8 @@ typedef struct { uint8_t RA_attempt_number; /// Random-access procedure flag uint8_t RA_active; + /// Random-access preamble index + int ra_PreambleIndex; /// Flag for the Msg1 generation: enabled at every occurrence of nr prach slot uint8_t generate_nr_prach; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index aa68bd1ef2..0b600d2b4c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -64,6 +64,8 @@ void init_RA(module_id_t mod_id, RA_config_t *ra = &mac->ra; ra->RA_active = 1; + ra->ra_PreambleIndex = -1; + ra->RA_usedGroupA = 1; ra->RA_RAPID_found = 0; ra->preambleTransMax = 0; ra->first_Msg3 = 1; @@ -251,7 +253,7 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t int messageSizeGroupA = 0; int sizeOfRA_PreamblesGroupA = 0; int messagePowerOffsetGroupB = 0; - int PLThreshold; + int PLThreshold = 0; long deltaPreamble_Msg3 = 0; uint8_t noGroupB = 0; RA_config_t *ra = &mac->ra; @@ -354,37 +356,34 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t } /* Msg3 has not been transmitted yet */ if (ra->first_Msg3) { - if (noGroupB) { - // use Group A preamble - prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % ra->cb_preambles_per_ssb); - ra->RA_usedGroupA = 1; - } else if ((ra->Msg3_size < messageSizeGroupA) && (dl_pathloss > PLThreshold)) { - // Group B is configured and RA preamble Group A is used - // - todo add condition on CCCH_sdu_size for initiation by CCCH - prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % sizeOfRA_PreamblesGroupA); - ra->RA_usedGroupA = 1; - } else { - // Group B preamble is configured and used - // the first sizeOfRA_PreamblesGroupA RA preambles belong to RA Preambles Group A - // the remaining belong to RA Preambles Group B - prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + ((taus()) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); - ra->RA_usedGroupA = 0; + if(ra->ra_PreambleIndex < 0 || ra->ra_PreambleIndex > 63) { + if (noGroupB) { + // use Group A preamble + ra->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % ra->cb_preambles_per_ssb); + ra->RA_usedGroupA = 1; + } else if ((ra->Msg3_size < messageSizeGroupA) && (dl_pathloss > PLThreshold)) { + // Group B is configured and RA preamble Group A is used + // - todo add condition on CCCH_sdu_size for initiation by CCCH + ra->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % sizeOfRA_PreamblesGroupA); + ra->RA_usedGroupA = 1; + } else { + // Group B preamble is configured and used + // the first sizeOfRA_PreamblesGroupA RA preambles belong to RA Preambles Group A + // the remaining belong to RA Preambles Group B + ra->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + ((taus()) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); + ra->RA_usedGroupA = 0; + } } - - // TODO: Remove to generate random ra_PreambleIndex - printf("prach_resources->ra_PreambleIndex = %i\n", prach_resources->ra_PreambleIndex); - prach_resources->ra_PreambleIndex = 21; - ra->RA_usedGroupA = 1; - } else { // Msg3 is being retransmitted if (ra->RA_usedGroupA && noGroupB) { - prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % ra->cb_preambles_per_ssb); + ra->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % ra->cb_preambles_per_ssb); } else if (ra->RA_usedGroupA && !noGroupB){ - prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % sizeOfRA_PreamblesGroupA); + ra->ra_PreambleIndex = ra->starting_preamble_nb + ((taus()) % sizeOfRA_PreamblesGroupA); } else { - prach_resources->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + ((taus()) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); + ra->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + ((taus()) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); } } + prach_resources->ra_PreambleIndex = ra->ra_PreambleIndex; } // RA-RNTI computation (associated to PRACH occasion in which the RA Preamble is transmitted) From 23695a52d7a916f124d56a0dccb2e80620fe5967 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 22 Feb 2021 14:30:04 +0000 Subject: [PATCH 03/94] Fix stored node --- targets/ARCH/rfsimulator/stored_node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/ARCH/rfsimulator/stored_node.c b/targets/ARCH/rfsimulator/stored_node.c index dcea69b9dd..8b0b397995 100644 --- a/targets/ARCH/rfsimulator/stored_node.c +++ b/targets/ARCH/rfsimulator/stored_node.c @@ -186,14 +186,14 @@ int main(int argc, char *argv[]) { serviceSock=client_start(argv[2],atoi(argv[3])); } - uint64_t typeStamp=ENB_MAGICDL_FDD; + uint64_t typeStamp=ENB_MAGICDL; boolean_t raw=false; if ( argc == 5 ) { raw=true; if (strcmp(argv[4],"UL") == 0 ) - typeStamp=UE_MAGICDL_FDD; + typeStamp=UE_MAGICDL; } samplesBlockHeader_t header; From 31cf9ab84760eea32a49f959420d46ef6645d286 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 23 Feb 2021 02:22:27 +0000 Subject: [PATCH 04/94] Fix ra->rnti --- openair1/PHY/defs_gNB.h | 1 + openair2/LAYER2/NR_MAC_gNB/config.c | 7 +++++++ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 20 ++++++++++--------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index b7923adb0b..f3f212effb 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -655,6 +655,7 @@ typedef struct { int prach_I0; } PHY_MEASUREMENTS_gNB; +#define TOTAL_NUM_NR_PRACH_PREAMBLES 64 #define MAX_NUM_NR_RX_RACH_PDUS 4 #define MAX_NUM_NR_RX_PRACH_PREAMBLES 4 #define MAX_UL_PDUS_PER_SLOT 8 diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 6aa906b82b..6f6ea8a327 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -416,6 +416,13 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, for (int i = 0; i < num_preamble; i++) ra->preambles.preamble_list[i] = cfra.resources.choice.ssb->ssb_ResourceList.list.array[i]->ra_PreambleIndex; } + } else { + ra->cfra = false; + ra->rnti = rnti; + ra->preambles.num_preambles = TOTAL_NUM_NR_PRACH_PREAMBLES; + ra->preambles.preamble_list = (uint8_t *) malloc(TOTAL_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); + for (int i = 0; i < TOTAL_NUM_NR_PRACH_PREAMBLES; i++) + ra->preambles.preamble_list[i] = i; } LOG_I(PHY,"Added new RA process for UE RNTI %04x with initial secondaryCellGroup\n", rnti); } else { // secondaryCellGroup has been updated diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 037b0f16af..0b3492ccdc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -454,15 +454,11 @@ void nr_initiate_ra_proc(module_id_t module_idP, // if the preamble received correspond to one of the listed // the UE sent a RACH either for starting RA procedure or RA procedure failed and UE retries int pr_found=0; - if(ra->preambles.num_preambles > 0) { - for (int i = 0; i < ra->preambles.num_preambles; i++) { - if (preamble_index == ra->preambles.preamble_list[i]) { - pr_found=1; - break; - } + for (int i = 0; i < ra->preambles.num_preambles; i++) { + if (preamble_index == ra->preambles.preamble_list[i]) { + pr_found=1; + break; } - } else { - pr_found=1; } if (!pr_found) { @@ -487,7 +483,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, preamble_index, freq_index, symbol); - int loop = 0; + LOG_D(MAC, "Frame %d, Slot %d: Activating RA process \n", frameP, slotP); ra->state = Msg2; ra->timing_offset = timing_offset; @@ -514,6 +510,10 @@ void nr_initiate_ra_proc(module_id_t module_idP, ra->Msg2_slot = msg2_slot; LOG_I(MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP); + + // TODO: Configure RRC with the new RNTI of the following commented lines + /* + int loop = 0; if (!ra->cfra) { do { ra->rnti = (taus() % 65518) + 1; @@ -525,6 +525,8 @@ void nr_initiate_ra_proc(module_id_t module_idP, abort(); } } + */ + ra->RA_rnti = ra_rnti; ra->preamble_index = preamble_index; ra->beam_id = beam_index; From 9d72f65e9c7e692bd52a3c839e95b181dfb292a4 Mon Sep 17 00:00:00 2001 From: Laurent Thomas Date: Tue, 23 Feb 2021 13:58:14 +0100 Subject: [PATCH 05/94] small fix --- openair1/PHY/TOOLS/nr_phy_scope.c | 11 +++++++---- openair1/PHY/defs_gNB.h | 2 +- targets/ARCH/rfsimulator/stored_node.c | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index cb61523852..d78e0ffaa2 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -38,10 +38,7 @@ int otg_enabled; const FL_COLOR rx_antenna_colors[4] = {FL_RED,FL_BLUE,FL_GREEN,FL_YELLOW}; const FL_COLOR water_colors[4] = {FL_BLUE,FL_GREEN,FL_YELLOW,FL_RED}; -typedef struct { - int16_t r; - int16_t i; -} scopeSample_t; +typedef struct complex16 scopeSample_t; #define SquaredNorm(VaR) ((VaR).r*(VaR).r+(VaR).i*(VaR).i) typedef struct OAIgraph { @@ -546,6 +543,12 @@ static void *scope_thread_gNB(void *arg) { pthread_attr_init(&atr); pthread_attr_getstacksize(&atr, &stksize); pthread_attr_setstacksize(&atr,32*1024*1024 ); + p.gNB->scopeData=calloc(sizeof(nrscope_t)); + nrscope_t scope=(nrscope_t*) p.gNB->scopeData; + scope->rxdataF=(int32_t **)malloc16(Prx*sizeof(int32_t*)); + for (int i=0; i < p.gNB->gNB_config.carrier_config.num_rx_ant.value; ; i++) + scope->rxdataF[i] = (scopeSample_t*)malloc16_clear(p->gNB.frme_parms.samples_per_frame_wCP*sizeof(scopeSample_t)); + sleep(3); // no clean interthread barriers int fl_argc=1; char *name="5G-gNB-scope"; diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index b7923adb0b..e0b9d2153e 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -833,7 +833,7 @@ typedef struct PHY_VARS_gNB_s { tpool_t *threadPool; int nbDecode; uint8_t pusch_proc_threads; - + void * scopeData; } PHY_VARS_gNB; typedef struct LDPCDecode_s { diff --git a/targets/ARCH/rfsimulator/stored_node.c b/targets/ARCH/rfsimulator/stored_node.c index dcea69b9dd..8b0b397995 100644 --- a/targets/ARCH/rfsimulator/stored_node.c +++ b/targets/ARCH/rfsimulator/stored_node.c @@ -186,14 +186,14 @@ int main(int argc, char *argv[]) { serviceSock=client_start(argv[2],atoi(argv[3])); } - uint64_t typeStamp=ENB_MAGICDL_FDD; + uint64_t typeStamp=ENB_MAGICDL; boolean_t raw=false; if ( argc == 5 ) { raw=true; if (strcmp(argv[4],"UL") == 0 ) - typeStamp=UE_MAGICDL_FDD; + typeStamp=UE_MAGICDL; } samplesBlockHeader_t header; From aacf75b298f4af192508bae10885c3444888f1a0 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 24 Feb 2021 02:54:53 +0000 Subject: [PATCH 06/94] Transmission and reception of a fake RA-Msg4 --- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 5 +- .../NR_MAC_UE/nr_ue_dci_configuration.c | 28 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 80 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 635 +++++++++++++++++- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 19 + .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 9 +- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 15 + 7 files changed, 756 insertions(+), 35 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 61d63f0f5a..71b3502c1a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -481,6 +481,7 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, uint // start contention resolution timer ra->RA_contention_resolution_cnt = (nr_rach_ConfigCommon->ra_ContentionResolutionTimer + 1) * 8; ra->RA_contention_resolution_timer_active = 1; + ra->ra_state = WAIT_CONTENTION_RESOLUTION; } @@ -536,7 +537,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, } } - if (prach_resources->init_msg1) { + if (prach_resources->init_msg1 && ra->ra_state != RA_SUCCEEDED) { if (ra->RA_active == 0) { /* RA not active - checking if RRC is ready to initiate the RA procedure */ @@ -625,7 +626,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, if (ra->RA_window_cnt >= 0 && ra->RA_RAPID_found == 1) { // Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213) - nr_ra_succeeded(mod_id, frame, nr_slot_tx); + //nr_ra_succeeded(mod_id, frame, nr_slot_tx); } else if (ra->RA_window_cnt == 0 && !ra->RA_RAPID_found) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 11edc6c20d..6ada79a675 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -153,6 +153,16 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t case NR_RNTI_CS: break; case NR_RNTI_TC: + // we use the initial DL BWP + sps = initialDownlinkBWP->genericParameters.cyclicPrefix == NULL ? 14 : 12; + monitoringSymbolsWithinSlot = (ss->monitoringSymbolsWithinSlot->buf[0]<<(sps-8)) | (ss->monitoringSymbolsWithinSlot->buf[1]>>(16-sps)); + rel15->rnti = ra->t_crnti; + //rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + //rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + rel15->BWPSize = NRRIV2BW(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing; + rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id); break; case NR_RNTI_SP_CSI: break; @@ -245,14 +255,18 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl if (ss->searchSpaceId == *pdcch_ConfigCommon->choice.setup->ra_SearchSpace){ switch(ra->ra_state){ case WAIT_RAR: - LOG_D(MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space\n"); - rel15->num_dci_options = 1; - rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; - config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, ss_id); - fill_dci_search_candidates(ss, rel15); - break; + LOG_D(NR_MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space (RA-Msg2)\n"); + rel15->num_dci_options = 1; + rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; + config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, ss_id); + fill_dci_search_candidates(ss, rel15); + break; case WAIT_CONTENTION_RESOLUTION: - LOG_E(MAC, "In %s: CB-RA not implemented yet. Should not have fallen in this case.\n", __FUNCTION__); + LOG_D(NR_MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space (RA-Msg4)\n"); + rel15->num_dci_options = 1; + rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; + config_dci_pdu(mac, rel15, dl_config, NR_RNTI_TC, ss_id); + fill_dci_search_candidates(ss, rel15); break; default: break; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 250cf856bc..a27ce36831 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -73,10 +73,10 @@ int get_rnti_type(NR_UE_MAC_INST_t *mac, uint16_t rnti){ if (rnti == ra->ra_rnti) { rnti_type = NR_RNTI_RA; + } else if (rnti == ra->t_crnti && ra->ra_state == WAIT_CONTENTION_RESOLUTION) { + rnti_type = NR_RNTI_TC; } else if (rnti == mac->crnti) { rnti_type = NR_RNTI_C; - } else if (rnti == ra->t_crnti) { - rnti_type = NR_RNTI_TC; } else if (rnti == 0xFFFE) { rnti_type = NR_RNTI_P; } else if (rnti == 0xFFFF) { @@ -515,9 +515,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr // Config PUSCH PDU ret = nr_config_pusch_pdu(mac, pusch_config_pdu, dci, NULL, rnti, &dci_format); - if (ret != -1 && ra->RA_active && mac->crnti){ - nr_ra_succeeded(module_id, frame, slot); - } + //if (ret != -1 && ra->RA_active && mac->crnti){ + // nr_ra_succeeded(module_id, frame, slot); + //} } @@ -578,9 +578,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr // Config PUSCH PDU ret = nr_config_pusch_pdu(mac, pusch_config_pdu, dci, NULL, rnti, &dci_format); - if (ret != -1 && ra->RA_active && mac->crnti){ - nr_ra_succeeded(module_id, frame, slot); - } + //if (ret != -1 && ra->RA_active && mac->crnti){ + // nr_ra_succeeded(module_id, frame, slot); + //} } @@ -661,6 +661,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; BWPSize = n_RB_DLBWP; + + if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) + pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); } /* IDENTIFIER_DCI_FORMATS */ @@ -770,6 +773,13 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr LOG_D(MAC,"(nr_ue_procedures.c) pdu_type=%d\n\n",dl_config->dl_config_list[dl_config->number_pdus].pdu_type); dl_config->number_pdus = dl_config->number_pdus + 1; + + // FIXME: Remove this + if (ra->ra_state == WAIT_CONTENTION_RESOLUTION && rnti == ra->t_crnti){ + LOG_I(NR_MAC,"RA-Msg4 was received\n"); + nr_ra_succeeded(module_id, frame, slot); + } + break; } @@ -1105,7 +1115,6 @@ int get_n_rb(NR_UE_MAC_INST_t *mac, int rnti_type){ int N_RB = 0, start_RB; switch(rnti_type) { case NR_RNTI_RA: - case NR_RNTI_TC: case NR_RNTI_P: { NR_BWP_Id_t dl_bwp_id = mac->DL_BWP_Id; if (mac->DLbwp[dl_bwp_id-1]->bwp_Common->pdcch_ConfigCommon->choice.setup->controlResourceSetZero) { @@ -1120,6 +1129,7 @@ int get_n_rb(NR_UE_MAC_INST_t *mac, int rnti_type){ case NR_RNTI_SI: N_RB = mac->type0_PDCCH_CSS_config.num_rbs; break; + case NR_RNTI_TC: case NR_RNTI_C: N_RB = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); break; @@ -1392,39 +1402,71 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; case NR_RNTI_TC: - // indicating a DL DCI format 1bit + + // indicating a DL DCI format - 1 bit pos++; dci_pdu_rel15->format_indicator = (*dci_pdu>>(dci_size-pos))&1; + // Freq domain assignment 0-16 bit fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) ); pos+=fsize; dci_pdu_rel15->frequency_domain_assignment.val = (*dci_pdu>>(dci_size-pos))&((1<time_domain_assignment.val = (*dci_pdu>>(dci_size-pos))&0xf; - // VRB to PRB mapping 1 bit + + // VRB to PRB mapping - 1 bit + pos++; dci_pdu_rel15->vrb_to_prb_mapping.val = (*dci_pdu>>(dci_size-pos))&1; + // MCS 5bit //bit over 32, so dci_pdu ++ pos+=5; dci_pdu_rel15->mcs = (*dci_pdu>>(dci_size-pos))&0x1f; - // New data indicator 1bit + + // New data indicator - 1 bit + pos++; dci_pdu_rel15->ndi = (*dci_pdu>>(dci_size-pos))&1; - // Redundancy version 2bit + + // Redundancy version - 2 bits pos+=2; dci_pdu_rel15->rv = (*dci_pdu>>(dci_size-pos))&3; - // HARQ process number 4bit + + // HARQ process number - 4 bits pos+=4; dci_pdu_rel15->harq_pid = (*dci_pdu>>(dci_size-pos))&0xf; - // Downlink assignment index  E2 bits + + // Downlink assignment index - 2 bits pos+=2; dci_pdu_rel15->dai[0].val = (*dci_pdu>>(dci_size-pos))&3; - // TPC command for scheduled PUCCH  E2 bits + + // TPC command for scheduled PUCCH - 2 bits pos+=2; dci_pdu_rel15->tpc = (*dci_pdu>>(dci_size-pos))&3; - // PDSCH-to-HARQ_feedback timing indicator  E3 bits + + // PUCCH resource indicator - 3 bits + pos+=3; + dci_pdu_rel15->pucch_resource_indicator = (*dci_pdu>>(dci_size-pos))&7; + + // PDSCH-to-HARQ_feedback timing indicator - 3 bits pos+=3; dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val = (*dci_pdu>>(dci_size-pos))&7; - + + LOG_D(NR_MAC,"N_RB = %i\n", N_RB); + LOG_D(NR_MAC,"dci_size = %i\n", dci_size); + LOG_D(NR_MAC,"fsize = %i\n", fsize); + LOG_D(NR_MAC,"dci_pdu_rel15->format_indicator = %i\n", dci_pdu_rel15->format_indicator); + LOG_D(NR_MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val); + LOG_D(NR_MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val); + LOG_D(NR_MAC,"dci_pdu_rel15->vrb_to_prb_mapping.val = %i\n", dci_pdu_rel15->vrb_to_prb_mapping.val); + LOG_D(NR_MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs); + LOG_D(NR_MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv); + LOG_D(NR_MAC,"dci_pdu_rel15->harq_pid = %i\n", dci_pdu_rel15->harq_pid); + LOG_D(NR_MAC,"dci_pdu_rel15->dai[0].val = %i\n", dci_pdu_rel15->dai[0].val); + LOG_D(NR_MAC,"dci_pdu_rel15->tpc = %i\n", dci_pdu_rel15->tpc); + LOG_D(NR_MAC,"dci_pdu_rel15->pucch_resource_indicator = %i\n", dci_pdu_rel15->pucch_resource_indicator); + LOG_D(NR_MAC,"dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val = %i\n", dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val); + break; } break; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 0b3492ccdc..e3c9d23c04 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -568,10 +568,10 @@ void nr_schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t slotP){ nr_generate_Msg2(module_idP, CC_id, frameP, slotP); break; case Msg4: - //generate_Msg4(module_idP, CC_id, frameP, slotP); + nr_generate_Msg4(module_idP, CC_id, frameP, slotP); break; case WAIT_Msg4_ACK: - //check_Msg4_retransmission(module_idP, CC_id, frameP, slotP); + nr_check_Msg4_Ack(module_idP, CC_id, frameP, slotP); break; default: break; @@ -1013,6 +1013,637 @@ void nr_generate_Msg2(module_id_t module_idP, } } +/*void nr_get_retransmission_timing(frame_t *frameP, sub_frame_t *subframeP) { + *frameP = (*frameP + 1) % 1024; + *subframeP = *subframeP; + return; +}*/ + +void nr_generate_Msg4(module_id_t module_idP, + int CC_id, + frame_t frameP, + sub_frame_t slotP) { + + gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; + NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; + NR_RA_t *ra = &cc->ra[0]; + + if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) { + + int mcsIndex = 0; + int startSymbolAndLength = 0; + int StartSymbolIndex = -1; + int NrOfSymbols = 14; + int StartSymbolIndex_tmp = 0; + int NrOfSymbols_tmp = 0; + int x_Overhead = 0; + int time_domain_assignment = 0; + long locationAndBandwidth = 0; + uint8_t nr_of_candidates = 0; + uint8_t aggregation_level = 0; + + NR_SearchSpace_t *ss = ra->ra_ss; + NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; + + // check if UE is doing RA on CORESET0 , InitialBWP or configured BWP from SCD + // get the BW of the PDCCH for PDCCH size and Msg4 PDSCH size + + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + int dci10_bw; + + if (ra->coreset0_configured == 1) { + AssertFatal(1==0,"This is a standalone condition\n"); + } + else { // on configured BWP or initial LDBWP, bandwidth parameters in DCI correspond size of initialBWP + //locationAndBandwidth = scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth; + locationAndBandwidth = bwp->bwp_Common->genericParameters.locationAndBandwidth; + dci10_bw = NRRIV2BW(locationAndBandwidth, MAX_BWP_SIZE); + } + + nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; + // Checking if the DCI allocation is feasible in current subframe + if (dl_req->nPDUs > NFAPI_NR_MAX_DL_TTI_PDUS - 2) { + LOG_I(NR_MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, ra->rnti); + return; + } + + find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss); + NR_ControlResourceSet_t *coreset = get_coreset(bwp, ss, 0 /* common */); + int CCEIndex = allocate_nr_CCEs(nr_mac, + bwp, + coreset, + aggregation_level, + 0, + 0, + nr_of_candidates); + + if (CCEIndex < 0) { + LOG_E(NR_MAC, "%s(): cannot find free CCE for RNTI %04x!\n", __func__, ra->rnti); + return; + } + + nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; + + // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially + // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them + const int bwpid = bwp->bwp_Id; + const int coresetid = coreset->controlResourceSetId; + nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid]; + if (!pdcch_pdu_rel15) { + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; + memset(dl_tti_pdcch_pdu, 0, sizeof(nfapi_nr_dl_tti_request_pdu_t)); + dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE; + dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu)); + dl_req->nPDUs += 1; + pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; + nr_configure_pdcch(pdcch_pdu_rel15, ss, coreset, scc, bwp); + nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid] = pdcch_pdu_rel15; + } + + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; + memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); + dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; + dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdsch_pdu)); + dl_req->nPDUs+=1; + nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; + + LOG_I(NR_MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); + + // This code from this point on will not work on initialBWP or CORESET0 + AssertFatal(ra->bwp_id>0,"cannot work on initialBWP for now\n"); + AssertFatal(ra->secondaryCellGroup, "no secondaryCellGroup for RNTI %04x\n", ra->rnti); + + AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, + "downlinkBWP_ToAddModList has %d BWP!\n", + ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); + + LOG_I(NR_MAC, "[RAPROC] Scheduling common search space DCI type 1 dlBWP BW %d\n", dci10_bw); + + pdsch_pdu_rel15->pduBitmap = 0; + pdsch_pdu_rel15->rnti = ra->rnti; + + // SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control + // information to data and is reset every slot. + const int pduindex = nr_mac->pdu_index[CC_id]++; + pdsch_pdu_rel15->pduIndex = pduindex; + + pdsch_pdu_rel15->BWPSize = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; + pdsch_pdu_rel15->CyclicPrefix = 0; + pdsch_pdu_rel15->NrOfCodewords = 1; + pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,0); + pdsch_pdu_rel15->qamModOrder[0] = 2; + pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; + + if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) { + pdsch_pdu_rel15->mcsTable[0] = 0; + } else { + if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) { + pdsch_pdu_rel15->mcsTable[0] = 1; + } else { + pdsch_pdu_rel15->mcsTable[0] = 2; + } + } + + pdsch_pdu_rel15->rvIndex[0] = 0; + pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; + pdsch_pdu_rel15->nrOfLayers = 1; + pdsch_pdu_rel15->transmissionScheme = 0; + pdsch_pdu_rel15->refPoint = 0; + pdsch_pdu_rel15->dmrsConfigType = 0; + pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; + pdsch_pdu_rel15->SCID = 0; + pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2; + pdsch_pdu_rel15->dmrsPorts = 1; + pdsch_pdu_rel15->resourceAlloc = 1; + pdsch_pdu_rel15->rbStart = 0; + pdsch_pdu_rel15->rbSize = 6; + pdsch_pdu_rel15->VRBtoPRBMapping = 0; + + for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { + startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; + SLIV2SL(startSymbolAndLength, &StartSymbolIndex_tmp, &NrOfSymbols_tmp); + if (NrOfSymbols_tmp < NrOfSymbols) { + NrOfSymbols = NrOfSymbols_tmp; + StartSymbolIndex = StartSymbolIndex_tmp; + time_domain_assignment = i; // this is short PDSCH added to the config to fit mixed slot + } + } + + AssertFatal(StartSymbolIndex >= 0, "StartSymbolIndex is negative\n"); + + pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; + pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols); + + // Fill PDCCH DL DCI PDU + nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; + pdcch_pdu_rel15->numDlDci++; + dci_pdu->RNTI = ra->rnti; + dci_pdu->ScramblingId = *scc->physCellId; + dci_pdu->ScramblingRNTI = 0; + dci_pdu->AggregationLevel = aggregation_level; + dci_pdu->CceIndex = CCEIndex; + dci_pdu->beta_PDCCH_1_0 = 0; + dci_pdu->powerControlOffsetSS = 1; + + dci_pdu_rel15_t dci_payload; + dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize, + pdsch_pdu_rel15->rbStart, + dci10_bw); + dci_payload.time_domain_assignment.val = time_domain_assignment; + dci_payload.vrb_to_prb_mapping.val = 0; + dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; + dci_payload.tb_scaling = 0; + + LOG_I(NR_MAC, + "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", + dci_payload.frequency_domain_assignment.val, + pdsch_pdu_rel15->rbStart, + pdsch_pdu_rel15->rbSize, + dci10_bw, + dci_payload.time_domain_assignment.val, + dci_payload.vrb_to_prb_mapping.val, + dci_payload.mcs, + dci_payload.tb_scaling); + + LOG_I(NR_MAC, "Frame %d: Subframe %d : Adding common DL DCI for RNTI %x\n", frameP, slotP, ra->rnti); + + const int dci_format = NR_DL_DCI_FORMAT_1_0; + const int rnti_type = NR_RNTI_TC; + + LOG_I(NR_MAC, + "[RAPROC] DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n", + pdcch_pdu_rel15->dci_pdu[0].RNTI, + rnti_type, + dci_format, + (unsigned long long)pdcch_pdu_rel15->FreqDomainResource, + pdcch_pdu_rel15->StartSymbolIndex, + pdcch_pdu_rel15->DurationSymbols); + + fill_dci_pdu_rel15(scc, + ra->secondaryCellGroup, + dci_pdu, + &dci_payload, + dci_format, + rnti_type, + dci10_bw, + ra->bwp_id); + + x_Overhead = 0; + nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); + + uint8_t payload[] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08}; + + // DL TX request + tx_req->PDU_length = pdsch_pdu_rel15->TBSize[0]; + tx_req->PDU_index = pduindex; + tx_req->num_TLV = 1; + tx_req->TLVs[0].length = 8; + nr_mac->TX_req[CC_id].SFN = frameP; + nr_mac->TX_req[CC_id].Number_of_PDUs++; + nr_mac->TX_req[CC_id].Slot = slotP; + memcpy(tx_req->TLVs[0].value.direct, payload, tx_req->TLVs[0].length); + + // mark the corresponding RBs as used + uint16_t *vrb_map = cc[CC_id].vrb_map; + for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { + vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; + } + + ra->state = WAIT_Msg4_ACK; +/* + // PREPROCESSOR + NR_UE_info_t *UE_info = &nr_mac->UE_info; + + int16_t rrc_sdu_length = 0; + uint16_t msg4_padding = 0; + uint16_t msg4_post_padding = 0; + uint16_t msg4_header = 0; + + int UE_id = find_nr_UE_id(module_id, ra->rnti); + + if (UE_id < 0) { + LOG_E(NR_MAC, "Can't find UE for t-crnti %x, kill RA procedure for this UE\n", ra->rnti); + nr_clear_ra_proc(module_id, CC_id, frame); + return; + } + + nr_mac->pre_processor_dl(module_id, frame, slot); + + NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + + // POST processing + struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = + sched_ctrl->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + AssertFatal(sched_ctrl->time_domain_allocation < tdaList->list.count, + "time_domain_allocation %d>=%d\n", + sched_ctrl->time_domain_allocation, + tdaList->list.count); + + const int startSymbolAndLength = tdaList->list.array[sched_ctrl->time_domain_allocation]->startSymbolAndLength; + + int startSymbolIndex; + int nrOfSymbols; + SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); + + long dmrsConfigType = sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + uint8_t N_PRB_DMRS = 0; + if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) { + N_PRB_DMRS = sched_ctrl->numDmrsCdmGrpsNoData * 6; + } + else { + N_PRB_DMRS = sched_ctrl->numDmrsCdmGrpsNoData * 4; + } + + uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(NULL, + RC.nrmac[module_id]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position , + nrOfSymbols); + + sched_ctrl->rbSize = 4; + const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx), + nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx), + sched_ctrl->rbSize, + nrOfSymbols, + N_PRB_DMRS * N_DMRS_SLOT, + 0, + 0, + 1) >> 3; + + NR_UE_harq_t *harq = &sched_ctrl->harq_processes[sched_ctrl->dl_harq_pid]; + NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0]; + harq->feedback_slot = pucch->ul_slot; + harq->is_waiting = 1; + UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++; + ra->harq_pid = sched_ctrl->dl_harq_pid; + LOG_I(NR_MAC, "%4d.%2d RNTI %04x start %d RBS %d MCS %d TBS %d HARQ PID %d round %d NDI %d, feedback slot %d, iswaiting %d\n", + frame, slot, ra->rnti, sched_ctrl->rbStart, sched_ctrl->rbSize, sched_ctrl->mcs, + TBS, sched_ctrl->dl_harq_pid, harq->round, harq->ndi, harq->feedback_slot, harq->is_waiting); + + nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; + + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; + memset((void*)dl_tti_pdcch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); + dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE; + dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu)); + dl_req->nPDUs += 1; + nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; + nr_configure_pdcch(pdcch_pdu_rel15, + sched_ctrl->search_space, + sched_ctrl->coreset, + scc, + sched_ctrl->active_bwp); + + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; + memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); + dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; + dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdsch_pdu)); + dl_req->nPDUs += 1; + nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; + + pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG; + + pdsch_pdu_rel15->pduBitmap = 0; + pdsch_pdu_rel15->rnti = ra->rnti; + pdsch_pdu_rel15->pduIndex = nr_mac->pdu_index[0]++; + + pdsch_pdu_rel15->BWPSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); + + pdsch_pdu_rel15->SubcarrierSpacing = sched_ctrl->active_bwp->bwp_Common->genericParameters.subcarrierSpacing; + if (sched_ctrl->active_bwp->bwp_Common->genericParameters.cyclicPrefix) { + pdsch_pdu_rel15->CyclicPrefix = *sched_ctrl->active_bwp->bwp_Common->genericParameters.cyclicPrefix; + } else { + pdsch_pdu_rel15->CyclicPrefix = 0; + } + + pdsch_pdu_rel15->NrOfCodewords = 1; + pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(sched_ctrl->mcs,0); + pdsch_pdu_rel15->qamModOrder[0] = 2; + pdsch_pdu_rel15->mcsIndex[0] = sched_ctrl->mcs; + pdsch_pdu_rel15->mcsTable[0] = 0; + pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[0]; + pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; + pdsch_pdu_rel15->nrOfLayers = 1; + pdsch_pdu_rel15->transmissionScheme = 0; + pdsch_pdu_rel15->refPoint = 1; + pdsch_pdu_rel15->dmrsConfigType = dmrsConfigType; + pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; + pdsch_pdu_rel15->SCID = 0; + pdsch_pdu_rel15->numDmrsCdmGrpsNoData = sched_ctrl->numDmrsCdmGrpsNoData; + pdsch_pdu_rel15->dmrsPorts = 1; + pdsch_pdu_rel15->resourceAlloc = 1; + pdsch_pdu_rel15->rbStart = sched_ctrl->rbStart; + pdsch_pdu_rel15->rbSize = sched_ctrl->rbSize; + pdsch_pdu_rel15->VRBtoPRBMapping = 0; + pdsch_pdu_rel15->qamModOrder[0] = nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx); + pdsch_pdu_rel15->TBSize[0] = TBS; + pdsch_pdu_rel15->mcsTable[0] = sched_ctrl->mcsTableIdx; + pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex; + pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols; + + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->StartSymbolIndex+pdsch_pdu_rel15->NrOfSymbols); + + LOG_D(NR_MAC,"dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos); + + // Fill PDCCH DL DCI PDU + nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; + pdcch_pdu_rel15->numDlDci++; + dci_pdu->RNTI = ra->rnti; + dci_pdu->ScramblingId = *scc->physCellId; + dci_pdu->ScramblingRNTI = 0; + dci_pdu->AggregationLevel = sched_ctrl->aggregation_level; + dci_pdu->CceIndex = sched_ctrl->cce_index; + dci_pdu->beta_PDCCH_1_0 = 0; + dci_pdu->powerControlOffsetSS = 1; + + // DCI payload + dci_pdu_rel15_t dci_payload; + memset(&dci_payload, 0, sizeof(dci_pdu_rel15_t)); + + dci_payload.bwp_indicator.val = sched_ctrl->active_bwp->bwp_Id; + + // frequency domain assignment + dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0( + pdsch_pdu_rel15->rbSize, pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->BWPSize); + + dci_payload.time_domain_assignment.val = sched_ctrl->time_domain_allocation; + dci_payload.mcs = sched_ctrl->mcs; + dci_payload.rv = pdsch_pdu_rel15->rvIndex[0]; + dci_payload.harq_pid = 0; + dci_payload.ndi = 0; + dci_payload.dai[0].val = 0; + dci_payload.tpc = 0; // table 7.2.1-1 in 38.213 + dci_payload.pucch_resource_indicator = 0; + dci_payload.pdsch_to_harq_feedback_timing_indicator.val = 0; + dci_payload.antenna_ports.val = 0; + dci_payload.dmrs_sequence_initialization.val = pdsch_pdu_rel15->SCID; + + fill_dci_pdu_rel15(scc, + ra->secondaryCellGroup, + &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1], + &dci_payload, + NR_DL_DCI_FORMAT_1_0, + NR_RNTI_TC, + pdsch_pdu_rel15->BWPSize, + sched_ctrl->active_bwp->bwp_Id); + + LOG_D(NR_MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize); + LOG_D(NR_MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart); + LOG_D(NR_MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing); + LOG_D(NR_MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix); + LOG_D(NR_MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex); + LOG_D(NR_MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols); + for(int n=0;n<6;n++) LOG_D(NR_MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]); + LOG_D(NR_MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType); + LOG_D(NR_MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize); + LOG_D(NR_MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize); + LOG_D(NR_MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType); + LOG_D(NR_MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex); + LOG_D(NR_MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity); + LOG_D(NR_MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci); + + NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[sched_ctrl->dl_harq_pid]; + if (harq->round != 0) { // retransmission + if (sched_ctrl->rbSize != retInfo->rbSize) + LOG_W(NR_MAC, + "retransmission uses different rbSize (%d vs. orig %d)\n", + sched_ctrl->rbSize, + retInfo->rbSize); + if (sched_ctrl->time_domain_allocation != retInfo->time_domain_allocation) + LOG_W(NR_MAC, + "retransmission uses different time_domain_allocation (%d vs. orig %d)\n", + sched_ctrl->time_domain_allocation, + retInfo->time_domain_allocation); + if (sched_ctrl->mcs != retInfo->mcs + || sched_ctrl->mcsTableIdx != retInfo->mcsTableIdx + || sched_ctrl->numDmrsCdmGrpsNoData != retInfo->numDmrsCdmGrpsNoData) + LOG_W(NR_MAC, + "retransmission uses different table/MCS/numDmrsCdmGrpsNoData (%d/%d/%d vs. orig %d/%d/%d)\n", + sched_ctrl->mcsTableIdx, + sched_ctrl->mcs, + sched_ctrl->numDmrsCdmGrpsNoData, + retInfo->mcsTableIdx, + retInfo->mcs, + retInfo->numDmrsCdmGrpsNoData); + // we do not have to do anything, since we do not require to get data + // from RLC, encode MAC CEs, or copy data to FAPI structures + LOG_W(NR_MAC, "%d.%2d retransmission UE %d/RNTI %04x\n", frame, slot, UE_id, ra->rnti); + LOG_W(NR_MAC, + "%d.%2d DL retransmission UE %d/RNTI %04x HARQ PID %d round %d NDI %d\n", + frame, + slot, + UE_id, + ra->rnti, + sched_ctrl->dl_harq_pid, + harq->round, + harq->ndi); + } else { // initial transmission + LOG_D(NR_MAC, "[%s] Initial HARQ transmission in %d.%d\n", __FUNCTION__, frame, slot); + // reserve space for timing advance of UE if necessary, + // nr_generate_dlsch_pdu() checks for ta_apply and add TA CE if necessary + const int cont_res_len = 1 + 6; + const int ta_len = (sched_ctrl->ta_apply) ? 2 : 0; + + // Get RLC data TODO: remove random data retrieval + int header_length_total = 0; + int header_length_last = 0; + int sdu_length_total = 0; + int num_sdus = 0; + uint16_t sdu_lengths[NB_RB_MAX] = {0}; + uint8_t mac_sdus[MAX_NR_DLSCH_PAYLOAD_BYTES]; + unsigned char sdu_lcids[NB_RB_MAX] = {0}; + const int lcid = DL_SCH_LCID_CCCH; + if (sched_ctrl->num_total_bytes > 0) { + LOG_I(NR_MAC, + "[gNB %d][MSG4] Frame %d : CCCH->DLSCH, Requesting " + "%d bytes from RLC (lcid %d total hdr len %d), TBS: %d \n \n", + module_id, + frame, + TBS - ta_len - header_length_total - sdu_length_total - 3, + lcid, + header_length_total, + TBS); +#if 0 + // sdu_lengths[num_sdus] = mac_rrc_data_req(module_id, CC_idP, frameP, CCCH, + // UE_RNTI(module_idP,UE_id),1, // 1 transport block + // &cc[CC_idP].CCCH_pdu.payload[0], 1); + sdu_lengths[num_sdus] = mac_rrc_nr_data_req(module_id, CC_id, frame, CCCH, ra->rnti, 1, // 1 transport block + mac_sdus); + + LOG_D(MAC, + "[gNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n", + module_id, + sdu_lengths[num_sdus], + lcid); + + sdu_lcids[num_sdus] = lcid; + sdu_length_total += sdu_lengths[num_sdus]; + header_length_last = 1 + 1 + (sdu_lengths[num_sdus] >= 128); + header_length_total += header_length_last; + + num_sdus++; +#else + LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: random data\n", frame, slot); + // fill dlsch_buffer with random data + sdu_lcids[0] = lcid; // DRB + sdu_lengths[0] = 500; + for (int i = 0; i < sdu_lengths[0]; i++) + mac_sdus[i] = (unsigned char) (lrand48()&0xff); + sdu_length_total += sdu_lengths[0]; + header_length_total += 2 + (sdu_lengths[0] >= 128); + num_sdus +=1; +#endif + //ue_sched_ctl->uplane_inactivity_timer = 0; + } + + UE_info->mac_stats[UE_id].dlsch_total_bytes += TBS; + UE_info->mac_stats[UE_id].lc_bytes_tx[lcid] += sdu_length_total; + + // Check if there is data from RLC or CE + const int post_padding = TBS > header_length_total + sdu_length_total + cont_res_len; + + LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frame, slot, + TBS , header_length_total , sdu_length_total ,cont_res_len , post_padding ); + // padding param currently not in use + //padding = TBS - header_length_total - sdu_length_total - ta_len - 1; + + const int ntx_req = nr_mac->TX_req[CC_id].Number_of_PDUs; + nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[ntx_req]; + // pointer to directly generate the PDU into the nFAPI structure + uint32_t *buf = tx_req->TLVs[0].value.direct; + + const int offset = nr_write_ce_dlsch_pdu(module_id, + sched_ctrl, + (unsigned char *)buf, + 255, // no drx + ra->cont_res_id); + + // Padding: fill remainder of DLSCH with 0 + if (post_padding > 0) { + for (int j = 0; j < TBS - offset; j++) + buf[offset + j] = 0; + } + + // the buffer has been filled by nr_generate_dlsch_pdu(), below we simply + //fill the remaining information + tx_req->PDU_length = TBS; + tx_req->PDU_index = nr_mac->pdu_index[0]++; + tx_req->num_TLV = 1; + tx_req->TLVs[0].length = TBS + 2; + nr_mac->TX_req[CC_id].Number_of_PDUs++; + nr_mac->TX_req[CC_id].SFN = frame; + nr_mac->TX_req[CC_id].Slot = slot; + + retInfo->rbSize = sched_ctrl->rbSize; + retInfo->time_domain_allocation = sched_ctrl->time_domain_allocation; + retInfo->mcsTableIdx = sched_ctrl->mcsTableIdx; + retInfo->mcs = sched_ctrl->mcs; + retInfo->numDmrsCdmGrpsNoData = sched_ctrl->numDmrsCdmGrpsNoData; + +#if defined(ENABLE_MAC_PAYLOAD_DEBUG) + if (frame%100 == 0) { + LOG_I(MAC, + "%d.%d, first 10 payload bytes, TBS size: %d \n", + frame, + slot, + TBS); + for(int i = 0; i < 10; i++) + LOG_I(MAC, "byte %d: %x\n", i, ((uint8_t *) buf)[i]); + } +#endif + } + + nr_get_retransmission_timing(&ra->Msg4_frame, &ra->Msg4_slot); + ra->state = WAIT_Msg4_ACK; + LOG_I(NR_MAC, "Retransmission time for Msg4 is %d %d\n", ra->Msg4_frame, ra->Msg4_slot); + */ + } +} + +void nr_check_Msg4_Ack(module_id_t module_id, + int CC_id, + frame_t frame, + sub_frame_t slot) { + + LOG_W(NR_MAC,"nr_check_Msg4_Ack() is not implemented yet!\n"); + + gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; + NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; + NR_RA_t *ra = &cc->ra[0]; + + ra->state = RA_IDLE; + + + /* + NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; + int UE_id = find_nr_UE_id_msg4(module_id, ra->rnti); + NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + const int current_harq_pid = ra->harq_pid; + NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid]; + + LOG_D(MAC, "ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d\n", UE_id, ra->rnti, harq->is_waiting, harq->round, frame, slot, current_harq_pid); + + if (harq->is_waiting == 0) + { + if ( harq->round == 0) + { + ra->state = IDLE; + UE_info->active[UE_id] = true; + free(ra->preambles.preamble_list); + LOG_I(MAC, "ue %d, rnti %d is active, frame %d %d\n", UE_id, ra->rnti, frame, slot); + } + else + { + ra->state = Msg4; + } + } + */ +} + void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP){ NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[CC_id].ra[0]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 20da8fa30a..f2c75acd22 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1131,6 +1131,7 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, break; case NR_RNTI_TC: + pos = 1; // indicating a DL DCI format 1bit *dci_pdu |= ((uint64_t)dci_pdu_rel15->format_indicator & 1) << (dci_size - pos++); // Freq domain assignment 0-16 bit @@ -1159,9 +1160,27 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, // TPC command for scheduled PUCCH – 2 bits for (int i = 0; i < 2; i++) *dci_pdu |= (((uint64_t)dci_pdu_rel15->tpc >> (1 - i)) & 1) << (dci_size - pos++); + // PUCCH resource indicator – 3 bits + for (int i = 0; i < 3; i++) + *dci_pdu |= (((uint64_t)dci_pdu_rel15->pucch_resource_indicator >> (2 - i)) & 1) << (dci_size - pos++); // PDSCH-to-HARQ_feedback timing indicator – 3 bits for (int i = 0; i < 3; i++) *dci_pdu |= (((uint64_t)dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val >> (2 - i)) & 1) << (dci_size - pos++); + + LOG_D(NR_MAC,"N_RB = %i\n", N_RB); + LOG_D(NR_MAC,"dci_size = %i\n", dci_size); + LOG_D(NR_MAC,"fsize = %i\n", fsize); + LOG_D(NR_MAC,"dci_pdu_rel15->format_indicator = %i\n", dci_pdu_rel15->format_indicator); + LOG_D(NR_MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val); + LOG_D(NR_MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val); + LOG_D(NR_MAC,"dci_pdu_rel15->vrb_to_prb_mapping.val = %i\n", dci_pdu_rel15->vrb_to_prb_mapping.val); + LOG_D(NR_MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs); + LOG_D(NR_MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv); + LOG_D(NR_MAC,"dci_pdu_rel15->harq_pid = %i\n", dci_pdu_rel15->harq_pid); + LOG_D(NR_MAC,"dci_pdu_rel15->dai[0].val = %i\n", dci_pdu_rel15->dai[0].val); + LOG_D(NR_MAC,"dci_pdu_rel15->tpc = %i\n", dci_pdu_rel15->tpc); + LOG_D(NR_MAC,"dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val = %i\n", dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val); + break; } break; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 1e2f341192..0ac10c90d5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -490,12 +490,11 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; free(ra->preambles.preamble_list); - ra->state = RA_IDLE; - LOG_I(NR_MAC, - "reset RA state information for RA-RNTI %04x/index %d\n", - ra->rnti, - i); + ra->state = Msg4; + ra->Msg4_frame = ( frameP +2 ) % 1024; + ra->Msg4_slot = 1; + LOG_I(MAC, "set RA state to Msg4 for RA-RNTI %04x, msg4 frame %d %d\n", ra->rnti, ra->Msg4_frame, ra->Msg4_slot); return; } } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 4b0f2eed2b..d0131e5cb2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -347,12 +347,27 @@ void config_nr_mib(int Mod_idP, int cellBarred, int intraFreqReselection); +int nr_write_ce_dlsch_pdu(module_id_t module_idP, + const NR_UE_sched_ctrl_t *ue_sched_ctl, + unsigned char *mac_pdu, + unsigned char drx_cmd, + unsigned char *ue_cont_res_id); void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP); +void nr_generate_Msg4(module_id_t module_idP, + int CC_id, + frame_t frameP, + sub_frame_t slotP); + +void nr_check_Msg4_Ack(module_id_t module_id, + int CC_id, + frame_t frame, + sub_frame_t slot); + void nr_process_mac_pdu( module_id_t module_idP, rnti_t rnti, From 2060cf45bb3f1d747fa35b53c2d0e53c614d39e0 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 24 Feb 2021 18:49:00 +0000 Subject: [PATCH 07/94] Fix RA-Msg4 to Initial BWP --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 2 + .../NR_MAC_UE/nr_ue_dci_configuration.c | 14 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 19 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 458 ++---------------- 4 files changed, 60 insertions(+), 433 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index 469415908f..61238ae647 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -88,6 +88,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, cset_start_sc = frame_parms.first_carrier_offset + rb_offset*NR_NB_SC_PER_RB; if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_MIB_SIB1) { cset_start_sc = cset_start_sc + RC.nrmac[gNB->Mod_id]->type0_PDCCH_CSS_config.cset_start_rb*NR_NB_SC_PER_RB; + } else if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0) { + cset_start_sc = cset_start_sc + pdcch_pdu_rel15->BWPStart*NR_NB_SC_PER_RB; } for (int d=0;dnumDlDci;d++) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 6ada79a675..1e1f4b311c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -88,7 +88,11 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t } else { ss = mac->search_space_zero; coreset = mac->coreset0; - rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1; + if(rnti_type == NR_RNTI_SI) { + rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_MIB_SIB1; + } else { + rel15->coreset.CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; + } } rel15->coreset.duration = coreset->duration; @@ -157,10 +161,8 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t sps = initialDownlinkBWP->genericParameters.cyclicPrefix == NULL ? 14 : 12; monitoringSymbolsWithinSlot = (ss->monitoringSymbolsWithinSlot->buf[0]<<(sps-8)) | (ss->monitoringSymbolsWithinSlot->buf[1]>>(16-sps)); rel15->rnti = ra->t_crnti; - //rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - //rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - rel15->BWPSize = NRRIV2BW(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing; rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id); break; @@ -265,7 +267,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl LOG_D(NR_MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space (RA-Msg4)\n"); rel15->num_dci_options = 1; rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; - config_dci_pdu(mac, rel15, dl_config, NR_RNTI_TC, ss_id); + config_dci_pdu(mac, rel15, dl_config, NR_RNTI_TC, -1); fill_dci_search_candidates(ss, rel15); break; default: diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index a27ce36831..18ad62cf39 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -469,7 +469,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr AssertFatal(mac->DLbwp[0]!=NULL,"DLbwp[0] should not be zero here!\n"); AssertFatal(mac->ULbwp[0]!=NULL,"DLbwp[0] should not be zero here!\n"); - const uint16_t n_RB_DLBWP = (ra->ra_state == WAIT_RAR) ? NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) : NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + const uint16_t n_RB_DLBWP = (ra->ra_state == WAIT_RAR || ra->ra_state == WAIT_CONTENTION_RESOLUTION) ? NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) : NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); LOG_D(MAC, "In %s: Processing received DCI format %s (DL BWP %d)\n", __FUNCTION__, dci_formats[dci_format], n_RB_DLBWP); @@ -657,13 +657,20 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } else { dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; } - dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; - BWPSize = n_RB_DLBWP; + + if(rnti == ra->t_crnti) { + dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } else { + dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; + } if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); + + BWPSize = n_RB_DLBWP; } /* IDENTIFIER_DCI_FORMATS */ @@ -1115,6 +1122,7 @@ int get_n_rb(NR_UE_MAC_INST_t *mac, int rnti_type){ int N_RB = 0, start_RB; switch(rnti_type) { case NR_RNTI_RA: + case NR_RNTI_TC: case NR_RNTI_P: { NR_BWP_Id_t dl_bwp_id = mac->DL_BWP_Id; if (mac->DLbwp[dl_bwp_id-1]->bwp_Common->pdcch_ConfigCommon->choice.setup->controlResourceSetZero) { @@ -1129,7 +1137,6 @@ int get_n_rb(NR_UE_MAC_INST_t *mac, int rnti_type){ case NR_RNTI_SI: N_RB = mac->type0_PDCCH_CSS_config.num_rbs; break; - case NR_RNTI_TC: case NR_RNTI_C: N_RB = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); break; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index e3c9d23c04..284243b69c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1013,12 +1013,6 @@ void nr_generate_Msg2(module_id_t module_idP, } } -/*void nr_get_retransmission_timing(frame_t *frameP, sub_frame_t *subframeP) { - *frameP = (*frameP + 1) % 1024; - *subframeP = *subframeP; - return; -}*/ - void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, @@ -1038,29 +1032,16 @@ void nr_generate_Msg4(module_id_t module_idP, int NrOfSymbols_tmp = 0; int x_Overhead = 0; int time_domain_assignment = 0; - long locationAndBandwidth = 0; uint8_t nr_of_candidates = 0; uint8_t aggregation_level = 0; - NR_SearchSpace_t *ss = ra->ra_ss; - NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - - // check if UE is doing RA on CORESET0 , InitialBWP or configured BWP from SCD - // get the BW of the PDCCH for PDCCH size and Msg4 PDSCH size - + NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; + NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; + NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - int dci10_bw; - - if (ra->coreset0_configured == 1) { - AssertFatal(1==0,"This is a standalone condition\n"); - } - else { // on configured BWP or initial LDBWP, bandwidth parameters in DCI correspond size of initialBWP - //locationAndBandwidth = scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth; - locationAndBandwidth = bwp->bwp_Common->genericParameters.locationAndBandwidth; - dci10_bw = NRRIV2BW(locationAndBandwidth, MAX_BWP_SIZE); - } nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; + // Checking if the DCI allocation is feasible in current subframe if (dl_req->nPDUs > NFAPI_NR_MAX_DL_TTI_PDUS - 2) { LOG_I(NR_MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, ra->rnti); @@ -1068,7 +1049,6 @@ void nr_generate_Msg4(module_id_t module_idP, } find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss); - NR_ControlResourceSet_t *coreset = get_coreset(bwp, ss, 0 /* common */); int CCEIndex = allocate_nr_CCEs(nr_mac, bwp, coreset, @@ -1100,6 +1080,9 @@ void nr_generate_Msg4(module_id_t module_idP, nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid] = pdcch_pdu_rel15; } + // TODO: This assignment should be done in function nr_configure_pdcch() + pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; @@ -1117,8 +1100,6 @@ void nr_generate_Msg4(module_id_t module_idP, "downlinkBWP_ToAddModList has %d BWP!\n", ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); - LOG_I(NR_MAC, "[RAPROC] Scheduling common search space DCI type 1 dlBWP BW %d\n", dci10_bw); - pdsch_pdu_rel15->pduBitmap = 0; pdsch_pdu_rel15->rnti = ra->rnti; @@ -1126,9 +1107,8 @@ void nr_generate_Msg4(module_id_t module_idP, // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; pdsch_pdu_rel15->pduIndex = pduindex; - - pdsch_pdu_rel15->BWPSize = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; @@ -1151,7 +1131,7 @@ void nr_generate_Msg4(module_id_t module_idP, pdsch_pdu_rel15->nrOfLayers = 1; pdsch_pdu_rel15->transmissionScheme = 0; pdsch_pdu_rel15->refPoint = 0; - pdsch_pdu_rel15->dmrsConfigType = 0; + pdsch_pdu_rel15->dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2; @@ -1191,45 +1171,41 @@ void nr_generate_Msg4(module_id_t module_idP, dci_pdu_rel15_t dci_payload; dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize, pdsch_pdu_rel15->rbStart, - dci10_bw); + pdsch_pdu_rel15->BWPSize); + dci_payload.time_domain_assignment.val = time_domain_assignment; dci_payload.vrb_to_prb_mapping.val = 0; dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; dci_payload.tb_scaling = 0; - LOG_I(NR_MAC, + LOG_D(NR_MAC, "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", dci_payload.frequency_domain_assignment.val, pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->rbSize, - dci10_bw, + pdsch_pdu_rel15->BWPSize, dci_payload.time_domain_assignment.val, dci_payload.vrb_to_prb_mapping.val, dci_payload.mcs, dci_payload.tb_scaling); - LOG_I(NR_MAC, "Frame %d: Subframe %d : Adding common DL DCI for RNTI %x\n", frameP, slotP, ra->rnti); - - const int dci_format = NR_DL_DCI_FORMAT_1_0; - const int rnti_type = NR_RNTI_TC; - - LOG_I(NR_MAC, + LOG_D(NR_MAC, "[RAPROC] DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n", pdcch_pdu_rel15->dci_pdu[0].RNTI, - rnti_type, - dci_format, + NR_RNTI_TC, + NR_DL_DCI_FORMAT_1_0, (unsigned long long)pdcch_pdu_rel15->FreqDomainResource, pdcch_pdu_rel15->StartSymbolIndex, pdcch_pdu_rel15->DurationSymbols); fill_dci_pdu_rel15(scc, - ra->secondaryCellGroup, - dci_pdu, + nr_mac->secondaryCellGroupCommon, + &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1], &dci_payload, - dci_format, - rnti_type, - dci10_bw, - ra->bwp_id); + NR_DL_DCI_FORMAT_1_0, + NR_RNTI_TC, + pdsch_pdu_rel15->BWPSize, + nr_mac->sched_ctrlCommon->active_bwp->bwp_Id); x_Overhead = 0; nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); @@ -1251,356 +1227,22 @@ void nr_generate_Msg4(module_id_t module_idP, for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; } - ra->state = WAIT_Msg4_ACK; -/* - // PREPROCESSOR - NR_UE_info_t *UE_info = &nr_mac->UE_info; - int16_t rrc_sdu_length = 0; - uint16_t msg4_padding = 0; - uint16_t msg4_post_padding = 0; - uint16_t msg4_header = 0; - - int UE_id = find_nr_UE_id(module_id, ra->rnti); - - if (UE_id < 0) { - LOG_E(NR_MAC, "Can't find UE for t-crnti %x, kill RA procedure for this UE\n", ra->rnti); - nr_clear_ra_proc(module_id, CC_id, frame); - return; - } - - nr_mac->pre_processor_dl(module_id, frame, slot); - - NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - - // POST processing - struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = - sched_ctrl->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - AssertFatal(sched_ctrl->time_domain_allocation < tdaList->list.count, - "time_domain_allocation %d>=%d\n", - sched_ctrl->time_domain_allocation, - tdaList->list.count); - - const int startSymbolAndLength = tdaList->list.array[sched_ctrl->time_domain_allocation]->startSymbolAndLength; - - int startSymbolIndex; - int nrOfSymbols; - SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); - - long dmrsConfigType = sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; - uint8_t N_PRB_DMRS = 0; - if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) { - N_PRB_DMRS = sched_ctrl->numDmrsCdmGrpsNoData * 6; - } - else { - N_PRB_DMRS = sched_ctrl->numDmrsCdmGrpsNoData * 4; - } - - uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(NULL, - RC.nrmac[module_id]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position , - nrOfSymbols); - - sched_ctrl->rbSize = 4; - const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx), - nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx), - sched_ctrl->rbSize, - nrOfSymbols, - N_PRB_DMRS * N_DMRS_SLOT, - 0, - 0, - 1) >> 3; - - NR_UE_harq_t *harq = &sched_ctrl->harq_processes[sched_ctrl->dl_harq_pid]; - NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0]; - harq->feedback_slot = pucch->ul_slot; - harq->is_waiting = 1; - UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++; - ra->harq_pid = sched_ctrl->dl_harq_pid; - LOG_I(NR_MAC, "%4d.%2d RNTI %04x start %d RBS %d MCS %d TBS %d HARQ PID %d round %d NDI %d, feedback slot %d, iswaiting %d\n", - frame, slot, ra->rnti, sched_ctrl->rbStart, sched_ctrl->rbSize, sched_ctrl->mcs, - TBS, sched_ctrl->dl_harq_pid, harq->round, harq->ndi, harq->feedback_slot, harq->is_waiting); - - nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; - - NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - - nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; - memset((void*)dl_tti_pdcch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); - dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE; - dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu)); - dl_req->nPDUs += 1; - nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; - nr_configure_pdcch(pdcch_pdu_rel15, - sched_ctrl->search_space, - sched_ctrl->coreset, - scc, - sched_ctrl->active_bwp); - - nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; - memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); - dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; - dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdsch_pdu)); - dl_req->nPDUs += 1; - nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; - - pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG; - - pdsch_pdu_rel15->pduBitmap = 0; - pdsch_pdu_rel15->rnti = ra->rnti; - pdsch_pdu_rel15->pduIndex = nr_mac->pdu_index[0]++; - - pdsch_pdu_rel15->BWPSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); - pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); - - pdsch_pdu_rel15->SubcarrierSpacing = sched_ctrl->active_bwp->bwp_Common->genericParameters.subcarrierSpacing; - if (sched_ctrl->active_bwp->bwp_Common->genericParameters.cyclicPrefix) { - pdsch_pdu_rel15->CyclicPrefix = *sched_ctrl->active_bwp->bwp_Common->genericParameters.cyclicPrefix; - } else { - pdsch_pdu_rel15->CyclicPrefix = 0; - } - - pdsch_pdu_rel15->NrOfCodewords = 1; - pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(sched_ctrl->mcs,0); - pdsch_pdu_rel15->qamModOrder[0] = 2; - pdsch_pdu_rel15->mcsIndex[0] = sched_ctrl->mcs; - pdsch_pdu_rel15->mcsTable[0] = 0; - pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[0]; - pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; - pdsch_pdu_rel15->nrOfLayers = 1; - pdsch_pdu_rel15->transmissionScheme = 0; - pdsch_pdu_rel15->refPoint = 1; - pdsch_pdu_rel15->dmrsConfigType = dmrsConfigType; - pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; - pdsch_pdu_rel15->SCID = 0; - pdsch_pdu_rel15->numDmrsCdmGrpsNoData = sched_ctrl->numDmrsCdmGrpsNoData; - pdsch_pdu_rel15->dmrsPorts = 1; - pdsch_pdu_rel15->resourceAlloc = 1; - pdsch_pdu_rel15->rbStart = sched_ctrl->rbStart; - pdsch_pdu_rel15->rbSize = sched_ctrl->rbSize; - pdsch_pdu_rel15->VRBtoPRBMapping = 0; - pdsch_pdu_rel15->qamModOrder[0] = nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx); - pdsch_pdu_rel15->TBSize[0] = TBS; - pdsch_pdu_rel15->mcsTable[0] = sched_ctrl->mcsTableIdx; - pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex; - pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols; - - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->StartSymbolIndex+pdsch_pdu_rel15->NrOfSymbols); - - LOG_D(NR_MAC,"dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos); - - // Fill PDCCH DL DCI PDU - nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; - pdcch_pdu_rel15->numDlDci++; - dci_pdu->RNTI = ra->rnti; - dci_pdu->ScramblingId = *scc->physCellId; - dci_pdu->ScramblingRNTI = 0; - dci_pdu->AggregationLevel = sched_ctrl->aggregation_level; - dci_pdu->CceIndex = sched_ctrl->cce_index; - dci_pdu->beta_PDCCH_1_0 = 0; - dci_pdu->powerControlOffsetSS = 1; - - // DCI payload - dci_pdu_rel15_t dci_payload; - memset(&dci_payload, 0, sizeof(dci_pdu_rel15_t)); - - dci_payload.bwp_indicator.val = sched_ctrl->active_bwp->bwp_Id; - - // frequency domain assignment - dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0( - pdsch_pdu_rel15->rbSize, pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->BWPSize); - - dci_payload.time_domain_assignment.val = sched_ctrl->time_domain_allocation; - dci_payload.mcs = sched_ctrl->mcs; - dci_payload.rv = pdsch_pdu_rel15->rvIndex[0]; - dci_payload.harq_pid = 0; - dci_payload.ndi = 0; - dci_payload.dai[0].val = 0; - dci_payload.tpc = 0; // table 7.2.1-1 in 38.213 - dci_payload.pucch_resource_indicator = 0; - dci_payload.pdsch_to_harq_feedback_timing_indicator.val = 0; - dci_payload.antenna_ports.val = 0; - dci_payload.dmrs_sequence_initialization.val = pdsch_pdu_rel15->SCID; - - fill_dci_pdu_rel15(scc, - ra->secondaryCellGroup, - &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1], - &dci_payload, - NR_DL_DCI_FORMAT_1_0, - NR_RNTI_TC, - pdsch_pdu_rel15->BWPSize, - sched_ctrl->active_bwp->bwp_Id); - - LOG_D(NR_MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize); - LOG_D(NR_MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart); - LOG_D(NR_MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing); - LOG_D(NR_MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix); - LOG_D(NR_MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex); - LOG_D(NR_MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols); - for(int n=0;n<6;n++) LOG_D(NR_MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]); - LOG_D(NR_MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType); - LOG_D(NR_MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize); - LOG_D(NR_MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize); - LOG_D(NR_MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType); - LOG_D(NR_MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex); - LOG_D(NR_MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity); - LOG_D(NR_MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci); - - NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[sched_ctrl->dl_harq_pid]; - if (harq->round != 0) { // retransmission - if (sched_ctrl->rbSize != retInfo->rbSize) - LOG_W(NR_MAC, - "retransmission uses different rbSize (%d vs. orig %d)\n", - sched_ctrl->rbSize, - retInfo->rbSize); - if (sched_ctrl->time_domain_allocation != retInfo->time_domain_allocation) - LOG_W(NR_MAC, - "retransmission uses different time_domain_allocation (%d vs. orig %d)\n", - sched_ctrl->time_domain_allocation, - retInfo->time_domain_allocation); - if (sched_ctrl->mcs != retInfo->mcs - || sched_ctrl->mcsTableIdx != retInfo->mcsTableIdx - || sched_ctrl->numDmrsCdmGrpsNoData != retInfo->numDmrsCdmGrpsNoData) - LOG_W(NR_MAC, - "retransmission uses different table/MCS/numDmrsCdmGrpsNoData (%d/%d/%d vs. orig %d/%d/%d)\n", - sched_ctrl->mcsTableIdx, - sched_ctrl->mcs, - sched_ctrl->numDmrsCdmGrpsNoData, - retInfo->mcsTableIdx, - retInfo->mcs, - retInfo->numDmrsCdmGrpsNoData); - // we do not have to do anything, since we do not require to get data - // from RLC, encode MAC CEs, or copy data to FAPI structures - LOG_W(NR_MAC, "%d.%2d retransmission UE %d/RNTI %04x\n", frame, slot, UE_id, ra->rnti); - LOG_W(NR_MAC, - "%d.%2d DL retransmission UE %d/RNTI %04x HARQ PID %d round %d NDI %d\n", - frame, - slot, - UE_id, - ra->rnti, - sched_ctrl->dl_harq_pid, - harq->round, - harq->ndi); - } else { // initial transmission - LOG_D(NR_MAC, "[%s] Initial HARQ transmission in %d.%d\n", __FUNCTION__, frame, slot); - // reserve space for timing advance of UE if necessary, - // nr_generate_dlsch_pdu() checks for ta_apply and add TA CE if necessary - const int cont_res_len = 1 + 6; - const int ta_len = (sched_ctrl->ta_apply) ? 2 : 0; - - // Get RLC data TODO: remove random data retrieval - int header_length_total = 0; - int header_length_last = 0; - int sdu_length_total = 0; - int num_sdus = 0; - uint16_t sdu_lengths[NB_RB_MAX] = {0}; - uint8_t mac_sdus[MAX_NR_DLSCH_PAYLOAD_BYTES]; - unsigned char sdu_lcids[NB_RB_MAX] = {0}; - const int lcid = DL_SCH_LCID_CCCH; - if (sched_ctrl->num_total_bytes > 0) { - LOG_I(NR_MAC, - "[gNB %d][MSG4] Frame %d : CCCH->DLSCH, Requesting " - "%d bytes from RLC (lcid %d total hdr len %d), TBS: %d \n \n", - module_id, - frame, - TBS - ta_len - header_length_total - sdu_length_total - 3, - lcid, - header_length_total, - TBS); -#if 0 - // sdu_lengths[num_sdus] = mac_rrc_data_req(module_id, CC_idP, frameP, CCCH, - // UE_RNTI(module_idP,UE_id),1, // 1 transport block - // &cc[CC_idP].CCCH_pdu.payload[0], 1); - sdu_lengths[num_sdus] = mac_rrc_nr_data_req(module_id, CC_id, frame, CCCH, ra->rnti, 1, // 1 transport block - mac_sdus); - - LOG_D(MAC, - "[gNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n", - module_id, - sdu_lengths[num_sdus], - lcid); - - sdu_lcids[num_sdus] = lcid; - sdu_length_total += sdu_lengths[num_sdus]; - header_length_last = 1 + 1 + (sdu_lengths[num_sdus] >= 128); - header_length_total += header_length_last; - - num_sdus++; -#else - LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: random data\n", frame, slot); - // fill dlsch_buffer with random data - sdu_lcids[0] = lcid; // DRB - sdu_lengths[0] = 500; - for (int i = 0; i < sdu_lengths[0]; i++) - mac_sdus[i] = (unsigned char) (lrand48()&0xff); - sdu_length_total += sdu_lengths[0]; - header_length_total += 2 + (sdu_lengths[0] >= 128); - num_sdus +=1; -#endif - //ue_sched_ctl->uplane_inactivity_timer = 0; - } - - UE_info->mac_stats[UE_id].dlsch_total_bytes += TBS; - UE_info->mac_stats[UE_id].lc_bytes_tx[lcid] += sdu_length_total; - - // Check if there is data from RLC or CE - const int post_padding = TBS > header_length_total + sdu_length_total + cont_res_len; - - LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frame, slot, - TBS , header_length_total , sdu_length_total ,cont_res_len , post_padding ); - // padding param currently not in use - //padding = TBS - header_length_total - sdu_length_total - ta_len - 1; - - const int ntx_req = nr_mac->TX_req[CC_id].Number_of_PDUs; - nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[ntx_req]; - // pointer to directly generate the PDU into the nFAPI structure - uint32_t *buf = tx_req->TLVs[0].value.direct; - - const int offset = nr_write_ce_dlsch_pdu(module_id, - sched_ctrl, - (unsigned char *)buf, - 255, // no drx - ra->cont_res_id); - - // Padding: fill remainder of DLSCH with 0 - if (post_padding > 0) { - for (int j = 0; j < TBS - offset; j++) - buf[offset + j] = 0; - } - - // the buffer has been filled by nr_generate_dlsch_pdu(), below we simply - //fill the remaining information - tx_req->PDU_length = TBS; - tx_req->PDU_index = nr_mac->pdu_index[0]++; - tx_req->num_TLV = 1; - tx_req->TLVs[0].length = TBS + 2; - nr_mac->TX_req[CC_id].Number_of_PDUs++; - nr_mac->TX_req[CC_id].SFN = frame; - nr_mac->TX_req[CC_id].Slot = slot; - - retInfo->rbSize = sched_ctrl->rbSize; - retInfo->time_domain_allocation = sched_ctrl->time_domain_allocation; - retInfo->mcsTableIdx = sched_ctrl->mcsTableIdx; - retInfo->mcs = sched_ctrl->mcs; - retInfo->numDmrsCdmGrpsNoData = sched_ctrl->numDmrsCdmGrpsNoData; - -#if defined(ENABLE_MAC_PAYLOAD_DEBUG) - if (frame%100 == 0) { - LOG_I(MAC, - "%d.%d, first 10 payload bytes, TBS size: %d \n", - frame, - slot, - TBS); - for(int i = 0; i < 10; i++) - LOG_I(MAC, "byte %d: %x\n", i, ((uint8_t *) buf)[i]); - } -#endif - } - - nr_get_retransmission_timing(&ra->Msg4_frame, &ra->Msg4_slot); - ra->state = WAIT_Msg4_ACK; - LOG_I(NR_MAC, "Retransmission time for Msg4 is %d %d\n", ra->Msg4_frame, ra->Msg4_slot); - */ + LOG_D(MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize); + LOG_D(MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart); + LOG_D(MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing); + LOG_D(MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix); + LOG_D(MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex); + LOG_D(MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols); + for(int n=0;n<6;n++) LOG_D(MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]); + LOG_D(MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType); + LOG_D(MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize); + LOG_D(MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize); + LOG_D(MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType); + LOG_D(MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex); + LOG_D(MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity); + LOG_D(MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci); } } @@ -1616,32 +1258,6 @@ void nr_check_Msg4_Ack(module_id_t module_id, NR_RA_t *ra = &cc->ra[0]; ra->state = RA_IDLE; - - - /* - NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; - int UE_id = find_nr_UE_id_msg4(module_id, ra->rnti); - NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - const int current_harq_pid = ra->harq_pid; - NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid]; - - LOG_D(MAC, "ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d\n", UE_id, ra->rnti, harq->is_waiting, harq->round, frame, slot, current_harq_pid); - - if (harq->is_waiting == 0) - { - if ( harq->round == 0) - { - ra->state = IDLE; - UE_info->active[UE_id] = true; - free(ra->preambles.preamble_list); - LOG_I(MAC, "ue %d, rnti %d is active, frame %d %d\n", UE_id, ra->rnti, frame, slot); - } - else - { - ra->state = Msg4; - } - } - */ } void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP){ From d1ba40cc561bc3ee4d9dff680c827d609c37b244 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 24 Feb 2021 19:34:53 +0000 Subject: [PATCH 08/94] Fix RA-Msg2 to Initial BWP --- .../NR_MAC_UE/nr_ue_dci_configuration.c | 4 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 141 ++++++++---------- 3 files changed, 65 insertions(+), 82 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 1e1f4b311c..f3b4acc9bd 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -148,7 +148,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t monitoringSymbolsWithinSlot = (ss->monitoringSymbolsWithinSlot->buf[0]<<(sps-8)) | (ss->monitoringSymbolsWithinSlot->buf[1]>>(16-sps)); rel15->rnti = ra->ra_rnti; rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); //NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, 275); + rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing; rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_RA, rel15->BWPSize, bwp_id); break; @@ -260,7 +260,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl LOG_D(NR_MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space (RA-Msg2)\n"); rel15->num_dci_options = 1; rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; - config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, ss_id); + config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, -1); fill_dci_search_candidates(ss, rel15); break; case WAIT_CONTENTION_RESOLUTION: diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 18ad62cf39..d228c7fc96 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -658,7 +658,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; } - if(rnti == ra->t_crnti) { + if( (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti) || (rnti == ra->t_crnti) ) { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); } else { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 284243b69c..00827a13ee 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -663,7 +663,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t vrb_map_UL[i + ra->msg3_first_rb] = 1; } - LOG_I(MAC, "[gNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n", module_idP, frameP, slotP, CC_id, ra->Msg3_frame, ra->Msg3_slot); + LOG_D(MAC, "[gNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n", module_idP, frameP, slotP, CC_id, ra->Msg3_frame, ra->Msg3_slot); nfapi_nr_ul_tti_request_t *future_ul_tti_req = &RC.nrmac[module_idP]->UL_tti_req_ahead[CC_id][ra->Msg3_slot]; AssertFatal(future_ul_tti_req->SFN == ra->Msg3_frame @@ -774,49 +774,43 @@ void nr_generate_Msg2(module_id_t module_idP, sub_frame_t slotP) { - int mcsIndex; - int startSymbolAndLength = 0, StartSymbolIndex = -1, NrOfSymbols = 14, StartSymbolIndex_tmp, NrOfSymbols_tmp, x_Overhead, time_domain_assignment = 0; - gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; - NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; - NR_RA_t *ra = &cc->ra[CC_id]; - NR_SearchSpace_t *ss = ra->ra_ss; - - uint16_t RA_rnti = ra->RA_rnti; - long locationAndBandwidth; - - // check if UE is doing RA on CORESET0 , InitialBWP or configured BWP from SCD - // get the BW of the PDCCH for PDCCH size and RAR PDSCH size - - NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - int dci10_bw; - - if (ra->coreset0_configured == 1) { - AssertFatal(1==0,"This is a standalone condition\n"); - } - else { // on configured BWP or initial LDBWP, bandwidth parameters in DCI correspond size of initialBWP - locationAndBandwidth = scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth; - dci10_bw = NRRIV2BW(locationAndBandwidth, MAX_BWP_SIZE); - } + gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; + NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; + NR_RA_t *ra = &cc->ra[0]; if ((ra->Msg2_frame == frameP) && (ra->Msg2_slot == slotP)) { + int mcsIndex = 0; + int startSymbolAndLength = 0; + int StartSymbolIndex = -1; + int NrOfSymbols = 14; + int StartSymbolIndex_tmp = 0; + int NrOfSymbols_tmp = 0; + int x_Overhead = 0; + int time_domain_assignment = 0; + uint8_t nr_of_candidates = 0; + uint8_t aggregation_level = 0; + + NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; + NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; + NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; + // Checking if the DCI allocation is feasible in current subframe if (dl_req->nPDUs > NFAPI_NR_MAX_DL_TTI_PDUS - 2) { - LOG_I(MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, RA_rnti); + LOG_I(MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, ra->RA_rnti); return; } - uint8_t nr_of_candidates, aggregation_level; find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss); - NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - NR_ControlResourceSet_t *coreset = get_coreset(bwp, ss, 0 /* common */); int CCEIndex = allocate_nr_CCEs(nr_mac, bwp, coreset, aggregation_level, - 0, // Y - 0, // m + 0, + 0, nr_of_candidates); if (CCEIndex < 0) { @@ -826,9 +820,8 @@ void nr_generate_Msg2(module_id_t module_idP, nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; - /* look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not - * exist, create it. This is especially important if we have multiple RAs, - * and the DLSCH has to reuse them, so we need to mark them */ + // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially + // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them const int bwpid = bwp->bwp_Id; const int coresetid = coreset->controlResourceSetId; nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid]; @@ -843,6 +836,9 @@ void nr_generate_Msg2(module_id_t module_idP, nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid] = pdcch_pdu_rel15; } + // TODO: This assignment should be done in function nr_configure_pdcch() + pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; @@ -850,7 +846,7 @@ void nr_generate_Msg2(module_id_t module_idP, dl_req->nPDUs+=1; nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; - LOG_I(MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RAR DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); + LOG_I(NR_MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); // This code from this point on will not work on initialBWP or CORESET0 AssertFatal(ra->bwp_id>0,"cannot work on initialBWP for now\n"); @@ -860,33 +856,23 @@ void nr_generate_Msg2(module_id_t module_idP, ra->crnti); AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, "downlinkBWP_ToAddModList has %d BWP!\n", ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); - NR_BWP_Uplink_t *ubwp=ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id-1]; - - LOG_I(MAC, "[RAPROC] Scheduling common search space DCI type 1 dlBWP BW %d\n", dci10_bw); - - // Qm>2 not allowed for RAR - if (get_softmodem_params()->do_ra) - mcsIndex = 9; - else - mcsIndex = 0; pdsch_pdu_rel15->pduBitmap = 0; - pdsch_pdu_rel15->rnti = RA_rnti; - /* SCF222: PDU index incremented for each PDSCH PDU sent in TX control - * message. This is used to associate control information to data and is - * reset every slot. */ + pdsch_pdu_rel15->rnti = ra->RA_rnti; + + // SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control + // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; pdsch_pdu_rel15->pduIndex = pduindex; - - - pdsch_pdu_rel15->BWPSize = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,0); pdsch_pdu_rel15->qamModOrder[0] = 2; pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; + if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) pdsch_pdu_rel15->mcsTable[0] = 0; else{ @@ -895,12 +881,13 @@ void nr_generate_Msg2(module_id_t module_idP, else pdsch_pdu_rel15->mcsTable[0] = 2; } + pdsch_pdu_rel15->rvIndex[0] = 0; pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; pdsch_pdu_rel15->nrOfLayers = 1; pdsch_pdu_rel15->transmissionScheme = 0; pdsch_pdu_rel15->refPoint = 0; - pdsch_pdu_rel15->dmrsConfigType = 0; + pdsch_pdu_rel15->dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2; @@ -908,7 +895,7 @@ void nr_generate_Msg2(module_id_t module_idP, pdsch_pdu_rel15->resourceAlloc = 1; pdsch_pdu_rel15->rbStart = 0; pdsch_pdu_rel15->rbSize = 6; - pdsch_pdu_rel15->VRBtoPRBMapping = 0; // non interleaved + pdsch_pdu_rel15->VRBtoPRBMapping = 0; for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; @@ -926,13 +913,10 @@ void nr_generate_Msg2(module_id_t module_idP, pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols); - /* Fill PDCCH DL DCI PDU */ + // Fill PDCCH DL DCI PDU nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; pdcch_pdu_rel15->numDlDci++; - dci_pdu->RNTI = RA_rnti; - /* TODO: remove next line */ - AssertFatal(ss->searchSpaceType->present != NR_SearchSpace__searchSpaceType_PR_ue_Specific, - "shouldn't the RA SS be common?\n"); + dci_pdu->RNTI = ra->RA_rnti; dci_pdu->ScramblingId = *scc->physCellId; dci_pdu->ScramblingRNTI = 0; dci_pdu->AggregationLevel = aggregation_level; @@ -942,47 +926,45 @@ void nr_generate_Msg2(module_id_t module_idP, dci_pdu_rel15_t dci_payload; dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize, - pdsch_pdu_rel15->rbStart,dci10_bw); + pdsch_pdu_rel15->rbStart, + pdsch_pdu_rel15->BWPSize); + dci_payload.time_domain_assignment.val = time_domain_assignment; dci_payload.vrb_to_prb_mapping.val = 0; dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; dci_payload.tb_scaling = 0; - LOG_I(MAC, + LOG_D(NR_MAC, "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", dci_payload.frequency_domain_assignment.val, pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->rbSize, - dci10_bw, + pdsch_pdu_rel15->BWPSize, dci_payload.time_domain_assignment.val, dci_payload.vrb_to_prb_mapping.val, dci_payload.mcs, dci_payload.tb_scaling); - LOG_I(MAC, "Frame %d: Subframe %d : Adding common DL DCI for RA_RNTI %x\n", frameP, slotP, RA_rnti); - - const int dci_format = NR_DL_DCI_FORMAT_1_0; - const int rnti_type = NR_RNTI_RA; - - LOG_I(MAC, - "[RAPROC] DCI params: rnti %d, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n", + LOG_D(NR_MAC, + "[RAPROC] DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n", pdcch_pdu_rel15->dci_pdu[0].RNTI, - rnti_type, - dci_format, + NR_RNTI_RA, + NR_DL_DCI_FORMAT_1_0, (unsigned long long)pdcch_pdu_rel15->FreqDomainResource, pdcch_pdu_rel15->StartSymbolIndex, pdcch_pdu_rel15->DurationSymbols); fill_dci_pdu_rel15(scc, - ra->secondaryCellGroup, - dci_pdu, + nr_mac->secondaryCellGroupCommon, + &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1], &dci_payload, - dci_format, - rnti_type, - dci10_bw, - ra->bwp_id); + NR_DL_DCI_FORMAT_1_0, + NR_RNTI_RA, + pdsch_pdu_rel15->BWPSize, + nr_mac->sched_ctrlCommon->active_bwp->bwp_Id); // Program UL processing for Msg3 + NR_BWP_Uplink_t *ubwp=ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id-1]; nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra); LOG_I(MAC, "Frame %d, Subframe %d: Setting Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); nr_add_msg3(module_idP, CC_id, frameP, slotP); @@ -1003,13 +985,14 @@ void nr_generate_Msg2(module_id_t module_idP, memcpy((void*)&tx_req->TLVs[0].value.direct[0], (void*)&cc[CC_id].RAR_pdu.payload[0], tx_req->TLVs[0].length); T(T_GNB_MAC_DL_RAR_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), - T_INT(RA_rnti), T_INT(frameP), T_INT(slotP), T_INT(0) /* harq pid, meaningful? */, + T_INT(ra->RA_rnti), T_INT(frameP), T_INT(slotP), T_INT(0) /* harq pid, meaningful? */, T_BUFFER(&cc[CC_id].RAR_pdu.payload[0], tx_req->TLVs[0].length)); - /* mark the corresponding RBs as used */ + // mark the corresponding RBs as used uint16_t *vrb_map = cc[CC_id].vrb_map; - for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) + for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; + } } } From adaf5a721cedefd166a01eb2a2d96694096dbd90 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 25 Feb 2021 10:56:08 +0000 Subject: [PATCH 09/94] Define Initial BWP with the same locationAndBandwidth as Coreset0 defined by PDCCHConfigSIB1 in MIB --- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index d28427dbf3..892aa73398 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -50,8 +50,8 @@ gNBs = dl_carrierBandwidth = 106; #initialDownlinkBWP #genericParameters - # this is RBstart=41,L=24 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6366; # 6366 12925 12956 28875 + # this is RBstart=27,L=48 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 12952; # 6366 12925 12956 28875 12952 # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; @@ -94,7 +94,7 @@ gNBs = pMax = 20; #initialUplinkBWP #genericParameters - initialULBWPlocationAndBandwidth = 6366; + initialULBWPlocationAndBandwidth = 12952; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialULBWPsubcarrierSpacing = 1; From c8fbcdf7b997a7ae7d6cfefe3693e47e18e89211 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 25 Feb 2021 12:47:23 +0000 Subject: [PATCH 10/94] Minor fix --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index 61238ae647..c4673e9d18 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -88,7 +88,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, cset_start_sc = frame_parms.first_carrier_offset + rb_offset*NR_NB_SC_PER_RB; if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_MIB_SIB1) { cset_start_sc = cset_start_sc + RC.nrmac[gNB->Mod_id]->type0_PDCCH_CSS_config.cset_start_rb*NR_NB_SC_PER_RB; - } else if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0) { + } else { cset_start_sc = cset_start_sc + pdcch_pdu_rel15->BWPStart*NR_NB_SC_PER_RB; } From 6a16fe9e3f5b7d6626c56206534dccc1793402c5 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 25 Feb 2021 14:57:53 +0000 Subject: [PATCH 11/94] Fix issues caused by merge of branch develop --- openair1/PHY/defs_gNB.h | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 1 + openair2/LAYER2/NR_MAC_gNB/config.c | 6 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 205 +++++++++--------- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 5 +- openair2/NR_PHY_INTERFACE/NR_IF_Module.c | 2 +- 9 files changed, 118 insertions(+), 109 deletions(-) diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index f3f212effb..b22803116b 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -655,7 +655,7 @@ typedef struct { int prach_I0; } PHY_MEASUREMENTS_gNB; -#define TOTAL_NUM_NR_PRACH_PREAMBLES 64 +#define MAX_NUM_NR_PRACH_PREAMBLES 64 #define MAX_NUM_NR_RX_RACH_PDUS 4 #define MAX_NUM_NR_RX_PRACH_PREAMBLES 4 #define MAX_UL_PDUS_PER_SLOT 8 diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index d228c7fc96..f26062d4c7 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -783,7 +783,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr // FIXME: Remove this if (ra->ra_state == WAIT_CONTENTION_RESOLUTION && rnti == ra->t_crnti){ - LOG_I(NR_MAC,"RA-Msg4 was received\n"); + LOG_I(NR_MAC,"RA-Msg4 received\n"); nr_ra_succeeded(module_id, frame, slot); } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 9fcf9baaaf..d60fc55090 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -895,6 +895,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in for (int k = 0; k < TBS_bytes; k++) { LOG_D(NR_MAC,"(%i): 0x%x\n",k,mac->ulsch_pdu.payload[k]); } + LOG_I(NR_MAC,"[RAPROC] RA-Msg3 transmitted\n"); } else { if (IS_SOFTMODEM_NOS1 && (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator)){ // Getting IP traffic to be transmitted diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index cf4966b31e..41317f8bbc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -436,9 +436,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, } else { ra->cfra = false; ra->rnti = rnti; - ra->preambles.num_preambles = TOTAL_NUM_NR_PRACH_PREAMBLES; - ra->preambles.preamble_list = (uint8_t *) malloc(TOTAL_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); - for (int i = 0; i < TOTAL_NUM_NR_PRACH_PREAMBLES; i++) + ra->preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES; + ra->preambles.preamble_list = (uint8_t *) malloc(MAX_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); + for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++) ra->preambles.preamble_list[i] = i; } LOG_I(PHY,"Added new RA process for UE RNTI %04x with initial secondaryCellGroup\n", rnti); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index c636c28bf3..288b57659d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -65,7 +65,7 @@ int16_t ssb_index_from_prach(module_id_t module_idP, uint8_t config_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex; uint8_t fdm = cfg->prach_config.num_prach_fd_occasions.value; - uint8_t total_RApreambles = 64; + uint8_t total_RApreambles = MAX_NUM_NR_PRACH_PREAMBLES; if( scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles != NULL) total_RApreambles = *scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles; @@ -520,7 +520,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1); - LOG_I(MAC, + LOG_D(MAC, "[gNB %d][RAPROC] CC_id %d Frame %d, Slot %d Initiating RA procedure for preamble index %d\n", module_idP, CC_id, @@ -542,7 +542,6 @@ void nr_initiate_ra_proc(module_id_t module_idP, continue; // if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc } } - int loop = 0; LOG_D(MAC, "Frame %d, Slot %d: Activating RA process \n", frameP, slotP); ra->state = Msg2; ra->timing_offset = timing_offset; @@ -574,7 +573,11 @@ void nr_initiate_ra_proc(module_id_t module_idP, ra->Msg2_frame = msg2_frame; ra->Msg2_slot = msg2_slot; - LOG_I(MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP); + LOG_D(MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP); + + // TODO: Configure RRC with the new RNTI of the following commented lines + /* + int loop = 0; if (!ra->cfra) { do { ra->rnti = (taus() % 65518) + 1; @@ -587,11 +590,13 @@ void nr_initiate_ra_proc(module_id_t module_idP, abort(); } } + */ + ra->RA_rnti = ra_rnti; ra->preamble_index = preamble_index; ra->beam_id = beam_index; - LOG_I(MAC, + LOG_D(MAC, "[gNB %d][RAPROC] CC_id %d Frame %d Activating Msg2 generation in frame %d, slot %d using RA rnti %x SSB " "index %u\n", module_idP, @@ -610,76 +615,76 @@ void nr_initiate_ra_proc(module_id_t module_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0); } -void nr_schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) -{ - gNB_MAC_INST *mac = RC.nrmac[module_idP]; + void nr_schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) + { + gNB_MAC_INST *mac = RC.nrmac[module_idP]; - start_meas(&mac->schedule_ra); - for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - NR_COMMON_channels_t *cc = &mac->common_channels[CC_id]; - for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { - NR_RA_t *ra = &cc->ra[i]; - LOG_D(MAC, "RA[state:%d]\n", ra->state); - switch (ra->state) { - case Msg2: - nr_generate_Msg2(module_idP, CC_id, frameP, slotP, ra); - break; - case Msg4: - nr_generate_Msg4(module_idP, CC_id, frameP, slotP); - break; - case WAIT_Msg4_ACK: - nr_check_Msg4_Ack(module_idP, CC_id, frameP, slotP); - break; - default: - break; + start_meas(&mac->schedule_ra); + for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { + NR_COMMON_channels_t *cc = &mac->common_channels[CC_id]; + for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { + NR_RA_t *ra = &cc->ra[i]; + LOG_D(MAC, "RA[state:%d]\n", ra->state); + switch (ra->state) { + case Msg2: + nr_generate_Msg2(module_idP, CC_id, frameP, slotP, ra); + break; + case Msg4: + nr_generate_Msg4(module_idP, CC_id, frameP, slotP); + break; + case WAIT_Msg4_ACK: + nr_check_Msg4_Ack(module_idP, CC_id, frameP, slotP); + break; + default: + break; + } } } + stop_meas(&mac->schedule_ra); } - stop_meas(&mac->schedule_ra); -} -void nr_get_Msg3alloc(module_id_t module_id, - int CC_id, - NR_ServingCellConfigCommon_t *scc, - NR_BWP_Uplink_t *ubwp, - sub_frame_t current_slot, - frame_t current_frame, - NR_RA_t *ra) { + void nr_get_Msg3alloc(module_id_t module_id, + int CC_id, + NR_ServingCellConfigCommon_t *scc, + NR_BWP_Uplink_t *ubwp, + sub_frame_t current_slot, + frame_t current_frame, + NR_RA_t *ra) { - // msg3 is schedulend in mixed slot in the following TDD period + // msg3 is schedulend in mixed slot in the following TDD period - uint16_t msg3_nb_rb = 8 + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT); // sdu has 6 or 8 bytes + uint16_t msg3_nb_rb = 8 + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT); // sdu has 6 or 8 bytes - int mu = ubwp->bwp_Common->genericParameters.subcarrierSpacing; - int StartSymbolIndex, NrOfSymbols, startSymbolAndLength, temp_slot; - ra->Msg3_tda_id = 16; // initialization to a value above limit + int mu = ubwp->bwp_Common->genericParameters.subcarrierSpacing; + int StartSymbolIndex, NrOfSymbols, startSymbolAndLength, temp_slot; + ra->Msg3_tda_id = 16; // initialization to a value above limit - for (int i=0; ibwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.count; i++) { - startSymbolAndLength = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; - SLIV2SL(startSymbolAndLength, &StartSymbolIndex, &NrOfSymbols); - // we want to transmit in the uplink symbols of mixed slot - if (NrOfSymbols == scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols) { - ra->Msg3_tda_id = i; - break; + for (int i=0; ibwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.count; i++) { + startSymbolAndLength = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; + SLIV2SL(startSymbolAndLength, &StartSymbolIndex, &NrOfSymbols); + // we want to transmit in the uplink symbols of mixed slot + if (NrOfSymbols == scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols) { + ra->Msg3_tda_id = i; + break; + } } - } - AssertFatal(ra->Msg3_tda_id<16,"Unable to find Msg3 time domain allocation in list\n"); + AssertFatal(ra->Msg3_tda_id<16,"Unable to find Msg3 time domain allocation in list\n"); - uint8_t k2 = *ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->k2; + uint8_t k2 = *ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->k2; - temp_slot = current_slot + k2 + DELTA[mu]; // msg3 slot according to 8.3 in 38.213 - ra->Msg3_slot = temp_slot%nr_slots_per_frame[mu]; - if (nr_slots_per_frame[mu]>temp_slot) - ra->Msg3_frame = current_frame; - else - ra->Msg3_frame = current_frame + (temp_slot/nr_slots_per_frame[mu]); + temp_slot = current_slot + k2 + DELTA[mu]; // msg3 slot according to 8.3 in 38.213 + ra->Msg3_slot = temp_slot%nr_slots_per_frame[mu]; + if (nr_slots_per_frame[mu]>temp_slot) + ra->Msg3_frame = current_frame; + else + ra->Msg3_frame = current_frame + (temp_slot/nr_slots_per_frame[mu]); - LOG_I(MAC, "[RAPROC] Msg3 slot %d: current slot %u Msg3 frame %u k2 %u Msg3_tda_id %u start symbol index %u\n", ra->Msg3_slot, current_slot, ra->Msg3_frame, k2,ra->Msg3_tda_id, StartSymbolIndex); - uint16_t *vrb_map_UL = - &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[ra->Msg3_slot * MAX_BWP_SIZE]; - const uint16_t bwpSize = NRRIV2BW(ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + LOG_D(MAC, "[RAPROC] Msg3 slot %d: current slot %u Msg3 frame %u k2 %u Msg3_tda_id %u start symbol index %u\n", ra->Msg3_slot, current_slot, ra->Msg3_frame, k2,ra->Msg3_tda_id, StartSymbolIndex); + uint16_t *vrb_map_UL = + &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[ra->Msg3_slot * MAX_BWP_SIZE]; + const uint16_t bwpSize = NRRIV2BW(ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - /* search msg3_nb_rb free RBs */ + /* search msg3_nb_rb free RBs */ int rbSize = 0; int rbStart = 0; while (rbSize < msg3_nb_rb) { @@ -824,7 +829,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; - NR_RA_t *ra = &cc->ra[0]; if ((ra->Msg2_frame == frameP) && (ra->Msg2_slot == slotP)) { @@ -838,14 +842,31 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int time_domain_assignment = 0; uint8_t nr_of_candidates = 0; uint8_t aggregation_level = 0; + int rbStart = 0; + int rbSize = 6; + uint16_t *vrb_map = cc[CC_id].vrb_map; NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; + for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { + if (vrb_map[rbStart + i]) { + rbStart += i; + i = 0; + } + } + if (rbStart > (BWPSize - rbSize)) { + LOG_E(MAC, "%s(): cannot find free vrb_map for RA RNTI %04x!\n", __func__, ra->RA_rnti); + return; + } + // Checking if the DCI allocation is feasible in current subframe if (dl_req->nPDUs > NFAPI_NR_MAX_DL_TTI_PDUS - 2) { LOG_I(MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, ra->RA_rnti); @@ -866,8 +887,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra return; } - nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; - // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them const int bwpid = bwp->bwp_Id; @@ -894,14 +913,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dl_req->nPDUs+=1; nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; - LOG_I(NR_MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); + LOG_I(NR_MAC,"[gNB %d][RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, rnti 0x%x, state %d\n", module_idP, CC_id, frameP, slotP, ra->RA_rnti, ra->state); - // This code from this point on will not work on initialBWP or CORESET0 - AssertFatal(ra->bwp_id>0,"cannot work on initialBWP for now\n"); - - AssertFatal(ra->secondaryCellGroup, - "no secondaryCellGroup for RNTI %04x\n", - ra->crnti); + AssertFatal(ra->secondaryCellGroup, "no secondaryCellGroup for RNTI %04x\n", ra->crnti); AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, "downlinkBWP_ToAddModList has %d BWP!\n", ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); @@ -912,15 +926,14 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; pdsch_pdu_rel15->pduIndex = pduindex; - pdsch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPSize = BWPSize; + pdsch_pdu_rel15->BWPStart = BWPStart; pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,0); pdsch_pdu_rel15->qamModOrder[0] = 2; pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; - if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) pdsch_pdu_rel15->mcsTable[0] = 0; else{ @@ -929,7 +942,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra else pdsch_pdu_rel15->mcsTable[0] = 2; } - pdsch_pdu_rel15->rvIndex[0] = 0; pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; pdsch_pdu_rel15->nrOfLayers = 1; @@ -941,8 +953,8 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2; pdsch_pdu_rel15->dmrsPorts = 1; pdsch_pdu_rel15->resourceAlloc = 1; - pdsch_pdu_rel15->rbStart = 0; - pdsch_pdu_rel15->rbSize = 6; + pdsch_pdu_rel15->rbStart = rbStart; + pdsch_pdu_rel15->rbSize = rbSize; pdsch_pdu_rel15->VRBtoPRBMapping = 0; for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { @@ -1011,17 +1023,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->BWPSize, nr_mac->sched_ctrlCommon->active_bwp->bwp_Id); - // Program UL processing for Msg3 - NR_BWP_Uplink_t *ubwp=ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id-1]; - nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra); - LOG_I(MAC, "Frame %d, Subframe %d: Setting Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); - nr_add_msg3(module_idP, CC_id, frameP, slotP); - ra->state = WAIT_Msg3; - LOG_I(MAC,"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d\n", module_idP, frameP, slotP, ra->state); - - x_Overhead = 0; - nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); - // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; tx_req->PDU_length = pdsch_pdu_rel15->TBSize[0]; @@ -1031,16 +1032,25 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra nr_mac->TX_req[CC_id].SFN = frameP; nr_mac->TX_req[CC_id].Number_of_PDUs++; nr_mac->TX_req[CC_id].Slot = slotP; - memcpy((void*)&tx_req->TLVs[0].value.direct[0], (void*)&cc[CC_id].RAR_pdu.payload[0], tx_req->TLVs[0].length); + + // Program UL processing for Msg3 + NR_BWP_Uplink_t *ubwp=ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id-1]; + nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra); + LOG_I(MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); + nr_add_msg3(module_idP, CC_id, frameP, slotP, ra, (uint8_t *) &tx_req->TLVs[0].value.direct[0]); + ra->state = WAIT_Msg3; + LOG_I(MAC,"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d\n", module_idP, frameP, slotP, ra->state); + + x_Overhead = 0; + nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); T(T_GNB_MAC_DL_RAR_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), - T_INT(ra->RA_rnti), T_INT(frameP), T_INT(slotP), T_INT(0) /* harq pid, meaningful? */, - T_BUFFER(&cc[CC_id].RAR_pdu.payload[0], tx_req->TLVs[0].length)); + T_INT(ra->RA_rnti), T_INT(frameP), T_INT(slotP), T_INT(0), + T_BUFFER(&tx_req->TLVs[0].value.direct[0], tx_req->TLVs[0].length)); - // mark the corresponding RBs as used - uint16_t *vrb_map = cc[CC_id].vrb_map; - for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { - vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; + // Mark the corresponding RBs as used + for (int rb = 0; rb < rbSize; rb++) { + vrb_map[rb + rbStart] = 1; } } } @@ -1124,10 +1134,7 @@ void nr_generate_Msg4(module_id_t module_idP, LOG_I(NR_MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); - // This code from this point on will not work on initialBWP or CORESET0 - AssertFatal(ra->bwp_id>0,"cannot work on initialBWP for now\n"); AssertFatal(ra->secondaryCellGroup, "no secondaryCellGroup for RNTI %04x\n", ra->rnti); - AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, "downlinkBWP_ToAddModList has %d BWP!\n", ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); @@ -1254,7 +1261,7 @@ void nr_generate_Msg4(module_id_t module_idP, nr_mac->TX_req[CC_id].Slot = slotP; memcpy(tx_req->TLVs[0].value.direct, payload, tx_req->TLVs[0].length); - // mark the corresponding RBs as used + // Mark the corresponding RBs as used uint16_t *vrb_map = cc[CC_id].vrb_map; for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index f2c75acd22..d9948b64b8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1698,7 +1698,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *secon add_tail_nr_list(&sched_ctrl->available_ul_harq, harq); create_nr_list(&sched_ctrl->feedback_ul_harq, 16); create_nr_list(&sched_ctrl->retrans_ul_harq, 16); - LOG_I(MAC, "gNB %d] Add NR UE_id %d : rnti %x\n", + LOG_I(MAC, "[gNB %d] Add NR UE_id %d : rnti %x\n", mod_idP, UE_id, rntiP); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 629b4dc7b0..4c7e063a0f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -164,7 +164,7 @@ void compute_csi_bitlen (NR_CellGroupConfig_t *secondaryCellGroup, NR_UE_info_t UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen =0; } - LOG_I (MAC, "UCI: CSI_bit len : ssbri %d, rsrp: %d, diff_rsrp: %d\n", + LOG_D (MAC, "UCI: CSI_bit len : ssbri %d, rsrp: %d, diff_rsrp: %d\n", UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].cri_ssbri_bitlen, UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].rsrp_bitlen, UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index ad71e467c3..b0b6ebbd5a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -476,13 +476,14 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, const int UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti, ra->secondaryCellGroup); UE_info->UE_beam_index[UE_id] = ra->beam_id; LOG_I(NR_MAC, - "[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly, " + "[gNB %d][RAPROC] PUSCH with TC-RNTI %x received correctly, " "adding UE MAC Context UE_id %d/RNTI %04x\n", gnb_mod_idP, current_rnti, UE_id, ra->rnti); + LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); for (int k = 0; k < sdu_lenP; k++) { LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); @@ -496,7 +497,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ra->state = Msg4; ra->Msg4_frame = ( frameP +2 ) % 1024; ra->Msg4_slot = 1; - LOG_I(MAC, "set RA state to Msg4 for RA-RNTI %04x, msg4 frame %d %d\n", ra->rnti, ra->Msg4_frame, ra->Msg4_slot); + LOG_I(MAC, "Scheduling RA-Msg4 for TC-RNTI %04x (state %d, frame %d, slot %d)\n", ra->rnti, ra->state, ra->Msg4_frame, ra->Msg4_slot); return; } } diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index b183b32aab..63cc0cf0de 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -56,7 +56,7 @@ extern uint16_t sl_ahead; void handle_nr_rach(NR_UL_IND_t *UL_info) { if (UL_info->rach_ind.number_of_pdus>0) { - LOG_I(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n",UL_info->frame,UL_info->slot, UL_info->rach_ind.sfn,UL_info->rach_ind.slot); + LOG_D(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n",UL_info->frame,UL_info->slot, UL_info->rach_ind.sfn,UL_info->rach_ind.slot); int npdus = UL_info->rach_ind.number_of_pdus; for(int i = 0; i < npdus; i++) { UL_info->rach_ind.number_of_pdus--; From eb17629d34d146b24d5f2f6ed7fbeb7187213468 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 26 Feb 2021 00:51:03 +0000 Subject: [PATCH 12/94] nr_generate_Msg4 support for multiple RA procedures --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 22 ++++++------------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 10 ++------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 288b57659d..5b21b9a68c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -475,7 +475,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - uint8_t total_RApreambles = 64; + uint8_t total_RApreambles = MAX_NUM_NR_PRACH_PREAMBLES; uint8_t num_ssb_per_RO = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present; int pr_found; @@ -624,16 +624,16 @@ void nr_initiate_ra_proc(module_id_t module_idP, NR_COMMON_channels_t *cc = &mac->common_channels[CC_id]; for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { NR_RA_t *ra = &cc->ra[i]; - LOG_D(MAC, "RA[state:%d]\n", ra->state); + LOG_D(NR_MAC, "RA[state:%d]\n", ra->state); switch (ra->state) { case Msg2: nr_generate_Msg2(module_idP, CC_id, frameP, slotP, ra); break; case Msg4: - nr_generate_Msg4(module_idP, CC_id, frameP, slotP); + nr_generate_Msg4(module_idP, CC_id, frameP, slotP, ra); break; case WAIT_Msg4_ACK: - nr_check_Msg4_Ack(module_idP, CC_id, frameP, slotP); + nr_check_Msg4_Ack(module_idP, CC_id, frameP, slotP, ra); break; default: break; @@ -1055,14 +1055,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } } -void nr_generate_Msg4(module_id_t module_idP, - int CC_id, - frame_t frameP, - sub_frame_t slotP) { +void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra) { gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; - NR_RA_t *ra = &cc->ra[0]; if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) { @@ -1285,16 +1281,12 @@ void nr_generate_Msg4(module_id_t module_idP, } } -void nr_check_Msg4_Ack(module_id_t module_id, - int CC_id, - frame_t frame, - sub_frame_t slot) { +void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t slot, NR_RA_t *ra) { LOG_W(NR_MAC,"nr_check_Msg4_Ack() is not implemented yet!\n"); gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; - NR_RA_t *ra = &cc->ra[0]; ra->state = RA_IDLE; } @@ -1303,7 +1295,7 @@ void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP){ NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[CC_id].ra[0]; LOG_D(MAC,"[gNB %d][RAPROC] CC_id %d Frame %d Clear Random access information rnti %x\n", module_idP, CC_id, frameP, ra->rnti); - ra->state = IDLE; + ra->state = RA_IDLE; ra->timing_offset = 0; ra->RRC_timer = 20; ra->rnti = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 5d77bcb949..823e374ceb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -355,15 +355,9 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP, void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra); -void nr_generate_Msg4(module_id_t module_idP, - int CC_id, - frame_t frameP, - sub_frame_t slotP); +void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra); -void nr_check_Msg4_Ack(module_id_t module_id, - int CC_id, - frame_t frame, - sub_frame_t slot); +void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t slot, NR_RA_t *ra); void nr_process_mac_pdu( module_id_t module_idP, From fc9b781c2a7de5f4b2b751fc2956d05b54d104f2 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 26 Feb 2021 20:15:06 +0000 Subject: [PATCH 13/94] Avoid multiple transmissions in the RA-Msg4 slot --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 8 +++++++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 5 ----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 7201b29596..6164f64e21 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -438,7 +438,13 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, } // This schedules the DCI for Downlink and PDSCH - if (is_xlsch_in_slot(dlsch_in_slot_bitmap, slot)) + bool tx_ra_msg4 = false; + for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { + if(cc->ra[i].state == Msg4 && cc->ra[i].Msg4_frame==frame && cc->ra[i].Msg4_slot==slot) { + tx_ra_msg4 = true; + } + } + if ( is_xlsch_in_slot(dlsch_in_slot_bitmap, slot) && tx_ra_msg4 == false ) nr_schedule_ue_spec(module_idP, frame, slot); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 5b21b9a68c..1eb25c0366 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1282,12 +1282,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t slot, NR_RA_t *ra) { - LOG_W(NR_MAC,"nr_check_Msg4_Ack() is not implemented yet!\n"); - - gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; - NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; - ra->state = RA_IDLE; } From 9ce7f945184d6d2ae12bb320c455506981ea0f5b Mon Sep 17 00:00:00 2001 From: Laurent Thomas Date: Sun, 28 Feb 2021 21:39:53 +0100 Subject: [PATCH 14/94] record/replay for 5G, nrscope bug fix --- executables/main-ocp.c | 4 +- executables/nr-ru.c | 5 +- executables/nr-softmodem.c | 2 +- executables/nr-uesoftmodem.c | 2 +- executables/ocp-gnb.c | 2 +- executables/softmodem-common.c | 2 +- executables/softmodem-common.h | 4 +- openair1/PHY/TOOLS/nr_phy_scope.c | 108 ++- openair1/PHY/TOOLS/nr_phy_scope.h | 8 +- openair1/PHY/TOOLS/phy_scope_interface.c | 1 + openair1/PHY/TOOLS/phy_scope_interface.h | 19 + targets/ARCH/COMMON/record_player.c | 24 +- targets/ARCH/COMMON/record_player.h | 19 +- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 950 +++++++++---------- targets/ARCH/iqplayer/iqplayer_lib.c | 205 ++-- targets/RT/USER/lte-softmodem.c | 4 +- targets/RT/USER/lte-uesoftmodem.c | 4 +- 17 files changed, 671 insertions(+), 692 deletions(-) diff --git a/executables/main-ocp.c b/executables/main-ocp.c index ae1db7195b..d1ccda95c3 100644 --- a/executables/main-ocp.c +++ b/executables/main-ocp.c @@ -1318,7 +1318,7 @@ int main ( int argc, char **argv ) { // end of CI modifications //getchar(); - if(IS_SOFTMODEM_DOFORMS) + if(IS_SOFTMODEM_DOSCOPE) load_softscope("enb", NULL); itti_wait_tasks_end(); @@ -1327,7 +1327,7 @@ int main ( int argc, char **argv ) { // stop threads if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) { - if(IS_SOFTMODEM_DOFORMS) + if(IS_SOFTMODEM_DOSCOPE) end_forms(); LOG_I(ENB_APP,"stopping MODEM threads\n"); diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 73421d8ed7..9e9303e228 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -89,7 +89,7 @@ static int DEFBFW[] = {0x00007fff}; #include "s1ap_eNB.h" #include "SIMULATION/ETH_TRANSPORT/proto.h" - +#include #include "T.h" @@ -1593,7 +1593,8 @@ void *ru_thread( void *param ) { for (aa=0;aanb_rx;aa++) memcpy((void*)RC.gNB[0]->common_vars.rxdataF[aa], (void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t)); - + if (IS_SOFTMODEM_DOSCOPE && RC.gNB[0]->scopeData) + ((scopeData_t*)RC.gNB[0]->scopeData)->slotFunc(ru->common.rxdataF[0],proc->tti_rx, RC.gNB[0]->scopeData); // Do PRACH RU processing int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST); diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 924c32b8a7..4d88edebb2 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -900,7 +900,7 @@ if(!IS_SOFTMODEM_NOS1) printf("RC.nb_RU:%d\n", RC.nb_RU); // once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration) printf("ALL RUs ready - init gNBs\n"); - if(IS_SOFTMODEM_DOFORMS) { + if(IS_SOFTMODEM_DOSCOPE) { sleep(1); scopeParms_t p; p.argc=&argc; diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 5d651344d6..981ee735c9 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -551,7 +551,7 @@ int main( int argc, char **argv ) { configure_linux(); mlockall(MCL_CURRENT | MCL_FUTURE); - if(IS_SOFTMODEM_DOFORMS) { + if(IS_SOFTMODEM_DOSCOPE) { load_softscope("nr",PHY_vars_UE_g[0][0]); } diff --git a/executables/ocp-gnb.c b/executables/ocp-gnb.c index 4ddc7870d9..a468861533 100644 --- a/executables/ocp-gnb.c +++ b/executables/ocp-gnb.c @@ -996,7 +996,7 @@ int main( int argc, char **argv ) { (void *)NULL, "time_meas", -1, OAI_PRIORITY_RT_LOW); } - if(IS_SOFTMODEM_DOFORMS) { + if(IS_SOFTMODEM_DOSCOPE) { scopeParms_t tmp= {&argc, argv, &ru, RC.gNB[0]}; load_softscope("nr",&tmp); } diff --git a/executables/softmodem-common.c b/executables/softmodem-common.c index 1077c0e1ac..72cf2e32c5 100644 --- a/executables/softmodem-common.c +++ b/executables/softmodem-common.c @@ -140,7 +140,7 @@ void get_common_options(uint32_t execmask) { } if (do_forms) { - set_softmodem_optmask(SOFTMODEM_DOFORMS_BIT); + set_softmodem_optmask(SOFTMODEM_DOSCOPE_BIT); } if(parallel_config != NULL) set_parallel_conf(parallel_config); diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index 60a761c732..4bbeaff32b 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -188,7 +188,7 @@ extern "C" #define SOFTMODEM_RFSIM_BIT (1<<10) #define SOFTMODEM_BASICSIM_BIT (1<<11) #define SOFTMODEM_SIML1_BIT (1<<12) -#define SOFTMODEM_DOFORMS_BIT (1<<15) +#define SOFTMODEM_DOSCOPE_BIT (1<<15) #define SOFTMODEM_RECPLAY_BIT (1<<16) #define SOFTMODEM_ENB_BIT (1<<20) #define SOFTMODEM_GNB_BIT (1<<21) @@ -204,7 +204,7 @@ extern "C" #define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT) #define IS_SOFTMODEM_BASICSIM ( get_softmodem_optmask() & SOFTMODEM_BASICSIM_BIT) #define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT) -#define IS_SOFTMODEM_DOFORMS ( get_softmodem_optmask() & SOFTMODEM_DOFORMS_BIT) +#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT) #define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT) #define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT) #define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT) diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index d78e0ffaa2..b42dcd11ee 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -56,7 +56,7 @@ typedef struct OAIgraph { double *waterFallAvg; boolean_t initDone; int iteration; - void (*gNBfunct) (struct OAIgraph *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy_vars_ru, int UE_id); + void (*gNBfunct) (struct OAIgraph *graph, scopeData_t *p, int UE_id); void (*nrUEfunct)(struct OAIgraph *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id); } OAIgraph_t; @@ -132,7 +132,7 @@ static void commonGraph(OAIgraph_t *graph, int type, FL_Coord x, FL_Coord y, FL_ graph->iteration=0; } -static OAIgraph_t gNBcommonGraph( void (*funct) (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy_vars_ru, int UE_id), +static OAIgraph_t gNBcommonGraph( void (*funct) (OAIgraph_t *graph, scopeData_t *p, int UE_id), int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) { OAIgraph_t graph; commonGraph(&graph, type, x, y, w, h, label, pointColor); @@ -223,7 +223,8 @@ static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int laye static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const int datasize, const int divisions, const char *label) { if ( values == NULL ) - return; + return; + fl_winset(FL_ObjWin(graph->graph)); const int samplesPerPixel=datasize/graph->w; int displayPart=graph->waterFallh-ScaleZone; @@ -318,10 +319,10 @@ static void genericPowerPerAntena(OAIgraph_t *graph, const int nb_ant, const sc } } -static void gNBWaterFall (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy_vars_ru, int nb_UEs) { - NR_DL_FRAME_PARMS *frame_parms=&phy_vars_gnb->frame_parms; +static void gNBWaterFall (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { + NR_DL_FRAME_PARMS *frame_parms=&p->gNB->frame_parms; //use 1st antenna - genericWaterFall(graph, (scopeSample_t *)phy_vars_ru->common.rxdata[0], + genericWaterFall(graph, (scopeSample_t *)p->ru->common.rxdata[0], frame_parms->samples_per_frame, frame_parms->slots_per_frame, "X axis:one frame in time"); } @@ -339,31 +340,35 @@ static void timeSignal (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy } */ -static void timeResponse (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy_vars_ru, int nb_UEs) { - const int len=2*phy_vars_gnb->frame_parms.ofdm_symbol_size; +static void timeResponse (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { + const int len=2*p->gNB->frame_parms.ofdm_symbol_size; float *values, *time; oai_xygraph_getbuff(graph, &time, &values, len, 0); const int ant=0; // display antenna 0 for each UE for (int ue=0; uepusch_vars[ue]->ul_ch_estimates_time[ant]; + if ( p->gNB->pusch_vars && p->gNB->pusch_vars[ue] && + p->gNB->pusch_vars[ue]->ul_ch_estimates_time && + p->gNB->pusch_vars[ue]->ul_ch_estimates_time[ant] ) { + scopeSample_t *data= (scopeSample_t *)p->gNB->pusch_vars[ue]->ul_ch_estimates_time[ant]; - if (data != NULL) { - for (int i=0; iframe_parms; +static void gNBfreqWaterFall (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { + NR_DL_FRAME_PARMS *frame_parms=&p->gNB->frame_parms; //use 1st antenna - genericWaterFall(graph, (scopeSample_t *)phy_vars_ru->common.rxdataF[0], frame_parms->samples_per_frame_wCP, + genericWaterFall(graph, (scopeSample_t *)p->rxdataF, frame_parms->samples_per_frame_wCP, frame_parms->slots_per_frame, - "X axis: Frequency domain, one frame"); + "X axis: Frequency domain, one subframe"); } /* @@ -375,16 +380,18 @@ static void frequencyResponse (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU } */ -static void puschLLR (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy_vars_ru, int nb_UEs) { +static void puschLLR (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { //int Qm = 2; int coded_bits_per_codeword =3*8*6144+12; // (8*((3*8*6144)+12)); // frame_parms->N_RB_UL*12*Qm*frame_parms->symbols_per_tti; for (int ue=0; uepusch_vars[ue]->llr; - float *llr, *bit; - oai_xygraph_getbuff(graph, &bit, &llr, coded_bits_per_codeword, ue); + if ( p->gNB->pusch_vars && + p->gNB->pusch_vars[ue] && + p->gNB->pusch_vars[ue]->llr ) { + int16_t *pusch_llr = (int16_t *)p->gNB->pusch_vars[ue]->llr; + float *llr, *bit; + oai_xygraph_getbuff(graph, &bit, &llr, coded_bits_per_codeword, ue); - if (pusch_llr) { for (int i=0; iframe_parms; +static void puschIQ (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { + NR_DL_FRAME_PARMS *frame_parms=&p->gNB->frame_parms; int sz=frame_parms->N_RB_UL*12*frame_parms->symbols_per_slot; for (int ue=0; uepusch_vars[ue]->rxdataF_comp[0]; - float *I, *Q; - oai_xygraph_getbuff(graph, &I, &Q, sz, ue); + if ( p->gNB->pusch_vars && + p->gNB->pusch_vars[ue] && + p->gNB->pusch_vars[ue]->rxdataF_comp && + p->gNB->pusch_vars[ue]->rxdataF_comp[0] ) { + scopeSample_t *pusch_comp = (scopeSample_t *) p->gNB->pusch_vars[ue]->rxdataF_comp[0]; + float *I, *Q; + oai_xygraph_getbuff(graph, &I, &Q, sz, ue); - if (pusch_comp) { for (int k=0; kpucch1ab_stats[UE_id]; @@ -440,10 +450,10 @@ static void pucchEnergy (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *ph */ } -static void pucchIQ (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy_vars_ru, int nb_UEs) { +static void pucchIQ (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { } -static void puschThroughtput (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy_vars_ru, int nb_UEs) { +static void puschThroughtput (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { // PUSCH Throughput /* float tput_time_enb[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; @@ -510,8 +520,7 @@ static OAI_phy_scope_t *create_phy_scope_gnb(void) { static const int scope_enb_num_ue = 1; void phy_scope_gNB(OAI_phy_scope_t *form, - PHY_VARS_gNB *phy_vars_gnb, - RU_t *phy_vars_ru, + scopeData_t *p, int UE_id) { static OAI_phy_scope_t *rememberForm=NULL; @@ -526,7 +535,7 @@ void phy_scope_gNB(OAI_phy_scope_t *form, int i=0; while (form->graph[i].graph) { - form->graph[i].gNBfunct(form->graph+i, phy_vars_gnb, phy_vars_ru, UE_id); + form->graph[i].gNBfunct(form->graph+i, p, UE_id); i++; } @@ -534,7 +543,7 @@ void phy_scope_gNB(OAI_phy_scope_t *form, } static void *scope_thread_gNB(void *arg) { - scopeParms_t *p=(scopeParms_t *) arg; + scopeData_t *p=(scopeData_t *) arg; //# ifdef ENABLE_XFORMS_WRITE_STATS // FILE *gNB_stats = fopen("gNB_stats.txt", "w"); //#endif @@ -543,12 +552,6 @@ static void *scope_thread_gNB(void *arg) { pthread_attr_init(&atr); pthread_attr_getstacksize(&atr, &stksize); pthread_attr_setstacksize(&atr,32*1024*1024 ); - p.gNB->scopeData=calloc(sizeof(nrscope_t)); - nrscope_t scope=(nrscope_t*) p.gNB->scopeData; - scope->rxdataF=(int32_t **)malloc16(Prx*sizeof(int32_t*)); - for (int i=0; i < p.gNB->gNB_config.carrier_config.num_rx_ant.value; ; i++) - scope->rxdataF[i] = (scopeSample_t*)malloc16_clear(p->gNB.frme_parms.samples_per_frame_wCP*sizeof(scopeSample_t)); - sleep(3); // no clean interthread barriers int fl_argc=1; char *name="5G-gNB-scope"; @@ -557,18 +560,31 @@ static void *scope_thread_gNB(void *arg) { OAI_phy_scope_t *form_gnb = create_phy_scope_gnb(); while (!oai_exit) { - phy_scope_gNB(form_gnb, p->gNB, p->ru, nb_ue); + phy_scope_gNB(form_gnb, p, nb_ue); usleep(99*1000); } return NULL; } +static void copyRxdataF(int32_t *data, int slot, void *scopeData) { + scopeData_t *scope=(scopeData_t *)scopeData; + memcpy(scope->rxdataF + slot*scope->gNB->frame_parms.samples_per_slot_wCP, + data, + scope->gNB->frame_parms.samples_per_slot_wCP); +} + void gNBinitScope(scopeParms_t *p) { - static scopeParms_t parms; - memcpy(&parms,p,sizeof(parms)); + AssertFatal(p->gNB->scopeData=malloc(sizeof(scopeData_t)),""); + scopeData_t *scope=(scopeData_t *) p->gNB->scopeData; + scope->argc=p->argc; + scope->argv=p->argv; + scope->ru=p->ru; + scope->gNB=p->gNB; + scope->slotFunc=copyRxdataF; + AssertFatal(scope->rxdataF=(int32_t *) calloc(p->gNB->frame_parms.samples_per_frame_wCP*sizeof(int32_t),1),""); pthread_t forms_thread; - threadCreate(&forms_thread, scope_thread_gNB, &parms, "scope", -1, OAI_PRIORITY_RT_LOW); + threadCreate(&forms_thread, scope_thread_gNB, p->gNB->scopeData, "scope", -1, OAI_PRIORITY_RT_LOW); } static void ueWaterFall (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) { diff --git a/openair1/PHY/TOOLS/nr_phy_scope.h b/openair1/PHY/TOOLS/nr_phy_scope.h index 84b9e66908..e34ddf2c20 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.h +++ b/openair1/PHY/TOOLS/nr_phy_scope.h @@ -33,13 +33,7 @@ //#include "PHY/impl_defs_top.h" #include "PHY/defs_nr_UE.h" -typedef struct { - int *argc; - char **argv; - RU_t *ru; - PHY_VARS_gNB *gNB; -} scopeParms_t; - +#include extern RAN_CONTEXT_t RC; #endif diff --git a/openair1/PHY/TOOLS/phy_scope_interface.c b/openair1/PHY/TOOLS/phy_scope_interface.c index af237b2325..7cd68c53d2 100644 --- a/openair1/PHY/TOOLS/phy_scope_interface.c +++ b/openair1/PHY/TOOLS/phy_scope_interface.c @@ -35,6 +35,7 @@ #include "phy_scope_interface.h" #define SOFTSCOPE_ENDFUNC_IDX 0 + static loader_shlibfunc_t scope_fdesc[]= {{"end_forms",NULL}}; int load_softscope(char *exectype, void *initarg) { diff --git a/openair1/PHY/TOOLS/phy_scope_interface.h b/openair1/PHY/TOOLS/phy_scope_interface.h index adf04d5ea4..8b747d575d 100644 --- a/openair1/PHY/TOOLS/phy_scope_interface.h +++ b/openair1/PHY/TOOLS/phy_scope_interface.h @@ -29,7 +29,26 @@ * \note * \warning */ +#ifndef __PHY_SCOPE_INTERFACE_H__ +#define __PHY_SCOPE_INTERFACE_H__ +#include +typedef struct { + int *argc; + char **argv; + RU_t *ru; + PHY_VARS_gNB *gNB; +} scopeParms_t; +typedef struct scopeData_s { + int *argc; + char **argv; + RU_t *ru; + PHY_VARS_gNB *gNB; + int32_t * rxdataF; + void (*slotFunc)(int32_t* data, int slot, void * scopeData); +} scopeData_t; + int load_softscope(char *exectype, void *initarg); int end_forms(void) ; +#endif diff --git a/targets/ARCH/COMMON/record_player.c b/targets/ARCH/COMMON/record_player.c index 2dcd61e479..522f6b6d16 100644 --- a/targets/ARCH/COMMON/record_player.c +++ b/targets/ARCH/COMMON/record_player.c @@ -68,8 +68,10 @@ int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_ *recplay_conf=NULL; } - if (u_sf_replay == 1) return RECPLAY_REPLAYMODE; - else if (u_sf_record == 1) return RECPLAY_RECORDMODE; + if (u_sf_replay == 1) + return RECPLAY_REPLAYMODE; + else if (u_sf_record == 1) + return RECPLAY_RECORDMODE; return 0; } @@ -80,7 +82,7 @@ int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_ */ void iqrecorder_end(openair0_device *device) { if (device->recplay_state != NULL) { // subframes store - iqfile_header_t fh = {device->type,device->openair0_cfg->tx_sample_advance, device->openair0_cfg->rx_bw,OAIIQFILE_ID}; + iqfile_header_t fh = {device->type,device->openair0_cfg->tx_sample_advance, device->openair0_cfg->rx_bw,0,OAIIQFILE_ID}; recplay_state_t *rs = device->recplay_state; recplay_conf_t *rc = device->openair0_cfg[0].recplay_conf; rs->pFile = fopen (rc->u_sf_filename,"wb+"); @@ -91,16 +93,20 @@ void iqrecorder_end(openair0_device *device) { unsigned int i = 0; unsigned int modu = 0; - if ((modu = rs->nb_samples % 10) != 0) { - rs->nb_samples -= modu; // store entire number of frames + if ((modu = rs->nbSamplesBlocks % 10) != 0) { + rs->nbSamplesBlocks -= modu; // store entire number of frames } + fh.nbSamplesBlocks=rs->nbSamplesBlocks; LOG_I(HW,"Writing file header to %s \n", rc->u_sf_filename ); fwrite(&fh, sizeof(fh), 1, rs->pFile); - LOG_UI(HW,"Writing %u subframes to %s \n",rs->nb_samples, rc->u_sf_filename ); + LOG_UI(HW,"Writing %u subframes to %s \n",rs->nbSamplesBlocks, rc->u_sf_filename ); + uint8_t *ptr=(uint8_t *)rs->ms_sample; - for (i = 0; i < rs->nb_samples; i++) { - fwrite(rs->ms_sample+i, sizeof(unsigned char), sizeof(iqrec_t), rs->pFile); + for (i = 0; i < rs->nbSamplesBlocks; i++) { + int blockBytes=sizeof(iqrec_t)+((iqrec_t *)ptr)->nbBytes; + fwrite(ptr, sizeof(unsigned char), blockBytes, rs->pFile); + ptr+=blockBytes; } fclose (rs->pFile); @@ -112,4 +118,4 @@ void iqrecorder_end(openair0_device *device) { rs->ms_sample = NULL; } } -} \ No newline at end of file +} diff --git a/targets/ARCH/COMMON/record_player.h b/targets/ARCH/COMMON/record_player.h index 500acdd709..d91da68323 100644 --- a/targets/ARCH/COMMON/record_player.h +++ b/targets/ARCH/COMMON/record_player.h @@ -46,21 +46,22 @@ extern "C" #define BELL_LABS_IQ_HEADER 0xabababababababab #define BELL_LABS_IQ_PER_SF 7680 // Up to 5MHz bw for now #define BELL_LABS_IQ_BYTES_PER_SF (BELL_LABS_IQ_PER_SF * 4) +#define MAX_BELL_LABS_IQ_BYTES_PER_SF BELL_LABS_IQ_BYTES_PER_SF*10 -#define OAIIQFILE_ID "OIQF" +#define OAIIQFILE_ID {'O', 'I','Q','F'} typedef struct { uint64_t devtype; uint64_t tx_sample_advance; double bw; + unsigned int nbSamplesBlocks; char oaiid[4]; } iqfile_header_t; typedef struct { int64_t header; int64_t ts; - int64_t rfu1; + int64_t nbBytes; int64_t rfu2; // pad for 256 bits alignement required by AVX2 - unsigned char samples[BELL_LABS_IQ_BYTES_PER_SF]; // iq's for one subframe } iqrec_t; #define DEF_NB_SF 120000 // default nb of sf or ms to capture (2 minutes at 5MHz) #define DEF_SF_FILE "/tmp/iqfile" // default subframes file name @@ -114,14 +115,16 @@ typedef struct { int use_mmap; // default is to use mmap size_t mapsize; FILE *pFile; - int mmapfd; - int iqfd; + int fd; iqrec_t *ms_sample; // memory for all subframes - unsigned int nb_samples; + unsigned int nbSamplesBlocks; + uint8_t *currentPtr; + uint64_t currentTs; + unsigned int curSamplesBlock; + int64_t wrap_count; + size_t maxSizeBytes; } recplay_state_t; - - #ifdef __cplusplus } #endif diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index dd29d01fae..d6ee1b340a 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -272,11 +272,10 @@ static int sync_to_gps(openair0_device *device) { */ static int trx_usrp_start(openair0_device *device) { usrp_state_t *s = (usrp_state_t *)device->priv; - // setup GPIO for TDD, GPIO(4) = ATR_RX //set data direction register (DDR) to output s->usrp->set_gpio_attr("FP0", "DDR", 0xfff, 0xfff); - //set lower 7 bits to be controlled automatically by ATR (the rest 5 bits are controlled manually) + //set lower 7 bits to be controlled automatically by ATR (the rest 5 bits are controlled manually) s->usrp->set_gpio_attr("FP0", "CTRL", 0x7f,0xfff); //set pins 4 (RX_TX_Switch) and 6 (Shutdown PA) to 1 when the radio is only receiving (ATR_RX) s->usrp->set_gpio_attr("FP0", "ATR_RX", (1<<4)|(1<<6), 0x7f); @@ -285,26 +284,24 @@ static int trx_usrp_start(openair0_device *device) { s->usrp->set_gpio_attr("FP0", "ATR_XX", (1<<5), 0x7f); // set the output pins to 1 s->usrp->set_gpio_attr("FP0", "OUT", 7<<7, 0xf80); - s->wait_for_first_pps = 1; s->rx_count = 0; s->tx_count = 0; //s->first_tx = 1; //s->first_rx = 1; s->rx_timestamp = 0; - s->usrp->set_time_next_pps(uhd::time_spec_t(0.0)); // wait for the pps to change uhd::time_spec_t time_last_pps = s->usrp->get_time_last_pps(); + while (time_last_pps == s->usrp->get_time_last_pps()) { boost::this_thread::sleep(boost::posix_time::milliseconds(1)); } uhd::stream_cmd_t cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS); - cmd.time_spec = uhd::time_spec_t(1.0); + cmd.time_spec = uhd::time_spec_t(1.0); cmd.stream_now = false; // start at constant delay s->rx_stream->issue_stream_cmd(cmd); - return 0; } /*! \brief Terminate operation of the USRP transceiver -- free all associated resources @@ -315,12 +312,11 @@ static void trx_usrp_end(openair0_device *device) { return; usrp_state_t *s = (usrp_state_t *)device->priv; - + if (s == NULL) return; + iqrecorder_end(device); - - } /*! \brief Called to send samples to the USRP RF target @@ -332,64 +328,59 @@ static void trx_usrp_end(openair0_device *device) { @param flags flags must be set to TRUE if timestamp parameter needs to be applied */ static int trx_usrp_write(openair0_device *device, - openair0_timestamp timestamp, - void **buff, - int nsamps, - int cc, - int flags) { + openair0_timestamp timestamp, + void **buff, + int nsamps, + int cc, + int flags) { int ret=0; usrp_state_t *s = (usrp_state_t *)device->priv; int nsamps2; // aligned to upper 32 or 16 byte boundary - int flags_lsb = flags&0xff; int flags_msb = (flags>>8)&0xff; - int end; openair0_thread_t *write_thread = &device->write_thread; openair0_write_package_t *write_package = write_thread->write_package; - AssertFatal( MAX_WRITE_THREAD_BUFFER_SIZE >= cc,"Do not support more than %d cc number\n", MAX_WRITE_THREAD_BUFFER_SIZE); + boolean_t first_packet_state=false,last_packet_state=false; - boolean_t first_packet_state=false,last_packet_state=false; - - if (flags_lsb == 2) { // start of burst - // s->tx_md.start_of_burst = true; - // s->tx_md.end_of_burst = false; - first_packet_state = true; - last_packet_state = false; - } else if (flags_lsb == 3) { // end of burst - //s->tx_md.start_of_burst = false; - //s->tx_md.end_of_burst = true; - first_packet_state = false; - last_packet_state = true; - } else if (flags_lsb == 4) { // start and end + if (flags_lsb == 2) { // start of burst + // s->tx_md.start_of_burst = true; + // s->tx_md.end_of_burst = false; + first_packet_state = true; + last_packet_state = false; + } else if (flags_lsb == 3) { // end of burst + //s->tx_md.start_of_burst = false; + //s->tx_md.end_of_burst = true; + first_packet_state = false; + last_packet_state = true; + } else if (flags_lsb == 4) { // start and end // s->tx_md.start_of_burst = true; // s->tx_md.end_of_burst = true; - first_packet_state = true; - last_packet_state = true; - } else if (flags_lsb==1) { // middle of burst + first_packet_state = true; + last_packet_state = true; + } else if (flags_lsb==1) { // middle of burst // s->tx_md.start_of_burst = false; // s->tx_md.end_of_burst = false; - first_packet_state = false; - last_packet_state = false; - } - else if (flags_lsb==10) { // fail safe mode - // s->tx_md.has_time_spec = false; - // s->tx_md.start_of_burst = false; - // s->tx_md.end_of_burst = true; - first_packet_state = false; - last_packet_state = true; - } + first_packet_state = false; + last_packet_state = false; + } else if (flags_lsb==10) { // fail safe mode + // s->tx_md.has_time_spec = false; + // s->tx_md.start_of_burst = false; + // s->tx_md.end_of_burst = true; + first_packet_state = false; + last_packet_state = true; + } - if(usrp_tx_thread == 0){ + if(usrp_tx_thread == 0) { #if defined(__x86_64) || defined(__i386__) - #ifdef __AVX2__ - nsamps2 = (nsamps+7)>>3; - __m256i buff_tx[8][nsamps2]; - #else +#ifdef __AVX2__ + nsamps2 = (nsamps+7)>>3; + __m256i buff_tx[8][nsamps2]; +#else nsamps2 = (nsamps+3)>>2; __m128i buff_tx[8][nsamps2]; - #endif +#endif #elif defined(__arm__) nsamps2 = (nsamps+3)>>2; int16x8_t buff_tx[8][nsamps2]; @@ -417,8 +408,8 @@ static int trx_usrp_write(openair0_device *device, s->tx_md.end_of_burst = last_packet_state; s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate); s->tx_count++; + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,1); -VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,1); // bit 3 enables gpio (for backward compatibility) if (flags_msb&8) { // push GPIO bits 7-9 from flags_msb @@ -427,7 +418,8 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI s->usrp->set_gpio_attr("FP0", "OUT", gpio789, 0x380); s->usrp->clear_command_time(); } -VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,0); + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,0); if (cc>1) { std::vector buff_ptrs; @@ -436,18 +428,18 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI buff_ptrs.push_back(&(((int16_t *)buff_tx[i])[0])); ret = (int)s->tx_stream->send(buff_ptrs, nsamps, s->tx_md); - } - else { + } else { ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md); } - if (ret != nsamps) LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); + if (ret != nsamps) + LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); + return ret; - } - else{ + } else { pthread_mutex_lock(&write_thread->mutex_write); - if(write_thread->count_write >= MAX_WRITE_THREAD_PACKAGE){ + if(write_thread->count_write >= MAX_WRITE_THREAD_PACKAGE) { LOG_W(HW,"Buffer overflow, count_write = %d, start = %d end = %d, resetting write package\n", write_thread->count_write, write_thread->start, write_thread->end); write_thread->end = write_thread->start; write_thread->count_write = 0; @@ -460,15 +452,16 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI write_package[end].first_packet = first_packet_state; write_package[end].last_packet = last_packet_state; write_package[end].flags_msb = flags_msb; + for (int i = 0; i < cc; i++) write_package[end].buff[i] = buff[i]; + write_thread->count_write++; write_thread->end = (write_thread->end + 1)% MAX_WRITE_THREAD_PACKAGE; pthread_cond_signal(&write_thread->cond_write); pthread_mutex_unlock(&write_thread->mutex_write); return 0; } - } //-----------------------start-------------------------- @@ -480,12 +473,11 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI @param antenna_id index of the antenna if the device has multiple antennas @param flags flags must be set to TRUE if timestamp parameter needs to be applied */ -void *trx_usrp_write_thread(void * arg){ +void *trx_usrp_write_thread(void *arg) { int ret=0; openair0_device *device=(openair0_device *)arg; openair0_thread_t *write_thread = &device->write_thread; openair0_write_package_t *write_package = write_thread->write_package; - usrp_state_t *s; int nsamps2; // aligned to upper 32 or 16 byte boundary int start; @@ -497,11 +489,13 @@ void *trx_usrp_write_thread(void * arg){ signed char last_packet; int flags_msb; - while(1){ + while(1) { pthread_mutex_lock(&write_thread->mutex_write); + while (write_thread->count_write == 0) { pthread_cond_wait(&write_thread->cond_write,&write_thread->mutex_write); // this unlocks mutex_rxtx while waiting and then locks it again } + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD, 1 ); s = (usrp_state_t *)device->priv; start = write_thread->start; @@ -518,38 +512,36 @@ void *trx_usrp_write_thread(void * arg){ /*if(write_thread->count_write != 0){ LOG_W(HW,"count write = %d, start = %d, end = %d\n", write_thread->count_write, write_thread->start, write_thread->end); }*/ - - #if defined(__x86_64) || defined(__i386__) - #ifdef __AVX2__ - nsamps2 = (nsamps+7)>>3; - __m256i buff_tx[8][nsamps2]; - #else - nsamps2 = (nsamps+3)>>2; - __m128i buff_tx[8][nsamps2]; - #endif - #elif defined(__arm__) - nsamps2 = (nsamps+3)>>2; - int16x8_t buff_tx[8][nsamps2]; - #else - #error Unsupported CPU architecture, USRP device cannot be built - #endif +#if defined(__x86_64) || defined(__i386__) +#ifdef __AVX2__ + nsamps2 = (nsamps+7)>>3; + __m256i buff_tx[8][nsamps2]; +#else + nsamps2 = (nsamps+3)>>2; + __m128i buff_tx[8][nsamps2]; +#endif +#elif defined(__arm__) + nsamps2 = (nsamps+3)>>2; + int16x8_t buff_tx[8][nsamps2]; +#else +#error Unsupported CPU architecture, USRP device cannot be built +#endif // bring RX data into 12 LSBs for softmodem RX for (int i=0; itx_md.has_time_spec = true; s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet; s->tx_md.end_of_burst = last_packet; @@ -572,34 +564,32 @@ void *trx_usrp_write_thread(void * arg){ buff_ptrs.push_back(&(((int16_t *)buff_tx[i])[0])); ret = (int)s->tx_stream->send(buff_ptrs, nsamps, s->tx_md); - } - else { + } else { ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md); } - if (ret != nsamps) LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); + if (ret != nsamps) + LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_USRP_SEND_RETURN, ret ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD, 0 ); - if(0) break; + if(0) + break; } return NULL; } -int trx_usrp_write_init(openair0_device *device){ - +int trx_usrp_write_init(openair0_device *device) { uhd::set_thread_priority_safe(1.0); openair0_thread_t *write_thread = &device->write_thread; printf("initializing tx write thread\n"); - write_thread->start = 0; write_thread->end = 0; write_thread->count_write = 0; printf("end of tx write thread\n"); - pthread_create(&write_thread->pthread_write,NULL,trx_usrp_write_thread,(void *)device); - return(0); } @@ -633,57 +623,60 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp int16x8_t buff_tmp[2][nsamps2]; #endif - if (cc>1) { - // receive multiple channels (e.g. RF A and RF B) - std::vector buff_ptrs; + if (cc>1) { + // receive multiple channels (e.g. RF A and RF B) + std::vector buff_ptrs; - for (int i=0; irx_stream->recv(buff_ptrs, nsamps, s->rx_md); - } else { - // receive a single channel (e.g. from connector RF A) - samples_received=0; + samples_received = s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md); + } else { + // receive a single channel (e.g. from connector RF A) + samples_received=0; - while (samples_received != nsamps) { - samples_received += s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received), - nsamps-samples_received, s->rx_md); + while (samples_received != nsamps) { + samples_received += s->rx_stream->recv((void *)((int32_t *)buff_tmp[0]+samples_received), + nsamps-samples_received, s->rx_md); - if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) - break; + if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) + break; - if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { - printf("sleep...\n"); //usleep(100); - } + if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { + printf("sleep...\n"); //usleep(100); } - if (samples_received == nsamps) s->wait_for_first_pps=0; } - // bring RX data into 12 LSBs for softmodem RX - for (int i=0; iwait_for_first_pps=0; + } + + // bring RX data into 12 LSBs for softmodem RX + for (int i=0; irx_md.error_code != uhd::rx_metadata_t::ERROR_CODE_NONE) LOG_E(HW, "%s\n", s->rx_md.to_pp_string(true).c_str()); @@ -691,21 +684,28 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp s->rx_count += nsamps; s->rx_timestamp = s->rx_md.time_spec.to_ticks(s->sample_rate); *ptimestamp = s->rx_timestamp; - // push GPIO bits 7-9 from flags_msb - /*s->usrp->set_command_time(uhd::time_spec_t::from_ticks((s->rx_timestamp+(2*nsamps)),s->sample_rate)); - s->usrp->set_gpio_attr("FP0", "OUT", gpio789<<7, 0x380); - s->usrp->clear_command_time(); - gpio789 = (gpio789+1)&7;*/ + /*s->usrp->set_command_time(uhd::time_spec_t::from_ticks((s->rx_timestamp+(2*nsamps)),s->sample_rate)); + s->usrp->set_gpio_attr("FP0", "OUT", gpio789<<7, 0x380); + s->usrp->clear_command_time(); + gpio789 = (gpio789+1)&7;*/ + recplay_state_t *recPlay=device->recplay_state; - if (device->recplay_state != NULL) { // record mode + if ( recPlay != NULL) { // record mode // Copy subframes to memory (later dump on a file) - if (device->recplay_state->nb_samples < device->openair0_cfg->recplay_conf->u_sf_max) { - (device->recplay_state->ms_sample+device->recplay_state->nb_samples)->header = BELL_LABS_IQ_HEADER; - (device->recplay_state->ms_sample+device->recplay_state->nb_samples)->ts = *ptimestamp; - memcpy((device->recplay_state->ms_sample+device->recplay_state->nb_samples)->samples, buff[0], nsamps*4); - device->recplay_state->nb_samples++; - } else exit_function(__FILE__, __FUNCTION__, __LINE__,"Recording reaches max iq limit\n"); + if (recPlay->nbSamplesBlocks < device->openair0_cfg->recplay_conf->u_sf_max && + recPlay->maxSizeBytes > (recPlay->currentPtr-(uint8_t *)recPlay->ms_sample) + + sizeof(iqrec_t) + nsamps*4 ) { + iqrec_t *hdr=(iqrec_t *)recPlay->currentPtr; + hdr->header = BELL_LABS_IQ_HEADER; + hdr->ts = *ptimestamp; + hdr->nbBytes=nsamps*4; + memcpy(hdr+1, buff[0], nsamps*4); + recPlay->currentPtr+=sizeof(iqrec_t)+nsamps*4; + recPlay->nbSamplesBlocks++; + LOG_D(HW,"recorded %d samples, for TS %lu, shift in buffer %ld\n", nsamps, hdr->ts, recPlay->currentPtr-(uint8_t *)recPlay->ms_sample); + } else + exit_function(__FILE__, __FUNCTION__, __LINE__,"Recording reaches max iq limit\n"); } return samples_received; @@ -937,32 +937,30 @@ extern "C" { device->trx_set_freq_func = trx_usrp_set_freq; device->trx_set_gains_func = trx_usrp_set_gains; device->trx_write_init = trx_usrp_write_init; - - // hotfix! to be checked later uhd::set_thread_priority_safe(1.0); // Initialize USRP device int vers=0,subvers=0,subsubvers=0; int bw_gain_adjust=0; - + if (device->openair0_cfg->recplay_mode == RECPLAY_RECORDMODE) { std::cerr << "USRP device initialized in subframes record mode" << std::endl; } - + sscanf(uhd::get_version_string().c_str(),"%d.%d.%d",&vers,&subvers,&subsubvers); LOG_I(HW,"UHD version %s (%d.%d.%d)\n", uhd::get_version_string().c_str(),vers,subvers,subsubvers); std::string args; - + if (openair0_cfg[0].sdr_addrs == NULL) { args = "type=b200"; } else { args = openair0_cfg[0].sdr_addrs; LOG_I(HW,"Checking for USRP with args %s\n",openair0_cfg[0].sdr_addrs); } - + uhd::device_addrs_t device_adds = uhd::device::find(args); - + if (device_adds.size() == 0) { LOG_E(HW,"No USRP Device Found.\n "); free(s); @@ -972,375 +970,367 @@ extern "C" { free(s); return -1; } - + LOG_I(HW,"Found USRP %s\n", device_adds[0].get("type").c_str()); double usrp_master_clock; - + if (device_adds[0].get("type") == "b200") { device->type = USRP_B200_DEV; usrp_master_clock = 30.72e6; args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=7680, recv_frame_size=7680" ; } - + if (device_adds[0].get("type") == "n3xx") { printf("Found USRP n300\n"); - device->type=USRP_N300_DEV; + device->type=USRP_N300_DEV; usrp_master_clock = 122.88e6; args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); //args += ", send_buff_size=33554432"; } - + if (device_adds[0].get("type") == "x300") { printf("Found USRP x300\n"); device->type=USRP_X300_DEV; usrp_master_clock = 184.32e6; args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); - + // USRP recommended: https://files.ettus.com/manual/page_usrp_x3x0_config.html if ( 0 != system("sysctl -w net.core.rmem_max=33554432 net.core.wmem_max=33554432") ) LOG_W(HW,"Can't set kernel parameters for X3xx\n"); } - + s->usrp = uhd::usrp::multi_usrp::make(args); - + if (args.find("clock_source")==std::string::npos) { - if (openair0_cfg[0].clock_source == internal) { - s->usrp->set_clock_source("internal"); - LOG_D(HW,"Setting clock source to internal\n"); - } - else if (openair0_cfg[0].clock_source == external ) { - s->usrp->set_clock_source("external"); - LOG_D(HW,"Setting clock source to external\n"); - } - else if (openair0_cfg[0].clock_source==gpsdo) { - s->usrp->set_clock_source("gpsdo"); - LOG_D(HW,"Setting clock source to gpsdo\n"); - } - else { - LOG_W(HW,"Clock source set neither in usrp_args nor on command line, using default!\n"); - } + if (openair0_cfg[0].clock_source == internal) { + s->usrp->set_clock_source("internal"); + LOG_D(HW,"Setting clock source to internal\n"); + } else if (openair0_cfg[0].clock_source == external ) { + s->usrp->set_clock_source("external"); + LOG_D(HW,"Setting clock source to external\n"); + } else if (openair0_cfg[0].clock_source==gpsdo) { + s->usrp->set_clock_source("gpsdo"); + LOG_D(HW,"Setting clock source to gpsdo\n"); + } else { + LOG_W(HW,"Clock source set neither in usrp_args nor on command line, using default!\n"); + } + } else { + if (openair0_cfg[0].clock_source != unset) { + LOG_W(HW,"Clock source set in both usrp_args and in clock_source, ingnoring the latter!\n"); + } } - else { - if (openair0_cfg[0].clock_source != unset) { - LOG_W(HW,"Clock source set in both usrp_args and in clock_source, ingnoring the latter!\n"); - } - } if (args.find("time_source")==std::string::npos) { - if (openair0_cfg[0].time_source == internal) { - s->usrp->set_time_source("internal"); - LOG_D(HW,"Setting time source to internal\n"); - } - else if (openair0_cfg[0].time_source == external ) { - s->usrp->set_time_source("external"); - LOG_D(HW,"Setting time source to external\n"); - } - else if (openair0_cfg[0].time_source==gpsdo) { - s->usrp->set_time_source("gpsdo"); - LOG_D(HW,"Setting time source to gpsdo\n"); - } - else { - LOG_W(HW,"Time source set neither in usrp_args nor on command line, using default!\n"); - } - } - else { - if (openair0_cfg[0].clock_source != unset) { - LOG_W(HW,"Time source set in both usrp_args and in time_source, ingnoring the latter!\n"); - } - } - - - if (s->usrp->get_clock_source(0) == "gpsdo") { - s->use_gps = 1; - - if (sync_to_gps(device)==EXIT_SUCCESS) { - LOG_I(HW,"USRP synced with GPS!\n"); + if (openair0_cfg[0].time_source == internal) { + s->usrp->set_time_source("internal"); + LOG_D(HW,"Setting time source to internal\n"); + } else if (openair0_cfg[0].time_source == external ) { + s->usrp->set_time_source("external"); + LOG_D(HW,"Setting time source to external\n"); + } else if (openair0_cfg[0].time_source==gpsdo) { + s->usrp->set_time_source("gpsdo"); + LOG_D(HW,"Setting time source to gpsdo\n"); + } else { + LOG_W(HW,"Time source set neither in usrp_args nor on command line, using default!\n"); + } } else { - LOG_I(HW,"USRP fails to sync with GPS. Exiting.\n"); - exit(EXIT_FAILURE); + if (openair0_cfg[0].clock_source != unset) { + LOG_W(HW,"Time source set in both usrp_args and in time_source, ingnoring the latter!\n"); + } } - } else if (s->usrp->get_clock_source(0) == "external") { - if (check_ref_locked(s,0)) { - LOG_I(HW,"USRP locked to external reference!\n"); - } else { - LOG_I(HW,"Failed to lock to external reference. Exiting.\n"); - exit(EXIT_FAILURE); + + if (s->usrp->get_clock_source(0) == "gpsdo") { + s->use_gps = 1; + + if (sync_to_gps(device)==EXIT_SUCCESS) { + LOG_I(HW,"USRP synced with GPS!\n"); + } else { + LOG_I(HW,"USRP fails to sync with GPS. Exiting.\n"); + exit(EXIT_FAILURE); + } + } else if (s->usrp->get_clock_source(0) == "external") { + if (check_ref_locked(s,0)) { + LOG_I(HW,"USRP locked to external reference!\n"); + } else { + LOG_I(HW,"Failed to lock to external reference. Exiting.\n"); + exit(EXIT_FAILURE); + } } - } - - if (device->type==USRP_X300_DEV) { - openair0_cfg[0].rx_gain_calib_table = calib_table_x310; - std::cerr << "-- Using calibration table: calib_table_x310" << std::endl; - } - if (device->type==USRP_N300_DEV) { - openair0_cfg[0].rx_gain_calib_table = calib_table_n310; - std::cerr << "-- Using calibration table: calib_table_n310" << std::endl; - } + if (device->type==USRP_X300_DEV) { + openair0_cfg[0].rx_gain_calib_table = calib_table_x310; + std::cerr << "-- Using calibration table: calib_table_x310" << std::endl; + } + if (device->type==USRP_N300_DEV) { + openair0_cfg[0].rx_gain_calib_table = calib_table_n310; + std::cerr << "-- Using calibration table: calib_table_n310" << std::endl; + } - if (device->type==USRP_N300_DEV || device->type==USRP_X300_DEV) { - LOG_I(HW,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate); + if (device->type==USRP_N300_DEV || device->type==USRP_X300_DEV) { + LOG_I(HW,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate); - switch ((int)openair0_cfg[0].sample_rate) { - case 122880000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; //to be checked - openair0_cfg[0].tx_bw = 80e6; - openair0_cfg[0].rx_bw = 80e6; - break; - - case 92160000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; //to be checked - openair0_cfg[0].tx_bw = 80e6; - openair0_cfg[0].rx_bw = 80e6; - break; - - case 61440000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; - openair0_cfg[0].tx_bw = 40e6; - openair0_cfg[0].rx_bw = 40e6; - break; - - case 46080000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; - openair0_cfg[0].tx_bw = 40e6; - openair0_cfg[0].rx_bw = 40e6; - break; - - case 30720000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - case 15360000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 45; - openair0_cfg[0].tx_bw = 10e6; - openair0_cfg[0].rx_bw = 10e6; - break; - - case 7680000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 50; - openair0_cfg[0].tx_bw = 5e6; - openair0_cfg[0].rx_bw = 5e6; - break; - - case 1920000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 50; - openair0_cfg[0].tx_bw = 1.25e6; - openair0_cfg[0].rx_bw = 1.25e6; - break; - - default: - LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + switch ((int)openair0_cfg[0].sample_rate) { + case 122880000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; //to be checked + openair0_cfg[0].tx_bw = 80e6; + openair0_cfg[0].rx_bw = 80e6; + break; + + case 92160000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; //to be checked + openair0_cfg[0].tx_bw = 80e6; + openair0_cfg[0].rx_bw = 80e6; + break; + + case 61440000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 40e6; + openair0_cfg[0].rx_bw = 40e6; + break; + + case 46080000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 40e6; + openair0_cfg[0].rx_bw = 40e6; + break; + + case 30720000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 15360000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 45; + openair0_cfg[0].tx_bw = 10e6; + openair0_cfg[0].rx_bw = 10e6; + break; + + case 7680000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 5e6; + openair0_cfg[0].rx_bw = 5e6; + break; + + case 1920000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 1.25e6; + openair0_cfg[0].rx_bw = 1.25e6; + break; + + default: + LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; + } + } + + if (device->type == USRP_B200_DEV) { + if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210; + bw_gain_adjust=0; + std::cerr << "-- Using calibration table: calib_table_b210" << std::endl; // Bell Labs info + } else { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; + bw_gain_adjust=1; + std::cerr << "-- Using calibration table: calib_table_b210_38" << std::endl; // Bell Labs info + } + + switch ((int)openair0_cfg[0].sample_rate) { + case 46080000: + s->usrp->set_master_clock_rate(46.08e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 115; + openair0_cfg[0].tx_bw = 40e6; + openair0_cfg[0].rx_bw = 40e6; + break; + + case 30720000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 115; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 23040000: + s->usrp->set_master_clock_rate(23.04e6); //to be checked + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 113; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 15360000: + s->usrp->set_master_clock_rate(30.72e06); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 103; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 7680000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 80; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 1920000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 40; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + default: + LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; + } + } + + /* device specific */ + //openair0_cfg[0].txlaunch_wait = 1;//manage when TX processing is triggered + //openair0_cfg[0].txlaunch_wait_slotcount = 1; //manage when TX processing is triggered + openair0_cfg[0].iq_txshift = 4;//shift + openair0_cfg[0].iq_rxrescale = 15;//rescale iqs + + for(int i=0; i<((int) s->usrp->get_rx_num_channels()); i++) { + if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); + s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); + set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); + ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); + // limit to maximum gain + AssertFatal( openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] <= gain_range.stop(), + "RX Gain too high, lower by %f dB\n", + openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] - gain_range.stop()); + s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],i); + LOG_I(HW,"RX Gain %d %f (%f) => %f (max %f)\n",i, + openair0_cfg[0].rx_gain[i],openair0_cfg[0].rx_gain_offset[i], + openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop()); + } + } + + LOG_D(HW, "usrp->get_tx_num_channels() == %zd\n", s->usrp->get_tx_num_channels()); + LOG_D(HW, "openair0_cfg[0].tx_num_channels == %d\n", openair0_cfg[0].tx_num_channels); + + for(int i=0; i<((int) s->usrp->get_tx_num_channels()); i++) { + ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); + + if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); + s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); + s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i); + LOG_I(HW,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]); + } + } + + //s->usrp->set_clock_source("external"); + //s->usrp->set_time_source("external"); + // display USRP settings + LOG_I(HW,"Actual master clock: %fMHz...\n",s->usrp->get_master_clock_rate()/1e6); + LOG_I(HW,"Actual clock source %s...\n",s->usrp->get_clock_source(0).c_str()); + LOG_I(HW,"Actual time source %s...\n",s->usrp->get_time_source(0).c_str()); + sleep(1); + // create tx & rx streamer + uhd::stream_args_t stream_args_rx("sc16", "sc16"); + int samples=openair0_cfg[0].sample_rate; + int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); + samples/=10000; + LOG_I(HW,"RF board max packet size %u, size for 100µs jitter %d \n", max, samples); + + if ( samples < max ) { + stream_args_rx.args["spp"] = str(boost::format("%d") % samples ); + } + + LOG_I(HW,"rx_max_num_samps %zu\n", + s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps()); + + for (int i = 0; irx_stream = s->usrp->get_rx_stream(stream_args_rx); + uhd::stream_args_t stream_args_tx("sc16", "sc16"); + + for (int i = 0; itx_stream = s->usrp->get_tx_stream(stream_args_tx); + + /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ + for(int i=0; i<((int) s->usrp->get_tx_num_channels()) && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); + + for(int i=0; i<((int) s->usrp->get_rx_num_channels()) && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); + + for (int i=0; iusrp->get_rx_rate(i)/1e6); + LOG_I(HW," Actual RX frequency: %fGHz...\n", s->usrp->get_rx_freq(i)/1e9); + LOG_I(HW," Actual RX gain: %f...\n", s->usrp->get_rx_gain(i)); + LOG_I(HW," Actual RX bandwidth: %fM...\n", s->usrp->get_rx_bandwidth(i)/1e6); + LOG_I(HW," Actual RX antenna: %s...\n", s->usrp->get_rx_antenna(i).c_str()); + } + + for (int i=0; iusrp->get_tx_rate(i)/1e6); + LOG_I(HW," Actual TX frequency: %fGHz...\n", s->usrp->get_tx_freq(i)/1e9); + LOG_I(HW," Actual TX gain: %f...\n", s->usrp->get_tx_gain(i)); + LOG_I(HW," Actual TX bandwidth: %fM...\n", s->usrp->get_tx_bandwidth(i)/1e6); + LOG_I(HW," Actual TX antenna: %s...\n", s->usrp->get_tx_antenna(i).c_str()); + LOG_I(HW," Actual TX packet size: %lu\n",s->tx_stream->get_max_num_samps()); + } + + LOG_I(HW,"Device timestamp: %f...\n", s->usrp->get_time_now().get_real_secs()); + device->trx_write_func = trx_usrp_write; + device->trx_read_func = trx_usrp_read; + s->sample_rate = openair0_cfg[0].sample_rate; + + // TODO: + // init tx_forward_nsamps based usrp_time_offset ex + if(is_equal(s->sample_rate, (double)30.72e6)) + s->tx_forward_nsamps = 176; + + if(is_equal(s->sample_rate, (double)15.36e6)) + s->tx_forward_nsamps = 90; + + if(is_equal(s->sample_rate, (double)7.68e6)) + s->tx_forward_nsamps = 50; + + recplay_state_t *recPlay=device->recplay_state; + + if (recPlay != NULL) { // record mode + recPlay->maxSizeBytes=openair0_cfg[0].recplay_conf->u_sf_max * + (sizeof(iqrec_t)+BELL_LABS_IQ_BYTES_PER_SF); + recPlay->ms_sample = (iqrec_t *) malloc(recPlay->maxSizeBytes); + recPlay->currentPtr= (uint8_t *)recPlay->ms_sample; + + if (recPlay->ms_sample == NULL) { + std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl; exit(-1); - break; + } } + return 0; } - - if (device->type == USRP_B200_DEV) { - if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { - openair0_cfg[0].rx_gain_calib_table = calib_table_b210; - bw_gain_adjust=0; - std::cerr << "-- Using calibration table: calib_table_b210" << std::endl; // Bell Labs info - } else { - openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; - bw_gain_adjust=1; - std::cerr << "-- Using calibration table: calib_table_b210_38" << std::endl; // Bell Labs info - } - - switch ((int)openair0_cfg[0].sample_rate) { - case 46080000: - s->usrp->set_master_clock_rate(46.08e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 115; - openair0_cfg[0].tx_bw = 40e6; - openair0_cfg[0].rx_bw = 40e6; - break; - - case 30720000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 115; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - case 23040000: - s->usrp->set_master_clock_rate(23.04e6); //to be checked - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 113; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - case 15360000: - s->usrp->set_master_clock_rate(30.72e06); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 103; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - case 7680000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 80; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - case 1920000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 40; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - default: - LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); - exit(-1); - break; - } - } - - /* device specific */ - //openair0_cfg[0].txlaunch_wait = 1;//manage when TX processing is triggered - //openair0_cfg[0].txlaunch_wait_slotcount = 1; //manage when TX processing is triggered - openair0_cfg[0].iq_txshift = 4;//shift - openair0_cfg[0].iq_rxrescale = 15;//rescale iqs - - for(int i=0; i<((int) s->usrp->get_rx_num_channels()); i++) { - if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); - s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); - set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); - ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); - // limit to maximum gain - AssertFatal( openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] <= gain_range.stop(), - "RX Gain too high, lower by %f dB\n", - openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] - gain_range.stop()); - s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],i); - LOG_I(HW,"RX Gain %d %f (%f) => %f (max %f)\n",i, - openair0_cfg[0].rx_gain[i],openair0_cfg[0].rx_gain_offset[i], - openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop()); - } - } - - LOG_D(HW, "usrp->get_tx_num_channels() == %zd\n", s->usrp->get_tx_num_channels()); - LOG_D(HW, "openair0_cfg[0].tx_num_channels == %d\n", openair0_cfg[0].tx_num_channels); - - for(int i=0; i<((int) s->usrp->get_tx_num_channels()); i++) { - ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); - - if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); - s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); - s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i); - LOG_I(HW,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]); - } - } - - //s->usrp->set_clock_source("external"); - //s->usrp->set_time_source("external"); - // display USRP settings - LOG_I(HW,"Actual master clock: %fMHz...\n",s->usrp->get_master_clock_rate()/1e6); - LOG_I(HW,"Actual clock source %s...\n",s->usrp->get_clock_source(0).c_str()); - LOG_I(HW,"Actual time source %s...\n",s->usrp->get_time_source(0).c_str()); - sleep(1); - // create tx & rx streamer - uhd::stream_args_t stream_args_rx("sc16", "sc16"); - int samples=openair0_cfg[0].sample_rate; - int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); - samples/=10000; - LOG_I(HW,"RF board max packet size %u, size for 100µs jitter %d \n", max, samples); - - if ( samples < max ) { - stream_args_rx.args["spp"] = str(boost::format("%d") % samples ); - } - - LOG_I(HW,"rx_max_num_samps %zu\n", - s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps()); - - for (int i = 0; irx_stream = s->usrp->get_rx_stream(stream_args_rx); - uhd::stream_args_t stream_args_tx("sc16", "sc16"); - - for (int i = 0; itx_stream = s->usrp->get_tx_stream(stream_args_tx); - - /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ - for(int i=0; i<((int) s->usrp->get_tx_num_channels()) && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); - - for(int i=0; i<((int) s->usrp->get_rx_num_channels()) && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); - - for (int i=0; iusrp->get_rx_rate(i)/1e6); - LOG_I(HW," Actual RX frequency: %fGHz...\n", s->usrp->get_rx_freq(i)/1e9); - LOG_I(HW," Actual RX gain: %f...\n", s->usrp->get_rx_gain(i)); - LOG_I(HW," Actual RX bandwidth: %fM...\n", s->usrp->get_rx_bandwidth(i)/1e6); - LOG_I(HW," Actual RX antenna: %s...\n", s->usrp->get_rx_antenna(i).c_str()); - } - - for (int i=0; iusrp->get_tx_rate(i)/1e6); - LOG_I(HW," Actual TX frequency: %fGHz...\n", s->usrp->get_tx_freq(i)/1e9); - LOG_I(HW," Actual TX gain: %f...\n", s->usrp->get_tx_gain(i)); - LOG_I(HW," Actual TX bandwidth: %fM...\n", s->usrp->get_tx_bandwidth(i)/1e6); - LOG_I(HW," Actual TX antenna: %s...\n", s->usrp->get_tx_antenna(i).c_str()); - LOG_I(HW," Actual TX packet size: %lu\n",s->tx_stream->get_max_num_samps()); - } - - LOG_I(HW,"Device timestamp: %f...\n", s->usrp->get_time_now().get_real_secs()); - device->trx_write_func = trx_usrp_write; - device->trx_read_func = trx_usrp_read; - s->sample_rate = openair0_cfg[0].sample_rate; - - // TODO: - // init tx_forward_nsamps based usrp_time_offset ex - if(is_equal(s->sample_rate, (double)30.72e6)) - s->tx_forward_nsamps = 176; - - if(is_equal(s->sample_rate, (double)15.36e6)) - s->tx_forward_nsamps = 90; - - if(is_equal(s->sample_rate, (double)7.68e6)) - s->tx_forward_nsamps = 50; - - - if (device->recplay_state != NULL) { // record mode - device->recplay_state->ms_sample = (iqrec_t *) malloc(openair0_cfg[0].recplay_conf->u_sf_max * sizeof(iqrec_t)); - - if (device->recplay_state->ms_sample == NULL) { - std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl; - exit(-1); - } - - memset(device->recplay_state->ms_sample, 0, openair0_cfg[0].recplay_conf->u_sf_max * BELL_LABS_IQ_BYTES_PER_SF); - } - return 0; -} -/*@}*/ + /*@}*/ }/* extern c */ diff --git a/targets/ARCH/iqplayer/iqplayer_lib.c b/targets/ARCH/iqplayer/iqplayer_lib.c index c4133d1b11..f634a4dbc5 100644 --- a/targets/ARCH/iqplayer/iqplayer_lib.c +++ b/targets/ARCH/iqplayer/iqplayer_lib.c @@ -40,18 +40,15 @@ #include "assertions.h" #include "common/utils/LOG/log.h" - - - - - static void parse_iqfile_header(openair0_device *device, iqfile_header_t *iq_fh) { - AssertFatal((memcmp(iq_fh->oaiid,OAIIQFILE_ID,sizeof(OAIIQFILE_ID)) == 0), - "iqfile doesn't seem to be compatible with oai (invalid id %.4s in header)\n", - iq_fh->oaiid); + char tmp[4]=OAIIQFILE_ID; + AssertFatal((memcmp(iq_fh->oaiid,tmp,sizeof(iq_fh->oaiid)) == 0), + "iqfile doesn't seem to be compatible with oai (invalid id %.4s in header)\n", + iq_fh->oaiid); device->type = iq_fh->devtype; device->openair0_cfg[0].tx_sample_advance=iq_fh->tx_sample_advance; device->openair0_cfg[0].tx_bw = device->openair0_cfg[0].rx_bw = iq_fh->bw; + device->recplay_state->nbSamplesBlocks=iq_fh->nbSamplesBlocks; LOG_UI(HW,"Replay iqs from %s device, bandwidth %e\n",get_devname(iq_fh->devtype),iq_fh->bw); } @@ -63,89 +60,73 @@ static int iqplayer_loadfile(openair0_device *device, openair0_config_t *openair recplay_state_t *s = device->recplay_state; recplay_conf_t *c = openair0_cfg->recplay_conf; + struct stat sb; + s->fd = open(c->u_sf_filename, O_RDONLY ); + if (s->fd >= 0 ) { + fstat(s->fd, &sb); + } else { + LOG_E( HW,"Cannot open %s exiting.\n", c->u_sf_filename ); + exit(-1); + } + if (s->use_mmap) { // use mmap - s->mmapfd = open(c->u_sf_filename, O_RDONLY ); - - if (s->mmapfd != 0) { - struct stat sb; - fstat(s->mmapfd, &sb); s->mapsize=sb.st_size; LOG_I(HW,"Loading subframes using mmap() from %s size=%lu bytes ...\n",c->u_sf_filename, (uint64_t)sb.st_size ); - void *mptr = mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->mmapfd, 0) ; - s->ms_sample = (iqrec_t *) ( mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->mmapfd, 0) + sizeof(iqfile_header_t)); + void *mptr = mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->fd, 0) ; + s->ms_sample = (iqrec_t *) ( mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->fd, 0) + sizeof(iqfile_header_t)); if (mptr != MAP_FAILED) { parse_iqfile_header(device, (iqfile_header_t *)mptr); s->ms_sample = (iqrec_t *)((char *)mptr + sizeof(iqfile_header_t)); - s->nb_samples = ((sb.st_size-sizeof(iqfile_header_t)) / sizeof(iqrec_t)); - int aligned = (((unsigned long)s->ms_sample & 31) == 0)? 1:0; - LOG_I(HW,"Loaded %u subframes.\n",s->nb_samples ); - - if (aligned == 0) { - LOG_E(HW, "mmap address is not 32 bytes aligned, exiting.\n" ); - close(s->mmapfd); - exit(-1); - } + LOG_I(HW,"Loaded %u subframes.\n",s->nbSamplesBlocks ); } else { LOG_E(HW,"Cannot mmap file, exiting.\n"); - close(s->mmapfd); + close(s->fd); exit(-1); } - } else { - LOG_E( HW,"Cannot open %s exiting.\n", c->u_sf_filename ); - exit(-1); - } } else { - s->iqfd = open(c->u_sf_filename, O_RDONLY); + iqfile_header_t fh; + size_t hs = read(s->fd,&fh,sizeof(fh)); - if (s->iqfd != 0) { - struct stat sb; - iqfile_header_t fh; - size_t hs = read(s->iqfd,&fh,sizeof(fh)); - - if (hs == sizeof(fh)) { - parse_iqfile_header(device, &fh); - fstat(s->iqfd, &sb); + if (hs == sizeof(fh)) { + parse_iqfile_header(device, &fh); + fstat(s->fd, &sb); s->mapsize=sb.st_size; - s->nb_samples = ((sb.st_size-sizeof(iqfile_header_t))/ sizeof(iqrec_t)); - LOG_I(HW, "Loading %u subframes from %s,size=%lu bytes ...\n",s->nb_samples, c->u_sf_filename,(uint64_t)sb.st_size); + LOG_I(HW, "Loading %u subframes from %s,size=%lu bytes ...\n",s->nbSamplesBlocks, c->u_sf_filename,(uint64_t)sb.st_size); // allocate buffer for 1 sample at a time - s->ms_sample = (iqrec_t *) malloc(sizeof(iqrec_t)); + s->ms_sample = (iqrec_t *) malloc(sizeof(iqrec_t)+MAX_BELL_LABS_IQ_BYTES_PER_SF*4); if (s->ms_sample == NULL) { LOG_E(HW,"Memory allocation failed for individual subframe replay mode.\n" ); - close(s->iqfd); + close(s->fd); exit(-1); } memset(s->ms_sample, 0, sizeof(iqrec_t)); // point at beginning of iqs in file - if (lseek(s->iqfd,sizeof(iqfile_header_t), SEEK_SET) == 0) { + if (lseek(s->fd,sizeof(iqfile_header_t), SEEK_SET) == 0) { LOG_I(HW,"Initial seek at beginning of the file\n" ); } else { LOG_I(HW,"Problem initial seek at beginning of the file\n"); } } else { LOG_E(HW,"Cannot read header in %s exiting.\n",c->u_sf_filename ); - close(s->iqfd); + close(s->fd); exit(-1); } - } else { - LOG_E(HW,"Cannot open %s exiting.\n",c->u_sf_filename ); - exit(-1); - } } + s->currentPtr=(uint8_t *)s->ms_sample; return 0; } /*! \brief start the oai iq player * \param device, the hardware used */ -static int trx_iqplayer_start(openair0_device *device){ - return 0; +static int trx_iqplayer_start(openair0_device *device) { + return 0; } /*! \brief Terminate operation of the oai iq player @@ -157,28 +138,22 @@ static void trx_iqplayer_end(openair0_device *device) { if (device->recplay_state == NULL) return; - + if (device->recplay_state->use_mmap) { if (device->recplay_state->ms_sample != MAP_FAILED) { munmap(device->recplay_state->ms_sample, device->recplay_state->mapsize); - device->recplay_state->ms_sample = NULL; - } - - if (device->recplay_state->mmapfd != 0) { - close(device->recplay_state->mmapfd); - device->recplay_state->mmapfd = 0; - } + } } else { if (device->recplay_state->ms_sample != NULL) { free(device->recplay_state->ms_sample); - device->recplay_state->ms_sample = NULL; - } - - if (device->recplay_state->iqfd != 0) { - close(device->recplay_state->iqfd); - device->recplay_state->iqfd = 0; - } + } } + device->recplay_state->ms_sample = NULL; + if (device->recplay_state->fd >= 0) { + close(device->recplay_state->fd); + device->recplay_state->fd = -1; + } + } /*! \brief Write iqs function when in replay mode, just introduce a delay, as configured at init time, @param device pointer to the device structure specific to the RF hardware target @@ -208,93 +183,68 @@ static int trx_iqplayer_write(openair0_device *device, openair0_timestamp timest * \returns the number of sample read */ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { - int samples_received=0; - static unsigned int cur_samples; - static int64_t wrap_count; - static int64_t wrap_ts; recplay_state_t *s = device->recplay_state; - if (cur_samples == s->nb_samples) { - cur_samples = 0; - wrap_count++; + if (s->curSamplesBlock==0 && s->wrap_count==0 ) + s->currentTs=s->ms_sample->ts; + + if (s->curSamplesBlock == s->nbSamplesBlocks) { + LOG_I(HW, "wrapping on iq file (%ld)\n", s->wrap_count); + s->curSamplesBlock = 0; + s->wrap_count++; - if (wrap_count == device->openair0_cfg->recplay_conf->u_sf_loops) { - LOG_W(HW, "iqplayer device terminating subframes replay after %u iteration\n",device->openair0_cfg->recplay_conf->u_sf_loops); + if (s->wrap_count == device->openair0_cfg->recplay_conf->u_sf_loops) { + LOG_W(HW, "iqplayer device terminating subframes replay after %u iteration\n", + device->openair0_cfg->recplay_conf->u_sf_loops); exit_function(__FILE__, __FUNCTION__, __LINE__,"replay ended, triggering process termination\n"); } - wrap_ts = wrap_count * (s->nb_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000)); + LOG_I(HW,"go back at the beginning of IQ file"); + device->recplay_state->currentPtr=(uint8_t *)device->recplay_state->ms_sample; - if (!device->recplay_state->use_mmap) { - if (lseek(device->recplay_state->iqfd, 0, SEEK_SET) == 0) { - LOG_I(HW,"Seeking at the beginning of IQ file"); - } else { - LOG_I(HW, "Problem seeking at the beginning of IQ file"); + if (!s->use_mmap) { + if (lseek(device->recplay_state->fd, 0, SEEK_SET) != 0) { + LOG_E(HW, "Problem seeking at the beginning of IQ file"); } } } - if (s->use_mmap) { - if (cur_samples < s->nb_samples) { - *ptimestamp = (s->ms_sample[0].ts + (cur_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000))) + wrap_ts; - - if (cur_samples == 0) { - LOG_I(HW,"starting subframes file with wrap_count=%lu wrap_ts=%lu ts=%lu\n", wrap_count,wrap_ts,*ptimestamp); - } - - memcpy(buff[0], &s->ms_sample[cur_samples].samples[0], nsamps*4); - cur_samples++; - } - } else { + if (!s->use_mmap) { // read sample from file - if (read(s->iqfd, s->ms_sample, sizeof(iqrec_t)) != sizeof(iqrec_t)) { - LOG_E(HW,"pb reading iqfile at index %lu\n",sizeof(iqrec_t)*cur_samples ); - close(s->iqfd); - free(s->ms_sample); - s->ms_sample = NULL; - s->iqfd = 0; + if (read(s->fd, s->ms_sample, sizeof(iqrec_t)) != sizeof(iqrec_t)) { + LOG_E(HW,"pb reading iqfile at index %lu\n",sizeof(iqrec_t)*s->curSamplesBlock ); exit(-1); - } - - if (cur_samples < s->nb_samples) { - static int64_t ts0 = 0; - - if ((cur_samples == 0) && (wrap_count == 0)) { - ts0 = s->ms_sample->ts; - } - - *ptimestamp = ts0 + (cur_samples * (((int)(device->openair0_cfg[0].sample_rate)) / 1000)) + wrap_ts; - - if (cur_samples == 0) { - LOG_I(HW, "starting subframes file with wrap_count=%lu wrap_ts=%lu ts=%lu ",wrap_count,wrap_ts, *ptimestamp); - } - - memcpy(buff[0], &s->ms_sample->samples[0], nsamps*4); - cur_samples++; - // Prepare for next read - off_t where = lseek(s->iqfd, cur_samples * sizeof(iqrec_t), SEEK_SET); - - if (where < 0) { - LOG_E(HW,"Cannot lseek in iqfile: %s\n",strerror(errno)); + } else { + if (read(s->fd, s->ms_sample+1, s->ms_sample->nbBytes) != s->ms_sample->nbBytes) { + LOG_E(HW,"pb reading iqfile at index %lu\n",sizeof(iqrec_t)*s->curSamplesBlock ); exit(-1); } } } + iqrec_t *curHeader=(iqrec_t *)s->currentPtr; + AssertFatal(curHeader->header==BELL_LABS_IQ_HEADER,"" ); + // the current timestamp is the stored timestamp until we wrap on input + // USRP shifts 1 sample time to time + AssertFatal(s->wrap_count !=0 || abs(curHeader->ts-s->currentTs) < 5 ,""); + AssertFatal(nsamps*4==curHeader->nbBytes,""); + *ptimestamp = s->currentTs; + memcpy(buff[0], curHeader+1, nsamps*4); + s->curSamplesBlock++; + // Prepare for next read + s->currentTs+=nsamps; + + if (s->use_mmap) + s->currentPtr+=sizeof(iqrec_t)+s->ms_sample->nbBytes; + struct timespec req; - req.tv_sec = 0; - req.tv_nsec = (device->openair0_cfg[0].recplay_conf->u_sf_read_delay) * 1000; - nanosleep(&req, NULL); - + LOG_D(HW, "returning %d samples at ts %lu\n", nsamps, *ptimestamp); return nsamps; - - return samples_received; } - int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { device->openair0_cfg = openair0_cfg; device->trx_start_func = trx_iqplayer_start; @@ -313,5 +263,4 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { LOG_UI(HW,"iqplayer device initialized, replay %s for %i iterations",openair0_cfg->recplay_conf->u_sf_filename,openair0_cfg->recplay_conf->u_sf_loops); return 0; } - /*@}*/ diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 2e6f148e00..b3d895d360 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -727,7 +727,7 @@ int main ( int argc, char **argv ) fflush(stderr); // end of CI modifications //getchar(); - if(IS_SOFTMODEM_DOFORMS) + if(IS_SOFTMODEM_DOSCOPE) load_softscope("enb",NULL); itti_wait_tasks_end(); oai_exit=1; @@ -735,7 +735,7 @@ int main ( int argc, char **argv ) // stop threads if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) { - if(IS_SOFTMODEM_DOFORMS) + if(IS_SOFTMODEM_DOSCOPE) end_forms(); LOG_I(ENB_APP,"stopping MODEM threads\n"); diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 9bf179efb9..15b97df3ed 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -758,7 +758,7 @@ int main( int argc, char **argv ) { PHY_vars_UE_g[0][0]->no_timing_correction = 1; } - if(IS_SOFTMODEM_DOFORMS) + if(IS_SOFTMODEM_DOSCOPE) load_softscope("ue",NULL); config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS); @@ -783,7 +783,7 @@ int main( int argc, char **argv ) { printf("oai_exit=%d\n",oai_exit); // stop threads - if(IS_SOFTMODEM_DOFORMS) + if(IS_SOFTMODEM_DOSCOPE) end_forms(); printf("stopping MODEM threads\n"); From f18db2bad8cf61350dd2f41d302f73b83a3efdc5 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Mon, 1 Mar 2021 10:32:12 +0000 Subject: [PATCH 15/94] Update SIB1 with q_RxLevMin to -65 and MCC and MNC to match SIM card values --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 2 +- .../GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 2 +- .../GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 82855365c8..4eea13bfe4 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -326,7 +326,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, // cellSelectionInfo sib1->cellSelectionInfo = CALLOC(1,sizeof(struct NR_SIB1__cellSelectionInfo)); - sib1->cellSelectionInfo->q_RxLevMin = -50; + sib1->cellSelectionInfo->q_RxLevMin = -65; // cellAccessRelatedInfo struct NR_PLMN_IdentityInfo *nr_plmn_info=CALLOC(1,sizeof(struct NR_PLMN_IdentityInfo)); diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 108cf06033..5bf6779f6d 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -13,7 +13,7 @@ gNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ({mcc = 222; mnc = 93; mnc_length = 2;}); + plmn_list = ({mcc = 208; mnc = 92; mnc_length = 2;}); tr_s_preference = "local_mac" diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 892aa73398..60834281a9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -13,7 +13,7 @@ gNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ({mcc = 222; mnc = 93; mnc_length = 2;}); + plmn_list = ({mcc = 208; mnc = 92; mnc_length = 2;}); tr_s_preference = "local_mac" From ee9210c69bd174669cc81680e17be1f1b5736a2f Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Mon, 1 Mar 2021 11:22:39 +0000 Subject: [PATCH 16/94] Correction proposal for HARQ when ULSCH is not received --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index b0b6ebbd5a..92fdadf757 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -329,8 +329,16 @@ void handle_nr_ul_harq(module_id_t mod_id, return; remove_front_nr_list(&sched_ctrl->feedback_ul_harq); - sched_ctrl->ul_harq_processes[harq_pid].round++; - add_tail_nr_list(&sched_ctrl->retrans_ul_harq, harq_pid); + sched_ctrl->ul_harq_processes[harq_pid].is_waiting = false; + if(sched_ctrl->ul_harq_processes[harq_pid].round == MAX_HARQ_ROUNDS) { + sched_ctrl->ul_harq_processes[harq_pid].ndi ^= 1; + sched_ctrl->ul_harq_processes[harq_pid].round = 0; + UE_info->mac_stats[UE_id].ulsch_errors++; + add_tail_nr_list(&sched_ctrl->available_ul_harq, harq_pid); + } else { + sched_ctrl->ul_harq_processes[harq_pid].round++; + add_tail_nr_list(&sched_ctrl->retrans_ul_harq, harq_pid); + } harq_pid = sched_ctrl->feedback_ul_harq.head; } remove_front_nr_list(&sched_ctrl->feedback_ul_harq); From deef82d70b0bf849c9e855aa5520c4c1f56a55e1 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 1 Mar 2021 19:23:23 +0000 Subject: [PATCH 17/94] Fix RA-Msg3 to logical channel CCCH --- openair2/LAYER2/NR_MAC_COMMON/nr_mac.h | 1 - openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 3 ++- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 5 ++-- openair2/RRC/NR/L2_nr_interface.c | 25 ++++++++++++++++++++ openair2/RRC/NR/nr_rrc_proto.h | 18 ++++++++++++++ openair2/RRC/NR/rrc_gNB.c | 12 ++++------ 6 files changed, 53 insertions(+), 11 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h index 381dce11b2..fa4d8d48ea 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h @@ -339,7 +339,6 @@ typedef struct { #define UL_SCH_LCID_SRB2 0x02 #define UL_SCH_LCID_SRB3 0x03 #define UL_SCH_LCID_DTCH 0x04 -#define UL_SCH_LCID_CCCH_MSG3 0x21 #define UL_SCH_LCID_RECOMMENDED_BITRATE_QUERY 0x35 #define UL_SCH_LCID_MULTI_ENTRY_PHR_4_OCT 0x36 #define UL_SCH_LCID_CONFIGURED_GRANT_CONFIRMATION 0x37 diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 71b3502c1a..9e4afd9c85 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -513,7 +513,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); RA_config_t *ra = &mac->ra; uint8_t mac_sdus[MAX_NR_ULSCH_PAYLOAD_BYTES]; - uint8_t lcid = UL_SCH_LCID_CCCH_MSG3, *payload; + uint8_t lcid = UL_SCH_LCID_CCCH; + uint8_t *payload; uint16_t size_sdu = 0; unsigned short post_padding; NR_ServingCellConfigCommon_t *scc = mac->scc; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index f26062d4c7..0012ad64e2 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2066,8 +2066,9 @@ uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload, last_size = 3; } } else { // UL CCCH SDU - mac_pdu_ptr->R = 0; - mac_pdu_ptr->LCID = sdu_lcids[i]; + ((NR_MAC_SUBHEADER_FIXED *) mac_pdu_ptr)->R = 0; + ((NR_MAC_SUBHEADER_FIXED *) mac_pdu_ptr)->LCID = sdu_lcids[i]; + last_size = 1; } mac_pdu_ptr += last_size; diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c index 58c595a3d0..cc97591f46 100644 --- a/openair2/RRC/NR/L2_nr_interface.c +++ b/openair2/RRC/NR/L2_nr_interface.c @@ -303,4 +303,29 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP, return(0); +} + +int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, + const int CC_id, + const frame_t frameP, + const sub_frame_t sub_frameP, + const int UE_id, + const rnti_t rntiP, + const rb_id_t srb_idP, + const uint8_t *sduP, + const sdu_size_t sdu_lenP, + const boolean_t brOption) { + + protocol_ctxt_t ctxt; + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, GNB_FLAG_YES, rntiP, frameP, sub_frameP,0); + + if((srb_idP & RAB_OFFSET) == CCCH) { + LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP); + ctxt.brOption = brOption; + if (sdu_lenP > 0) { + nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, CC_id); + } + } + + return 0; } \ No newline at end of file diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index 6d876a0eef..895624ca6a 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -156,6 +156,24 @@ int nr_rrc_mac_remove_ue(module_id_t mod_idP, rnti_t rntiP); +int8_t nr_mac_rrc_data_ind( + const module_id_t module_idP, + const int CC_id, + const frame_t frameP, + const sub_frame_t sub_frameP, + const int UE_id, + const rnti_t rntiP, + const rb_id_t srb_idP, + const uint8_t *sduP, + const sdu_size_t sdu_lenP, + const boolean_t brOption +); + +int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, + const uint8_t *buffer, + int buffer_length, + const int CC_id); + void rrc_gNB_generate_dedicatedRRCReconfiguration_release( const protocol_ctxt_t *const ctxt_pP, diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 6d430d7223..3a70ea482a 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1383,7 +1383,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, break; case NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest: - LOG_I(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %x)\n", ctxt_pP->rnti); + LOG_D(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %x)\n", ctxt_pP->rnti); ue_context_p = rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti); if (ue_context_p != NULL) { rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_p); @@ -1490,15 +1490,13 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, CC_id); break; } - } - if (ue_context_p != NULL) { ue_context_p->ue_context.establishment_cause = rrcSetupRequest->establishmentCause; - } - rrc_gNB_generate_RRCSetup(ctxt_pP, - rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti), - CC_id); + rrc_gNB_generate_RRCSetup(ctxt_pP, + rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti), + CC_id); + } break; case NR_UL_CCCH_MessageType__c1_PR_rrcResumeRequest: From e5aba9eda1a9e318b9790b3863980b43fe04f5ac Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 1 Mar 2021 19:23:43 +0000 Subject: [PATCH 18/94] Fix RA-Msg3 to logical channel CCCH --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 92fdadf757..37ee5acb85 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -237,13 +237,19 @@ void nr_process_mac_pdu( case UL_SCH_LCID_SRB3: // todo break; - case UL_SCH_LCID_CCCH_MSG3: - // todo - break; case UL_SCH_LCID_CCCH: - // todo - mac_subheader_len = 2; - break; + mac_subheader_len = 1; + nr_mac_rrc_data_ind(module_idP, + CC_id, + frameP, + 0, + 0, + rnti, + CCCH, + pdu_ptr+mac_subheader_len, + pdu_len-mac_subheader_len, + 0); + break; case UL_SCH_LCID_DTCH: // check if LCID is valid at current time. @@ -500,6 +506,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, // re-initialize ta update variables afrer RA procedure completion UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; + nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP); + free(ra->preambles.preamble_list); ra->state = Msg4; From 240f411fed85686aeaa591472fbcfca1a18ea8c0 Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Mon, 1 Mar 2021 20:41:02 +0100 Subject: [PATCH 19/94] Passing symbolStart to fill_dmrs_mask It is sufficient to pass l_d directly to the function but considering future extension to mapping type B, this way makes more sense. --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 8 +++-- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 4 +-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 6 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 4 +-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 6 ++-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 31 ++++++++++++------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 3 +- 7 files changed, 38 insertions(+), 24 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 5d1b08bcf6..aba03f44cf 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -2228,8 +2228,8 @@ int get_num_dmrs(uint16_t dmrs_mask ) { return(num_dmrs); } /* returns the total DMRS symbols in a slot*/ -uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols){ - return get_num_dmrs(fill_dmrs_mask(pdsch_Config,dmrs_TypeA_Position,NrOfSymbols)); +uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol){ + return get_num_dmrs(fill_dmrs_mask(pdsch_Config,dmrs_TypeA_Position,NrOfSymbols,startSymbol)); } // Table 5.1.2.2.1-1 38.214 @@ -2864,9 +2864,10 @@ int is_nr_UL_slot(NR_ServingCellConfigCommon_t *scc,slot_t slot) { else return(slot_in_period >= slots1+scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0); } -int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols) { +int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol) { int l0; + int ld = NrOfSymbols; if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2) l0=2; else if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3) l0=3; else AssertFatal(1==0,"Illegal dmrs_TypeA_Position %d\n",(int)dmrs_TypeA_Position); @@ -2877,6 +2878,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup) { // Relative to start of slot + ld += startSymbol; NR_DMRS_DownlinkConfig_t *dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; AssertFatal(NrOfSymbols>1 && NrOfSymbols < 15,"Illegal NrOfSymbols %d\n",NrOfSymbols); int pos2=0; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index 087d316567..258b0f2400 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -47,7 +47,7 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn); uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw); -int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols); +int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol); int is_nr_DL_slot(NR_ServingCellConfigCommon_t *scc,slot_t slotP); @@ -142,7 +142,7 @@ bool set_dl_ptrs_values(NR_PTRS_DownlinkConfig_t *ptrs_config, uint8_t NrOfSymbols); void get_band(uint64_t downlink_frequency, uint16_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type); -uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols); +uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol); /* \brief Set the transform precoding according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16 @param *pusch_config, pointer to pusch config diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index f26062d4c7..431e582ca4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -687,7 +687,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr /* dmrs symbol positions*/ dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config, mac->scc->dmrs_TypeA_Position, - dlsch_config_pdu_1_0->start_symbol+dlsch_config_pdu_1_0->number_symbols); + dlsch_config_pdu_1_0->number_symbols, + dlsch_config_pdu_1_0->start_symbol); dlsch_config_pdu_1_0->dmrsConfigType = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; /* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */ if (dlsch_config_pdu_1_0->number_symbols == 2) @@ -859,7 +860,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr /* dmrs symbol positions*/ dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config, mac->scc->dmrs_TypeA_Position, - dlsch_config_pdu_1_1->number_symbols); + dlsch_config_pdu_1_1->number_symbols, + dlsch_config_pdu_1_1->start_symbol); dlsch_config_pdu_1_1->dmrsConfigType = mac->DLbwp[dl_bwp_id-1]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; /* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214, using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */ diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 1eb25c0366..68697a69a8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -971,7 +971,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols); + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols, StartSymbolIndex); // Fill PDCCH DL DCI PDU nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; @@ -1190,7 +1190,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols); + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols, StartSymbolIndex); // Fill PDCCH DL DCI PDU nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 3f69cfbe74..07875028cf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -289,7 +289,7 @@ void schedule_control_sib1(module_id_t module_id, // Calculate number of PRB_DMRS uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; - uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, startSymbolIndex+nrOfSymbols); + uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); int rbSize = 0; @@ -388,7 +388,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->StartSymbolIndex+pdsch_pdu_rel15->NrOfSymbols); + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->NrOfSymbols, pdsch_pdu_rel15->StartSymbolIndex); LOG_D(MAC,"dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos); @@ -489,7 +489,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) // Calculate number of PRB_DMRS uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; - uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, startSymbolIndex+nrOfSymbols); + uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx), diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 30a89cce77..296b271df5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -302,7 +302,7 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP, return offset; } -int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda) { +void getStartNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda, int *startSymbol, int *nrOfSymbols) { struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; AssertFatal(tda < tdaList->list.count, @@ -311,9 +311,7 @@ int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda) { tdaList->list.count); const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength; - int startSymbolIndex, nrOfSymbols; - SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); - return nrOfSymbols; + SLIV2SL(startSymbolAndLength, startSymbol, nrOfSymbols); } nfapi_nr_dmrs_type_e getDmrsConfigType(NR_BWP_Downlink_t *bwp) { @@ -487,8 +485,12 @@ void pf_dl(module_id_t module_id, sched_ctrl->numDmrsCdmGrpsNoData = 1; uint8_t N_PRB_DMRS = getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData); - int nrOfSymbols = getNrOfSymbols(sched_ctrl->active_bwp, - sched_ctrl->time_domain_allocation); + int startSymbol; + int nrOfSymbols; + getStartNrOfSymbols(sched_ctrl->active_bwp, + sched_ctrl->time_domain_allocation, + &startSymbol, + &nrOfSymbols); uint32_t tbs = nr_compute_tbs(nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx), nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx), 1, // rbSize @@ -574,13 +576,18 @@ void pf_dl(module_id_t module_id, const uint8_t N_PRB_DMRS = getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData); - const int nrOfSymbols = getNrOfSymbols(sched_ctrl->active_bwp, - sched_ctrl->time_domain_allocation); + int startSymbol; + int nrOfSymbols; + getStartNrOfSymbols(sched_ctrl->active_bwp, + sched_ctrl->time_domain_allocation, + &startSymbol, + &nrOfSymbols); const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels->ServingCellConfigCommon; const uint8_t N_DMRS_SLOT = get_num_dmrs_symbols( sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, - nrOfSymbols); + nrOfSymbols, + startSymbol); int rbSize = 0; uint32_t TBS = 0; @@ -697,7 +704,8 @@ void nr_schedule_ue_spec(module_id_t module_id, getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData); uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, RC.nrmac[module_id]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position , - nrOfSymbols); + nrOfSymbols, + startSymbolIndex); const nfapi_nr_dmrs_type_e dmrsConfigType = getDmrsConfigType(sched_ctrl->active_bwp); const int nrOfLayers = 1; const uint16_t R = nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx); @@ -818,7 +826,8 @@ void nr_schedule_ue_spec(module_id_t module_id, pdsch_pdu->dlDmrsSymbPos = fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, - nrOfSymbols); + nrOfSymbols, + startSymbolIndex); pdsch_pdu->dmrsConfigType = dmrsConfigType; pdsch_pdu->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu->SCID = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 6487f391b9..bf8269132a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -164,7 +164,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, - NrOfSymbols); + NrOfSymbols, + StartSymbolIndex); /* AssertFatal(k0==0,"k0 is not zero for Initial DL BWP TimeDomain Alloc\n"); From ca5eb17f285cc099abea869735c730d2b6d4aaed Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Mon, 1 Mar 2021 22:18:51 +0000 Subject: [PATCH 20/94] Fix SIB1 with offsetToPointA = 86 --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 4eea13bfe4..e07d461c4c 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -418,7 +418,8 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, nrMultiBandInfo->freqBandIndicatorNR = configuration->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[i]; ASN_SEQUENCE_ADD(&sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.frequencyBandList.list,nrMultiBandInfo); } - sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = configuration->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier; + //sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = configuration->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier; + sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = 86; for(int i = 0; i< configuration->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.count; i++) { ASN_SEQUENCE_ADD(&sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list,configuration->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[i]); } From 1a7a08648032e03e76712f56f51544494653727f Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Mon, 1 Mar 2021 23:50:16 +0100 Subject: [PATCH 21/94] Passing symbolStart to fill_dmrs_mask Adding missed changes in previous commit --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index aba03f44cf..ad68b3b950 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -2880,7 +2880,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i // Relative to start of slot ld += startSymbol; NR_DMRS_DownlinkConfig_t *dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; - AssertFatal(NrOfSymbols>1 && NrOfSymbols < 15,"Illegal NrOfSymbols %d\n",NrOfSymbols); + AssertFatal(ld>1 && ld < 15,"Illegal l_d %d\n",ld); int pos2=0; if (dmrs_config->maxLength == NULL) { // this is Table 7.4.1.1.2-3: PDSCH DM-RS positions l for single-symbol DM-RS @@ -2889,7 +2889,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i return(1<3,"Illegal NrOfSymbols %d for len2 DMRS\n",NrOfSymbols); - if (NrOfSymbols < 10) return(1<dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition!=NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<3,"Illegal l_d %d for len2 DMRS\n",ld); + if (ld < 10) return(1<dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition!=NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition!=NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition!=NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1) return(1<dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1< Date: Tue, 2 Mar 2021 20:20:11 +0000 Subject: [PATCH 22/94] Draft RA-Msg4 at gNB --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 95 ++++++++++++++++--- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 4 +- openair2/RRC/NR/L2_nr_interface.c | 44 ++++----- openair2/RRC/NR/nr_rrc_proto.h | 1 + 4 files changed, 103 insertions(+), 41 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 68697a69a8..1824490371 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -862,8 +862,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra i = 0; } } + if (rbStart > (BWPSize - rbSize)) { - LOG_E(MAC, "%s(): cannot find free vrb_map for RA RNTI %04x!\n", __func__, ra->RA_rnti); + LOG_E(NR_MAC, "%s(): cannot find free vrb_map for RA RNTI %04x!\n", __func__, ra->RA_rnti); return; } @@ -1070,17 +1071,64 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int NrOfSymbols_tmp = 0; int x_Overhead = 0; int time_domain_assignment = 0; + int rbStart = 0; + int rbSize = 0; uint8_t nr_of_candidates = 0; uint8_t aggregation_level = 0; + uint16_t *vrb_map = cc[CC_id].vrb_map; NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; + long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + + long dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + uint8_t N_PRB_DMRS = 0; + if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) { + N_PRB_DMRS = nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; + } + else { + N_PRB_DMRS = nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 4; + } + + uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(NULL, + RC.nrmac[module_idP]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, + NrOfSymbols, + StartSymbolIndex); + + uint8_t mac_sdu[30]; + uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, mac_sdu); + + LOG_I(NR_MAC, "[gNB %d] Got %d bytes from CCCH\n", module_idP, mac_sdu_length); + + int header_length_total = 1 + 6 + 2 + (mac_sdu_length >= 128); + int payload_length = mac_sdu_length + header_length_total; + + uint32_t TBS = 0; + do { + rbSize++; + TBS = nr_compute_tbs(nr_get_Qm_dl(nr_mac->sched_ctrlCommon->mcs, nr_mac->sched_ctrlCommon->mcsTableIdx), + nr_get_code_rate_dl(nr_mac->sched_ctrlCommon->mcs, nr_mac->sched_ctrlCommon->mcsTableIdx), + rbSize, NrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT,0, 0,1) >> 3; + } while (rbStart + rbSize < BWPSize && !vrb_map[rbStart + rbSize] && TBS < payload_length); + + for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { + if (vrb_map[rbStart + i]) { + rbStart += i; + i = 0; + } + } + + if (rbStart > (BWPSize - rbSize)) { + LOG_E(NR_MAC, "%s(): cannot find free vrb_map for RA RNTI %04x!\n", __func__, ra->RA_rnti); + return; + } // Checking if the DCI allocation is feasible in current subframe + nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; if (dl_req->nPDUs > NFAPI_NR_MAX_DL_TTI_PDUS - 2) { LOG_I(NR_MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, ra->rnti); return; @@ -1100,8 +1148,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra return; } - nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; - // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them const int bwpid = bwp->bwp_Id; @@ -1142,8 +1188,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; pdsch_pdu_rel15->pduIndex = pduindex; - pdsch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdsch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_pdu_rel15->BWPSize = BWPSize; + pdsch_pdu_rel15->BWPStart = BWPStart; pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; @@ -1172,8 +1218,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2; pdsch_pdu_rel15->dmrsPorts = 1; pdsch_pdu_rel15->resourceAlloc = 1; - pdsch_pdu_rel15->rbStart = 0; - pdsch_pdu_rel15->rbSize = 6; + pdsch_pdu_rel15->rbStart = rbStart; + pdsch_pdu_rel15->rbSize = rbSize; pdsch_pdu_rel15->VRBtoPRBMapping = 0; for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { @@ -1185,7 +1231,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra time_domain_assignment = i; // this is short PDSCH added to the config to fit mixed slot } } - AssertFatal(StartSymbolIndex >= 0, "StartSymbolIndex is negative\n"); pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; @@ -1245,20 +1290,42 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra x_Overhead = 0; nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); - uint8_t payload[] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08}; + const int cont_res_len = 1 + 6; + const int post_padding = TBS > header_length_total + payload_length + cont_res_len; + + LOG_D(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frameP, slotP, + TBS, header_length_total, payload_length, cont_res_len, post_padding); // DL TX request - tx_req->PDU_length = pdsch_pdu_rel15->TBSize[0]; + nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; + + uint8_t payload[50] = {}; + const int offset = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, (unsigned char *)payload, 255, ra->cont_res_id); + + ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->R = 0; + ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->F = 0; + ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->LCID = DL_SCH_LCID_CCCH; + ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->L = mac_sdu_length*8; + + memcpy(&payload[9], mac_sdu, mac_sdu_length); + + if (post_padding > 0) { + for (int j = 0; j < TBS - payload_length; j++) + payload[payload_length + j] = 0; + } + + bzero(tx_req->TLVs[0].value.direct,MAX_NR_DLSCH_PAYLOAD_BYTES); + memcpy(&tx_req->TLVs[0].value.direct, payload, payload_length); + + tx_req->PDU_length = TBS; tx_req->PDU_index = pduindex; tx_req->num_TLV = 1; - tx_req->TLVs[0].length = 8; + tx_req->TLVs[0].length = TBS + 2; nr_mac->TX_req[CC_id].SFN = frameP; nr_mac->TX_req[CC_id].Number_of_PDUs++; nr_mac->TX_req[CC_id].Slot = slotP; - memcpy(tx_req->TLVs[0].value.direct, payload, tx_req->TLVs[0].length); // Mark the corresponding RBs as used - uint16_t *vrb_map = cc[CC_id].vrb_map; for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 07875028cf..45f9b4ab83 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -113,7 +113,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, dl_tti_request = &gNB->DL_req[CC_id]; dl_req = &dl_tti_request->dl_tti_request_body; - mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 1, &cc->MIB_pdu.payload[0]); + mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 0, 1, &cc->MIB_pdu.payload[0]); LOG_D(MAC, "Frame %d, slot %d: BCH PDU length %d\n", frameP, slotP, mib_sdu_length); @@ -473,7 +473,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) // Get SIB1 uint8_t sib1_payload[NR_MAX_SIB_LENGTH/8]; - uint8_t sib1_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, BCCH, 1, sib1_payload); + uint8_t sib1_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, BCCH, 0, 1, sib1_payload); LOG_D(MAC,"sib1_sdu_length = %i\n", sib1_sdu_length); LOG_D(MAC,"SIB1: \n"); for (int i=0;i>4)&0x3f); - #ifdef DEBUG_RRC LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%ld\n",Mod_idP,Srb_id); #endif - rrc_gNB_carrier_data_t *carrier; - NR_BCCH_BCH_Message_t *mib; - NR_SRB_INFO *srb_info; - char payload_size, *payload_pP; - - carrier = &RC.nrrrc[Mod_idP]->carrier; - mib = &carrier->mib; - srb_info = &carrier->Srb0; - - /* MIBCH */ + // MIBCH if ((Srb_id & RAB_OFFSET) == MIBCH) { + asn_enc_rval_t enc_rval; + uint8_t sfn_msb = (uint8_t)((frameP>>4)&0x3f); + rrc_gNB_carrier_data_t *carrier = &RC.nrrrc[Mod_idP]->carrier; + NR_BCCH_BCH_Message_t *mib = &carrier->mib; + // Currently we are getting the pdcch_ConfigSIB1 from the configuration file. // Uncomment this function for a dynamic pdcch_ConfigSIB1. //channel_bandwidth_t min_channel_bw = bw_10MHz; // Must be obtained based on TS 38.101-1 Table 5.3.5-1 @@ -269,7 +263,7 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP, return (3); } - /* TODO BCCH SIB1 SIBs */ + // TODO BCCH SIB1 SIBs if ((Srb_id & RAB_OFFSET ) == BCCH) { memcpy(&buffer_pP[0], RC.nrrrc[Mod_idP]->carrier.SIB1, @@ -278,25 +272,25 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP, return RC.nrrrc[Mod_idP]->carrier.sizeof_SIB1; } - /* CCCH */ + // CCCH if( (Srb_id & RAB_OFFSET ) == CCCH) { - //struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti); - //if (ue_context_p == NULL) return(0); - //eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context; - LOG_D(RRC,"[gNB %d] Frame %d CCCH request (Srb_id %ld)\n", Mod_idP, frameP, Srb_id); - // srb_info=&ue_p->Srb0; + char *payload_pP; + uint8_t Sdu_size = 0; + struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[Mod_idP], rnti); - payload_size = srb_info->Tx_buffer.payload_size; + LOG_D(NR_RRC,"[gNB %d] Frame %d CCCH request (Srb_id %ld)\n", Mod_idP, frameP, Srb_id); + + char payload_size = ue_context_p->ue_context.Srb0.Tx_buffer.payload_size; // check if data is there for MAC if (payload_size > 0) { - payload_pP = srb_info->Tx_buffer.Payload; - LOG_D(RRC,"[gNB %d] CCCH (%p) has %d bytes (dest: %p, src %p)\n", Mod_idP, srb_info, payload_size, buffer_pP, payload_pP); + payload_pP = ue_context_p->ue_context.Srb0.Tx_buffer.Payload; + LOG_D(NR_RRC,"[gNB %d] CCCH has %d bytes (dest: %p, src %p)\n", Mod_idP, payload_size, buffer_pP, payload_pP); // Fill buffer memcpy((void *)buffer_pP, (void*)payload_pP, payload_size); Sdu_size = payload_size; - srb_info->Tx_buffer.payload_size = 0; + ue_context_p->ue_context.Srb0.Tx_buffer.payload_size = 0; } return Sdu_size; } diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index 895624ca6a..7c08d59e67 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -51,6 +51,7 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP, const int CC_id, const frame_t frameP, const rb_id_t Srb_id, + const rnti_t rnti, const uint8_t Nb_tb, uint8_t *const buffer_pP ); From d1c56742d32c8c74157b64b4ce607e1031b57b6c Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 3 Mar 2021 00:11:07 +0000 Subject: [PATCH 23/94] Msg4 transmitted with UE Contention Resolution Identity and with RRCSetup --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 14 +++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 77 +++++++++++-------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 + 3 files changed, 61 insertions(+), 34 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index a1e687bded..3993fc2bca 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1825,7 +1825,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, case DL_SCH_LCID_CCCH: // MSG4 RRC Connection Setup 38.331 - // varialbe length + // variable length mac_ce_len |= (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pduP)->L; mac_subheader_len = 2; if(((NR_MAC_SUBHEADER_SHORT *)pduP)->F){ @@ -1833,6 +1833,13 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, mac_subheader_len = 3; } + LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_ce_len); + + // TODO: Forward RRCSetup to RRC + LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n bits, rx bytes: \n", mac_ce_len); + for (int i = 0; i < mac_ce_len/8; i++) { + LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[i + 2]); + } break; case DL_SCH_LCID_TCI_STATE_ACT_UE_SPEC_PDSCH: @@ -1942,10 +1949,13 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, case DL_SCH_LCID_CON_RES_ID: // Clause 5.1.5 and 6.1.3.3 of 3GPP TS 38.321 version 16.2.1 Release 16 // WIP todo: handle CCCH_pdu + // MAC Header: 1 byte (R/R/LCID) + // MAC SDU: 6 bytes (UE Contention Resolution Identity) mac_ce_len = 6; - LOG_I(MAC, "[UE %d][RAPROC] Frame %d : received contention resolution msg: %x.%x.%x.%x.%x.%x, Terminating RA procedure\n", module_idP, frameP, pduP[0], pduP[1], pduP[2], pduP[3], pduP[4], pduP[5]); + LOG_I(MAC, "[UE %d][RAPROC] Frame %d : received contention resolution identity: 0x%x%x%x%x%x%x. Terminating RA procedure\n", module_idP, frameP, pduP[1], pduP[2], pduP[3], pduP[4], pduP[5], pduP[6]); + // FIXME: Only succeeds if received contention resolution equals to the first 48 bits of transmitted Mgs3 if (ra->RA_active == 1) { nr_ra_succeeded(module_idP, frameP, slot); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 1824490371..01f8b012a8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1063,10 +1063,35 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) { + uint8_t mac_pdu[100] = {}; + uint16_t mac_pdu_length = 0; + + const int offset = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, (unsigned char *)mac_pdu, 255, ra->cont_res_id); + mac_pdu_length += offset; + + uint8_t mac_sdu[30]; + uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, mac_sdu); + + + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->R = 0; + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->F = 0; + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->LCID = DL_SCH_LCID_CCCH; + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->L = mac_sdu_length * 8; + mac_pdu_length += 2; + + memcpy(&mac_pdu[mac_pdu_length], mac_sdu, sizeof(uint8_t) * mac_sdu_length); + mac_pdu_length += mac_sdu_length; + + LOG_I(NR_MAC, "[gNB %d] Got %d bytes from CCCH\n", module_idP, mac_sdu_length); + + //int header_length_total = 1 + 6 + 2 + (mac_sdu_length >= 128); + //int payload_length = mac_sdu_length + header_length_total; + + int mcsIndex = 0; int startSymbolAndLength = 0; int StartSymbolIndex = -1; - int NrOfSymbols = 14; + int NrOfSymbols = 5; int StartSymbolIndex_tmp = 0; int NrOfSymbols_tmp = 0; int x_Overhead = 0; @@ -1099,13 +1124,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra NrOfSymbols, StartSymbolIndex); - uint8_t mac_sdu[30]; - uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, mac_sdu); - - LOG_I(NR_MAC, "[gNB %d] Got %d bytes from CCCH\n", module_idP, mac_sdu_length); - - int header_length_total = 1 + 6 + 2 + (mac_sdu_length >= 128); - int payload_length = mac_sdu_length + header_length_total; uint32_t TBS = 0; do { @@ -1113,7 +1131,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra TBS = nr_compute_tbs(nr_get_Qm_dl(nr_mac->sched_ctrlCommon->mcs, nr_mac->sched_ctrlCommon->mcsTableIdx), nr_get_code_rate_dl(nr_mac->sched_ctrlCommon->mcs, nr_mac->sched_ctrlCommon->mcsTableIdx), rbSize, NrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT,0, 0,1) >> 3; - } while (rbStart + rbSize < BWPSize && !vrb_map[rbStart + rbSize] && TBS < payload_length); + } while (rbStart + rbSize < BWPSize && !vrb_map[rbStart + rbSize] && TBS < mac_pdu_length); for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { if (vrb_map[rbStart + i]) { @@ -1200,11 +1218,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) { pdsch_pdu_rel15->mcsTable[0] = 0; } else { - if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) { - pdsch_pdu_rel15->mcsTable[0] = 1; - } else { - pdsch_pdu_rel15->mcsTable[0] = 2; - } + if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) { + pdsch_pdu_rel15->mcsTable[0] = 1; + } else { + pdsch_pdu_rel15->mcsTable[0] = 2; + } } pdsch_pdu_rel15->rvIndex[0] = 0; @@ -1222,14 +1240,16 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->rbSize = rbSize; pdsch_pdu_rel15->VRBtoPRBMapping = 0; + // FIXME: should use Initial BWP for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &StartSymbolIndex_tmp, &NrOfSymbols_tmp); - if (NrOfSymbols_tmp < NrOfSymbols) { + //if (NrOfSymbols_tmp < NrOfSymbols) { NrOfSymbols = NrOfSymbols_tmp; StartSymbolIndex = StartSymbolIndex_tmp; time_domain_assignment = i; // this is short PDSCH added to the config to fit mixed slot - } + //} + break; } AssertFatal(StartSymbolIndex >= 0, "StartSymbolIndex is negative\n"); @@ -1291,31 +1311,24 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); const int cont_res_len = 1 + 6; - const int post_padding = TBS > header_length_total + payload_length + cont_res_len; + const int post_padding = TBS > mac_pdu_length; - LOG_D(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frameP, slotP, - TBS, header_length_total, payload_length, cont_res_len, post_padding); + //LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frameP, slotP, + // TBS, header_length_total, payload_length, cont_res_len, post_padding); // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; - uint8_t payload[50] = {}; - const int offset = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, (unsigned char *)payload, 255, ra->cont_res_id); - - ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->R = 0; - ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->F = 0; - ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->LCID = DL_SCH_LCID_CCCH; - ((NR_MAC_SUBHEADER_SHORT *) &payload[offset])->L = mac_sdu_length*8; - - memcpy(&payload[9], mac_sdu, mac_sdu_length); if (post_padding > 0) { - for (int j = 0; j < TBS - payload_length; j++) - payload[payload_length + j] = 0; + for (int j = 0; j < TBS - mac_pdu_length; j++) + mac_pdu[mac_pdu_length + j] = 0; } + mac_pdu_length = TBS; - bzero(tx_req->TLVs[0].value.direct,MAX_NR_DLSCH_PAYLOAD_BYTES); - memcpy(&tx_req->TLVs[0].value.direct, payload, payload_length); + + //bzero(tx_req->TLVs[0].value.direct,MAX_NR_DLSCH_PAYLOAD_BYTES); + memcpy(&tx_req->TLVs[0].value.direct, mac_pdu, sizeof(uint8_t) * mac_pdu_length); tx_req->PDU_length = TBS; tx_req->PDU_index = pduindex; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index e8e6ef5f07..e6441f4581 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -504,6 +504,10 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); } + // UE Contention Resolution Identity + // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 + memcpy(ra->cont_res_id, sduP, sizeof(uint8_t) * 6); + // re-initialize ta update variables afrer RA procedure completion UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; From d0b9146cd0def103623659e4d448270007fa797a Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 3 Mar 2021 01:27:50 +0000 Subject: [PATCH 24/94] Msg4 transmitted from MAC to RRC through ITTI (TASK_RRC_NRUE created) --- executables/nr-uesoftmodem.c | 23 ++++++++++++ openair1/SIMULATION/NR_PHY/dlsim.c | 15 ++++---- openair1/SIMULATION/NR_PHY/prachsim.c | 14 +++++++- openair1/SIMULATION/NR_PHY/ulsim.c | 14 ++++++-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 37 +++++++++++--------- openair2/RRC/NR_UE/L2_interface_ue.c | 31 ++++++++++++++++ openair2/RRC/NR_UE/rrc_proto.h | 10 +++++- 7 files changed, 118 insertions(+), 26 deletions(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 981ee735c9..25356704cb 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -180,6 +180,23 @@ void print_difftimes(void) { LOG_I(HW,"difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec); } +int create_tasks_nrue(uint32_t ue_nb) { + LOG_D(NR_RRC, "%s(ue_nb:%d)\n", __FUNCTION__, ue_nb); + itti_wait_ready(1); + + if (ue_nb > 0) { + LOG_I(NR_RRC,"create TASK_RRC_NRUE \n"); + if (itti_create_task (TASK_RRC_NRUE, rrc_nrue_task, NULL) < 0) { + LOG_E(NR_RRC, "Create task for RRC UE failed\n"); + return -1; + } + + } + + itti_wait_ready(0); + return 0; +} + void exit_function(const char *file, const char *function, const int line, const char *s) { int CC_id; @@ -561,6 +578,12 @@ int main( int argc, char **argv ) { // wait for end of program printf("TYPE TO TERMINATE\n"); + + if (create_tasks_nrue(1) < 0) { + printf("cannot create ITTI tasks\n"); + exit(-1); // need a softer mode + } + // Sleep a while before checking all parameters have been used // Some are used directly in external threads, asynchronously sleep(20); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 6856ecfb04..040f8c5a54 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -87,12 +87,15 @@ uint64_t downlink_frequency[MAX_NUM_CCs][4]; // dummy functions int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, - const uint8_t gNB_index, - const int8_t channel, - const uint8_t* pduP, - const sdu_size_t pdu_len) +int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, + const int CC_id, + const uint8_t gNB_index, + const frame_t frame, + const sub_frame_t sub_frame, + const rnti_t rnti, + const channel_t channel, + const uint8_t* pduP, + const sdu_size_t pdu_len) { return 0; } diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 3c15707402..4b6e9993cc 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -47,6 +47,7 @@ #include "OCG_vars.h" #include #include +#include //#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" @@ -130,7 +131,18 @@ nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP( return 0; } -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index, const int8_t channel, const uint8_t* pduP, const sdu_size_t pdu_len) {return 0;} +int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, + const int CC_id, + const uint8_t gNB_index, + const frame_t frame, + const sub_frame_t sub_frame, + const rnti_t rnti, + const channel_t channel, + const uint8_t* pduP, + const sdu_size_t pdu_len) +{ + return 0; +} void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index) { diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 3b9d8045d0..fded8619f0 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -82,9 +82,19 @@ double cpuf; //uint8_t nfapi_mode = 0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; +int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, + const int CC_id, + const uint8_t gNB_index, + const frame_t frame, + const sub_frame_t sub_frame, + const rnti_t rnti, + const channel_t channel, + const uint8_t* pduP, + const sdu_size_t pdu_len) +{ + return 0; +} -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index, - const int8_t channel, const uint8_t* pduP, const sdu_size_t pdu_len) { return 0; } int generate_dlsch_header(unsigned char *mac_header, unsigned char num_sdus, unsigned short *sdu_lengths, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 3993fc2bca..843e030f6f 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -105,7 +105,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id, NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); - nr_mac_rrc_data_ind_ue( module_id, cc_id, gNB_index, NR_BCCH_BCH, (uint8_t *) pduP, 3 ); // fixed 3 bytes MIB PDU + nr_mac_rrc_data_ind_ue( module_id, cc_id, gNB_index, 0, 0, 0, NR_BCCH_BCH, (uint8_t *) pduP, 3 ); // fixed 3 bytes MIB PDU AssertFatal(mac->mib != NULL, "nr_ue_decode_mib() mac->mib == NULL\n"); //if(mac->mib != NULL){ @@ -161,7 +161,7 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id, uint8_t *pduP, uint32_t pdu_len) { LOG_D(NR_MAC, "Decoding NR-BCCH-DL-SCH-Message (SIB1 or SI)\n"); - nr_mac_rrc_data_ind_ue(module_id, cc_id, gNB_index, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len); + nr_mac_rrc_data_ind_ue(module_id, cc_id, gNB_index, 0, 0, 0, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len); return 0; } @@ -1824,23 +1824,28 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, // MAC CE case DL_SCH_LCID_CCCH: - // MSG4 RRC Connection Setup 38.331 - // variable length - mac_ce_len |= (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pduP)->L; + // MSG4 RRC Connection Setup 38.331 + // variable length + + if(((NR_MAC_SUBHEADER_SHORT *)pduP)->F){ + mac_sdu_len = ((uint16_t)(((NR_MAC_SUBHEADER_LONG *) pduP)->L1 & 0x7f) << 8) + | ((uint16_t)((NR_MAC_SUBHEADER_LONG *) pduP)->L2 & 0xff); + mac_subheader_len = 3; + } else { + mac_sdu_len = ((NR_MAC_SUBHEADER_LONG *) pduP)->L1; mac_subheader_len = 2; - if(((NR_MAC_SUBHEADER_SHORT *)pduP)->F){ - mac_ce_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pduP)->L2)<<8; - mac_subheader_len = 3; - } + } - LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_ce_len); + LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_sdu_len); - // TODO: Forward RRCSetup to RRC - LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n bits, rx bytes: \n", mac_ce_len); - for (int i = 0; i < mac_ce_len/8; i++) { - LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[i + 2]); - } - break; + + LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n bits, rx bytes: \n", mac_sdu_len); + for (int i = 0; i < mac_sdu_len/8; i++) { + LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[i + 2]); + } + + nr_mac_rrc_data_ind_ue(module_idP, CC_id, gNB_index, frameP, 0, mac->crnti, CCCH, pduP+mac_subheader_len, mac_sdu_len); + break; case DL_SCH_LCID_TCI_STATE_ACT_UE_SPEC_PDSCH: diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index e21859ded8..347a367e62 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -42,17 +42,48 @@ nr_mac_rrc_data_ind_ue( const module_id_t module_id, const int CC_id, const uint8_t gNB_index, + const frame_t frame, + const sub_frame_t sub_frame, + const rnti_t rnti, const channel_t channel, const uint8_t* pduP, const sdu_size_t pdu_len){ + sdu_size_t sdu_size = 0; + protocol_ctxt_t ctxt; switch(channel){ case NR_BCCH_BCH: AssertFatal( nr_rrc_ue_decode_NR_BCCH_BCH_Message(module_id, gNB_index, (uint8_t*)pduP, pdu_len) == 0, "UE decode BCCH-BCH error!\n"); break; + case NR_BCCH_DL_SCH: AssertFatal( nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id, gNB_index, (uint8_t*)pduP, pdu_len, 0, 0) == 0, "UE decode BCCH-DL-SCH error!\n"); break; + + case CCCH: + if (pdu_len>0) { + LOG_T(NR_RRC,"[UE %d] Received SDU for CCCH on SRB %ld from gNB %d\n",module_id,channel & RAB_OFFSET,gNB_index); + + MessageDef *message_p; + int msg_sdu_size = CCCH_SDU_SIZE; + + if (pdu_len > msg_sdu_size) { + LOG_E(NR_RRC, "SDU larger than CCCH SDU buffer size (%d, %d)", sdu_size, msg_sdu_size); + sdu_size = msg_sdu_size; + } else { + sdu_size = pdu_len; + } + + message_p = itti_alloc_new_message (TASK_MAC_UE, 0, NR_RRC_MAC_CCCH_DATA_IND); + memset (NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE); + memcpy (NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu, pduP, sdu_size); + NR_RRC_MAC_CCCH_DATA_IND (message_p).frame = frame; //frameP + NR_RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = sub_frame; //sub_frameP + NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = sdu_size; + NR_RRC_MAC_CCCH_DATA_IND (message_p).gnb_index = gNB_index; + NR_RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti; //rntiP + itti_send_msg_to_task (TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE( module_id ), message_p); + } default: break; } diff --git a/openair2/RRC/NR_UE/rrc_proto.h b/openair2/RRC/NR_UE/rrc_proto.h index 0acf6db634..534da0112b 100644 --- a/openair2/RRC/NR_UE/rrc_proto.h +++ b/openair2/RRC/NR_UE/rrc_proto.h @@ -109,7 +109,15 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(const module_id_t module_id, const ui \param channel indicator for channel of the pdu \param pduP pointer to pdu \param pdu_len data length of pdu*/ -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index, const channel_t channel, const uint8_t* pduP, const sdu_size_t pdu_len); +int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, + const int CC_id, + const uint8_t gNB_index, + const frame_t frame, + const sub_frame_t sub_frame, + const rnti_t rnti, + const channel_t channel, + const uint8_t* pduP, + const sdu_size_t pdu_len); /**\brief \param module_id module id From c457cf645566f384c9cc3c009eb8b70175048238 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 3 Mar 2021 10:01:35 +0000 Subject: [PATCH 25/94] Msg2 temporary fix for PDSCH time domain resource allocation (use the same as SIB1 from TS 38.214 Table 5.1.2.1.1-2) --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 01f8b012a8..11bbb3ea3d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -833,9 +833,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if ((ra->Msg2_frame == frameP) && (ra->Msg2_slot == slotP)) { int mcsIndex = 0; - int startSymbolAndLength = 0; - int StartSymbolIndex = -1; - int NrOfSymbols = 14; + int startSymbolAndLength = 53; + int StartSymbolIndex = 2; + int NrOfSymbols = 12; int StartSymbolIndex_tmp = 0; int NrOfSymbols_tmp = 0; int x_Overhead = 0; @@ -958,16 +958,17 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->rbSize = rbSize; pdsch_pdu_rel15->VRBtoPRBMapping = 0; + // FIXME: should use Initial BWP and maybe Default values from TS 38.214 Table 5.1.2.1.1-1 for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &StartSymbolIndex_tmp, &NrOfSymbols_tmp); - if (NrOfSymbols_tmp < NrOfSymbols) { + //if (NrOfSymbols_tmp < NrOfSymbols) { NrOfSymbols = NrOfSymbols_tmp; StartSymbolIndex = StartSymbolIndex_tmp; time_domain_assignment = i; // this is short PDSCH added to the config to fit mixed slot - } + //} + break; } - AssertFatal(StartSymbolIndex >= 0, "StartSymbolIndex is negative\n"); pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; @@ -1089,9 +1090,9 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int mcsIndex = 0; - int startSymbolAndLength = 0; - int StartSymbolIndex = -1; - int NrOfSymbols = 5; + int startSymbolAndLength = 53; + int StartSymbolIndex = 2; + int NrOfSymbols = 12; int StartSymbolIndex_tmp = 0; int NrOfSymbols_tmp = 0; int x_Overhead = 0; @@ -1240,7 +1241,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->rbSize = rbSize; pdsch_pdu_rel15->VRBtoPRBMapping = 0; - // FIXME: should use Initial BWP + // FIXME: should use Initial BWP and maybe Default values from TS 38.214 Table 5.1.2.1.1-1 for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &StartSymbolIndex_tmp, &NrOfSymbols_tmp); From efd1f46f1f419e2259ffe5b6ddc9b37517ff460c Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 3 Mar 2021 12:12:39 +0000 Subject: [PATCH 26/94] Fix Msg4 mcsIndex assignment --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 17 +++++++----- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 27 +++++++------------ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 843e030f6f..6485d6c851 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1836,15 +1836,20 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, mac_subheader_len = 2; } - LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_sdu_len); + if ( mac_sdu_len > 0) { + LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_sdu_len); - LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n bits, rx bytes: \n", mac_sdu_len); - for (int i = 0; i < mac_sdu_len/8; i++) { - LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[i + 2]); + LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n bits, rx bytes: \n", mac_sdu_len); + for (int i = 0; i < mac_subheader_len; i++) { + LOG_D(NR_MAC, "MAC header %d: 0x%x\n", i, pduP[i]); + } + for (int i = 0; i < mac_sdu_len/8; i++) { + LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[mac_subheader_len + i]); + } + + nr_mac_rrc_data_ind_ue(module_idP, CC_id, gNB_index, frameP, 0, mac->crnti, CCCH, pduP+mac_subheader_len, mac_sdu_len); } - - nr_mac_rrc_data_ind_ue(module_idP, CC_id, gNB_index, frameP, 0, mac->crnti, CCCH, pduP+mac_subheader_len, mac_sdu_len); break; case DL_SCH_LCID_TCI_STATE_ACT_UE_SPEC_PDSCH: diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 11bbb3ea3d..37db600b6b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1090,7 +1090,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int mcsIndex = 0; - int startSymbolAndLength = 53; + int mcsTableIndex = 0; + int startSymbolAndLength = 0; int StartSymbolIndex = 2; int NrOfSymbols = 12; int StartSymbolIndex_tmp = 0; @@ -1129,8 +1130,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint32_t TBS = 0; do { rbSize++; - TBS = nr_compute_tbs(nr_get_Qm_dl(nr_mac->sched_ctrlCommon->mcs, nr_mac->sched_ctrlCommon->mcsTableIdx), - nr_get_code_rate_dl(nr_mac->sched_ctrlCommon->mcs, nr_mac->sched_ctrlCommon->mcsTableIdx), + TBS = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIndex), + nr_get_code_rate_dl(mcsIndex, mcsTableIndex), rbSize, NrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT,0, 0,1) >> 3; } while (rbStart + rbSize < BWPSize && !vrb_map[rbStart + rbSize] && TBS < mac_pdu_length); @@ -1212,10 +1213,10 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; - pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,0); + pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,mcsTableIndex); pdsch_pdu_rel15->qamModOrder[0] = 2; pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; - +/* if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) { pdsch_pdu_rel15->mcsTable[0] = 0; } else { @@ -1225,6 +1226,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->mcsTable[0] = 2; } } + */ + pdsch_pdu_rel15->rvIndex[0] = 0; pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; @@ -1311,8 +1314,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra x_Overhead = 0; nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); - const int cont_res_len = 1 + 6; - const int post_padding = TBS > mac_pdu_length; //LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frameP, slotP, // TBS, header_length_total, payload_length, cont_res_len, post_padding); @@ -1320,17 +1321,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; - - if (post_padding > 0) { - for (int j = 0; j < TBS - mac_pdu_length; j++) - mac_pdu[mac_pdu_length + j] = 0; - } - mac_pdu_length = TBS; - - - //bzero(tx_req->TLVs[0].value.direct,MAX_NR_DLSCH_PAYLOAD_BYTES); - memcpy(&tx_req->TLVs[0].value.direct, mac_pdu, sizeof(uint8_t) * mac_pdu_length); - + memcpy(&tx_req->TLVs[0].value.direct, mac_pdu, sizeof(uint8_t) * TBS); tx_req->PDU_length = TBS; tx_req->PDU_index = pduindex; tx_req->num_TLV = 1; From bb0507a8465230742a8e122b95c3b65973021962 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 3 Mar 2021 16:03:18 +0000 Subject: [PATCH 27/94] Revert code from commit fc9b781c --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 95e27021cb..ede68b11ef 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -444,13 +444,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, } // This schedules the DCI for Downlink and PDSCH - bool tx_ra_msg4 = false; - for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { - if(cc->ra[i].state == Msg4 && cc->ra[i].Msg4_frame==frame && cc->ra[i].Msg4_slot==slot) { - tx_ra_msg4 = true; - } - } - if ( is_xlsch_in_slot(dlsch_in_slot_bitmap, slot) && tx_ra_msg4 == false ) + if (is_xlsch_in_slot(dlsch_in_slot_bitmap, slot)) nr_schedule_ue_spec(module_idP, frame, slot); From ab3794e62cc64a0837b443efbb9c5c013aabdf65 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 3 Mar 2021 20:16:14 +0000 Subject: [PATCH 28/94] Improvements in RA-Msg2 --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 6 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 124 ++++++++---------- 2 files changed, 60 insertions(+), 70 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 6485d6c851..a63cec0481 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -654,8 +654,11 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } else { if (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti){ dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH; + pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; } else { dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; + if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) + pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); } if( (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti) || (rnti == ra->t_crnti) ) { @@ -667,9 +670,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; } - if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); - BWPSize = n_RB_DLBWP; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 37db600b6b..b14c82fa3a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -832,19 +832,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if ((ra->Msg2_frame == frameP) && (ra->Msg2_slot == slotP)) { - int mcsIndex = 0; - int startSymbolAndLength = 53; - int StartSymbolIndex = 2; - int NrOfSymbols = 12; - int StartSymbolIndex_tmp = 0; - int NrOfSymbols_tmp = 0; - int x_Overhead = 0; - int time_domain_assignment = 0; - uint8_t nr_of_candidates = 0; - uint8_t aggregation_level = 0; + uint8_t time_domain_assignment = 0; + uint8_t mcsIndex = 0; int rbStart = 0; int rbSize = 6; - uint16_t *vrb_map = cc[CC_id].vrb_map; NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; @@ -854,8 +845,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; - + uint16_t *vrb_map = cc[CC_id].vrb_map; for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { if (vrb_map[rbStart + i]) { rbStart += i; @@ -869,25 +859,27 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } // Checking if the DCI allocation is feasible in current subframe + nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; if (dl_req->nPDUs > NFAPI_NR_MAX_DL_TTI_PDUS - 2) { LOG_I(MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, ra->RA_rnti); return; } + uint8_t aggregation_level; + uint8_t nr_of_candidates; find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss); - int CCEIndex = allocate_nr_CCEs(nr_mac, - bwp, - coreset, - aggregation_level, - 0, - 0, - nr_of_candidates); - + int CCEIndex = allocate_nr_CCEs(nr_mac, bwp, coreset, aggregation_level,0,0,nr_of_candidates); if (CCEIndex < 0) { LOG_E(MAC, "%s(): cannot find free CCE for RA RNTI %04x!\n", __func__, ra->rnti); return; } + // Calculate number of symbols + int startSymbolIndex, nrOfSymbols; + const int startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength; + SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); + AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); + // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them const int bwpid = bwp->bwp_Id; @@ -914,35 +906,41 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dl_req->nPDUs+=1; nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; - LOG_I(NR_MAC,"[gNB %d][RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, rnti 0x%x, state %d\n", module_idP, CC_id, frameP, slotP, ra->RA_rnti, ra->state); + LOG_I(NR_MAC,"[gNB %d][RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, rnti 0x%x, state %d\n", + module_idP, CC_id, frameP, slotP, ra->RA_rnti, ra->state); AssertFatal(ra->secondaryCellGroup, "no secondaryCellGroup for RNTI %04x\n", ra->crnti); - AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, - "downlinkBWP_ToAddModList has %d BWP!\n", ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); - pdsch_pdu_rel15->pduBitmap = 0; - pdsch_pdu_rel15->rnti = ra->RA_rnti; + AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, + "downlinkBWP_ToAddModList has %d BWP!\n", + ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); // SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; + + uint8_t mcsTableIdx = 0; + if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) + mcsTableIdx = 0; + else{ + if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) + mcsTableIdx = 1; + else + mcsTableIdx = 2; + } + + pdsch_pdu_rel15->pduBitmap = 0; + pdsch_pdu_rel15->rnti = ra->RA_rnti; pdsch_pdu_rel15->pduIndex = pduindex; pdsch_pdu_rel15->BWPSize = BWPSize; pdsch_pdu_rel15->BWPStart = BWPStart; pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; - pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,0); + pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,mcsTableIdx); pdsch_pdu_rel15->qamModOrder[0] = 2; pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; - if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) - pdsch_pdu_rel15->mcsTable[0] = 0; - else{ - if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) - pdsch_pdu_rel15->mcsTable[0] = 1; - else - pdsch_pdu_rel15->mcsTable[0] = 2; - } + pdsch_pdu_rel15->mcsTable[0] = mcsTableIdx; pdsch_pdu_rel15->rvIndex[0] = 0; pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; pdsch_pdu_rel15->nrOfLayers = 1; @@ -957,23 +955,16 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->rbStart = rbStart; pdsch_pdu_rel15->rbSize = rbSize; pdsch_pdu_rel15->VRBtoPRBMapping = 0; + pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex; + pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols; + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, + nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, + nrOfSymbols, + startSymbolIndex); - // FIXME: should use Initial BWP and maybe Default values from TS 38.214 Table 5.1.2.1.1-1 - for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { - startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; - SLIV2SL(startSymbolAndLength, &StartSymbolIndex_tmp, &NrOfSymbols_tmp); - //if (NrOfSymbols_tmp < NrOfSymbols) { - NrOfSymbols = NrOfSymbols_tmp; - StartSymbolIndex = StartSymbolIndex_tmp; - time_domain_assignment = i; // this is short PDSCH added to the config to fit mixed slot - //} - break; - } - AssertFatal(StartSymbolIndex >= 0, "StartSymbolIndex is negative\n"); - - pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; - pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols, StartSymbolIndex); + int x_Overhead = 0; + uint8_t tb_scaling = 0; + nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, tb_scaling); // Fill PDCCH DL DCI PDU nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; @@ -994,7 +985,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dci_payload.time_domain_assignment.val = time_domain_assignment; dci_payload.vrb_to_prb_mapping.val = 0; dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; - dci_payload.tb_scaling = 0; + dci_payload.tb_scaling = tb_scaling; LOG_D(NR_MAC, "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", @@ -1027,6 +1018,17 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; + + // Program UL processing for Msg3 + NR_BWP_Uplink_t *ubwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id-1]; + nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra); + nr_add_msg3(module_idP, CC_id, frameP, slotP, ra, (uint8_t *) &tx_req->TLVs[0].value.direct[0]); + + LOG_I(MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); + + T(T_GNB_MAC_DL_RAR_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(ra->RA_rnti), T_INT(frameP), + T_INT(slotP), T_INT(0), T_BUFFER(&tx_req->TLVs[0].value.direct[0], tx_req->TLVs[0].length)); + tx_req->PDU_length = pdsch_pdu_rel15->TBSize[0]; tx_req->PDU_index = pduindex; tx_req->num_TLV = 1; @@ -1035,25 +1037,13 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra nr_mac->TX_req[CC_id].Number_of_PDUs++; nr_mac->TX_req[CC_id].Slot = slotP; - // Program UL processing for Msg3 - NR_BWP_Uplink_t *ubwp=ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id-1]; - nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra); - LOG_I(MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); - nr_add_msg3(module_idP, CC_id, frameP, slotP, ra, (uint8_t *) &tx_req->TLVs[0].value.direct[0]); - ra->state = WAIT_Msg3; - LOG_I(MAC,"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d\n", module_idP, frameP, slotP, ra->state); - - x_Overhead = 0; - nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); - - T(T_GNB_MAC_DL_RAR_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), - T_INT(ra->RA_rnti), T_INT(frameP), T_INT(slotP), T_INT(0), - T_BUFFER(&tx_req->TLVs[0].value.direct[0], tx_req->TLVs[0].length)); - // Mark the corresponding RBs as used for (int rb = 0; rb < rbSize; rb++) { vrb_map[rb + rbStart] = 1; } + + ra->state = WAIT_Msg3; + LOG_I(MAC,"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d\n", module_idP, frameP, slotP, ra->state); } } From 245f1e066feab4286bf777f8a014bc057e6803e2 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 4 Mar 2021 01:23:56 +0000 Subject: [PATCH 29/94] Improvements in RA-Msg4 --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 6 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 194 +++++++----------- openair2/RRC/NR_UE/L2_interface_ue.c | 3 +- 3 files changed, 83 insertions(+), 120 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index a63cec0481..a644059839 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -654,20 +654,20 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } else { if (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti){ dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH; - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; } else { dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; - if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); } if( (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti) || (rnti == ra->t_crnti) ) { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; } else { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; + if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) + pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); } BWPSize = n_RB_DLBWP; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index b14c82fa3a..dcd2e44026 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -909,7 +909,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra LOG_I(NR_MAC,"[gNB %d][RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg2 DCI, rnti 0x%x, state %d\n", module_idP, CC_id, frameP, slotP, ra->RA_rnti, ra->state); - AssertFatal(ra->secondaryCellGroup, "no secondaryCellGroup for RNTI %04x\n", ra->crnti); + AssertFatal(ra->secondaryCellGroup, "no secondaryCellGroup for RNTI %04x\n", ra->RA_rnti); AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, "downlinkBWP_ToAddModList has %d BWP!\n", @@ -1054,45 +1054,10 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) { + uint8_t time_domain_assignment = 0; + uint8_t mcsIndex = 0; + uint8_t mac_sdu[30] = {}; uint8_t mac_pdu[100] = {}; - uint16_t mac_pdu_length = 0; - - const int offset = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, (unsigned char *)mac_pdu, 255, ra->cont_res_id); - mac_pdu_length += offset; - - uint8_t mac_sdu[30]; - uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, mac_sdu); - - - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->R = 0; - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->F = 0; - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->LCID = DL_SCH_LCID_CCCH; - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->L = mac_sdu_length * 8; - mac_pdu_length += 2; - - memcpy(&mac_pdu[mac_pdu_length], mac_sdu, sizeof(uint8_t) * mac_sdu_length); - mac_pdu_length += mac_sdu_length; - - LOG_I(NR_MAC, "[gNB %d] Got %d bytes from CCCH\n", module_idP, mac_sdu_length); - - //int header_length_total = 1 + 6 + 2 + (mac_sdu_length >= 128); - //int payload_length = mac_sdu_length + header_length_total; - - - int mcsIndex = 0; - int mcsTableIndex = 0; - int startSymbolAndLength = 0; - int StartSymbolIndex = 2; - int NrOfSymbols = 12; - int StartSymbolIndex_tmp = 0; - int NrOfSymbols_tmp = 0; - int x_Overhead = 0; - int time_domain_assignment = 0; - int rbStart = 0; - int rbSize = 0; - uint8_t nr_of_candidates = 0; - uint8_t aggregation_level = 0; - uint16_t *vrb_map = cc[CC_id].vrb_map; NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; @@ -1102,6 +1067,30 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + // Bytes to be transmitted + uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, mac_sdu); + uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, (unsigned char *)mac_pdu, 255, ra->cont_res_id); + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->R = 0; + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->F = 0; + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->LCID = DL_SCH_LCID_CCCH; + ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->L = mac_sdu_length * 8; + mac_pdu_length += 2; + memcpy(&mac_pdu[mac_pdu_length], mac_sdu, sizeof(uint8_t) * mac_sdu_length); + mac_pdu_length += mac_sdu_length; + + // Calculate number of symbols + int startSymbolIndex, nrOfSymbols; + const int startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength; + SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); + AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); + + uint16_t dlDmrsSymbPos = fill_dmrs_mask(nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, + nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, + nrOfSymbols, + startSymbolIndex); + + uint16_t N_DMRS_SLOT = get_num_dmrs(dlDmrsSymbPos); + long dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; uint8_t N_PRB_DMRS = 0; if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) { @@ -1111,18 +1100,26 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra N_PRB_DMRS = nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 4; } - uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(NULL, - RC.nrmac[module_idP]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, - NrOfSymbols, - StartSymbolIndex); - + uint8_t mcsTableIdx = 0; + if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) + mcsTableIdx = 0; + else{ + if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) + mcsTableIdx = 1; + else + mcsTableIdx = 2; + } + int rbStart = 0; + int rbSize = 0; uint32_t TBS = 0; + uint8_t tb_scaling = 0; + uint16_t *vrb_map = cc[CC_id].vrb_map; do { rbSize++; - TBS = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIndex), - nr_get_code_rate_dl(mcsIndex, mcsTableIndex), - rbSize, NrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT,0, 0,1) >> 3; + TBS = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIdx), + nr_get_code_rate_dl(mcsIndex, mcsTableIdx), + rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3; } while (rbStart + rbSize < BWPSize && !vrb_map[rbStart + rbSize] && TBS < mac_pdu_length); for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { @@ -1133,7 +1130,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } if (rbStart > (BWPSize - rbSize)) { - LOG_E(NR_MAC, "%s(): cannot find free vrb_map for RA RNTI %04x!\n", __func__, ra->RA_rnti); + LOG_E(NR_MAC, "%s(): cannot find free vrb_map for RNTI %04x!\n", __func__, ra->rnti); return; } @@ -1144,17 +1141,12 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra return; } + uint8_t aggregation_level; + uint8_t nr_of_candidates; find_aggregation_candidates(&aggregation_level, &nr_of_candidates, ss); - int CCEIndex = allocate_nr_CCEs(nr_mac, - bwp, - coreset, - aggregation_level, - 0, - 0, - nr_of_candidates); - + int CCEIndex = allocate_nr_CCEs(nr_mac, bwp, coreset, aggregation_level,0,0,nr_of_candidates); if (CCEIndex < 0) { - LOG_E(NR_MAC, "%s(): cannot find free CCE for RNTI %04x!\n", __func__, ra->rnti); + LOG_E(MAC, "%s(): cannot find free CCE for RA RNTI %04x!\n", __func__, ra->rnti); return; } @@ -1187,44 +1179,33 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra LOG_I(NR_MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); AssertFatal(ra->secondaryCellGroup, "no secondaryCellGroup for RNTI %04x\n", ra->rnti); + AssertFatal(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, "downlinkBWP_ToAddModList has %d BWP!\n", ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); - pdsch_pdu_rel15->pduBitmap = 0; - pdsch_pdu_rel15->rnti = ra->rnti; - // SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; + + pdsch_pdu_rel15->pduBitmap = 0; + pdsch_pdu_rel15->rnti = ra->rnti; pdsch_pdu_rel15->pduIndex = pduindex; pdsch_pdu_rel15->BWPSize = BWPSize; pdsch_pdu_rel15->BWPStart = BWPStart; pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; - pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,mcsTableIndex); + pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,mcsTableIdx); pdsch_pdu_rel15->qamModOrder[0] = 2; pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; -/* - if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) { - pdsch_pdu_rel15->mcsTable[0] = 0; - } else { - if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) { - pdsch_pdu_rel15->mcsTable[0] = 1; - } else { - pdsch_pdu_rel15->mcsTable[0] = 2; - } - } - */ - - + pdsch_pdu_rel15->mcsTable[0] = mcsTableIdx; pdsch_pdu_rel15->rvIndex[0] = 0; pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; pdsch_pdu_rel15->nrOfLayers = 1; pdsch_pdu_rel15->transmissionScheme = 0; pdsch_pdu_rel15->refPoint = 0; - pdsch_pdu_rel15->dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + pdsch_pdu_rel15->dmrsConfigType = dmrsConfigType; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2; @@ -1233,23 +1214,12 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->rbStart = rbStart; pdsch_pdu_rel15->rbSize = rbSize; pdsch_pdu_rel15->VRBtoPRBMapping = 0; + pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex; + pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols; + pdsch_pdu_rel15->dlDmrsSymbPos = dlDmrsSymbPos; - // FIXME: should use Initial BWP and maybe Default values from TS 38.214 Table 5.1.2.1.1-1 - for (int i=0; ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { - startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; - SLIV2SL(startSymbolAndLength, &StartSymbolIndex_tmp, &NrOfSymbols_tmp); - //if (NrOfSymbols_tmp < NrOfSymbols) { - NrOfSymbols = NrOfSymbols_tmp; - StartSymbolIndex = StartSymbolIndex_tmp; - time_domain_assignment = i; // this is short PDSCH added to the config to fit mixed slot - //} - break; - } - AssertFatal(StartSymbolIndex >= 0, "StartSymbolIndex is negative\n"); - - pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; - pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols, StartSymbolIndex); + int x_Overhead = 0; + nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, tb_scaling); // Fill PDCCH DL DCI PDU nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; @@ -1270,7 +1240,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dci_payload.time_domain_assignment.val = time_domain_assignment; dci_payload.vrb_to_prb_mapping.val = 0; dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; - dci_payload.tb_scaling = 0; + dci_payload.tb_scaling = tb_scaling; LOG_D(NR_MAC, "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", @@ -1301,16 +1271,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->BWPSize, nr_mac->sched_ctrlCommon->active_bwp->bwp_Id); - x_Overhead = 0; - nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, dci_payload.tb_scaling); - - - //LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frameP, slotP, - // TBS, header_length_total, payload_length, cont_res_len, post_padding); - // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; - memcpy(&tx_req->TLVs[0].value.direct, mac_pdu, sizeof(uint8_t) * TBS); tx_req->PDU_length = TBS; tx_req->PDU_index = pduindex; @@ -1324,22 +1286,24 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { vrb_map[rb + pdsch_pdu_rel15->rbStart] = 1; } - ra->state = WAIT_Msg4_ACK; - LOG_D(MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize); - LOG_D(MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart); - LOG_D(MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing); - LOG_D(MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix); - LOG_D(MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex); - LOG_D(MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols); - for(int n=0;n<6;n++) LOG_D(MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]); - LOG_D(MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType); - LOG_D(MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize); - LOG_D(MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize); - LOG_D(MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType); - LOG_D(MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex); - LOG_D(MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity); - LOG_D(MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci); + LOG_D(NR_MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize); + LOG_D(NR_MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart); + LOG_D(NR_MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing); + LOG_D(NR_MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix); + LOG_D(NR_MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex); + LOG_D(NR_MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols); + for(int n=0;n<6;n++) LOG_D(NR_MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]); + LOG_D(NR_MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType); + LOG_D(NR_MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize); + LOG_D(NR_MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize); + LOG_D(NR_MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType); + LOG_D(NR_MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex); + LOG_D(NR_MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity); + LOG_D(NR_MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci); + + ra->state = WAIT_Msg4_ACK; + LOG_I(MAC,"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d\n", module_idP, frameP, slotP, ra->state); } } diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index 347a367e62..609d526127 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -49,7 +49,6 @@ nr_mac_rrc_data_ind_ue( const uint8_t* pduP, const sdu_size_t pdu_len){ sdu_size_t sdu_size = 0; - protocol_ctxt_t ctxt; switch(channel){ case NR_BCCH_BCH: @@ -62,7 +61,7 @@ nr_mac_rrc_data_ind_ue( case CCCH: if (pdu_len>0) { - LOG_T(NR_RRC,"[UE %d] Received SDU for CCCH on SRB %ld from gNB %d\n",module_id,channel & RAB_OFFSET,gNB_index); + LOG_T(NR_RRC,"[UE %d] Received SDU for CCCH on SRB %u from gNB %d\n",module_id,channel & RAB_OFFSET,gNB_index); MessageDef *message_p; int msg_sdu_size = CCCH_SDU_SIZE; From cfd5adcc84f832213606a7582f32657276821fd8 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 4 Mar 2021 16:11:44 +0000 Subject: [PATCH 30/94] Segmentation fault prevention in RA-Msg2 --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index dcd2e44026..7a00f40e45 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -837,6 +837,18 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int rbStart = 0; int rbSize = 6; + if (nr_mac->sched_ctrlCommon == NULL){ + nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); + nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); + nr_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->active_bwp)); + nr_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->coreset)); + nr_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->active_bwp)); + fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); + fill_default_coresetZero(nr_mac->sched_ctrlCommon->coreset,cc->ServingCellConfigCommon); + fill_default_initialDownlinkBWP(nr_mac->sched_ctrlCommon->active_bwp,cc->ServingCellConfigCommon); + } + nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; + NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; From ba8c14debcdc0a1dee464c3457706186c54594a7 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 4 Mar 2021 19:58:11 +0000 Subject: [PATCH 31/94] Update RA succeeded procedures --- openair2/LAYER2/NR_MAC_UE/mac_defs.h | 2 + openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 10 ++-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 50 +++++++++---------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 3 +- 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index cf157e108a..84e8ec59b5 100755 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -291,6 +291,8 @@ typedef struct { uint8_t RA_contention_resolution_timer_active; /// Random-access Contention Resolution Timer count value uint8_t RA_contention_resolution_cnt; + /// Transmitted UE Contention Resolution Identifier + uint8_t cont_res_id[6]; /// BeamfailurerecoveryConfig NR_BeamFailureRecoveryConfig_t RA_BeamFailureRecoveryConfig; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 9e4afd9c85..671dfbdd68 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -568,6 +568,11 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, if (size_sdu > 0) { + // UE Contention Resolution Identity + // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to determine whether or not the + // Random Access Procedure has been successful after reception of Msg4 + memcpy(ra->cont_res_id, mac_sdus, sizeof(uint8_t) * 6); + LOG_D(MAC, "[UE %d][%d.%d]: starting initialisation Random Access Procedure...\n", mod_id, frame, nr_slot_tx); ra->Msg3_size = size_sdu + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT); @@ -624,10 +629,9 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, prach_resources->RA_PREAMBLE_BACKOFF = 0; } - if (ra->RA_window_cnt >= 0 && ra->RA_RAPID_found == 1) { + if (ra->RA_window_cnt >= 0 && ra->RA_RAPID_found == 1 && ra->cfra) { // Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213) - - //nr_ra_succeeded(mod_id, frame, nr_slot_tx); + nr_ra_succeeded(mod_id, frame, nr_slot_tx); } else if (ra->RA_window_cnt == 0 && !ra->RA_RAPID_found) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index a644059839..5380de2ba4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -515,10 +515,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr // Config PUSCH PDU ret = nr_config_pusch_pdu(mac, pusch_config_pdu, dci, NULL, rnti, &dci_format); - //if (ret != -1 && ra->RA_active && mac->crnti){ - // nr_ra_succeeded(module_id, frame, slot); - //} - } break; @@ -578,10 +574,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr // Config PUSCH PDU ret = nr_config_pusch_pdu(mac, pusch_config_pdu, dci, NULL, rnti, &dci_format); - //if (ret != -1 && ra->RA_active && mac->crnti){ - // nr_ra_succeeded(module_id, frame, slot); - //} - } break; @@ -782,12 +774,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dl_config->number_pdus = dl_config->number_pdus + 1; - // FIXME: Remove this - if (ra->ra_state == WAIT_CONTENTION_RESOLUTION && rnti == ra->t_crnti){ - LOG_I(NR_MAC,"RA-Msg4 received\n"); - nr_ra_succeeded(module_id, frame, slot); - } - break; } @@ -1957,20 +1943,34 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, break; case DL_SCH_LCID_CON_RES_ID: - // Clause 5.1.5 and 6.1.3.3 of 3GPP TS 38.321 version 16.2.1 Release 16 - // WIP todo: handle CCCH_pdu - // MAC Header: 1 byte (R/R/LCID) - // MAC SDU: 6 bytes (UE Contention Resolution Identity) - mac_ce_len = 6; - - LOG_I(MAC, "[UE %d][RAPROC] Frame %d : received contention resolution identity: 0x%x%x%x%x%x%x. Terminating RA procedure\n", module_idP, frameP, pduP[1], pduP[2], pduP[3], pduP[4], pduP[5], pduP[6]); + // Clause 5.1.5 and 6.1.3.3 of 3GPP TS 38.321 version 16.2.1 Release 16 + // MAC Header: 1 byte (R/R/LCID) + // MAC SDU: 6 bytes (UE Contention Resolution Identity) + mac_ce_len = 6; - // FIXME: Only succeeds if received contention resolution equals to the first 48 bits of transmitted Mgs3 - if (ra->RA_active == 1) { - nr_ra_succeeded(module_idP, frameP, slot); + if(ra->ra_state == WAIT_CONTENTION_RESOLUTION) { + LOG_I(MAC, "[UE %d][RAPROC] Frame %d : received contention resolution identity: 0x%02x%02x%02x%02x%02x%02x Terminating RA procedure\n", + module_idP, frameP, pduP[1], pduP[2], pduP[3], pduP[4], pduP[5], pduP[6]); + + bool ra_success = true; + for(int i = 0; icont_res_id[i] != pduP[i+1]) { + ra_success = false; + break; + } } - break; + if ( (ra->RA_active == 1) && ra_success) { + nr_ra_succeeded(module_idP, frameP, slot); + } else if (!ra_success){ + // TODO: Handle failure of RA procedure @ MAC layer + // nr_ra_failed(module_idP, CC_id, prach_resources, frameP, slot); // prach_resources is a PHY structure + ra->ra_state = RA_UE_IDLE; + ra->RA_active = 0; + } + } + + break; case DL_SCH_LCID_PADDING: done = 1; // end of MAC PDU, can ignore the rest. diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index e6441f4581..86b33236ca 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -506,7 +506,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, // UE Contention Resolution Identity // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 - memcpy(ra->cont_res_id, sduP, sizeof(uint8_t) * 6); + // First byte corresponds to R/LCID MAC sub-header + memcpy(ra->cont_res_id, &sduP[1], sizeof(uint8_t) * 6); // re-initialize ta update variables afrer RA procedure completion UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; From 99711020bdd9128dac298422685434c22de0a08c Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 6 Mar 2021 20:13:14 +0000 Subject: [PATCH 32/94] Update generate_nr_prach after receiving RA-Msg2 at UE --- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 671dfbdd68..ead83af58a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -629,9 +629,14 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, prach_resources->RA_PREAMBLE_BACKOFF = 0; } - if (ra->RA_window_cnt >= 0 && ra->RA_RAPID_found == 1 && ra->cfra) { - // Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213) - nr_ra_succeeded(mod_id, frame, nr_slot_tx); + if (ra->RA_window_cnt >= 0 && ra->RA_RAPID_found == 1) { + + if(ra->cfra) { + // Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213) + nr_ra_succeeded(mod_id, frame, nr_slot_tx); + } else { + ra->generate_nr_prach = 2; + } } else if (ra->RA_window_cnt == 0 && !ra->RA_RAPID_found) { From dc9425ee914eaa40d9dba7026789176802063858 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 8 Mar 2021 12:05:25 +0000 Subject: [PATCH 33/94] Uniformization of coreset start subcarrier at gNB for coreset0 --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 7 +------ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 1 - openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 5 ++++- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index c4673e9d18..269ed3860d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -85,12 +85,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, // compute rb_offset and n_prb based on frequency allocation nr_fill_cce_list(gNB,0,pdcch_pdu_rel15); get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset); - cset_start_sc = frame_parms.first_carrier_offset + rb_offset*NR_NB_SC_PER_RB; - if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_MIB_SIB1) { - cset_start_sc = cset_start_sc + RC.nrmac[gNB->Mod_id]->type0_PDCCH_CSS_config.cset_start_rb*NR_NB_SC_PER_RB; - } else { - cset_start_sc = cset_start_sc + pdcch_pdu_rel15->BWPStart*NR_NB_SC_PER_RB; - } + cset_start_sc = frame_parms.first_carrier_offset + (pdcch_pdu_rel15->BWPStart + rb_offset) * NR_NB_SC_PER_RB; for (int d=0;dnumDlDci;d++) { /*The coreset is initialised diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 7a00f40e45..413fadb4a8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -840,7 +840,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if (nr_mac->sched_ctrlCommon == NULL){ nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); - nr_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->active_bwp)); nr_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->coreset)); nr_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->active_bwp)); fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 45f9b4ab83..a60685c586 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -245,7 +245,6 @@ void schedule_control_sib1(module_id_t module_id, if (gNB_mac->sched_ctrlCommon == NULL){ gNB_mac->sched_ctrlCommon = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon)); gNB_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->search_space)); - gNB_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->active_bwp)); gNB_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->coreset)); gNB_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->active_bwp)); fill_default_searchSpaceZero(gNB_mac->sched_ctrlCommon->search_space); @@ -340,6 +339,10 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, scc, bwp); + // TODO: This assignment should be done in function nr_configure_pdcch() + pdcch_pdu_rel15->BWPSize = gNB_mac->type0_PDCCH_CSS_config.num_rbs; + pdcch_pdu_rel15->BWPStart = gNB_mac->type0_PDCCH_CSS_config.cset_start_rb; + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; From 45b86847b70a07a9bae9f95cb26a839468483458 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Mon, 8 Mar 2021 19:35:49 +0000 Subject: [PATCH 34/94] Fix DMRS sequence generation for BWPStart>0 (Msg2 and Msg4) --- openair1/PHY/NR_TRANSPORT/nr_dlsch.c | 25 ++++++++++++++----- .../nr_dl_channel_estimation.c | 5 +++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 2 +- .../gnb.sa.band78.fr1.106PRB.usrpb210.conf | 2 +- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 66fc987f6d..4fb9065aa5 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -151,7 +151,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, else { nb_re_dmrs = 4*rel15->numDmrsCdmGrpsNoData; } - n_dmrs = (rel15->rbSize+rel15->rbStart)*nb_re_dmrs; + n_dmrs = (rel15->BWPStart+rel15->rbStart+rel15->rbSize)*nb_re_dmrs; uint16_t dmrs_symbol_map = rel15->dlDmrsSymbPos;//single DMRS: 010000100 Double DMRS 110001100 uint8_t dmrs_len = get_num_dmrs(rel15->dlDmrsSymbPos); @@ -320,11 +320,24 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, /// DMRS QPSK modulation uint8_t k_prime=0; uint16_t n=0; - if ((dmrs_symbol_map & (1 << l))){ //DMRS time occasion - if (dmrs_Type == NFAPI_NR_DMRS_TYPE1) // another if condition to be included to check pdsch config type (reference of k) - dmrs_idx = rel15->rbStart*6; - else - dmrs_idx = rel15->rbStart*4; + + if ((dmrs_symbol_map & (1 << l))){ // DMRS time occasion + // The reference point for is subcarrier 0 of the lowest-numbered resource block in CORESET 0 if the corresponding + // PDCCH is associated with CORESET 0 and Type0-PDCCH common search space and is addressed to SI-RNTI + // 3GPP TS 38.211 V15.8.0 Section 7.4.1.1.2 Mapping to physical resources + if (rel15->rnti==SI_RNTI) { + if (dmrs_Type==NFAPI_NR_DMRS_TYPE1) { + dmrs_idx = rel15->rbStart*6; + } else { + dmrs_idx = rel15->rbStart*4; + } + } else { + if (dmrs_Type == NFAPI_NR_DMRS_TYPE1) { + dmrs_idx = (rel15->rbStart+rel15->BWPStart)*6; + } else { + dmrs_idx = (rel15->rbStart+rel15->BWPStart)*4; + } + } } // Update l_prime in the case of double DMRS config diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 6cb0a612e9..b498ed9c6f 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -687,7 +687,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, #endif // generate pilot for gNB port number 1000+p - uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12 - BWPStart; + uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12; + if (Ns % 20 == 0) { // FIXME: temporary fix for SIB1 + rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12 - BWPStart; + } uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type; int8_t delta = get_delta(p, config_type); nr_pdsch_dmrs_rx(ue,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol][0], &pilot[0],1000,0,nb_rb_pdsch+rb_offset); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 413fadb4a8..3a27f92a34 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -832,7 +832,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if ((ra->Msg2_frame == frameP) && (ra->Msg2_slot == slotP)) { - uint8_t time_domain_assignment = 0; + uint8_t time_domain_assignment = 3; uint8_t mcsIndex = 0; int rbStart = 0; int rbSize = 6; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 60834281a9..35eb694c2b 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -106,7 +106,7 @@ gNBs = prach_msg1_FDM = 0; prach_msg1_FrequencyStart = 0; zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -100; + preambleReceivedTargetPower = -96; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) preambleTransMax = 6; #powerRampingStep From e5ee51964b876b702a527ec643e57041d420be72 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 9 Mar 2021 15:00:06 +0000 Subject: [PATCH 35/94] Add temporary LOGs for Msg2 --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 25 ++++++++++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 40 +++++++++++++++++++ 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 5380de2ba4..312a9215d1 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2362,8 +2362,26 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t rnti = mac->crnti; } - #ifdef DEBUG_RAR - LOG_D(MAC, "In %s:[%d.%d]: [UE %d] Received RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d csi_req %d t_crnti %x \n", + // FIXME: To be removed + LOG_I(NR_MAC, "rarh->E = 0x%x\n", rarh->E); + LOG_I(NR_MAC, "rarh->T = 0x%x\n", rarh->T); + LOG_I(NR_MAC, "rarh->RAPID = 0x%x (%i)\n", rarh->RAPID, rarh->RAPID); + + LOG_I(NR_MAC, "rar->R = 0x%x\n", rar->R); + LOG_I(NR_MAC, "rar->TA1 = 0x%x\n", rar->TA1); + + LOG_I(NR_MAC, "rar->TA2 = 0x%x\n", rar->TA2); + LOG_I(NR_MAC, "rar->UL_GRANT_1 = 0x%x\n", rar->UL_GRANT_1); + + LOG_I(NR_MAC, "rar->UL_GRANT_2 = 0x%x\n", rar->UL_GRANT_2); + LOG_I(NR_MAC, "rar->UL_GRANT_3 = 0x%x\n", rar->UL_GRANT_3); + LOG_I(NR_MAC, "rar->UL_GRANT_4 = 0x%x\n", rar->UL_GRANT_4); + + LOG_I(NR_MAC, "rar->TCRNTI_1 = 0x%x\n", rar->TCRNTI_1); + LOG_I(NR_MAC, "rar->TCRNTI_2 = 0x%x\n", rar->TCRNTI_2); + + //#ifdef DEBUG_RAR + LOG_I(NR_MAC, "In %s:[%d.%d]: [UE %d] Received RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d t_crnti %x \n", __FUNCTION__, frame, slot, @@ -2374,9 +2392,8 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t rar_grant.mcs, rar_grant.freq_hopping, tpc_command, - csi_req, ra->t_crnti); - #endif + //#endif // Schedule Msg3 ret = nr_ue_pusch_scheduler(mac, is_Msg3, frame, slot, &frame_tx, &slot_tx, rar_grant.Msg3_t_alloc); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 3a27f92a34..a9e20c7c9a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1427,4 +1427,44 @@ void nr_fill_rar(uint8_t Mod_idP, rar->UL_GRANT_3 = (uint8_t) (ul_grant >> 8) & 0xff; rar->UL_GRANT_4 = (uint8_t) ul_grant & 0xff; + // FIXME: To be removed + LOG_I(NR_MAC, "rarh->E = 0x%x\n", rarh->E); + LOG_I(NR_MAC, "rarh->T = 0x%x\n", rarh->T); + LOG_I(NR_MAC, "rarh->RAPID = 0x%x (%i)\n", rarh->RAPID, rarh->RAPID); + + LOG_I(NR_MAC, "rar->R = 0x%x\n", rar->R); + LOG_I(NR_MAC, "rar->TA1 = 0x%x\n", rar->TA1); + + LOG_I(NR_MAC, "rar->TA2 = 0x%x\n", rar->TA2); + LOG_I(NR_MAC, "rar->UL_GRANT_1 = 0x%x\n", rar->UL_GRANT_1); + + LOG_I(NR_MAC, "rar->UL_GRANT_2 = 0x%x\n", rar->UL_GRANT_2); + LOG_I(NR_MAC, "rar->UL_GRANT_3 = 0x%x\n", rar->UL_GRANT_3); + LOG_I(NR_MAC, "rar->UL_GRANT_4 = 0x%x\n", rar->UL_GRANT_4); + + LOG_I(NR_MAC, "rar->TCRNTI_1 = 0x%x\n", rar->TCRNTI_1); + LOG_I(NR_MAC, "rar->TCRNTI_2 = 0x%x\n", rar->TCRNTI_2); + + int mcs = (unsigned char) (rar->UL_GRANT_4 >> 4); + // time alloc + int Msg3_t_alloc = (unsigned char) (rar->UL_GRANT_3 & 0x07); + // frequency alloc + int Msg3_f_alloc = (uint16_t) ((rar->UL_GRANT_3 >> 4) | (rar->UL_GRANT_2 << 4) | ((rar->UL_GRANT_1 & 0x03) << 12)); + // frequency hopping + int freq_hopping = (unsigned char) (rar->UL_GRANT_1 >> 2); + // TA command + int ta_command = rar->TA2 + (rar->TA1 << 5); + // TC-RNTI + int t_crnti = rar->TCRNTI_2 + (rar->TCRNTI_1 << 8); + + LOG_I(NR_MAC, "In %s: Transmitted RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d csi_req %d t_crnti %x \n", + __FUNCTION__, + Msg3_t_alloc, + Msg3_f_alloc, + ta_command, + mcs, + freq_hopping, + tpc_command, + csi_req, + t_crnti); } From 7be1952c82cff254eee82a3fafd9792dfc32ebcd Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 9 Mar 2021 16:29:04 +0000 Subject: [PATCH 36/94] Add back-off indicator subheader to Msg2 --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 17 ++++++++----- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 24 +++++++++++++++---- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 312a9215d1..460f148b14 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2266,27 +2266,32 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t NR_MAC_RAR *rar = (NR_MAC_RAR *) (dlsch_buffer + 1); // RAR subPDU pointer uint8_t preamble_index = get_ra_PreambleIndex(mod_id, cc_id, gNB_id); //prach_resources->ra_PreambleIndex; - LOG_D(MAC, "In %s:[%d.%d]: [UE %d][RAPROC] invoking MAC for received RAR (current preamble %d)\n", __FUNCTION__, frame, slot, mod_id, preamble_index); + LOG_D(NR_MAC, "In %s:[%d.%d]: [UE %d][RAPROC] invoking MAC for received RAR (current preamble %d)\n", __FUNCTION__, frame, slot, mod_id, preamble_index); while (1) { n_subheaders++; if (rarh->T == 1) { n_subPDUs++; - LOG_D(MAC, "[UE %d][RAPROC] Got RAPID RAR subPDU\n", mod_id); + LOG_I(NR_MAC, "[UE %d][RAPROC] Got RAPID RAR subPDU\n", mod_id); } else { - n_subPDUs++; ra->RA_backoff_indicator = table_7_2_1[((NR_RA_HEADER_BI *)rarh)->BI]; ra->RA_BI_found = 1; - LOG_D(MAC, "[UE %d][RAPROC] Got BI RAR subPDU %d\n", mod_id, ra->RA_backoff_indicator); + LOG_I(NR_MAC, "[UE %d][RAPROC] Got BI RAR subPDU %d ms\n", mod_id, ra->RA_backoff_indicator); + if ( ((NR_RA_HEADER_BI *)rarh)->E == 1) { + rarh += sizeof(NR_RA_HEADER_BI); + continue; + } else { + break; + } } if (rarh->RAPID == preamble_index) { - LOG_I(MAC, "[UE %d][RAPROC][%d.%d] Found RAR with the intended RAPID %d\n", mod_id, frame, slot, rarh->RAPID); + LOG_I(NR_MAC, "[UE %d][RAPROC][%d.%d] Found RAR with the intended RAPID %d\n", mod_id, frame, slot, rarh->RAPID); rar = (NR_MAC_RAR *) (dlsch_buffer + n_subheaders + (n_subPDUs - 1) * sizeof(NR_MAC_RAR)); ra->RA_RAPID_found = 1; break; } if (rarh->E == 0) { - LOG_W(PHY,"[UE %d][RAPROC] Received RAR preamble (%d) doesn't match the intended RAPID...\n", mod_id, preamble_index); + LOG_W(NR_MAC,"[UE %d][RAPROC] Received RAR preamble (%d) doesn't match the intended RAPID (%d)\n", mod_id, rarh->RAPID, preamble_index); break; } else { rarh += sizeof(NR_MAC_RAR) + 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index a9e20c7c9a..b7614034de 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -835,7 +835,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint8_t time_domain_assignment = 3; uint8_t mcsIndex = 0; int rbStart = 0; - int rbSize = 6; + int rbSize = 8; if (nr_mac->sched_ctrlCommon == NULL){ nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); @@ -1043,7 +1043,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra tx_req->PDU_length = pdsch_pdu_rel15->TBSize[0]; tx_req->PDU_index = pduindex; tx_req->num_TLV = 1; - tx_req->TLVs[0].length = 8; + tx_req->TLVs[0].length = tx_req->PDU_length + 2; nr_mac->TX_req[CC_id].SFN = frameP; nr_mac->TX_req[CC_id].Number_of_PDUs++; nr_mac->TX_req[CC_id].Slot = slotP; @@ -1371,8 +1371,9 @@ void nr_fill_rar(uint8_t Mod_idP, nfapi_nr_pusch_pdu_t *pusch_pdu){ LOG_I(MAC, "[gNB] Generate RAR MAC PDU frame %d slot %d preamble index %u TA command %d \n", ra->Msg2_frame, ra-> Msg2_slot, ra->preamble_index, ra->timing_offset); - NR_RA_HEADER_RAPID *rarh = (NR_RA_HEADER_RAPID *) dlsch_buffer; - NR_MAC_RAR *rar = (NR_MAC_RAR *) (dlsch_buffer + 1); + NR_RA_HEADER_BI *rarbi = (NR_RA_HEADER_BI *) dlsch_buffer; + NR_RA_HEADER_RAPID *rarh = (NR_RA_HEADER_RAPID *) (dlsch_buffer + 1); + NR_MAC_RAR *rar = (NR_MAC_RAR *) (dlsch_buffer + 2); unsigned char csi_req = 0, tpc_command; //uint8_t N_UL_Hop; uint8_t valid_bits; @@ -1381,6 +1382,16 @@ void nr_fill_rar(uint8_t Mod_idP, tpc_command = 3; // this is 0 dB + /// E/T/R/R/BI subheader /// + // E = 1, MAC PDU includes another MAC sub-PDU (RAPID) + // T = 0, Back-off indicator subheader + // R = 2, Reserved + // BI = 0, 5ms + rarbi->E = 1; + rarbi->T = 0; + rarbi->R = 0; + rarbi->BI = 0; + /// E/T/RAPID subheader /// // E = 0, one only RAR, first and last // T = 1, RAPID @@ -1428,6 +1439,11 @@ void nr_fill_rar(uint8_t Mod_idP, rar->UL_GRANT_4 = (uint8_t) ul_grant & 0xff; // FIXME: To be removed + //LOG_I(NR_MAC, "rarbi->E = 0x%x\n", rarbi->E); + //LOG_I(NR_MAC, "rarbi->T = 0x%x\n", rarbi->T); + //LOG_I(NR_MAC, "rarbi->R = 0x%x\n", rarbi->R); + //LOG_I(NR_MAC, "rarbi->BI = 0x%x\n", rarbi->BI); + LOG_I(NR_MAC, "rarh->E = 0x%x\n", rarh->E); LOG_I(NR_MAC, "rarh->T = 0x%x\n", rarh->T); LOG_I(NR_MAC, "rarh->RAPID = 0x%x (%i)\n", rarh->RAPID, rarh->RAPID); From 982a05463148e51dd5e7945e726b509da2f84da5 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 10 Mar 2021 10:42:11 +0000 Subject: [PATCH 37/94] Add support for PUSCH DMRS sequence generation when BWPStart>0 --- .../PHY/NR_ESTIMATION/nr_ul_channel_estimation.c | 6 +++--- openair1/PHY/NR_TRANSPORT/nr_dlsch.c | 1 + openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 15 ++++++++------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 38b35dcf6d..f4a70b1323 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -124,9 +124,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, //------------------generate DMRS------------------// - if (pusch_pdu->transform_precoding == transform_precoder_disabled) - nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, pusch_pdu->rb_start*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type); - + if (pusch_pdu->transform_precoding == transform_precoder_disabled) + nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, (pusch_pdu->bwp_start + pusch_pdu->rb_start)*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type); + else { // if transform precoding or SC-FDMA is enabled in Uplink // NR_SC_FDMA supports type1 DMRS so only 6 DMRS REs per RB possible diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 4fb9065aa5..a8ceb2aef3 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -268,6 +268,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, //to be moved to init phase potentially, for now tx_layers 1-8 are mapped on antenna ports 1000-1007 /// DMRS QPSK modulation + // TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part for (int l=rel15->StartSymbolIndex; lStartSymbolIndex+rel15->NrOfSymbols; l++) { if (rel15->dlDmrsSymbPos & (1 << l)) { nr_modulation(pdsch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs[l]); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index abc944bc00..917a41c9e6 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -917,7 +917,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, n_rnti = rel15->rnti; if (crc == n_rnti) { - LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n", + LOG_I(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation); dci_ind->SFN = proc->frame_rx; dci_ind->slot = proc->nr_slot_rx; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 208901f289..4a9a81f657 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -195,7 +195,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, /////////////////////////DMRS Modulation///////////////////////// /////////// uint32_t ***pusch_dmrs = UE->nr_gold_pusch_dmrs[slot]; - uint16_t n_dmrs = (start_rb+nb_rb)*((dmrs_type == pusch_dmrs_type1) ? 6:4); + uint16_t n_dmrs = (pusch_pdu->bwp_start + start_rb + nb_rb)*((dmrs_type == pusch_dmrs_type1) ? 6:4); int16_t mod_dmrs[n_dmrs<<1] __attribute((aligned(16))); /////////// //////////////////////////////////////////////////////////////////////// @@ -355,16 +355,17 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, if (pusch_pdu->transform_precoding == transform_precoder_disabled){ if (dmrs_type == pusch_dmrs_type1) - dmrs_idx = start_rb*6; + dmrs_idx = (pusch_pdu->bwp_start + start_rb)*6; else - dmrs_idx = start_rb*4; - - // Perform this on gold sequence, not required when SC FDMA operation is done, + dmrs_idx = (pusch_pdu->bwp_start + start_rb)*4; + + // TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part + // Perform this on gold sequence, not required when SC FDMA operation is done, nr_modulation(pusch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated } else { - dmrs_idx = 0; - } + dmrs_idx = 0; + } } else if (pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) { From f6a1c1883fff899d054de26d576beb29c17416fb Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 10 Mar 2021 19:13:29 +0000 Subject: [PATCH 38/94] Add support for PUSCH scheduled by RAR when BWPStart>0 --- openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c | 4 ++-- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 10 ++++++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 42d6cfad7a..cc088a36d6 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -326,7 +326,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF, #endif uint8_t is_dmrs_re; - start_re = (frame_parms->first_carrier_offset + (pusch_pdu->rb_start * NR_NB_SC_PER_RB))%frame_parms->ofdm_symbol_size; + start_re = (frame_parms->first_carrier_offset + (pusch_pdu->rb_start + pusch_pdu->bwp_start) * NR_NB_SC_PER_RB)%frame_parms->ofdm_symbol_size; nb_re_pusch = NR_NB_SC_PER_RB * pusch_pdu->rb_size; #ifdef __AVX2__ int nb_re_pusch2 = nb_re_pusch + (nb_re_pusch&7); @@ -1174,7 +1174,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, } - bwp_start_subcarrier = (rel15_ul->rb_start*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size; + bwp_start_subcarrier = ((rel15_ul->rb_start + rel15_ul->bwp_start)*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size; dmrs_symbol_flag = ((rel15_ul->ul_dmrs_symb_pos)>>symbol)&0x01; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 4a9a81f657..160134d329 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -137,7 +137,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, uint8_t mod_order = pusch_pdu->qam_mod_order; uint16_t rnti = pusch_pdu->rnti; uint8_t cdm_grps_no_data = pusch_pdu->num_dmrs_cdm_grps_no_data; - uint16_t start_sc = frame_parms->first_carrier_offset + start_rb*NR_NB_SC_PER_RB; + uint16_t start_sc = frame_parms->first_carrier_offset + (start_rb+pusch_pdu->bwp_start)*NR_NB_SC_PER_RB; if (start_sc >= frame_parms->ofdm_symbol_size) start_sc -= frame_parms->ofdm_symbol_size; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index d60fc55090..ff3aece24b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -495,11 +495,13 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, int ibwp_size = NRRIV2BW(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); // BWP start selection according to 8.3 of TS 38.213 - pusch_config_pdu->bwp_size = ibwp_size; - if ((ibwp_start < abwp_start) || (ibwp_size > abwp_size)) + if ((ibwp_start < abwp_start) || (ibwp_size > abwp_size)) { pusch_config_pdu->bwp_start = abwp_start; - else + pusch_config_pdu->bwp_size = abwp_size; + } else { pusch_config_pdu->bwp_start = ibwp_start; + pusch_config_pdu->bwp_size = ibwp_size; + } //// Resource assignment from RAR // Frequency domain allocation according to 8.3 of TS 38.213 @@ -513,7 +515,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, return -1; // virtual resource block to physical resource mapping for Msg3 PUSCH (6.3.1.7 in 38.211) - pusch_config_pdu->rb_start += ibwp_start - abwp_start; + //pusch_config_pdu->rb_start += ibwp_start - abwp_start; // Time domain allocation SLIV2SL(startSymbolAndLength, &StartSymbolIndex, &NrOfSymbols); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index b7614034de..5f5a92bc6a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -791,7 +791,8 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t pusch_pdu->dmrs_ports = 1; // 6.2.2 in 38.214 only port 0 to be used pusch_pdu->num_dmrs_cdm_grps_no_data = 2; // no data in dmrs symbols as in 6.2.2 in 38.214 pusch_pdu->resource_alloc = 1; //type 1 - pusch_pdu->rb_start = ra->msg3_first_rb + ibwp_start - abwp_start; // as for 6.3.1.7 in 38.211 + //pusch_pdu->rb_start = ra->msg3_first_rb + ibwp_start - abwp_start; // as for 6.3.1.7 in 38.211 + pusch_pdu->rb_start = ra->msg3_first_rb; if (ra->msg3_nb_rb > pusch_pdu->bwp_size) AssertFatal(1==0,"MSG3 allocated number of RBs exceed the BWP size\n"); else From fa79cdb5ba47edbb866cd285808c1d8d8d3144c2 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 10 Mar 2021 19:21:06 +0000 Subject: [PATCH 39/94] Revert RA preamble shift at gNB --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 0c1fde07a2..1d971a8831 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -681,7 +681,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, preamble_shift -= NCS; if (preamble_shift < 0) - preamble_shift+=((N_ZC/NCS)*NCS); + preamble_shift+=N_ZC; } } else { // This is the high-speed case new_dft = 0; From e06c7276042d2ce3a7956cc5d2e68e9b0a0b3bed Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 11 Mar 2021 13:57:29 +0000 Subject: [PATCH 40/94] Revert "Revert RA preamble shift at gNB" This reverts commit fa79cdb5 --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 1d971a8831..0c1fde07a2 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -681,7 +681,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, preamble_shift -= NCS; if (preamble_shift < 0) - preamble_shift+=N_ZC; + preamble_shift+=((N_ZC/NCS)*NCS); } } else { // This is the high-speed case new_dft = 0; From acb9a6e0dcd7412684f719fecc46206d4a58f259 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 11 Mar 2021 14:11:08 +0000 Subject: [PATCH 41/94] Update band 41 config file --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +- .../CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 917a41c9e6..abc944bc00 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -917,7 +917,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, n_rnti = rel15->rnti; if (crc == n_rnti) { - LOG_I(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n", + LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation); dci_ind->SFN = proc->frame_rx; dci_ind->slot = proc->nr_slot_rx; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 5bf6779f6d..cbdd205d30 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -51,7 +51,7 @@ gNBs = #initialDownlinkBWP #genericParameters # this is RBstart=41,L=24 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6366; # 6366 12925 12956 28875 + initialDLBWPlocationAndBandwidth = 12952; # 6366 12925 12956 28875 # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; @@ -75,17 +75,12 @@ gNBs = initialDLBWPk0_2 = 0; initialDLBWPmappingType_2 = 0; #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 95; + initialDLBWPstartSymbolAndLength_2 = 54; initialDLBWPk0_3 = 0; initialDLBWPmappingType_3 = 0; - #this is SS=2,L=7 - initialDLBWPstartSymbolAndLength_3 = 86; - - initialDLBWPk0_4 = 0; - initialDLBWPmappingType_4 = 0; - #this is SS=2,L=5 - initialDLBWPstartSymbolAndLength_4 = 58; + #this is SS=1,L=5 + initialDLBWPstartSymbolAndLength_3 = 57; #uplinkConfigCommon #frequencyInfoUL @@ -99,7 +94,7 @@ gNBs = pMax = 20; #initialUplinkBWP #genericParameters - initialULBWPlocationAndBandwidth = 6366; + initialULBWPlocationAndBandwidth = 12952; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialULBWPsubcarrierSpacing = 1; @@ -111,7 +106,7 @@ gNBs = prach_msg1_FDM = 0; prach_msg1_FrequencyStart = 0; zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -100; + preambleReceivedTargetPower = -96; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) preambleTransMax = 6; #powerRampingStep From e2627f8025fb2976d8a9ee09e68e0fc9dd4dff5b Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 12 Mar 2021 13:47:59 +0000 Subject: [PATCH 42/94] Improve UE mode --- openair1/PHY/defs_common.h | 5 +++-- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 15 ++++++--------- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 6 ++++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index 27765a8548..1a8016054a 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -867,8 +867,9 @@ typedef enum { NOT_SYNCHED=0, PRACH=1, RA_RESPONSE=2, - PUSCH=3, - RESYNCH=4 + RA_WAIT_CR=3, + PUSCH=4, + RESYNCH=5 } UE_MODE_t; #define FOREACH_PARALLEL(GEN) \ diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index a7bb4e0dbc..2ed9fe13cd 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -2209,17 +2209,14 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t nr_Msg1_transmitted(mod_id, ue->CC_id, frame_tx, gNB_id); } else if (nr_prach == 2) { - - LOG_D(PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id); - + LOG_W(PHY, "In %s: [UE %d] RA waiting contention resolution\n", __FUNCTION__, mod_id); + ue->UE_mode[gNB_id] = RA_WAIT_CR; + } else if (nr_prach == 3) { + LOG_W(PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id); ue->UE_mode[gNB_id] = PUSCH; - - } else if(nr_prach == 3){ - - LOG_D(PHY, "In %s: [UE %d] RA failed, setting UE mode to PRACH\n", __FUNCTION__, mod_id); - + } else if(nr_prach == 4){ + LOG_W(PHY, "In %s: [UE %d] RA failed, setting UE mode to PRACH\n", __FUNCTION__, mod_id); ue->UE_mode[gNB_id] = PRACH; - } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_OUT); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index ead83af58a..f51fb73c42 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -664,6 +664,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, } } + } else { + return 3; } if (ra->RA_contention_resolution_timer_active){ @@ -779,7 +781,7 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){ LOG_D(MAC, "In %s: [UE %d] clearing RA_active flag...\n", __FUNCTION__, mod_id); ra->RA_active = 0; - ra->generate_nr_prach = 2; + ra->generate_nr_prach = 3; ra->ra_state = RA_SUCCEEDED; } @@ -795,7 +797,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res RA_config_t *ra = &mac->ra; ra->first_Msg3 = 0; - ra->generate_nr_prach = 3; + ra->generate_nr_prach = 4; ra->ra_state = RA_UE_IDLE; prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER++; From 53d0fc05caf825b7a38cefd7a823dbd98e18d0cc Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 12 Mar 2021 16:02:28 +0000 Subject: [PATCH 43/94] Add more RA_state_t to accommodate all the output values from nr_ue_get_rach --- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 14 +++++++------- openair2/LAYER2/NR_MAC_UE/mac_defs.h | 11 +++++++---- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 18 ++++++++++-------- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 4 ++-- 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 2ed9fe13cd..dc60fbcf13 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -2162,7 +2162,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t } - if (nr_prach == 1) { + if (nr_prach == GENERATE_PREAMBLE) { if (ue->mac_enabled == 1) { int16_t pathloss = get_nr_PL(mod_id, ue->CC_id, gNB_id); @@ -2208,14 +2208,14 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t if (ue->mac_enabled == 1) nr_Msg1_transmitted(mod_id, ue->CC_id, frame_tx, gNB_id); - } else if (nr_prach == 2) { - LOG_W(PHY, "In %s: [UE %d] RA waiting contention resolution\n", __FUNCTION__, mod_id); + } else if (nr_prach == WAIT_CONTENTION_RESOLUTION) { + LOG_D(PHY, "In %s: [UE %d] RA waiting contention resolution\n", __FUNCTION__, mod_id); ue->UE_mode[gNB_id] = RA_WAIT_CR; - } else if (nr_prach == 3) { - LOG_W(PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id); + } else if (nr_prach == RA_SUCCEEDED) { + LOG_D(PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id); ue->UE_mode[gNB_id] = PUSCH; - } else if(nr_prach == 4){ - LOG_W(PHY, "In %s: [UE %d] RA failed, setting UE mode to PRACH\n", __FUNCTION__, mod_id); + } else if(nr_prach == RA_FAILED){ + LOG_D(PHY, "In %s: [UE %d] RA failed, setting UE mode to PRACH\n", __FUNCTION__, mod_id); ue->UE_mode[gNB_id] = PRACH; } diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 84e8ec59b5..4c2f3f8a90 100755 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -234,9 +234,12 @@ typedef struct { typedef enum { RA_UE_IDLE = 0, - WAIT_RAR = 1, - WAIT_CONTENTION_RESOLUTION = 2, - RA_SUCCEEDED = 3 + GENERATE_IDLE = 0, + GENERATE_PREAMBLE = 1, + WAIT_RAR = 2, + WAIT_CONTENTION_RESOLUTION = 3, + RA_SUCCEEDED = 4, + RA_FAILED = 5 } RA_state_t; typedef struct { @@ -260,7 +263,7 @@ typedef struct { /// Random-access preamble index int ra_PreambleIndex; /// Flag for the Msg1 generation: enabled at every occurrence of nr prach slot - uint8_t generate_nr_prach; + RA_state_t generate_nr_prach; /// Random-access window counter int16_t RA_window_cnt; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index f51fb73c42..652715f852 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -582,7 +582,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, nr_get_RA_window(mac); // Fill in preamble and PRACH resources - if (ra->generate_nr_prach == 1) + if (ra->generate_nr_prach == GENERATE_PREAMBLE) nr_get_prach_resources(mod_id, CC_id, gNB_id, prach_resources, prach_pdu, rach_ConfigDedicated); offset = nr_generate_ulsch_pdu((uint8_t *) mac_sdus, // sdus buffer @@ -635,7 +635,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, // Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213) nr_ra_succeeded(mod_id, frame, nr_slot_tx); } else { - ra->generate_nr_prach = 2; + ra->generate_nr_prach = GENERATE_IDLE; } } else if (ra->RA_window_cnt == 0 && !ra->RA_RAPID_found) { @@ -658,21 +658,23 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, ra->RA_backoff_cnt--; - if ((ra->RA_backoff_cnt > 0 && ra->generate_nr_prach == 1) || ra->RA_backoff_cnt == 0){ + if ((ra->RA_backoff_cnt > 0 && ra->generate_nr_prach == GENERATE_PREAMBLE) || ra->RA_backoff_cnt == 0){ nr_get_prach_resources(mod_id, CC_id, gNB_id, prach_resources, prach_pdu, rach_ConfigDedicated); } } } - } else { - return 3; } if (ra->RA_contention_resolution_timer_active){ nr_ue_contention_resolution(mod_id, CC_id, frame, nr_slot_tx, prach_resources); } - return ra->generate_nr_prach; + if(ra->generate_nr_prach != GENERATE_IDLE) { + return ra->generate_nr_prach; + } else { + return ra->ra_state; + } } @@ -781,7 +783,7 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){ LOG_D(MAC, "In %s: [UE %d] clearing RA_active flag...\n", __FUNCTION__, mod_id); ra->RA_active = 0; - ra->generate_nr_prach = 3; + ra->generate_nr_prach = GENERATE_IDLE; ra->ra_state = RA_SUCCEEDED; } @@ -797,7 +799,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res RA_config_t *ra = &mac->ra; ra->first_Msg3 = 0; - ra->generate_nr_prach = 4; + ra->generate_nr_prach = RA_FAILED; ra->ra_state = RA_UE_IDLE; prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER++; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index ff3aece24b..0c2504149c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1669,7 +1669,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &setup->rach_ConfigGeneric; ra->RA_offset = 2; // to compensate the rx frame offset at the gNB - ra->generate_nr_prach = 0; // Reset flag for PRACH generation + ra->generate_nr_prach = GENERATE_IDLE; // Reset flag for PRACH generation if (is_nr_UL_slot(scc, slotP)) { @@ -1686,7 +1686,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s if (is_nr_prach_slot && ra->ra_state == RA_UE_IDLE) { AssertFatal(NULL != prach_occasion_info_p,"PRACH Occasion Info not returned in a valid NR Prach Slot\n"); - ra->generate_nr_prach = 1; + ra->generate_nr_prach = GENERATE_PREAMBLE; format = prach_occasion_info_p->format; format0 = format & 0xff; // single PRACH format From 732617f5aea308bf088625c037862b3c0a60f48b Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 12 Mar 2021 18:31:34 +0000 Subject: [PATCH 44/94] Fix RNTI type for Msg3 at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 460f148b14..189e5e1d5c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -73,7 +73,7 @@ int get_rnti_type(NR_UE_MAC_INST_t *mac, uint16_t rnti){ if (rnti == ra->ra_rnti) { rnti_type = NR_RNTI_RA; - } else if (rnti == ra->t_crnti && ra->ra_state == WAIT_CONTENTION_RESOLUTION) { + } else if (rnti == ra->t_crnti && (ra->ra_state == WAIT_RAR || ra->ra_state == WAIT_CONTENTION_RESOLUTION) ) { rnti_type = NR_RNTI_TC; } else if (rnti == mac->crnti) { rnti_type = NR_RNTI_C; From 8b5d5bbb47b5b4b09cc5aef1063f35b4fe0fd94d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 12 Mar 2021 18:48:00 +0000 Subject: [PATCH 45/94] Set crnti with t_crnti value when RA succeeded --- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 652715f852..82e4f37a95 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -768,6 +768,7 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){ LOG_I(MAC, "[UE %d][%d.%d][RAPROC] RA procedure succeeded. CF-RA: RAR successfully received.\n", mod_id, frame, slot); ra->RA_window_cnt = -1; + mac->crnti = ra->t_crnti; } else { @@ -775,6 +776,7 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){ ra->RA_contention_resolution_cnt = -1; ra->RA_contention_resolution_timer_active = 0; + mac->crnti = ra->t_crnti; ra->t_crnti = 0; LOG_D(MAC, "In %s: [UE %d][%d.%d] CB-RA: cleared contention resolution timer...\n", __FUNCTION__, mod_id, frame, slot); From 8f28685cf38a4a052608a06d7500b947caaf7684 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 12 Mar 2021 20:15:48 +0000 Subject: [PATCH 46/94] Fix in new RA attempts after fail --- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 116 +++++++++++------- 3 files changed, 76 insertions(+), 44 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 82e4f37a95..40db20e828 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -800,7 +800,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); RA_config_t *ra = &mac->ra; - ra->first_Msg3 = 0; + ra->first_Msg3 = 1; ra->generate_nr_prach = RA_FAILED; ra->ra_state = RA_UE_IDLE; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 189e5e1d5c..f3fd9b5db6 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2291,7 +2291,7 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t break; } if (rarh->E == 0) { - LOG_W(NR_MAC,"[UE %d][RAPROC] Received RAR preamble (%d) doesn't match the intended RAPID (%d)\n", mod_id, rarh->RAPID, preamble_index); + LOG_W(NR_MAC,"[UE %d][RAPROC][%d.%d] Received RAR preamble (%d) doesn't match the intended RAPID (%d)\n", mod_id, frame, slot, rarh->RAPID, preamble_index); break; } else { rarh += sizeof(NR_MAC_RAR) + 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 86b33236ca..3f92482e20 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -464,9 +464,19 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, UE_scheduling_control->sched_ul_bytes = 0; } } - } else { - if (!sduP) // check that CRC passed - return; + } else if(sduP) { + + bool no_sig = true; + for (int k = 0; k < sdu_lenP; k++) { + if(sduP[k]!=0) { + no_sig = false; + break; + } + } + + if(no_sig) { + LOG_W(NR_MAC, "No signal\n"); + } T(T_GNB_MAC_UL_PDU_WITH_DATA, T_INT(gnb_mod_idP), T_INT(CC_idP), T_INT(rntiP), T_INT(frameP), T_INT(slotP), T_INT(-1) /* harq_pid */, @@ -480,47 +490,69 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if (ra->state != WAIT_Msg3) continue; - // random access pusch with TC-RNTI - if (ra->rnti != current_rnti) { - LOG_W(NR_MAC, - "expected TC-RNTI %04x to match current RNTI %04x\n", - ra->rnti, - current_rnti); + if(no_sig) { + LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); + ra->state = RA_IDLE; + ra->timing_offset = 0; + ra->RRC_timer = 20; + ra->msg3_round = 0; + } else { + + // random access pusch with TC-RNTI + if (ra->rnti != current_rnti) { + LOG_W(NR_MAC, + "expected TC-RNTI %04x to match current RNTI %04x\n", + ra->rnti, + current_rnti); + continue; + } + const int UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti, ra->secondaryCellGroup); + UE_info->UE_beam_index[UE_id] = ra->beam_id; + LOG_I(NR_MAC, + "[gNB %d][RAPROC] PUSCH with TC-RNTI %x received correctly, " + "adding UE MAC Context UE_id %d/RNTI %04x\n", + gnb_mod_idP, + current_rnti, + UE_id, + ra->rnti); + + LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); + LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); + for (int k = 0; k < sdu_lenP; k++) { + LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); + } + + // UE Contention Resolution Identity + // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 + // First byte corresponds to R/LCID MAC sub-header + memcpy(ra->cont_res_id, &sduP[1], sizeof(uint8_t) * 6); + + // re-initialize ta update variables afrer RA procedure completion + UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; + + nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP); + + free(ra->preambles.preamble_list); + + ra->state = Msg4; + ra->Msg4_frame = ( frameP +2 ) % 1024; + ra->Msg4_slot = 1; + LOG_I(MAC, "Scheduling RA-Msg4 for TC-RNTI %04x (state %d, frame %d, slot %d)\n", ra->rnti, ra->state, ra->Msg4_frame, ra->Msg4_slot); + return; + + } + } + } else { + for (int i = 0; i < NR_NB_RA_PROC_MAX; ++i) { + NR_RA_t *ra = &gNB_mac->common_channels[CC_idP].ra[i]; + if (ra->state != WAIT_Msg3) continue; - } - const int UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti, ra->secondaryCellGroup); - UE_info->UE_beam_index[UE_id] = ra->beam_id; - LOG_I(NR_MAC, - "[gNB %d][RAPROC] PUSCH with TC-RNTI %x received correctly, " - "adding UE MAC Context UE_id %d/RNTI %04x\n", - gnb_mod_idP, - current_rnti, - UE_id, - ra->rnti); - LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); - LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); - for (int k = 0; k < sdu_lenP; k++) { - LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); - } - - // UE Contention Resolution Identity - // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 - // First byte corresponds to R/LCID MAC sub-header - memcpy(ra->cont_res_id, &sduP[1], sizeof(uint8_t) * 6); - - // re-initialize ta update variables afrer RA procedure completion - UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; - - nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP); - - free(ra->preambles.preamble_list); - - ra->state = Msg4; - ra->Msg4_frame = ( frameP +2 ) % 1024; - ra->Msg4_slot = 1; - LOG_I(MAC, "Scheduling RA-Msg4 for TC-RNTI %04x (state %d, frame %d, slot %d)\n", ra->rnti, ra->state, ra->Msg4_frame, ra->Msg4_slot); - return; + LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); + ra->state = RA_IDLE; + ra->timing_offset = 0; + ra->RRC_timer = 20; + ra->msg3_round = 0; } } } From dff9c29b1dc5a3715fada3da1f66253d8bf8728c Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 12 Mar 2021 20:39:48 +0000 Subject: [PATCH 47/94] Fix regarding ra_PreambleIndex in new RA attempts after fail --- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 40db20e828..0d234c2163 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -801,6 +801,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res RA_config_t *ra = &mac->ra; ra->first_Msg3 = 1; + ra->ra_PreambleIndex = -1; ra->generate_nr_prach = RA_FAILED; ra->ra_state = RA_UE_IDLE; From 7ef6611d7dd83cefbcae408b7b1a449fd58cdd93 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 13 Mar 2021 17:56:23 +0000 Subject: [PATCH 48/94] Remove hard code in nr_pdsch_channel_estimation --- openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 5 +++-- openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h | 1 + openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index b498ed9c6f..97613e5428 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -650,6 +650,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB_offset, + bool is_SI, unsigned char Ns, unsigned short p, unsigned char symbol, @@ -688,8 +689,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, // generate pilot for gNB port number 1000+p uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12; - if (Ns % 20 == 0) { // FIXME: temporary fix for SIB1 - rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12 - BWPStart; + if (is_SI) { + rb_offset -= BWPStart; } uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type; int8_t delta = get_delta(p, config_type); diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index 6c461ef448..1466fabe5d 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -70,6 +70,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB_offset, + bool is_SI, unsigned char Ns, unsigned short p, unsigned char symbol, diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index dc60fbcf13..c78632a5b4 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -796,6 +796,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ uint16_t pdsch_nb_rb = dlsch0_harq->nb_rb; uint16_t s0 = dlsch0_harq->start_symbol; uint16_t s1 = dlsch0_harq->nb_symbols; + bool is_SI = dlsch0->rnti_type == _SI_RNTI_; LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0->harq_processes[harq_pid]->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos); @@ -805,6 +806,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ nr_pdsch_channel_estimation(ue, proc, 0 /*eNB_id*/, + is_SI, nr_slot_rx, aatx /*p*/, m, From bad2a56b06715f9ee1b7d2d3f2339fd4a58a8f86 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 13 Mar 2021 20:12:57 +0000 Subject: [PATCH 49/94] Implementation of the RA-Msg4 Ack --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 93 +++++++++++++++---- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 - 2 files changed, 73 insertions(+), 22 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 5f5a92bc6a..92d9f65fef 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1068,27 +1068,52 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint8_t time_domain_assignment = 0; uint8_t mcsIndex = 0; - uint8_t mac_sdu[30] = {}; - uint8_t mac_pdu[100] = {}; NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1; + + int UE_id = find_nr_UE_id(module_idP, ra->rnti); + NR_UE_info_t *UE_info = &nr_mac->UE_info; + NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + int nr_mix_slots = tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0; + int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots; + int first_ul_slot_tdd = tdd->nrofDownlinkSlots + nr_slots_period * (slotP / nr_slots_period); + + // HARQ management + int8_t current_harq_pid = sched_ctrl->dl_harq_pid; + if (current_harq_pid < 0) { + current_harq_pid = sched_ctrl->available_dl_harq.head; + remove_front_nr_list(&sched_ctrl->available_dl_harq); + sched_ctrl->dl_harq_pid = current_harq_pid; + } else { + if (sched_ctrl->harq_processes[current_harq_pid].round == 0) + remove_nr_list(&sched_ctrl->available_dl_harq, current_harq_pid); + else + remove_nr_list(&sched_ctrl->retrans_dl_harq, current_harq_pid); + } + NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid]; + DevAssert(!harq->is_waiting); + add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid); + harq->is_waiting = true; + harq->feedback_slot = first_ul_slot_tdd; + ra->harq_pid = current_harq_pid; + // Bytes to be transmitted - uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, mac_sdu); - uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, (unsigned char *)mac_pdu, 255, ra->cont_res_id); - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->R = 0; - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->F = 0; - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->LCID = DL_SCH_LCID_CCCH; - ((NR_MAC_SUBHEADER_SHORT *) &mac_pdu[mac_pdu_length])->L = mac_sdu_length * 8; - mac_pdu_length += 2; - memcpy(&mac_pdu[mac_pdu_length], mac_sdu, sizeof(uint8_t) * mac_sdu_length); - mac_pdu_length += mac_sdu_length; + uint8_t *buf = (uint8_t *) harq->tb; + uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, buf, 255, ra->cont_res_id); + uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, &buf[mac_pdu_length+2]); + ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->R = 0; + ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->F = 0; + ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->LCID = DL_SCH_LCID_CCCH; + ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->L = mac_sdu_length * 8; + mac_pdu_length = mac_pdu_length + mac_sdu_length + 2; // Calculate number of symbols int startSymbolIndex, nrOfSymbols; @@ -1124,15 +1149,14 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int rbStart = 0; int rbSize = 0; - uint32_t TBS = 0; uint8_t tb_scaling = 0; uint16_t *vrb_map = cc[CC_id].vrb_map; do { rbSize++; - TBS = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIdx), + harq->tb_size = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIdx), nr_get_code_rate_dl(mcsIndex, mcsTableIdx), rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3; - } while (rbStart + rbSize < BWPSize && !vrb_map[rbStart + rbSize] && TBS < mac_pdu_length); + } while (rbStart + rbSize < BWPSize && !vrb_map[rbStart + rbSize] && harq->tb_size < mac_pdu_length); for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { if (vrb_map[rbStart + i]) { @@ -1212,7 +1236,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->qamModOrder[0] = 2; pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; pdsch_pdu_rel15->mcsTable[0] = mcsTableIdx; - pdsch_pdu_rel15->rvIndex[0] = 0; + pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[harq->round]; pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; pdsch_pdu_rel15->nrOfLayers = 1; pdsch_pdu_rel15->transmissionScheme = 0; @@ -1253,6 +1277,13 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dci_payload.vrb_to_prb_mapping.val = 0; dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; dci_payload.tb_scaling = tb_scaling; + dci_payload.rv = pdsch_pdu_rel15->rvIndex[0]; + dci_payload.harq_pid = current_harq_pid; + dci_payload.ndi = harq->ndi; + dci_payload.dai[0].val = (sched_ctrl->sched_pucch->dai_c-1)&3; + dci_payload.tpc = sched_ctrl->tpc1; // TPC for PUCCH: table 7.2.1-1 in 38.213 + dci_payload.pucch_resource_indicator = sched_ctrl->sched_pucch->resource_indicator; + dci_payload.pdsch_to_harq_feedback_timing_indicator.val = sched_ctrl->sched_pucch->timing_indicator; LOG_D(NR_MAC, "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", @@ -1285,11 +1316,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; - memcpy(&tx_req->TLVs[0].value.direct, mac_pdu, sizeof(uint8_t) * TBS); - tx_req->PDU_length = TBS; + memcpy(tx_req->TLVs[0].value.direct, harq->tb, sizeof(uint8_t) * harq->tb_size); + tx_req->PDU_length = harq->tb_size; tx_req->PDU_index = pduindex; tx_req->num_TLV = 1; - tx_req->TLVs[0].length = TBS + 2; + tx_req->TLVs[0].length = harq->tb_size + 2; nr_mac->TX_req[CC_id].SFN = frameP; nr_mac->TX_req[CC_id].Number_of_PDUs++; nr_mac->TX_req[CC_id].Slot = slotP; @@ -1320,8 +1351,30 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t slot, NR_RA_t *ra) { - LOG_W(NR_MAC,"nr_check_Msg4_Ack() is not implemented yet!\n"); - ra->state = RA_IDLE; + + int UE_id = find_nr_UE_id(module_id, ra->rnti); + const int current_harq_pid = ra->harq_pid; + + NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; + NR_UE_harq_t *harq = &UE_info->UE_sched_ctrl[UE_id].harq_processes[current_harq_pid]; + + LOG_D(MAC, "ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d\n", UE_id, ra->rnti, harq->is_waiting, harq->round, frame, slot, current_harq_pid); + + if (harq->is_waiting == 0) + { + if (harq->round == 0) + { + ra->state = RA_IDLE; + UE_info->active[UE_id] = true; + free(ra->preambles.preamble_list); + LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. RA procedure succeeded!\n", UE_id, ra->rnti); + } + else + { + ra->state = Msg4; + } + } + } void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP){ diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 3f92482e20..22827a690d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -532,8 +532,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP); - free(ra->preambles.preamble_list); - ra->state = Msg4; ra->Msg4_frame = ( frameP +2 ) % 1024; ra->Msg4_slot = 1; From bdc97f7a569d9995f7230ab92bca06a3666b787c Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 16 Mar 2021 10:08:54 +0000 Subject: [PATCH 50/94] Send MAC NR-BCCH-SL-SCH to RRC through ITTI at UE --- openair2/RRC/NR_UE/L2_interface_ue.c | 26 +++++++++++++++++++++++++- openair2/RRC/NR_UE/rrc_UE.c | 2 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index 609d526127..c78a1caf37 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -56,7 +56,29 @@ nr_mac_rrc_data_ind_ue( break; case NR_BCCH_DL_SCH: - AssertFatal( nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id, gNB_index, (uint8_t*)pduP, pdu_len, 0, 0) == 0, "UE decode BCCH-DL-SCH error!\n"); + if (pdu_len>0) { + LOG_T(NR_RRC, "[UE %d] Received SDU for NR-BCCH-DL-SCH on SRB %u from gNB %d\n", module_id, channel & RAB_OFFSET, + gNB_index); + + MessageDef *message_p; + int msg_sdu_size = BCCH_SDU_SIZE; + + if (pdu_len > msg_sdu_size) { + LOG_E(NR_RRC, "SDU larger than NR-BCCH-DL-SCH SDU buffer size (%d, %d)", sdu_size, msg_sdu_size); + sdu_size = msg_sdu_size; + } else { + sdu_size = pdu_len; + } + + message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_BCCH_DATA_IND); + memset(NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu, 0, BCCH_SDU_SIZE); + memcpy(NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu, pduP, sdu_size); + NR_RRC_MAC_BCCH_DATA_IND (message_p).frame = frame; //frameP + NR_RRC_MAC_BCCH_DATA_IND (message_p).sub_frame = sub_frame; //sub_frameP + NR_RRC_MAC_BCCH_DATA_IND (message_p).sdu_size = sdu_size; + NR_RRC_MAC_BCCH_DATA_IND (message_p).gnb_index = gNB_index; + itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p); + } break; case CCCH: @@ -83,6 +105,8 @@ nr_mac_rrc_data_ind_ue( NR_RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti; //rntiP itti_send_msg_to_task (TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE( module_id ), message_p); } + break; + default: break; } diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index f373d74230..703a93c847 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2472,7 +2472,6 @@ void *rrc_nrue_task( void *args_p ) { case NR_RRC_MAC_BCCH_DATA_IND: LOG_D(NR_RRC, "[UE %d] Received %s: frameP %d, gNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p), NR_RRC_MAC_BCCH_DATA_IND (msg_p).frame, NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index); - // PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_NO, NOT_A_RNTI, RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NOT_A_RNTI, NR_RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0,NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index); nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message (ctxt.module_id, NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index, @@ -2480,6 +2479,7 @@ void *rrc_nrue_task( void *args_p ) { NR_RRC_MAC_BCCH_DATA_IND (msg_p).sdu_size, NR_RRC_MAC_BCCH_DATA_IND (msg_p).rsrq, NR_RRC_MAC_BCCH_DATA_IND (msg_p).rsrp); + break; case NR_RRC_MAC_CCCH_DATA_IND: LOG_D(NR_RRC, "[UE %d] RNTI %x Received %s: frameP %d, gNB %d\n", From 8646dd0bcbc55379c2af89780b88c9a9daa6311c Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 16 Mar 2021 12:51:04 +0000 Subject: [PATCH 51/94] DRB configuration for a new crnti --- openair2/LAYER2/NR_MAC_gNB/config.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 11 +++-------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 10 ++-------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 2 +- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 4 +++- openair2/RRC/NR/rrc_gNB.c | 3 +++ openair2/RRC/NR_UE/rrc_UE.c | 6 +++--- 7 files changed, 16 insertions(+), 22 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 41317f8bbc..cb30d21d88 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -435,7 +435,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, } } else { ra->cfra = false; - ra->rnti = rnti; + ra->rnti = 0; ra->preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES; ra->preambles.preamble_list = (uint8_t *) malloc(MAX_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 92d9f65fef..d3f8cf9693 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -575,8 +575,6 @@ void nr_initiate_ra_proc(module_id_t module_idP, LOG_D(MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP); - // TODO: Configure RRC with the new RNTI of the following commented lines - /* int loop = 0; if (!ra->cfra) { do { @@ -590,7 +588,6 @@ void nr_initiate_ra_proc(module_id_t module_idP, abort(); } } - */ ra->RA_rnti = ra_rnti; ra->preamble_index = preamble_index; @@ -1364,9 +1361,9 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram { if (harq->round == 0) { - ra->state = RA_IDLE; - UE_info->active[UE_id] = true; + nr_clear_ra_proc(module_id, CC_id, frame, ra); free(ra->preambles.preamble_list); + UE_info->active[UE_id] = true; LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. RA procedure succeeded!\n", UE_id, ra->rnti); } else @@ -1377,9 +1374,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram } -void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP){ - - NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[CC_id].ra[0]; +void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, NR_RA_t *ra){ LOG_D(MAC,"[gNB %d][RAPROC] CC_id %d Frame %d Clear Random access information rnti %x\n", module_idP, CC_id, frameP, ra->rnti); ra->state = RA_IDLE; ra->timing_offset = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 22827a690d..7af74c931d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -492,10 +492,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if(no_sig) { LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); - ra->state = RA_IDLE; - ra->timing_offset = 0; - ra->RRC_timer = 20; - ra->msg3_round = 0; + nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); } else { // random access pusch with TC-RNTI @@ -547,10 +544,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, continue; LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); - ra->state = RA_IDLE; - ra->timing_offset = 0; - ra->RRC_timer = 20; - ra->msg3_round = 0; + nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); } } } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 823e374ceb..1fa27506a9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -114,7 +114,7 @@ void nr_schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t slotP); void nr_initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, uint16_t preamble_index, uint8_t freq_index, uint8_t symbol, int16_t timing_offset); -void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP); +void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, NR_RA_t *ra); int nr_allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t slotP, int test_only); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index f14d25b145..100f1d6acc 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -796,7 +796,9 @@ void nr_DRB_preconfiguration(uint16_t crnti) rbconfig->securityConfig->keyToUse = calloc(1,sizeof(*rbconfig->securityConfig->keyToUse)); *rbconfig->securityConfig->keyToUse = NR_SecurityConfig__keyToUse_master; - xer_fprint(stdout, &asn_DEF_NR_RadioBearerConfig, (const void*)rbconfig); + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_NR_RadioBearerConfig, (const void*)rbconfig); + } NR_RLC_BearerConfig_t *RLC_BearerConfig = calloc(1,sizeof(*RLC_BearerConfig)); nr_rlc_bearer_init(RLC_BearerConfig); diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 3a70ea482a..e231cd4d47 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1496,6 +1496,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, rrc_gNB_generate_RRCSetup(ctxt_pP, rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti), CC_id); + + // FIXME: Check the best place to perform this DRB configuration + nr_DRB_preconfiguration(ctxt_pP->rnti); } break; diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 703a93c847..0d52f218a1 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1365,10 +1365,10 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB (void **)&dl_ccch_msg, (uint8_t *)Srb_info->Rx_buffer.Payload, 100,0,0); - - // if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout,&asn_DEF_NR_DL_CCCH_Message,(void *)dl_ccch_msg); - // } + } if ((dec_rval.code != RC_OK) && (dec_rval.consumed==0)) { LOG_E(RRC,"[UE %d] Frame %d : Failed to decode DL-CCCH-Message (%zu bytes)\n",ctxt_pP->module_id,ctxt_pP->frame,dec_rval.consumed); From 986a9fac1d2e251e4de27aadadf6dc92dd9959a4 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 16 Mar 2021 16:00:37 +0000 Subject: [PATCH 52/94] Fixed issues to allow coexistence of CFRA and CBRA implementations --- openair2/LAYER2/NR_MAC_UE/nr_l1_helpers.c | 14 +- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 268 ++++++++---------- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 4 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 6 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 49 ++-- openair2/RRC/NR/rrc_gNB_reconfig.c | 98 +++---- 6 files changed, 213 insertions(+), 226 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_l1_helpers.c b/openair2/LAYER2/NR_MAC_UE/nr_l1_helpers.c index 27623fe5be..2f4697c25d 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_l1_helpers.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_l1_helpers.c @@ -146,17 +146,11 @@ int nr_get_Po_NOMINAL_PUSCH(NR_PRACH_RESOURCES_t *prach_resources, module_id_t m NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); NR_ServingCellConfigCommon_t *scc = mac->scc; - int8_t receivedTargerPower, delta_preamble; - long preambleReceivedTargetPower = 0; - - if (prach_resources->RA_TYPE == RA_4STEP){ - NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup; - preambleReceivedTargetPower = nr_rach_ConfigCommon->rach_ConfigGeneric.preambleReceivedTargetPower; - } else if (prach_resources->RA_TYPE == RA_2STEP){ - // msgA-PreambleReceivedTargetPower - LOG_E(MAC, "In %s:%d: missing implementation for 2-step RA...\n", __FUNCTION__, __LINE__); - } + int8_t receivedTargerPower; + int8_t delta_preamble; + NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup; + long preambleReceivedTargetPower = nr_rach_ConfigCommon->rach_ConfigGeneric.preambleReceivedTargetPower; delta_preamble = nr_get_DELTA_PREAMBLE(mod_id, CC_id, prach_resources->prach_format); receivedTargerPower = preambleReceivedTargetPower + delta_preamble + (prach_resources->RA_PREAMBLE_POWER_RAMPING_COUNTER - 1) * prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP + prach_resources->POWER_OFFSET_2STEP_RA; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 0d234c2163..080a09ad51 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -103,150 +103,137 @@ void init_RA(module_id_t mod_id, LOG_E(MAC, "In %s: config not handled\n", __FUNCTION__); } - if (prach_resources->RA_TYPE == RA_2STEP){ - LOG_E(MAC, "Missing implementation of initialization of 2-step RA specific variables...\n"); - } else if (prach_resources->RA_TYPE == RA_4STEP){ - LOG_D(MAC, "Initialization of 4-step RA specific variables...\n"); - switch (rach_ConfigGeneric->powerRampingStep){ // in dB - case 0: + switch (rach_ConfigGeneric->powerRampingStep){ // in dB + case 0: prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP = 0; break; - case 1: + case 1: prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP = 2; break; - case 2: + case 2: prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP = 4; break; - case 3: + case 3: prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP = 6; break; - } - - switch (rach_ConfigGeneric->preambleTransMax) { - case 0: - ra->preambleTransMax = 3; - break; - case 1: - ra->preambleTransMax = 4; - break; - case 2: - ra->preambleTransMax = 5; - break; - case 3: - ra->preambleTransMax = 6; - break; - case 4: - ra->preambleTransMax = 7; - break; - case 5: - ra->preambleTransMax = 8; - break; - case 6: - ra->preambleTransMax = 10; - break; - case 7: - ra->preambleTransMax = 20; - break; - case 8: - ra->preambleTransMax = 50; - break; - case 9: - ra->preambleTransMax = 100; - break; - case 10: - ra->preambleTransMax = 200; - break; - } - if (nr_rach_ConfigCommon->ext1) { - if (nr_rach_ConfigCommon->ext1->ra_PrioritizationForAccessIdentity){ - LOG_D(MAC, "In %s:%d: Missing implementation for Access Identity initialization procedures\n", __FUNCTION__, __LINE__); - } - } } - return; + switch (rach_ConfigGeneric->preambleTransMax) { + case 0: + ra->preambleTransMax = 3; + break; + case 1: + ra->preambleTransMax = 4; + break; + case 2: + ra->preambleTransMax = 5; + break; + case 3: + ra->preambleTransMax = 6; + break; + case 4: + ra->preambleTransMax = 7; + break; + case 5: + ra->preambleTransMax = 8; + break; + case 6: + ra->preambleTransMax = 10; + break; + case 7: + ra->preambleTransMax = 20; + break; + case 8: + ra->preambleTransMax = 50; + break; + case 9: + ra->preambleTransMax = 100; + break; + case 10: + ra->preambleTransMax = 200; + break; + } + if (nr_rach_ConfigCommon->ext1) { + if (nr_rach_ConfigCommon->ext1->ra_PrioritizationForAccessIdentity){ + LOG_D(MAC, "In %s:%d: Missing implementation for Access Identity initialization procedures\n", __FUNCTION__, __LINE__); + } + } } void ssb_rach_config(RA_config_t *ra, NR_PRACH_RESOURCES_t *prach_resources, NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon, fapi_nr_ul_config_prach_pdu *prach_pdu){ // Determine the SSB to RACH mapping ratio // ======================================= - if (prach_resources->RA_TYPE == RA_4STEP){ - NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present; - boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB - uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB - int total_preambles_per_ssb; - uint8_t ssb_nb_in_ro; - int numberOfRA_Preambles = 64; - switch (ssb_perRACH_config){ - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneEighth: - multiple_ssb_per_ro = false; - ssb_rach_ratio = 8; - ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneEighth + 1); - break; - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneFourth: - multiple_ssb_per_ro = false; - ssb_rach_ratio = 4; - ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneFourth + 1); - break; - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneHalf: - multiple_ssb_per_ro = false; - ssb_rach_ratio = 2; - ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneHalf + 1); - break; - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one: - multiple_ssb_per_ro = true; - ssb_rach_ratio = 1; - ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.one + 1); - break; - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_two: - multiple_ssb_per_ro = true; - ssb_rach_ratio = 2; - ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.two + 1); - break; - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_four: - multiple_ssb_per_ro = true; - ssb_rach_ratio = 4; - ra->cb_preambles_per_ssb = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.four; - break; - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_eight: - multiple_ssb_per_ro = true; - ssb_rach_ratio = 8; - ra->cb_preambles_per_ssb = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.eight; - break; - case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_sixteen: - multiple_ssb_per_ro = true; - ssb_rach_ratio = 16; - ra->cb_preambles_per_ssb = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.sixteen; - break; - default: - AssertFatal(1 == 0, "Unsupported ssb_perRACH_config %d\n", ssb_perRACH_config); - break; - } + NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present; + boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB + uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB + int total_preambles_per_ssb; + uint8_t ssb_nb_in_ro; + int numberOfRA_Preambles = 64; - if (nr_rach_ConfigCommon->totalNumberOfRA_Preambles) - numberOfRA_Preambles = *(nr_rach_ConfigCommon->totalNumberOfRA_Preambles); + switch (ssb_perRACH_config){ + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneEighth: + multiple_ssb_per_ro = false; + ssb_rach_ratio = 8; + ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneEighth + 1); + break; + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneFourth: + multiple_ssb_per_ro = false; + ssb_rach_ratio = 4; + ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneFourth + 1); + break; + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneHalf: + multiple_ssb_per_ro = false; + ssb_rach_ratio = 2; + ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneHalf + 1); + break; + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one: + multiple_ssb_per_ro = true; + ssb_rach_ratio = 1; + ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.one + 1); + break; + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_two: + multiple_ssb_per_ro = true; + ssb_rach_ratio = 2; + ra->cb_preambles_per_ssb = 4 * (nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.two + 1); + break; + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_four: + multiple_ssb_per_ro = true; + ssb_rach_ratio = 4; + ra->cb_preambles_per_ssb = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.four; + break; + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_eight: + multiple_ssb_per_ro = true; + ssb_rach_ratio = 8; + ra->cb_preambles_per_ssb = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.eight; + break; + case NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_sixteen: + multiple_ssb_per_ro = true; + ssb_rach_ratio = 16; + ra->cb_preambles_per_ssb = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.sixteen; + break; + default: + AssertFatal(1 == 0, "Unsupported ssb_perRACH_config %d\n", ssb_perRACH_config); + } - // Compute the proper Preamble selection params according to the selected SSB and the ssb_perRACH_OccasionAndCB_PreamblesPerSSB configuration - if ((true == multiple_ssb_per_ro) && - (ssb_rach_ratio > 1)) { - total_preambles_per_ssb = numberOfRA_Preambles / ssb_rach_ratio; + if (nr_rach_ConfigCommon->totalNumberOfRA_Preambles) + numberOfRA_Preambles = *(nr_rach_ConfigCommon->totalNumberOfRA_Preambles); - ssb_nb_in_ro = prach_pdu->ssb_nb_in_ro; - ra->starting_preamble_nb = total_preambles_per_ssb * ssb_nb_in_ro; - } - else { - total_preambles_per_ssb = numberOfRA_Preambles; - ra->starting_preamble_nb = 0; - } + // Compute the proper Preamble selection params according to the selected SSB and the ssb_perRACH_OccasionAndCB_PreamblesPerSSB configuration + if ((true == multiple_ssb_per_ro) && (ssb_rach_ratio > 1)) { + total_preambles_per_ssb = numberOfRA_Preambles / ssb_rach_ratio; + + ssb_nb_in_ro = prach_pdu->ssb_nb_in_ro; + ra->starting_preamble_nb = total_preambles_per_ssb * ssb_nb_in_ro; } else { - LOG_E(MAC, "In %s:%d: missing implementation for 2-step RA...\n", __FUNCTION__, __LINE__); + total_preambles_per_ssb = numberOfRA_Preambles; + ra->starting_preamble_nb = 0; } } -// This routine implements RA premable configuration according to +// This routine implements RA preamble configuration according to // section 5.1 (Random Access procedure) of 3GPP TS 38.321 version 16.2.1 Release 16 void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t *mac, int16_t dl_pathloss){ @@ -261,23 +248,21 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t NR_RACH_ConfigCommon_t *nr_rach_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup; NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &nr_rach_ConfigCommon->rach_ConfigGeneric; - if (prach_resources->RA_TYPE == RA_4STEP){ + if (scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble){ + deltaPreamble_Msg3 = (*scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble) * 2; // dB + LOG_D(MAC, "In %s: deltaPreamble_Msg3 set to %ld\n", __FUNCTION__, deltaPreamble_Msg3); + } - if (scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble){ - deltaPreamble_Msg3 = (*scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble) * 2; // dB - LOG_D(MAC, "In %s: deltaPreamble_Msg3 set to %ld\n", __FUNCTION__, deltaPreamble_Msg3); - } - - if (!nr_rach_ConfigCommon->groupBconfigured) { - noGroupB = 1; - LOG_D(MAC, "In %s:%d: preambles group B is not configured...\n", __FUNCTION__, __LINE__); - } else { - // RA preambles group B is configured - // - Random Access Preambles group B is configured for 4-step RA type - // - Defining the number of RA preambles in RA Preamble Group A for each SSB - LOG_D(MAC, "In %s:%d: preambles group B is configured...\n", __FUNCTION__, __LINE__); - sizeOfRA_PreamblesGroupA = nr_rach_ConfigCommon->groupBconfigured->numberOfRA_PreamblesGroupA; - switch (nr_rach_ConfigCommon->groupBconfigured->ra_Msg3SizeGroupA){ + if (!nr_rach_ConfigCommon->groupBconfigured) { + noGroupB = 1; + LOG_D(MAC, "In %s:%d: preambles group B is not configured...\n", __FUNCTION__, __LINE__); + } else { + // RA preambles group B is configured + // - Random Access Preambles group B is configured for 4-step RA type + // - Defining the number of RA preambles in RA Preamble Group A for each SSB + LOG_D(MAC, "In %s:%d: preambles group B is configured...\n", __FUNCTION__, __LINE__); + sizeOfRA_PreamblesGroupA = nr_rach_ConfigCommon->groupBconfigured->numberOfRA_PreamblesGroupA; + switch (nr_rach_ConfigCommon->groupBconfigured->ra_Msg3SizeGroupA){ /* - Threshold to determine the groups of RA preambles */ case 0: messageSizeGroupA = 56; @@ -343,17 +328,12 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t break; default: AssertFatal(1 == 0,"Unknown messagePowerOffsetGroupB %lu\n", nr_rach_ConfigCommon->groupBconfigured->messagePowerOffsetGroupB); - } - - PLThreshold = prach_resources->RA_PCMAX - rach_ConfigGeneric->preambleReceivedTargetPower - deltaPreamble_Msg3 - messagePowerOffsetGroupB; - } - } else { - // todo: - // - groupB-ConfiguredTwoStepRA - // - msgA-DeltaPreamble - LOG_E(MAC, "In %s:%d: missing implementation for 2-step RA...\n", __FUNCTION__, __LINE__); + + PLThreshold = prach_resources->RA_PCMAX - rach_ConfigGeneric->preambleReceivedTargetPower - deltaPreamble_Msg3 - messagePowerOffsetGroupB; + } + /* Msg3 has not been transmitted yet */ if (ra->first_Msg3) { if(ra->ra_PreambleIndex < 0 || ra->ra_PreambleIndex > 63) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 0c2504149c..8e8a16948b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -891,13 +891,12 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in uint16_t TBS_bytes = ulcfg_pdu->pusch_config_pdu.pusch_data.tb_size; - if (ra->ra_state == WAIT_RAR){ + if (ra->ra_state == WAIT_RAR && !ra->cfra){ memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes); LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n"); for (int k = 0; k < TBS_bytes; k++) { LOG_D(NR_MAC,"(%i): 0x%x\n",k,mac->ulsch_pdu.payload[k]); } - LOG_I(NR_MAC,"[RAPROC] RA-Msg3 transmitted\n"); } else { if (IS_SOFTMODEM_NOS1 && (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator)){ // Getting IP traffic to be transmitted @@ -947,6 +946,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in tx_req.tx_request_body[0].pdu = ulsch_input_buffer; if (ra->ra_state != RA_SUCCEEDED && !ra->cfra){ + LOG_I(NR_MAC,"[RAPROC] RA-Msg3 transmitted\n"); nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->gNB_index); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index d3f8cf9693..394893a15e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1033,7 +1033,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra); nr_add_msg3(module_idP, CC_id, frameP, slotP, ra, (uint8_t *) &tx_req->TLVs[0].value.direct[0]); - LOG_I(MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); + if(ra->cfra) { + LOG_I(MAC, "Frame %d, Subframe %d: Setting RA-Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); + } T(T_GNB_MAC_DL_RAR_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(ra->RA_rnti), T_INT(frameP), T_INT(slotP), T_INT(0), T_BUFFER(&tx_req->TLVs[0].value.direct[0], tx_req->TLVs[0].length)); @@ -1364,7 +1366,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram nr_clear_ra_proc(module_id, CC_id, frame, ra); free(ra->preambles.preamble_list); UE_info->active[UE_id] = true; - LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. RA procedure succeeded!\n", UE_id, ra->rnti); + LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti); } else { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 7af74c931d..1a330da02c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -513,26 +513,37 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, UE_id, ra->rnti); - LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); - LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); - for (int k = 0; k < sdu_lenP; k++) { - LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); + if(ra->cfra) { + + LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) CFRA procedure succeeded!\n", UE_id, ra->rnti); + nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); + free(ra->preambles.preamble_list); + UE_info->active[UE_id] = true; + + } else { + + LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); + LOG_I(NR_MAC,"[RAPROC] Received Msg3:\n"); + for (int k = 0; k < sdu_lenP; k++) { + LOG_I(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); + } + + // UE Contention Resolution Identity + // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 + // First byte corresponds to R/LCID MAC sub-header + memcpy(ra->cont_res_id, &sduP[1], sizeof(uint8_t) * 6); + + // re-initialize ta update variables afrer RA procedure completion + UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; + + nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP); + + ra->state = Msg4; + ra->Msg4_frame = ( frameP +2 ) % 1024; + ra->Msg4_slot = 1; + LOG_I(MAC, "Scheduling RA-Msg4 for TC-RNTI %04x (state %d, frame %d, slot %d)\n", ra->rnti, ra->state, ra->Msg4_frame, ra->Msg4_slot); + } - - // UE Contention Resolution Identity - // Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4 - // First byte corresponds to R/LCID MAC sub-header - memcpy(ra->cont_res_id, &sduP[1], sizeof(uint8_t) * 6); - - // re-initialize ta update variables afrer RA procedure completion - UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; - - nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP); - - ra->state = Msg4; - ra->Msg4_frame = ( frameP +2 ) % 1024; - ra->Msg4_slot = 1; - LOG_I(MAC, "Scheduling RA-Msg4 for TC-RNTI %04x (state %d, frame %d, slot %d)\n", ra->rnti, ra->state, ra->Msg4_frame, ra->Msg4_slot); return; } diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 051352590a..e6780ed29e 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -228,58 +228,58 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->spCellConfig->reconfigurationWithSync->ext1 = NULL; // For 2-step contention-free random access procedure -#if 0 - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated = calloc(1,sizeof(struct NR_ReconfigurationWithSync__rach_ConfigDedicated)); - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->present= NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink; - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink= calloc(1,sizeof(struct NR_RACH_ConfigDedicated)); - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra= calloc(1,sizeof(struct NR_CFRA)); - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->ra_Prioritization= NULL; - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions= calloc(1,sizeof(struct NR_CFRA__occasions)); - memcpy(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->rach_ConfigGeneric, - &servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric, sizeof(NR_RACH_ConfigGeneric_t)); - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->ssb_perRACH_Occasion= calloc(1,sizeof(long)); - *secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->ssb_perRACH_Occasion = NR_CFRA__occasions__ssb_perRACH_Occasion_one; - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.present = NR_CFRA__resources_PR_ssb; - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb = calloc(1,sizeof(struct NR_CFRA__resources__ssb)); - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ra_ssb_OccasionMaskIndex = 0; + if(get_softmodem_params()->sa == 0) { + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated = calloc(1,sizeof(struct NR_ReconfigurationWithSync__rach_ConfigDedicated)); + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->present= NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink; + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink= calloc(1,sizeof(struct NR_RACH_ConfigDedicated)); + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra= calloc(1,sizeof(struct NR_CFRA)); + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->ra_Prioritization= NULL; + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions= calloc(1,sizeof(struct NR_CFRA__occasions)); + memcpy(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->rach_ConfigGeneric, + &servingcellconfigcommon->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric, sizeof(NR_RACH_ConfigGeneric_t)); + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->ssb_perRACH_Occasion= calloc(1,sizeof(long)); + *secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->occasions->ssb_perRACH_Occasion = NR_CFRA__occasions__ssb_perRACH_Occasion_one; + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.present = NR_CFRA__resources_PR_ssb; + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb = calloc(1,sizeof(struct NR_CFRA__resources__ssb)); + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ra_ssb_OccasionMaskIndex = 0; - struct NR_CFRA_SSB_Resource *ssbElem[8]; + struct NR_CFRA_SSB_Resource *ssbElem[8]; - ssbElem[0] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[0]->ssb = 0; - ssbElem[0]->ra_PreambleIndex = 63; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[0]); - ssbElem[1] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[1]->ssb = 1; - ssbElem[1]->ra_PreambleIndex = 62; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[1]); - ssbElem[2] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[2]->ssb = 2; - ssbElem[2]->ra_PreambleIndex = 63; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[2]); - ssbElem[3] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[3]->ssb = 3; - ssbElem[3]->ra_PreambleIndex = 63; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[3]); - ssbElem[4] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[4]->ssb = 4; - ssbElem[4]->ra_PreambleIndex = 63; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[4]); - ssbElem[5] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[5]->ssb = 5; - ssbElem[5]->ra_PreambleIndex = 63; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[5]); - ssbElem[6] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[6]->ssb = 6; - ssbElem[6]->ra_PreambleIndex = 63; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[6]); - ssbElem[7] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); - ssbElem[7]->ssb = 7; - ssbElem[7]->ra_PreambleIndex = 63; - ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[7]); + ssbElem[0] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[0]->ssb = 0; + ssbElem[0]->ra_PreambleIndex = 63; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[0]); + ssbElem[1] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[1]->ssb = 1; + ssbElem[1]->ra_PreambleIndex = 62; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[1]); + ssbElem[2] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[2]->ssb = 2; + ssbElem[2]->ra_PreambleIndex = 63; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[2]); + ssbElem[3] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[3]->ssb = 3; + ssbElem[3]->ra_PreambleIndex = 63; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[3]); + ssbElem[4] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[4]->ssb = 4; + ssbElem[4]->ra_PreambleIndex = 63; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[4]); + ssbElem[5] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[5]->ssb = 5; + ssbElem[5]->ra_PreambleIndex = 63; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[5]); + ssbElem[6] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[6]->ssb = 6; + ssbElem[6]->ra_PreambleIndex = 63; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[6]); + ssbElem[7] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); + ssbElem[7]->ssb = 7; + ssbElem[7]->ra_PreambleIndex = 63; + ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[7]); - secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->ext1 = NULL; -#endif + secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->ext1 = NULL; + } secondaryCellGroup->spCellConfig->rlf_TimersAndConstants = calloc(1,sizeof(*secondaryCellGroup->spCellConfig->rlf_TimersAndConstants)); secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->present = NR_SetupRelease_RLF_TimersAndConstants_PR_setup; From 27f0414e60ace2c9db95c6b6f9e99357aae22b17 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 16 Mar 2021 16:49:30 +0000 Subject: [PATCH 53/94] Fill pusch_proc_threads in config files --- .../CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 5 +++-- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index cbdd205d30..dd18cf624e 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -250,10 +250,11 @@ MACRLCs = ( ); L1s = ( - { + { num_cc = 1; tr_n_preference = "local_mac"; - } + pusch_proc_threads = 8; + } ); RUs = ( diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 35eb694c2b..001e5b917a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -250,10 +250,11 @@ MACRLCs = ( ); L1s = ( - { + { num_cc = 1; tr_n_preference = "local_mac"; - } + pusch_proc_threads = 8; + } ); RUs = ( From 9efe4187e72f25fd2936be5b9e4daa5473383afb Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 18 Mar 2021 01:20:59 +0000 Subject: [PATCH 54/94] Fix preamble sequence --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- openair1/PHY/NR_TRANSPORT/nr_prach.h | 285 ++++++++++++++++++ openair1/PHY/NR_TRANSPORT/nr_prach_common.c | 27 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 +- 4 files changed, 313 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 1d971a8831..0c1fde07a2 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -681,7 +681,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, preamble_shift -= NCS; if (preamble_shift < 0) - preamble_shift+=N_ZC; + preamble_shift+=((N_ZC/NCS)*NCS); } } else { // This is the high-speed case new_dft = 0; diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.h b/openair1/PHY/NR_TRANSPORT/nr_prach.h index d158e04c79..d97689a5a6 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.h +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.h @@ -93,3 +93,288 @@ uint16_t prach_root_sequence_map_abc[138] = { 51, 88 , 52, 87 , 53, 86 , 54, 85 , 55, 84 , 56, 83 , 57, 82 , 58, 81 , 59, 80 , 60, 79 , 61, 78 , 62, 77 , 63, 76 , 64, 75 , 65, 74 , 66, 73 , 67, 72 , 68, 71 , 69, 70 }; + +int16_t prach_fft139_re[139][139] = { +{32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767}, +{32767, 32733, 32633, 32466, 32232, 31933, 31569, 31140, 30647, 30092, 29475, 28799, 28063, 27270, 26421, 25519, 24564, 23559, 22506, 21406, 20264, 19079, 17856, 16596, 15303, 13978, 12624, 11245, 9843, 8421, 6981, 5527, 4062, 2589, 1110, -371, -1851, -3327, -4797, -6257, -7704, -9135, -10548, -11939, -13305, -14645, -15955, -17232, -18473, -19677, -20841, -21963, -23039, -24068, -25049, -25978, -26853, -27675, -28439, -29146, -29792, -30378, -30902, -31363, -31760, -32092, -32358, -32558, -32692, -32759, -32759, -32692, -32558, -32358, -32092, -31760, -31363, -30902, -30378, -29792, -29146, -28439, -27675, -26853, -25978, -25049, -24068, -23039, -21963, -20841, -19677, -18473, -17232, -15955, -14645, -13305, -11939, -10548, -9135, -7704, -6257, -4797, -3327, -1851, -371, 1110, 2589, 4062, 5527, 6981, 8421, 9843, 11245, 12624, 13978, 15303, 16596, 17856, 19079, 20264, 21406, 22506, 23559, 24564, 25519, 26421, 27270, 28063, 28799, 29475, 30092, 30647, 31140, 31569, 31933, 32232, 32466, 32633, 32733}, +{32767, 32633, 32232, 31569, 30647, 29475, 28063, 26421, 24564, 22506, 20264, 17856, 15303, 12624, 9843, 6981, 4062, 1110, -1851, -4797, -7704, -10548, -13305, -15955, -18473, -20841, -23039, -25049, -26853, -28439, -29792, -30902, -31760, -32358, -32692, -32759, -32558, -32092, -31363, -30378, -29146, -27675, -25978, -24068, -21963, -19677, -17232, -14645, -11939, -9135, -6257, -3327, -371, 2589, 5527, 8421, 11245, 13978, 16596, 19079, 21406, 23559, 25519, 27270, 28799, 30092, 31140, 31933, 32466, 32733, 32733, 32466, 31933, 31140, 30092, 28799, 27270, 25519, 23559, 21406, 19079, 16596, 13978, 11245, 8421, 5527, 2589, -371, -3327, -6257, -9135, -11939, -14645, -17232, -19677, -21963, -24068, -25978, -27675, -29146, -30378, -31363, -32092, -32558, -32759, -32692, -32358, -31760, -30902, -29792, -28439, -26853, -25049, -23039, -20841, -18473, -15955, -13305, -10548, -7704, -4797, -1851, 1110, 4062, 6981, 9843, 12624, 15303, 17856, 20264, 22506, 24564, 26421, 28063, 29475, 30647, 31569, 32232, 32633}, +{32767, 32466, 31569, 30092, 28063, 25519, 22506, 19079, 15303, 11245, 6981, 2589, -1851, -6257, -10548, -14645, -18473, -21963, -25049, -27675, -29792, -31363, -32358, -32759, -32558, -31760, -30378, -28439, -25978, -23039, -19677, -15955, -11939, -7704, -3327, 1110, 5527, 9843, 13978, 17856, 21406, 24564, 27270, 29475, 31140, 32232, 32733, 32633, 31933, 30647, 28799, 26421, 23559, 20264, 16596, 12624, 8421, 4062, -371, -4797, -9135, -13305, -17232, -20841, -24068, -26853, -29146, -30902, -32092, -32692, -32692, -32092, -30902, -29146, -26853, -24068, -20841, -17232, -13305, -9135, -4797, -371, 4062, 8421, 12624, 16596, 20264, 23559, 26421, 28799, 30647, 31933, 32633, 32733, 32232, 31140, 29475, 27270, 24564, 21406, 17856, 13978, 9843, 5527, 1110, -3327, -7704, -11939, -15955, -19677, -23039, -25978, -28439, -30378, -31760, -32558, -32759, -32358, -31363, -29792, -27675, -25049, -21963, -18473, -14645, -10548, -6257, -1851, 2589, 6981, 11245, 15303, 19079, 22506, 25519, 28063, 30092, 31569, 32466}, +{32767, 32232, 30647, 28063, 24564, 20264, 15303, 9843, 4062, -1851, -7704, -13305, -18473, -23039, -26853, -29792, -31760, -32692, -32558, -31363, -29146, -25978, -21963, -17232, -11939, -6257, -371, 5527, 11245, 16596, 21406, 25519, 28799, 31140, 32466, 32733, 31933, 30092, 27270, 23559, 19079, 13978, 8421, 2589, -3327, -9135, -14645, -19677, -24068, -27675, -30378, -32092, -32759, -32358, -30902, -28439, -25049, -20841, -15955, -10548, -4797, 1110, 6981, 12624, 17856, 22506, 26421, 29475, 31569, 32633, 32633, 31569, 29475, 26421, 22506, 17856, 12624, 6981, 1110, -4797, -10548, -15955, -20841, -25049, -28439, -30902, -32358, -32759, -32092, -30378, -27675, -24068, -19677, -14645, -9135, -3327, 2589, 8421, 13978, 19079, 23559, 27270, 30092, 31933, 32733, 32466, 31140, 28799, 25519, 21406, 16596, 11245, 5527, -371, -6257, -11939, -17232, -21963, -25978, -29146, -31363, -32558, -32692, -31760, -29792, -26853, -23039, -18473, -13305, -7704, -1851, 4062, 9843, 15303, 20264, 24564, 28063, 30647, 32232}, +{32767, 31933, 29475, 25519, 20264, 13978, 6981, -371, -7704, -14645, -20841, -25978, -29792, -32092, -32759, -31760, -29146, -25049, -19677, -13305, -6257, 1110, 8421, 15303, 21406, 26421, 30092, 32232, 32733, 31569, 28799, 24564, 19079, 12624, 5527, -1851, -9135, -15955, -21963, -26853, -30378, -32358, -32692, -31363, -28439, -24068, -18473, -11939, -4797, 2589, 9843, 16596, 22506, 27270, 30647, 32466, 32633, 31140, 28063, 23559, 17856, 11245, 4062, -3327, -10548, -17232, -23039, -27675, -30902, -32558, -32558, -30902, -27675, -23039, -17232, -10548, -3327, 4062, 11245, 17856, 23559, 28063, 31140, 32633, 32466, 30647, 27270, 22506, 16596, 9843, 2589, -4797, -11939, -18473, -24068, -28439, -31363, -32692, -32358, -30378, -26853, -21963, -15955, -9135, -1851, 5527, 12624, 19079, 24564, 28799, 31569, 32733, 32232, 30092, 26421, 21406, 15303, 8421, 1110, -6257, -13305, -19677, -25049, -29146, -31760, -32759, -32092, -29792, -25978, -20841, -14645, -7704, -371, 6981, 13978, 20264, 25519, 29475, 31933}, +{32767, 31569, 28063, 22506, 15303, 6981, -1851, -10548, -18473, -25049, -29792, -32358, -32558, -30378, -25978, -19677, -11939, -3327, 5527, 13978, 21406, 27270, 31140, 32733, 31933, 28799, 23559, 16596, 8421, -371, -9135, -17232, -24068, -29146, -32092, -32692, -30902, -26853, -20841, -13305, -4797, 4062, 12624, 20264, 26421, 30647, 32633, 32232, 29475, 24564, 17856, 9843, 1110, -7704, -15955, -23039, -28439, -31760, -32759, -31363, -27675, -21963, -14645, -6257, 2589, 11245, 19079, 25519, 30092, 32466, 32466, 30092, 25519, 19079, 11245, 2589, -6257, -14645, -21963, -27675, -31363, -32759, -31760, -28439, -23039, -15955, -7704, 1110, 9843, 17856, 24564, 29475, 32232, 32633, 30647, 26421, 20264, 12624, 4062, -4797, -13305, -20841, -26853, -30902, -32692, -32092, -29146, -24068, -17232, -9135, -371, 8421, 16596, 23559, 28799, 31933, 32733, 31140, 27270, 21406, 13978, 5527, -3327, -11939, -19677, -25978, -30378, -32558, -32358, -29792, -25049, -18473, -10548, -1851, 6981, 15303, 22506, 28063, 31569}, +{32767, 31140, 26421, 19079, 9843, -371, -10548, -19677, -26853, -31363, -32759, -30902, -25978, -18473, -9135, 1110, 11245, 20264, 27270, 31569, 32733, 30647, 25519, 17856, 8421, -1851, -11939, -20841, -27675, -31760, -32692, -30378, -25049, -17232, -7704, 2589, 12624, 21406, 28063, 31933, 32633, 30092, 24564, 16596, 6981, -3327, -13305, -21963, -28439, -32092, -32558, -29792, -24068, -15955, -6257, 4062, 13978, 22506, 28799, 32232, 32466, 29475, 23559, 15303, 5527, -4797, -14645, -23039, -29146, -32358, -32358, -29146, -23039, -14645, -4797, 5527, 15303, 23559, 29475, 32466, 32232, 28799, 22506, 13978, 4062, -6257, -15955, -24068, -29792, -32558, -32092, -28439, -21963, -13305, -3327, 6981, 16596, 24564, 30092, 32633, 31933, 28063, 21406, 12624, 2589, -7704, -17232, -25049, -30378, -32692, -31760, -27675, -20841, -11939, -1851, 8421, 17856, 25519, 30647, 32733, 31569, 27270, 20264, 11245, 1110, -9135, -18473, -25978, -30902, -32759, -31363, -26853, -19677, -10548, -371, 9843, 19079, 26421, 31140}, +{32767, 30647, 24564, 15303, 4062, -7704, -18473, -26853, -31760, -32558, -29146, -21963, -11939, -371, 11245, 21406, 28799, 32466, 31933, 27270, 19079, 8421, -3327, -14645, -24068, -30378, -32759, -30902, -25049, -15955, -4797, 6981, 17856, 26421, 31569, 32633, 29475, 22506, 12624, 1110, -10548, -20841, -28439, -32358, -32092, -27675, -19677, -9135, 2589, 13978, 23559, 30092, 32733, 31140, 25519, 16596, 5527, -6257, -17232, -25978, -31363, -32692, -29792, -23039, -13305, -1851, 9843, 20264, 28063, 32232, 32232, 28063, 20264, 9843, -1851, -13305, -23039, -29792, -32692, -31363, -25978, -17232, -6257, 5527, 16596, 25519, 31140, 32733, 30092, 23559, 13978, 2589, -9135, -19677, -27675, -32092, -32358, -28439, -20841, -10548, 1110, 12624, 22506, 29475, 32633, 31569, 26421, 17856, 6981, -4797, -15955, -25049, -30902, -32759, -30378, -24068, -14645, -3327, 8421, 19079, 27270, 31933, 32466, 28799, 21406, 11245, -371, -11939, -21963, -29146, -32558, -31760, -26853, -18473, -7704, 4062, 15303, 24564, 30647}, +{32767, 30092, 22506, 11245, -1851, -14645, -25049, -31363, -32558, -28439, -19677, -7704, 5527, 17856, 27270, 32232, 31933, 26421, 16596, 4062, -9135, -20841, -29146, -32692, -30902, -24068, -13305, -371, 12624, 23559, 30647, 32733, 29475, 21406, 9843, -3327, -15955, -25978, -31760, -32358, -27675, -18473, -6257, 6981, 19079, 28063, 32466, 31569, 25519, 15303, 2589, -10548, -21963, -29792, -32759, -30378, -23039, -11939, 1110, 13978, 24564, 31140, 32633, 28799, 20264, 8421, -4797, -17232, -26853, -32092, -32092, -26853, -17232, -4797, 8421, 20264, 28799, 32633, 31140, 24564, 13978, 1110, -11939, -23039, -30378, -32759, -29792, -21963, -10548, 2589, 15303, 25519, 31569, 32466, 28063, 19079, 6981, -6257, -18473, -27675, -32358, -31760, -25978, -15955, -3327, 9843, 21406, 29475, 32733, 30647, 23559, 12624, -371, -13305, -24068, -30902, -32692, -29146, -20841, -9135, 4062, 16596, 26421, 31933, 32232, 27270, 17856, 5527, -7704, -19677, -28439, -32558, -31363, -25049, -14645, -1851, 11245, 22506, 30092}, +{32767, 29475, 20264, 6981, -7704, -20841, -29792, -32759, -29146, -19677, -6257, 8421, 21406, 30092, 32733, 28799, 19079, 5527, -9135, -21963, -30378, -32692, -28439, -18473, -4797, 9843, 22506, 30647, 32633, 28063, 17856, 4062, -10548, -23039, -30902, -32558, -27675, -17232, -3327, 11245, 23559, 31140, 32466, 27270, 16596, 2589, -11939, -24068, -31363, -32358, -26853, -15955, -1851, 12624, 24564, 31569, 32232, 26421, 15303, 1110, -13305, -25049, -31760, -32092, -25978, -14645, -371, 13978, 25519, 31933, 31933, 25519, 13978, -371, -14645, -25978, -32092, -31760, -25049, -13305, 1110, 15303, 26421, 32232, 31569, 24564, 12624, -1851, -15955, -26853, -32358, -31363, -24068, -11939, 2589, 16596, 27270, 32466, 31140, 23559, 11245, -3327, -17232, -27675, -32558, -30902, -23039, -10548, 4062, 17856, 28063, 32633, 30647, 22506, 9843, -4797, -18473, -28439, -32692, -30378, -21963, -9135, 5527, 19079, 28799, 32733, 30092, 21406, 8421, -6257, -19677, -29146, -32759, -29792, -20841, -7704, 6981, 20264, 29475}, +{32767, 28799, 17856, 2589, -13305, -25978, -32358, -30902, -21963, -7704, 8421, 22506, 31140, 32232, 25519, 12624, -3327, -18473, -29146, -32759, -28439, -17232, -1851, 13978, 26421, 32466, 30647, 21406, 6981, -9135, -23039, -31363, -32092, -25049, -11939, 4062, 19079, 29475, 32733, 28063, 16596, 1110, -14645, -26853, -32558, -30378, -20841, -6257, 9843, 23559, 31569, 31933, 24564, 11245, -4797, -19677, -29792, -32692, -27675, -15955, -371, 15303, 27270, 32633, 30092, 20264, 5527, -10548, -24068, -31760, -31760, -24068, -10548, 5527, 20264, 30092, 32633, 27270, 15303, -371, -15955, -27675, -32692, -29792, -19677, -4797, 11245, 24564, 31933, 31569, 23559, 9843, -6257, -20841, -30378, -32558, -26853, -14645, 1110, 16596, 28063, 32733, 29475, 19079, 4062, -11939, -25049, -32092, -31363, -23039, -9135, 6981, 21406, 30647, 32466, 26421, 13978, -1851, -17232, -28439, -32759, -29146, -18473, -3327, 12624, 25519, 32232, 31140, 22506, 8421, -7704, -21963, -30902, -32358, -25978, -13305, 2589, 17856, 28799}, +{32767, 28063, 15303, -1851, -18473, -29792, -32558, -25978, -11939, 5527, 21406, 31140, 31933, 23559, 8421, -9135, -24068, -32092, -30902, -20841, -4797, 12624, 26421, 32633, 29475, 17856, 1110, -15955, -28439, -32759, -27675, -14645, 2589, 19079, 30092, 32466, 25519, 11245, -6257, -21963, -31363, -31760, -23039, -7704, 9843, 24564, 32232, 30647, 20264, 4062, -13305, -26853, -32692, -29146, -17232, -371, 16596, 28799, 32733, 27270, 13978, -3327, -19677, -30378, -32358, -25049, -10548, 6981, 22506, 31569, 31569, 22506, 6981, -10548, -25049, -32358, -30378, -19677, -3327, 13978, 27270, 32733, 28799, 16596, -371, -17232, -29146, -32692, -26853, -13305, 4062, 20264, 30647, 32232, 24564, 9843, -7704, -23039, -31760, -31363, -21963, -6257, 11245, 25519, 32466, 30092, 19079, 2589, -14645, -27675, -32759, -28439, -15955, 1110, 17856, 29475, 32633, 26421, 12624, -4797, -20841, -30902, -32092, -24068, -9135, 8421, 23559, 31933, 31140, 21406, 5527, -11939, -25978, -32558, -29792, -18473, -1851, 15303, 28063}, +{32767, 27270, 12624, -6257, -23039, -32092, -30378, -18473, -371, 17856, 30092, 32232, 23559, 6981, -11939, -26853, -32759, -27675, -13305, 5527, 22506, 31933, 30647, 19079, 1110, -17232, -29792, -32358, -24068, -7704, 11245, 26421, 32733, 28063, 13978, -4797, -21963, -31760, -30902, -19677, -1851, 16596, 29475, 32466, 24564, 8421, -10548, -25978, -32692, -28439, -14645, 4062, 21406, 31569, 31140, 20264, 2589, -15955, -29146, -32558, -25049, -9135, 9843, 25519, 32633, 28799, 15303, -3327, -20841, -31363, -31363, -20841, -3327, 15303, 28799, 32633, 25519, 9843, -9135, -25049, -32558, -29146, -15955, 2589, 20264, 31140, 31569, 21406, 4062, -14645, -28439, -32692, -25978, -10548, 8421, 24564, 32466, 29475, 16596, -1851, -19677, -30902, -31760, -21963, -4797, 13978, 28063, 32733, 26421, 11245, -7704, -24068, -32358, -29792, -17232, 1110, 19079, 30647, 31933, 22506, 5527, -13305, -27675, -32759, -26853, -11939, 6981, 23559, 32232, 30092, 17856, -371, -18473, -30378, -32092, -23039, -6257, 12624, 27270}, +{32767, 26421, 9843, -10548, -26853, -32759, -25978, -9135, 11245, 27270, 32733, 25519, 8421, -11939, -27675, -32692, -25049, -7704, 12624, 28063, 32633, 24564, 6981, -13305, -28439, -32558, -24068, -6257, 13978, 28799, 32466, 23559, 5527, -14645, -29146, -32358, -23039, -4797, 15303, 29475, 32232, 22506, 4062, -15955, -29792, -32092, -21963, -3327, 16596, 30092, 31933, 21406, 2589, -17232, -30378, -31760, -20841, -1851, 17856, 30647, 31569, 20264, 1110, -18473, -30902, -31363, -19677, -371, 19079, 31140, 31140, 19079, -371, -19677, -31363, -30902, -18473, 1110, 20264, 31569, 30647, 17856, -1851, -20841, -31760, -30378, -17232, 2589, 21406, 31933, 30092, 16596, -3327, -21963, -32092, -29792, -15955, 4062, 22506, 32232, 29475, 15303, -4797, -23039, -32358, -29146, -14645, 5527, 23559, 32466, 28799, 13978, -6257, -24068, -32558, -28439, -13305, 6981, 24564, 32633, 28063, 12624, -7704, -25049, -32692, -27675, -11939, 8421, 25519, 32733, 27270, 11245, -9135, -25978, -32759, -26853, -10548, 9843, 26421}, +{32767, 25519, 6981, -14645, -29792, -31760, -19677, 1110, 21406, 32232, 28799, 12624, -9135, -26853, -32692, -24068, -4797, 16596, 30647, 31140, 17856, -3327, -23039, -32558, -27675, -10548, 11245, 28063, 32466, 22506, 2589, -18473, -31363, -30378, -15955, 5527, 24564, 32733, 26421, 8421, -13305, -29146, -32092, -20841, -371, 20264, 31933, 29475, 13978, -7704, -25978, -32759, -25049, -6257, 15303, 30092, 31569, 19079, -1851, -21963, -32358, -28439, -11939, 9843, 27270, 32633, 23559, 4062, -17232, -30902, -30902, -17232, 4062, 23559, 32633, 27270, 9843, -11939, -28439, -32358, -21963, -1851, 19079, 31569, 30092, 15303, -6257, -25049, -32759, -25978, -7704, 13978, 29475, 31933, 20264, -371, -20841, -32092, -29146, -13305, 8421, 26421, 32733, 24564, 5527, -15955, -30378, -31363, -18473, 2589, 22506, 32466, 28063, 11245, -10548, -27675, -32558, -23039, -3327, 17856, 31140, 30647, 16596, -4797, -24068, -32692, -26853, -9135, 12624, 28799, 32232, 21406, 1110, -19677, -31760, -29792, -14645, 6981, 25519}, +{32767, 24564, 4062, -18473, -31760, -29146, -11939, 11245, 28799, 31933, 19079, -3327, -24068, -32759, -25049, -4797, 17856, 31569, 29475, 12624, -10548, -28439, -32092, -19677, 2589, 23559, 32733, 25519, 5527, -17232, -31363, -29792, -13305, 9843, 28063, 32232, 20264, -1851, -23039, -32692, -25978, -6257, 16596, 31140, 30092, 13978, -9135, -27675, -32358, -20841, 1110, 22506, 32633, 26421, 6981, -15955, -30902, -30378, -14645, 8421, 27270, 32466, 21406, -371, -21963, -32558, -26853, -7704, 15303, 30647, 30647, 15303, -7704, -26853, -32558, -21963, -371, 21406, 32466, 27270, 8421, -14645, -30378, -30902, -15955, 6981, 26421, 32633, 22506, 1110, -20841, -32358, -27675, -9135, 13978, 30092, 31140, 16596, -6257, -25978, -32692, -23039, -1851, 20264, 32232, 28063, 9843, -13305, -29792, -31363, -17232, 5527, 25519, 32733, 23559, 2589, -19677, -32092, -28439, -10548, 12624, 29475, 31569, 17856, -4797, -25049, -32759, -24068, -3327, 19079, 31933, 28799, 11245, -11939, -29146, -31760, -18473, 4062, 24564}, +{32767, 23559, 1110, -21963, -32692, -25049, -3327, 20264, 32466, 26421, 5527, -18473, -32092, -27675, -7704, 16596, 31569, 28799, 9843, -14645, -30902, -29792, -11939, 12624, 30092, 30647, 13978, -10548, -29146, -31363, -15955, 8421, 28063, 31933, 17856, -6257, -26853, -32358, -19677, 4062, 25519, 32633, 21406, -1851, -24068, -32759, -23039, -371, 22506, 32733, 24564, 2589, -20841, -32558, -25978, -4797, 19079, 32232, 27270, 6981, -17232, -31760, -28439, -9135, 15303, 31140, 29475, 11245, -13305, -30378, -30378, -13305, 11245, 29475, 31140, 15303, -9135, -28439, -31760, -17232, 6981, 27270, 32232, 19079, -4797, -25978, -32558, -20841, 2589, 24564, 32733, 22506, -371, -23039, -32759, -24068, -1851, 21406, 32633, 25519, 4062, -19677, -32358, -26853, -6257, 17856, 31933, 28063, 8421, -15955, -31363, -29146, -10548, 13978, 30647, 30092, 12624, -11939, -29792, -30902, -14645, 9843, 28799, 31569, 16596, -7704, -27675, -32092, -18473, 5527, 26421, 32466, 20264, -3327, -25049, -32692, -21963, 1110, 23559}, +{32767, 22506, -1851, -25049, -32558, -19677, 5527, 27270, 31933, 16596, -9135, -29146, -30902, -13305, 12624, 30647, 29475, 9843, -15955, -31760, -27675, -6257, 19079, 32466, 25519, 2589, -21963, -32759, -23039, 1110, 24564, 32633, 20264, -4797, -26853, -32092, -17232, 8421, 28799, 31140, 13978, -11939, -30378, -29792, -10548, 15303, 31569, 28063, 6981, -18473, -32358, -25978, -3327, 21406, 32733, 23559, -371, -24068, -32692, -20841, 4062, 26421, 32232, 17856, -7704, -28439, -31363, -14645, 11245, 30092, 30092, 11245, -14645, -31363, -28439, -7704, 17856, 32232, 26421, 4062, -20841, -32692, -24068, -371, 23559, 32733, 21406, -3327, -25978, -32358, -18473, 6981, 28063, 31569, 15303, -10548, -29792, -30378, -11939, 13978, 31140, 28799, 8421, -17232, -32092, -26853, -4797, 20264, 32633, 24564, 1110, -23039, -32759, -21963, 2589, 25519, 32466, 19079, -6257, -27675, -31760, -15955, 9843, 29475, 30647, 12624, -13305, -30902, -29146, -9135, 16596, 31933, 27270, 5527, -19677, -32558, -25049, -1851, 22506}, +{32767, 21406, -4797, -27675, -31363, -13305, 13978, 31569, 27270, 4062, -21963, -32759, -20841, 5527, 28063, 31140, 12624, -14645, -31760, -26853, -3327, 22506, 32733, 20264, -6257, -28439, -30902, -11939, 15303, 31933, 26421, 2589, -23039, -32692, -19677, 6981, 28799, 30647, 11245, -15955, -32092, -25978, -1851, 23559, 32633, 19079, -7704, -29146, -30378, -10548, 16596, 32232, 25519, 1110, -24068, -32558, -18473, 8421, 29475, 30092, 9843, -17232, -32358, -25049, -371, 24564, 32466, 17856, -9135, -29792, -29792, -9135, 17856, 32466, 24564, -371, -25049, -32358, -17232, 9843, 30092, 29475, 8421, -18473, -32558, -24068, 1110, 25519, 32232, 16596, -10548, -30378, -29146, -7704, 19079, 32633, 23559, -1851, -25978, -32092, -15955, 11245, 30647, 28799, 6981, -19677, -32692, -23039, 2589, 26421, 31933, 15303, -11939, -30902, -28439, -6257, 20264, 32733, 22506, -3327, -26853, -31760, -14645, 12624, 31140, 28063, 5527, -20841, -32759, -21963, 4062, 27270, 31569, 13978, -13305, -31363, -27675, -4797, 21406}, +{32767, 20264, -7704, -29792, -29146, -6257, 21406, 32733, 19079, -9135, -30378, -28439, -4797, 22506, 32633, 17856, -10548, -30902, -27675, -3327, 23559, 32466, 16596, -11939, -31363, -26853, -1851, 24564, 32232, 15303, -13305, -31760, -25978, -371, 25519, 31933, 13978, -14645, -32092, -25049, 1110, 26421, 31569, 12624, -15955, -32358, -24068, 2589, 27270, 31140, 11245, -17232, -32558, -23039, 4062, 28063, 30647, 9843, -18473, -32692, -21963, 5527, 28799, 30092, 8421, -19677, -32759, -20841, 6981, 29475, 29475, 6981, -20841, -32759, -19677, 8421, 30092, 28799, 5527, -21963, -32692, -18473, 9843, 30647, 28063, 4062, -23039, -32558, -17232, 11245, 31140, 27270, 2589, -24068, -32358, -15955, 12624, 31569, 26421, 1110, -25049, -32092, -14645, 13978, 31933, 25519, -371, -25978, -31760, -13305, 15303, 32232, 24564, -1851, -26853, -31363, -11939, 16596, 32466, 23559, -3327, -27675, -30902, -10548, 17856, 32633, 22506, -4797, -28439, -30378, -9135, 19079, 32733, 21406, -6257, -29146, -29792, -7704, 20264}, +{32767, 19079, -10548, -31363, -25978, 1110, 27270, 30647, 8421, -20841, -32692, -17232, 12624, 31933, 24564, -3327, -28439, -29792, -6257, 22506, 32466, 15303, -14645, -32358, -23039, 5527, 29475, 28799, 4062, -24068, -32092, -13305, 16596, 32633, 21406, -7704, -30378, -27675, -1851, 25519, 31569, 11245, -18473, -32759, -19677, 9843, 31140, 26421, -371, -26853, -30902, -9135, 20264, 32733, 17856, -11939, -31760, -25049, 2589, 28063, 30092, 6981, -21963, -32558, -15955, 13978, 32232, 23559, -4797, -29146, -29146, -4797, 23559, 32232, 13978, -15955, -32558, -21963, 6981, 30092, 28063, 2589, -25049, -31760, -11939, 17856, 32733, 20264, -9135, -30902, -26853, -371, 26421, 31140, 9843, -19677, -32759, -18473, 11245, 31569, 25519, -1851, -27675, -30378, -7704, 21406, 32633, 16596, -13305, -32092, -24068, 4062, 28799, 29475, 5527, -23039, -32358, -14645, 15303, 32466, 22506, -6257, -29792, -28439, -3327, 24564, 31933, 12624, -17232, -32692, -20841, 8421, 30647, 27270, 1110, -25978, -31363, -10548, 19079}, +{32767, 17856, -13305, -32358, -21963, 8421, 31140, 25519, -3327, -29146, -28439, -1851, 26421, 30647, 6981, -23039, -32092, -11939, 19079, 32733, 16596, -14645, -32558, -20841, 9843, 31569, 24564, -4797, -29792, -27675, -371, 27270, 30092, 5527, -24068, -31760, -10548, 20264, 32633, 15303, -15955, -32692, -19677, 11245, 31933, 23559, -6257, -30378, -26853, 1110, 28063, 29475, 4062, -25049, -31363, -9135, 21406, 32466, 13978, -17232, -32759, -18473, 12624, 32232, 22506, -7704, -30902, -25978, 2589, 28799, 28799, 2589, -25978, -30902, -7704, 22506, 32232, 12624, -18473, -32759, -17232, 13978, 32466, 21406, -9135, -31363, -25049, 4062, 29475, 28063, 1110, -26853, -30378, -6257, 23559, 31933, 11245, -19677, -32692, -15955, 15303, 32633, 20264, -10548, -31760, -24068, 5527, 30092, 27270, -371, -27675, -29792, -4797, 24564, 31569, 9843, -20841, -32558, -14645, 16596, 32733, 19079, -11939, -32092, -23039, 6981, 30647, 26421, -1851, -28439, -29146, -3327, 25519, 31140, 8421, -21963, -32358, -13305, 17856}, +{32767, 16596, -15955, -32759, -17232, 15303, 32733, 17856, -14645, -32692, -18473, 13978, 32633, 19079, -13305, -32558, -19677, 12624, 32466, 20264, -11939, -32358, -20841, 11245, 32232, 21406, -10548, -32092, -21963, 9843, 31933, 22506, -9135, -31760, -23039, 8421, 31569, 23559, -7704, -31363, -24068, 6981, 31140, 24564, -6257, -30902, -25049, 5527, 30647, 25519, -4797, -30378, -25978, 4062, 30092, 26421, -3327, -29792, -26853, 2589, 29475, 27270, -1851, -29146, -27675, 1110, 28799, 28063, -371, -28439, -28439, -371, 28063, 28799, 1110, -27675, -29146, -1851, 27270, 29475, 2589, -26853, -29792, -3327, 26421, 30092, 4062, -25978, -30378, -4797, 25519, 30647, 5527, -25049, -30902, -6257, 24564, 31140, 6981, -24068, -31363, -7704, 23559, 31569, 8421, -23039, -31760, -9135, 22506, 31933, 9843, -21963, -32092, -10548, 21406, 32232, 11245, -20841, -32358, -11939, 20264, 32466, 12624, -19677, -32558, -13305, 19079, 32633, 13978, -18473, -32692, -14645, 17856, 32733, 15303, -17232, -32759, -15955, 16596}, +{32767, 15303, -18473, -32558, -11939, 21406, 31933, 8421, -24068, -30902, -4797, 26421, 29475, 1110, -28439, -27675, 2589, 30092, 25519, -6257, -31363, -23039, 9843, 32232, 20264, -13305, -32692, -17232, 16596, 32733, 13978, -19677, -32358, -10548, 22506, 31569, 6981, -25049, -30378, -3327, 27270, 28799, -371, -29146, -26853, 4062, 30647, 24564, -7704, -31760, -21963, 11245, 32466, 19079, -14645, -32759, -15955, 17856, 32633, 12624, -20841, -32092, -9135, 23559, 31140, 5527, -25978, -29792, -1851, 28063, 28063, -1851, -29792, -25978, 5527, 31140, 23559, -9135, -32092, -20841, 12624, 32633, 17856, -15955, -32759, -14645, 19079, 32466, 11245, -21963, -31760, -7704, 24564, 30647, 4062, -26853, -29146, -371, 28799, 27270, -3327, -30378, -25049, 6981, 31569, 22506, -10548, -32358, -19677, 13978, 32733, 16596, -17232, -32692, -13305, 20264, 32232, 9843, -23039, -31363, -6257, 25519, 30092, 2589, -27675, -28439, 1110, 29475, 26421, -4797, -30902, -24068, 8421, 31933, 21406, -11939, -32558, -18473, 15303}, +{32767, 13978, -20841, -31760, -6257, 26421, 28799, -1851, -30378, -24068, 9843, 32466, 17856, -17232, -32558, -10548, 23559, 30647, 2589, -28439, -26853, 5527, 31569, 21406, -13305, -32759, -14645, 20264, 31933, 6981, -25978, -29146, 1110, 30092, 24564, -9135, -32358, -18473, 16596, 32633, 11245, -23039, -30902, -3327, 28063, 27270, -4797, -31363, -21963, 12624, 32733, 15303, -19677, -32092, -7704, 25519, 29475, -371, -29792, -25049, 8421, 32232, 19079, -15955, -32692, -11939, 22506, 31140, 4062, -27675, -27675, 4062, 31140, 22506, -11939, -32692, -15955, 19079, 32232, 8421, -25049, -29792, -371, 29475, 25519, -7704, -32092, -19677, 15303, 32733, 12624, -21963, -31363, -4797, 27270, 28063, -3327, -30902, -23039, 11245, 32633, 16596, -18473, -32358, -9135, 24564, 30092, 1110, -29146, -25978, 6981, 31933, 20264, -14645, -32759, -13305, 21406, 31569, 5527, -26853, -28439, 2589, 30647, 23559, -10548, -32558, -17232, 17856, 32466, 9843, -24068, -30378, -1851, 28799, 26421, -6257, -31760, -20841, 13978}, +{32767, 12624, -23039, -30378, -371, 30092, 23559, -11939, -32759, -13305, 22506, 30647, 1110, -29792, -24068, 11245, 32733, 13978, -21963, -30902, -1851, 29475, 24564, -10548, -32692, -14645, 21406, 31140, 2589, -29146, -25049, 9843, 32633, 15303, -20841, -31363, -3327, 28799, 25519, -9135, -32558, -15955, 20264, 31569, 4062, -28439, -25978, 8421, 32466, 16596, -19677, -31760, -4797, 28063, 26421, -7704, -32358, -17232, 19079, 31933, 5527, -27675, -26853, 6981, 32232, 17856, -18473, -32092, -6257, 27270, 27270, -6257, -32092, -18473, 17856, 32232, 6981, -26853, -27675, 5527, 31933, 19079, -17232, -32358, -7704, 26421, 28063, -4797, -31760, -19677, 16596, 32466, 8421, -25978, -28439, 4062, 31569, 20264, -15955, -32558, -9135, 25519, 28799, -3327, -31363, -20841, 15303, 32633, 9843, -25049, -29146, 2589, 31140, 21406, -14645, -32692, -10548, 24564, 29475, -1851, -30902, -21963, 13978, 32733, 11245, -24068, -29792, 1110, 30647, 22506, -13305, -32759, -11939, 23559, 30092, -371, -30378, -23039, 12624}, +{32767, 11245, -25049, -28439, 5527, 32232, 16596, -20841, -30902, -371, 30647, 21406, -15955, -32358, -6257, 28063, 25519, -10548, -32759, -11939, 24564, 28799, -4797, -32092, -17232, 20264, 31140, 1110, -30378, -21963, 15303, 32466, 6981, -27675, -25978, 9843, 32733, 12624, -24068, -29146, 4062, 31933, 17856, -19677, -31363, -1851, 30092, 22506, -14645, -32558, -7704, 27270, 26421, -9135, -32692, -13305, 23559, 29475, -3327, -31760, -18473, 19079, 31569, 2589, -29792, -23039, 13978, 32633, 8421, -26853, -26853, 8421, 32633, 13978, -23039, -29792, 2589, 31569, 19079, -18473, -31760, -3327, 29475, 23559, -13305, -32692, -9135, 26421, 27270, -7704, -32558, -14645, 22506, 30092, -1851, -31363, -19677, 17856, 31933, 4062, -29146, -24068, 12624, 32733, 9843, -25978, -27675, 6981, 32466, 15303, -21963, -30378, 1110, 31140, 20264, -17232, -32092, -4797, 28799, 24564, -11939, -32759, -10548, 25519, 28063, -6257, -32358, -15955, 21406, 30647, -371, -30902, -20841, 16596, 32232, 5527, -28439, -25049, 11245}, +{32767, 9843, -26853, -25978, 11245, 32733, 8421, -27675, -25049, 12624, 32633, 6981, -28439, -24068, 13978, 32466, 5527, -29146, -23039, 15303, 32232, 4062, -29792, -21963, 16596, 31933, 2589, -30378, -20841, 17856, 31569, 1110, -30902, -19677, 19079, 31140, -371, -31363, -18473, 20264, 30647, -1851, -31760, -17232, 21406, 30092, -3327, -32092, -15955, 22506, 29475, -4797, -32358, -14645, 23559, 28799, -6257, -32558, -13305, 24564, 28063, -7704, -32692, -11939, 25519, 27270, -9135, -32759, -10548, 26421, 26421, -10548, -32759, -9135, 27270, 25519, -11939, -32692, -7704, 28063, 24564, -13305, -32558, -6257, 28799, 23559, -14645, -32358, -4797, 29475, 22506, -15955, -32092, -3327, 30092, 21406, -17232, -31760, -1851, 30647, 20264, -18473, -31363, -371, 31140, 19079, -19677, -30902, 1110, 31569, 17856, -20841, -30378, 2589, 31933, 16596, -21963, -29792, 4062, 32232, 15303, -23039, -29146, 5527, 32466, 13978, -24068, -28439, 6981, 32633, 12624, -25049, -27675, 8421, 32733, 11245, -25978, -26853, 9843}, +{32767, 8421, -28439, -23039, 16596, 31569, -371, -31760, -15955, 23559, 28063, -9135, -32759, -7704, 28799, 22506, -17232, -31363, 1110, 31933, 15303, -24068, -27675, 9843, 32733, 6981, -29146, -21963, 17856, 31140, -1851, -32092, -14645, 24564, 27270, -10548, -32692, -6257, 29475, 21406, -18473, -30902, 2589, 32232, 13978, -25049, -26853, 11245, 32633, 5527, -29792, -20841, 19079, 30647, -3327, -32358, -13305, 25519, 26421, -11939, -32558, -4797, 30092, 20264, -19677, -30378, 4062, 32466, 12624, -25978, -25978, 12624, 32466, 4062, -30378, -19677, 20264, 30092, -4797, -32558, -11939, 26421, 25519, -13305, -32358, -3327, 30647, 19079, -20841, -29792, 5527, 32633, 11245, -26853, -25049, 13978, 32232, 2589, -30902, -18473, 21406, 29475, -6257, -32692, -10548, 27270, 24564, -14645, -32092, -1851, 31140, 17856, -21963, -29146, 6981, 32733, 9843, -27675, -24068, 15303, 31933, 1110, -31363, -17232, 22506, 28799, -7704, -32759, -9135, 28063, 23559, -15955, -31760, -371, 31569, 16596, -23039, -28439, 8421}, +{32767, 6981, -29792, -19677, 21406, 28799, -9135, -32692, -4797, 30647, 17856, -23039, -27675, 11245, 32466, 2589, -31363, -15955, 24564, 26421, -13305, -32092, -371, 31933, 13978, -25978, -25049, 15303, 31569, -1851, -32358, -11939, 27270, 23559, -17232, -30902, 4062, 32633, 9843, -28439, -21963, 19079, 30092, -6257, -32759, -7704, 29475, 20264, -20841, -29146, 8421, 32733, 5527, -30378, -18473, 22506, 28063, -10548, -32558, -3327, 31140, 16596, -24068, -26853, 12624, 32232, 1110, -31760, -14645, 25519, 25519, -14645, -31760, 1110, 32232, 12624, -26853, -24068, 16596, 31140, -3327, -32558, -10548, 28063, 22506, -18473, -30378, 5527, 32733, 8421, -29146, -20841, 20264, 29475, -7704, -32759, -6257, 30092, 19079, -21963, -28439, 9843, 32633, 4062, -30902, -17232, 23559, 27270, -11939, -32358, -1851, 31569, 15303, -25049, -25978, 13978, 31933, -371, -32092, -13305, 26421, 24564, -15955, -31363, 2589, 32466, 11245, -27675, -23039, 17856, 30647, -4797, -32692, -9135, 28799, 21406, -19677, -29792, 6981}, +{32767, 5527, -30902, -15955, 25519, 24564, -17232, -30378, 6981, 32733, 4062, -31363, -14645, 26421, 23559, -18473, -29792, 8421, 32633, 2589, -31760, -13305, 27270, 22506, -19677, -29146, 9843, 32466, 1110, -32092, -11939, 28063, 21406, -20841, -28439, 11245, 32232, -371, -32358, -10548, 28799, 20264, -21963, -27675, 12624, 31933, -1851, -32558, -9135, 29475, 19079, -23039, -26853, 13978, 31569, -3327, -32692, -7704, 30092, 17856, -24068, -25978, 15303, 31140, -4797, -32759, -6257, 30647, 16596, -25049, -25049, 16596, 30647, -6257, -32759, -4797, 31140, 15303, -25978, -24068, 17856, 30092, -7704, -32692, -3327, 31569, 13978, -26853, -23039, 19079, 29475, -9135, -32558, -1851, 31933, 12624, -27675, -21963, 20264, 28799, -10548, -32358, -371, 32232, 11245, -28439, -20841, 21406, 28063, -11939, -32092, 1110, 32466, 9843, -29146, -19677, 22506, 27270, -13305, -31760, 2589, 32633, 8421, -29792, -18473, 23559, 26421, -14645, -31363, 4062, 32733, 6981, -30378, -17232, 24564, 25519, -15955, -30902, 5527}, +{32767, 4062, -31760, -11939, 28799, 19079, -24068, -25049, 17856, 29475, -10548, -32092, 2589, 32733, 5527, -31363, -13305, 28063, 20264, -23039, -25978, 16596, 30092, -9135, -32358, 1110, 32633, 6981, -30902, -14645, 27270, 21406, -21963, -26853, 15303, 30647, -7704, -32558, -371, 32466, 8421, -30378, -15955, 26421, 22506, -20841, -27675, 13978, 31140, -6257, -32692, -1851, 32232, 9843, -29792, -17232, 25519, 23559, -19677, -28439, 12624, 31569, -4797, -32759, -3327, 31933, 11245, -29146, -18473, 24564, 24564, -18473, -29146, 11245, 31933, -3327, -32759, -4797, 31569, 12624, -28439, -19677, 23559, 25519, -17232, -29792, 9843, 32232, -1851, -32692, -6257, 31140, 13978, -27675, -20841, 22506, 26421, -15955, -30378, 8421, 32466, -371, -32558, -7704, 30647, 15303, -26853, -21963, 21406, 27270, -14645, -30902, 6981, 32633, 1110, -32358, -9135, 30092, 16596, -25978, -23039, 20264, 28063, -13305, -31363, 5527, 32733, 2589, -32092, -10548, 29475, 17856, -25049, -24068, 19079, 28799, -11939, -31760, 4062}, +{32767, 2589, -32358, -7704, 31140, 12624, -29146, -17232, 26421, 21406, -23039, -25049, 19079, 28063, -14645, -30378, 9843, 31933, -4797, -32692, -371, 32633, 5527, -31760, -10548, 30092, 15303, -27675, -19677, 24564, 23559, -20841, -26853, 16596, 29475, -11939, -31363, 6981, 32466, -1851, -32759, -3327, 32232, 8421, -30902, -13305, 28799, 17856, -25978, -21963, 22506, 25519, -18473, -28439, 13978, 30647, -9135, -32092, 4062, 32733, 1110, -32558, -6257, 31569, 11245, -29792, -15955, 27270, 20264, -24068, -24068, 20264, 27270, -15955, -29792, 11245, 31569, -6257, -32558, 1110, 32733, 4062, -32092, -9135, 30647, 13978, -28439, -18473, 25519, 22506, -21963, -25978, 17856, 28799, -13305, -30902, 8421, 32232, -3327, -32759, -1851, 32466, 6981, -31363, -11939, 29475, 16596, -26853, -20841, 23559, 24564, -19677, -27675, 15303, 30092, -10548, -31760, 5527, 32633, -371, -32692, -4797, 31933, 9843, -30378, -14645, 28063, 19079, -25049, -23039, 21406, 26421, -17232, -29146, 12624, 31140, -7704, -32358, 2589}, +{32767, 1110, -32692, -3327, 32466, 5527, -32092, -7704, 31569, 9843, -30902, -11939, 30092, 13978, -29146, -15955, 28063, 17856, -26853, -19677, 25519, 21406, -24068, -23039, 22506, 24564, -20841, -25978, 19079, 27270, -17232, -28439, 15303, 29475, -13305, -30378, 11245, 31140, -9135, -31760, 6981, 32232, -4797, -32558, 2589, 32733, -371, -32759, -1851, 32633, 4062, -32358, -6257, 31933, 8421, -31363, -10548, 30647, 12624, -29792, -14645, 28799, 16596, -27675, -18473, 26421, 20264, -25049, -21963, 23559, 23559, -21963, -25049, 20264, 26421, -18473, -27675, 16596, 28799, -14645, -29792, 12624, 30647, -10548, -31363, 8421, 31933, -6257, -32358, 4062, 32633, -1851, -32759, -371, 32733, 2589, -32558, -4797, 32232, 6981, -31760, -9135, 31140, 11245, -30378, -13305, 29475, 15303, -28439, -17232, 27270, 19079, -25978, -20841, 24564, 22506, -23039, -24068, 21406, 25519, -19677, -26853, 17856, 28063, -15955, -29146, 13978, 30092, -11939, -30902, 9843, 31569, -7704, -32092, 5527, 32466, -3327, -32692, 1110}, +{32767, -371, -32759, 1110, 32733, -1851, -32692, 2589, 32633, -3327, -32558, 4062, 32466, -4797, -32358, 5527, 32232, -6257, -32092, 6981, 31933, -7704, -31760, 8421, 31569, -9135, -31363, 9843, 31140, -10548, -30902, 11245, 30647, -11939, -30378, 12624, 30092, -13305, -29792, 13978, 29475, -14645, -29146, 15303, 28799, -15955, -28439, 16596, 28063, -17232, -27675, 17856, 27270, -18473, -26853, 19079, 26421, -19677, -25978, 20264, 25519, -20841, -25049, 21406, 24564, -21963, -24068, 22506, 23559, -23039, -23039, 23559, 22506, -24068, -21963, 24564, 21406, -25049, -20841, 25519, 20264, -25978, -19677, 26421, 19079, -26853, -18473, 27270, 17856, -27675, -17232, 28063, 16596, -28439, -15955, 28799, 15303, -29146, -14645, 29475, 13978, -29792, -13305, 30092, 12624, -30378, -11939, 30647, 11245, -30902, -10548, 31140, 9843, -31363, -9135, 31569, 8421, -31760, -7704, 31933, 6981, -32092, -6257, 32232, 5527, -32358, -4797, 32466, 4062, -32558, -3327, 32633, 2589, -32692, -1851, 32733, 1110, -32759, -371}, +{32767, -1851, -32558, 5527, 31933, -9135, -30902, 12624, 29475, -15955, -27675, 19079, 25519, -21963, -23039, 24564, 20264, -26853, -17232, 28799, 13978, -30378, -10548, 31569, 6981, -32358, -3327, 32733, -371, -32692, 4062, 32232, -7704, -31363, 11245, 30092, -14645, -28439, 17856, 26421, -20841, -24068, 23559, 21406, -25978, -18473, 28063, 15303, -29792, -11939, 31140, 8421, -32092, -4797, 32633, 1110, -32759, 2589, 32466, -6257, -31760, 9843, 30647, -13305, -29146, 16596, 27270, -19677, -25049, 22506, 22506, -25049, -19677, 27270, 16596, -29146, -13305, 30647, 9843, -31760, -6257, 32466, 2589, -32759, 1110, 32633, -4797, -32092, 8421, 31140, -11939, -29792, 15303, 28063, -18473, -25978, 21406, 23559, -24068, -20841, 26421, 17856, -28439, -14645, 30092, 11245, -31363, -7704, 32232, 4062, -32692, -371, 32733, -3327, -32358, 6981, 31569, -10548, -30378, 13978, 28799, -17232, -26853, 20264, 24564, -23039, -21963, 25519, 19079, -27675, -15955, 29475, 12624, -30902, -9135, 31933, 5527, -32558, -1851}, +{32767, -3327, -32092, 9843, 30092, -15955, -26853, 21406, 22506, -25978, -17232, 29475, 11245, -31760, -4797, 32733, -1851, -32358, 8421, 30647, -14645, -27675, 20264, 23559, -25049, -18473, 28799, 12624, -31363, -6257, 32633, -371, -32558, 6981, 31140, -13305, -28439, 19079, 24564, -24068, -19677, 28063, 13978, -30902, -7704, 32466, 1110, -32692, 5527, 31569, -11939, -29146, 17856, 25519, -23039, -20841, 27270, 15303, -30378, -9135, 32232, 2589, -32759, 4062, 31933, -10548, -29792, 16596, 26421, -21963, -21963, 26421, 16596, -29792, -10548, 31933, 4062, -32759, 2589, 32232, -9135, -30378, 15303, 27270, -20841, -23039, 25519, 17856, -29146, -11939, 31569, 5527, -32692, 1110, 32466, -7704, -30902, 13978, 28063, -19677, -24068, 24564, 19079, -28439, -13305, 31140, 6981, -32558, -371, 32633, -6257, -31363, 12624, 28799, -18473, -25049, 23559, 20264, -27675, -14645, 30647, 8421, -32358, -1851, 32733, -4797, -31760, 11245, 29475, -17232, -25978, 22506, 21406, -26853, -15955, 30092, 9843, -32092, -3327}, +{32767, -4797, -31363, 13978, 27270, -21963, -20841, 28063, 12624, -31760, -3327, 32733, -6257, -30902, 15303, 26421, -23039, -19677, 28799, 11245, -32092, -1851, 32633, -7704, -30378, 16596, 25519, -24068, -18473, 29475, 9843, -32358, -371, 32466, -9135, -29792, 17856, 24564, -25049, -17232, 30092, 8421, -32558, 1110, 32232, -10548, -29146, 19079, 23559, -25978, -15955, 30647, 6981, -32692, 2589, 31933, -11939, -28439, 20264, 22506, -26853, -14645, 31140, 5527, -32759, 4062, 31569, -13305, -27675, 21406, 21406, -27675, -13305, 31569, 4062, -32759, 5527, 31140, -14645, -26853, 22506, 20264, -28439, -11939, 31933, 2589, -32692, 6981, 30647, -15955, -25978, 23559, 19079, -29146, -10548, 32232, 1110, -32558, 8421, 30092, -17232, -25049, 24564, 17856, -29792, -9135, 32466, -371, -32358, 9843, 29475, -18473, -24068, 25519, 16596, -30378, -7704, 32633, -1851, -32092, 11245, 28799, -19677, -23039, 26421, 15303, -30902, -6257, 32733, -3327, -31760, 12624, 28063, -20841, -21963, 27270, 13978, -31363, -4797}, +{32767, -6257, -30378, 17856, 23559, -26853, -13305, 31933, 1110, -32358, 11245, 28063, -21963, -19677, 29475, 8421, -32692, 4062, 31140, -15955, -25049, 25519, 15303, -31363, -3327, 32633, -9135, -29146, 20264, 21406, -28439, -10548, 32466, -1851, -31760, 13978, 26421, -24068, -17232, 30647, 5527, -32759, 6981, 30092, -18473, -23039, 27270, 12624, -32092, -371, 32232, -11939, -27675, 22506, 19079, -29792, -7704, 32733, -4797, -30902, 16596, 24564, -25978, -14645, 31569, 2589, -32558, 9843, 28799, -20841, -20841, 28799, 9843, -32558, 2589, 31569, -14645, -25978, 24564, 16596, -30902, -4797, 32733, -7704, -29792, 19079, 22506, -27675, -11939, 32232, -371, -32092, 12624, 27270, -23039, -18473, 30092, 6981, -32759, 5527, 30647, -17232, -24068, 26421, 13978, -31760, -1851, 32466, -10548, -28439, 21406, 20264, -29146, -9135, 32633, -3327, -31363, 15303, 25519, -25049, -15955, 31140, 4062, -32692, 8421, 29475, -19677, -21963, 28063, 11245, -32358, 1110, 31933, -13305, -26853, 23559, 17856, -30378, -6257}, +{32767, -7704, -29146, 21406, 19079, -30378, -4797, 32633, -10548, -27675, 23559, 16596, -31363, -1851, 32232, -13305, -25978, 25519, 13978, -32092, 1110, 31569, -15955, -24068, 27270, 11245, -32558, 4062, 30647, -18473, -21963, 28799, 8421, -32759, 6981, 29475, -20841, -19677, 30092, 5527, -32692, 9843, 28063, -23039, -17232, 31140, 2589, -32358, 12624, 26421, -25049, -14645, 31933, -371, -31760, 15303, 24564, -26853, -11939, 32466, -3327, -30902, 17856, 22506, -28439, -9135, 32733, -6257, -29792, 20264, 20264, -29792, -6257, 32733, -9135, -28439, 22506, 17856, -30902, -3327, 32466, -11939, -26853, 24564, 15303, -31760, -371, 31933, -14645, -25049, 26421, 12624, -32358, 2589, 31140, -17232, -23039, 28063, 9843, -32692, 5527, 30092, -19677, -20841, 29475, 6981, -32759, 8421, 28799, -21963, -18473, 30647, 4062, -32558, 11245, 27270, -24068, -15955, 31569, 1110, -32092, 13978, 25519, -25978, -13305, 32232, -1851, -31363, 16596, 23559, -27675, -10548, 32633, -4797, -30378, 19079, 21406, -29146, -7704}, +{32767, -9135, -27675, 24564, 13978, -32358, 4062, 30092, -20841, -18473, 31140, 1110, -31760, 16596, 22506, -29146, -6257, 32633, -11939, -25978, 26421, 11245, -32692, 6981, 28799, -23039, -15955, 31933, -1851, -30902, 19079, 20264, -30378, -3327, 32232, -14645, -24068, 28063, 8421, -32759, 9843, 27270, -25049, -13305, 32466, -4797, -29792, 21406, 17856, -31363, -371, 31569, -17232, -21963, 29475, 5527, -32558, 12624, 25519, -26853, -10548, 32733, -7704, -28439, 23559, 15303, -32092, 2589, 30647, -19677, -19677, 30647, 2589, -32092, 15303, 23559, -28439, -7704, 32733, -10548, -26853, 25519, 12624, -32558, 5527, 29475, -21963, -17232, 31569, -371, -31363, 17856, 21406, -29792, -4797, 32466, -13305, -25049, 27270, 9843, -32759, 8421, 28063, -24068, -14645, 32232, -3327, -30378, 20264, 19079, -30902, -1851, 31933, -15955, -23039, 28799, 6981, -32692, 11245, 26421, -25978, -11939, 32633, -6257, -29146, 22506, 16596, -31760, 1110, 31140, -18473, -20841, 30092, 4062, -32358, 13978, 24564, -27675, -9135}, +{32767, -10548, -25978, 27270, 8421, -32692, 12624, 24564, -28439, -6257, 32466, -14645, -23039, 29475, 4062, -32092, 16596, 21406, -30378, -1851, 31569, -18473, -19677, 31140, -371, -30902, 20264, 17856, -31760, 2589, 30092, -21963, -15955, 32232, -4797, -29146, 23559, 13978, -32558, 6981, 28063, -25049, -11939, 32733, -9135, -26853, 26421, 9843, -32759, 11245, 25519, -27675, -7704, 32633, -13305, -24068, 28799, 5527, -32358, 15303, 22506, -29792, -3327, 31933, -17232, -20841, 30647, 1110, -31363, 19079, 19079, -31363, 1110, 30647, -20841, -17232, 31933, -3327, -29792, 22506, 15303, -32358, 5527, 28799, -24068, -13305, 32633, -7704, -27675, 25519, 11245, -32759, 9843, 26421, -26853, -9135, 32733, -11939, -25049, 28063, 6981, -32558, 13978, 23559, -29146, -4797, 32232, -15955, -21963, 30092, 2589, -31760, 17856, 20264, -30902, -371, 31140, -19677, -18473, 31569, -1851, -30378, 21406, 16596, -32092, 4062, 29475, -23039, -14645, 32466, -6257, -28439, 24564, 12624, -32692, 8421, 27270, -25978, -10548}, +{32767, -11939, -24068, 29475, 2589, -31363, 20264, 16596, -32358, 6981, 27270, -26853, -7704, 32466, -15955, -20841, 31140, -1851, -29792, 23559, 12624, -32759, 11245, 24564, -29146, -3327, 31569, -19677, -17232, 32232, -6257, -27675, 26421, 8421, -32558, 15303, 21406, -30902, 1110, 30092, -23039, -13305, 32733, -10548, -25049, 28799, 4062, -31760, 19079, 17856, -32092, 5527, 28063, -25978, -9135, 32633, -14645, -21963, 30647, -371, -30378, 22506, 13978, -32692, 9843, 25519, -28439, -4797, 31933, -18473, -18473, 31933, -4797, -28439, 25519, 9843, -32692, 13978, 22506, -30378, -371, 30647, -21963, -14645, 32633, -9135, -25978, 28063, 5527, -32092, 17856, 19079, -31760, 4062, 28799, -25049, -10548, 32733, -13305, -23039, 30092, 1110, -30902, 21406, 15303, -32558, 8421, 26421, -27675, -6257, 32232, -17232, -19677, 31569, -3327, -29146, 24564, 11245, -32759, 12624, 23559, -29792, -1851, 31140, -20841, -15955, 32466, -7704, -26853, 27270, 6981, -32358, 16596, 20264, -31363, 2589, 29475, -24068, -11939}, +{32767, -13305, -21963, 31140, -3327, -28439, 26421, 6981, -32092, 19079, 16596, -32558, 9843, 24564, -29792, -371, 30092, -24068, -10548, 32633, -15955, -19677, 31933, -6257, -26853, 28063, 4062, -31363, 21406, 13978, -32759, 12624, 22506, -30902, 2589, 28799, -25978, -7704, 32232, -18473, -17232, 32466, -9135, -25049, 29475, 1110, -30378, 23559, 11245, -32692, 15303, 20264, -31760, 5527, 27270, -27675, -4797, 31569, -20841, -14645, 32733, -11939, -23039, 30647, -1851, -29146, 25519, 8421, -32358, 17856, 17856, -32358, 8421, 25519, -29146, -1851, 30647, -23039, -11939, 32733, -14645, -20841, 31569, -4797, -27675, 27270, 5527, -31760, 20264, 15303, -32692, 11245, 23559, -30378, 1110, 29475, -25049, -9135, 32466, -17232, -18473, 32232, -7704, -25978, 28799, 2589, -30902, 22506, 12624, -32759, 13978, 21406, -31363, 4062, 28063, -26853, -6257, 31933, -19677, -15955, 32633, -10548, -24068, 30092, -371, -29792, 24564, 9843, -32558, 16596, 19079, -32092, 6981, 26421, -28439, -3327, 31140, -21963, -13305}, +{32767, -14645, -19677, 32232, -9135, -24068, 30647, -3327, -27675, 28063, 2589, -30378, 24564, 8421, -32092, 20264, 13978, -32759, 15303, 19079, -32358, 9843, 23559, -30902, 4062, 27270, -28439, -1851, 30092, -25049, -7704, 31933, -20841, -13305, 32733, -15955, -18473, 32466, -10548, -23039, 31140, -4797, -26853, 28799, 1110, -29792, 25519, 6981, -31760, 21406, 12624, -32692, 16596, 17856, -32558, 11245, 22506, -31363, 5527, 26421, -29146, -371, 29475, -25978, -6257, 31569, -21963, -11939, 32633, -17232, -17232, 32633, -11939, -21963, 31569, -6257, -25978, 29475, -371, -29146, 26421, 5527, -31363, 22506, 11245, -32558, 17856, 16596, -32692, 12624, 21406, -31760, 6981, 25519, -29792, 1110, 28799, -26853, -4797, 31140, -23039, -10548, 32466, -18473, -15955, 32733, -13305, -20841, 31933, -7704, -25049, 30092, -1851, -28439, 27270, 4062, -30902, 23559, 9843, -32358, 19079, 15303, -32759, 13978, 20264, -32092, 8421, 24564, -30378, 2589, 28063, -27675, -3327, 30647, -24068, -9135, 32232, -19677, -14645}, +{32767, -15955, -17232, 32733, -14645, -18473, 32633, -13305, -19677, 32466, -11939, -20841, 32232, -10548, -21963, 31933, -9135, -23039, 31569, -7704, -24068, 31140, -6257, -25049, 30647, -4797, -25978, 30092, -3327, -26853, 29475, -1851, -27675, 28799, -371, -28439, 28063, 1110, -29146, 27270, 2589, -29792, 26421, 4062, -30378, 25519, 5527, -30902, 24564, 6981, -31363, 23559, 8421, -31760, 22506, 9843, -32092, 21406, 11245, -32358, 20264, 12624, -32558, 19079, 13978, -32692, 17856, 15303, -32759, 16596, 16596, -32759, 15303, 17856, -32692, 13978, 19079, -32558, 12624, 20264, -32358, 11245, 21406, -32092, 9843, 22506, -31760, 8421, 23559, -31363, 6981, 24564, -30902, 5527, 25519, -30378, 4062, 26421, -29792, 2589, 27270, -29146, 1110, 28063, -28439, -371, 28799, -27675, -1851, 29475, -26853, -3327, 30092, -25978, -4797, 30647, -25049, -6257, 31140, -24068, -7704, 31569, -23039, -9135, 31933, -21963, -10548, 32232, -20841, -11939, 32466, -19677, -13305, 32633, -18473, -14645, 32733, -17232, -15955}, +{32767, -17232, -14645, 32633, -19677, -11939, 32232, -21963, -9135, 31569, -24068, -6257, 30647, -25978, -3327, 29475, -27675, -371, 28063, -29146, 2589, 26421, -30378, 5527, 24564, -31363, 8421, 22506, -32092, 11245, 20264, -32558, 13978, 17856, -32759, 16596, 15303, -32692, 19079, 12624, -32358, 21406, 9843, -31760, 23559, 6981, -30902, 25519, 4062, -29792, 27270, 1110, -28439, 28799, -1851, -26853, 30092, -4797, -25049, 31140, -7704, -23039, 31933, -10548, -20841, 32466, -13305, -18473, 32733, -15955, -15955, 32733, -18473, -13305, 32466, -20841, -10548, 31933, -23039, -7704, 31140, -25049, -4797, 30092, -26853, -1851, 28799, -28439, 1110, 27270, -29792, 4062, 25519, -30902, 6981, 23559, -31760, 9843, 21406, -32358, 12624, 19079, -32692, 15303, 16596, -32759, 17856, 13978, -32558, 20264, 11245, -32092, 22506, 8421, -31363, 24564, 5527, -30378, 26421, 2589, -29146, 28063, -371, -27675, 29475, -3327, -25978, 30647, -6257, -24068, 31569, -9135, -21963, 32232, -11939, -19677, 32633, -14645, -17232}, +{32767, -18473, -11939, 31933, -24068, -4797, 29475, -28439, 2589, 25519, -31363, 9843, 20264, -32692, 16596, 13978, -32358, 22506, 6981, -30378, 27270, -371, -26853, 30647, -7704, -21963, 32466, -14645, -15955, 32633, -20841, -9135, 31140, -25978, -1851, 28063, -29792, 5527, 23559, -32092, 12624, 17856, -32759, 19079, 11245, -31760, 24564, 4062, -29146, 28799, -3327, -25049, 31569, -10548, -19677, 32733, -17232, -13305, 32232, -23039, -6257, 30092, -27675, 1110, 26421, -30902, 8421, 21406, -32558, 15303, 15303, -32558, 21406, 8421, -30902, 26421, 1110, -27675, 30092, -6257, -23039, 32232, -13305, -17232, 32733, -19677, -10548, 31569, -25049, -3327, 28799, -29146, 4062, 24564, -31760, 11245, 19079, -32759, 17856, 12624, -32092, 23559, 5527, -29792, 28063, -1851, -25978, 31140, -9135, -20841, 32633, -15955, -14645, 32466, -21963, -7704, 30647, -26853, -371, 27270, -30378, 6981, 22506, -32358, 13978, 16596, -32692, 20264, 9843, -31363, 25519, 2589, -28439, 29475, -4797, -24068, 31933, -11939, -18473}, +{32767, -19677, -9135, 30647, -27675, 2589, 24564, -32092, 13978, 15303, -32358, 23559, 4062, -28439, 30092, -7704, -20841, 32733, -18473, -10548, 31140, -26853, 1110, 25519, -31760, 12624, 16596, -32558, 22506, 5527, -29146, 29475, -6257, -21963, 32633, -17232, -11939, 31569, -25978, -371, 26421, -31363, 11245, 17856, -32692, 21406, 6981, -29792, 28799, -4797, -23039, 32466, -15955, -13305, 31933, -25049, -1851, 27270, -30902, 9843, 19079, -32759, 20264, 8421, -30378, 28063, -3327, -24068, 32232, -14645, -14645, 32232, -24068, -3327, 28063, -30378, 8421, 20264, -32759, 19079, 9843, -30902, 27270, -1851, -25049, 31933, -13305, -15955, 32466, -23039, -4797, 28799, -29792, 6981, 21406, -32692, 17856, 11245, -31363, 26421, -371, -25978, 31569, -11939, -17232, 32633, -21963, -6257, 29475, -29146, 5527, 22506, -32558, 16596, 12624, -31760, 25519, 1110, -26853, 31140, -10548, -18473, 32733, -20841, -7704, 30092, -28439, 4062, 23559, -32358, 15303, 13978, -32092, 24564, 2589, -27675, 30647, -9135, -19677}, +{32767, -20841, -6257, 28799, -30378, 9843, 17856, -32558, 23559, 2589, -26853, 31569, -13305, -14645, 31933, -25978, 1110, 24564, -32358, 16596, 11245, -30902, 28063, -4797, -21963, 32733, -19677, -7704, 29475, -29792, 8421, 19079, -32692, 22506, 4062, -27675, 31140, -11939, -15955, 32232, -25049, -371, 25519, -32092, 15303, 12624, -31363, 27270, -3327, -23039, 32633, -18473, -9135, 30092, -29146, 6981, 20264, -32759, 21406, 5527, -28439, 30647, -10548, -17232, 32466, -24068, -1851, 26421, -31760, 13978, 13978, -31760, 26421, -1851, -24068, 32466, -17232, -10548, 30647, -28439, 5527, 21406, -32759, 20264, 6981, -29146, 30092, -9135, -18473, 32633, -23039, -3327, 27270, -31363, 12624, 15303, -32092, 25519, -371, -25049, 32232, -15955, -11939, 31140, -27675, 4062, 22506, -32692, 19079, 8421, -29792, 29475, -7704, -19677, 32733, -21963, -4797, 28063, -30902, 11245, 16596, -32358, 24564, 1110, -25978, 31933, -14645, -13305, 31569, -26853, 2589, 23559, -32558, 17856, 9843, -30378, 28799, -6257, -20841}, +{32767, -21963, -3327, 26421, -32092, 16596, 9843, -29792, 30092, -10548, -15955, 31933, -26853, 4062, 21406, -32759, 22506, 2589, -25978, 32232, -17232, -9135, 29475, -30378, 11245, 15303, -31760, 27270, -4797, -20841, 32733, -23039, -1851, 25519, -32358, 17856, 8421, -29146, 30647, -11939, -14645, 31569, -27675, 5527, 20264, -32692, 23559, 1110, -25049, 32466, -18473, -7704, 28799, -30902, 12624, 13978, -31363, 28063, -6257, -19677, 32633, -24068, -371, 24564, -32558, 19079, 6981, -28439, 31140, -13305, -13305, 31140, -28439, 6981, 19079, -32558, 24564, -371, -24068, 32633, -19677, -6257, 28063, -31363, 13978, 12624, -30902, 28799, -7704, -18473, 32466, -25049, 1110, 23559, -32692, 20264, 5527, -27675, 31569, -14645, -11939, 30647, -29146, 8421, 17856, -32358, 25519, -1851, -23039, 32733, -20841, -4797, 27270, -31760, 15303, 11245, -30378, 29475, -9135, -17232, 32232, -25978, 2589, 22506, -32759, 21406, 4062, -26853, 31933, -15955, -10548, 30092, -29792, 9843, 16596, -32092, 26421, -3327, -21963}, +{32767, -23039, -371, 23559, -32759, 22506, 1110, -24068, 32733, -21963, -1851, 24564, -32692, 21406, 2589, -25049, 32633, -20841, -3327, 25519, -32558, 20264, 4062, -25978, 32466, -19677, -4797, 26421, -32358, 19079, 5527, -26853, 32232, -18473, -6257, 27270, -32092, 17856, 6981, -27675, 31933, -17232, -7704, 28063, -31760, 16596, 8421, -28439, 31569, -15955, -9135, 28799, -31363, 15303, 9843, -29146, 31140, -14645, -10548, 29475, -30902, 13978, 11245, -29792, 30647, -13305, -11939, 30092, -30378, 12624, 12624, -30378, 30092, -11939, -13305, 30647, -29792, 11245, 13978, -30902, 29475, -10548, -14645, 31140, -29146, 9843, 15303, -31363, 28799, -9135, -15955, 31569, -28439, 8421, 16596, -31760, 28063, -7704, -17232, 31933, -27675, 6981, 17856, -32092, 27270, -6257, -18473, 32232, -26853, 5527, 19079, -32358, 26421, -4797, -19677, 32466, -25978, 4062, 20264, -32558, 25519, -3327, -20841, 32633, -25049, 2589, 21406, -32692, 24564, -1851, -21963, 32733, -24068, 1110, 22506, -32759, 23559, -371, -23039}, +{32767, -24068, 2589, 20264, -32358, 27270, -7704, -15955, 31140, -29792, 12624, 11245, -29146, 31569, -17232, -6257, 26421, -32558, 21406, 1110, -23039, 32733, -25049, 4062, 19079, -32092, 28063, -9135, -14645, 30647, -30378, 13978, 9843, -28439, 31933, -18473, -4797, 25519, -32692, 22506, -371, -21963, 32633, -25978, 5527, 17856, -31760, 28799, -10548, -13305, 30092, -30902, 15303, 8421, -27675, 32232, -19677, -3327, 24564, -32759, 23559, -1851, -20841, 32466, -26853, 6981, 16596, -31363, 29475, -11939, -11939, 29475, -31363, 16596, 6981, -26853, 32466, -20841, -1851, 23559, -32759, 24564, -3327, -19677, 32232, -27675, 8421, 15303, -30902, 30092, -13305, -10548, 28799, -31760, 17856, 5527, -25978, 32633, -21963, -371, 22506, -32692, 25519, -4797, -18473, 31933, -28439, 9843, 13978, -30378, 30647, -14645, -9135, 28063, -32092, 19079, 4062, -25049, 32733, -23039, 1110, 21406, -32558, 26421, -6257, -17232, 31569, -29146, 11245, 12624, -29792, 31140, -15955, -7704, 27270, -32358, 20264, 2589, -24068}, +{32767, -25049, 5527, 16596, -30902, 30647, -15955, -6257, 25519, -32759, 24564, -4797, -17232, 31140, -30378, 15303, 6981, -25978, 32733, -24068, 4062, 17856, -31363, 30092, -14645, -7704, 26421, -32692, 23559, -3327, -18473, 31569, -29792, 13978, 8421, -26853, 32633, -23039, 2589, 19079, -31760, 29475, -13305, -9135, 27270, -32558, 22506, -1851, -19677, 31933, -29146, 12624, 9843, -27675, 32466, -21963, 1110, 20264, -32092, 28799, -11939, -10548, 28063, -32358, 21406, -371, -20841, 32232, -28439, 11245, 11245, -28439, 32232, -20841, -371, 21406, -32358, 28063, -10548, -11939, 28799, -32092, 20264, 1110, -21963, 32466, -27675, 9843, 12624, -29146, 31933, -19677, -1851, 22506, -32558, 27270, -9135, -13305, 29475, -31760, 19079, 2589, -23039, 32633, -26853, 8421, 13978, -29792, 31569, -18473, -3327, 23559, -32692, 26421, -7704, -14645, 30092, -31363, 17856, 4062, -24068, 32733, -25978, 6981, 15303, -30378, 31140, -17232, -4797, 24564, -32759, 25519, -6257, -15955, 30647, -30902, 16596, 5527, -25049}, +{32767, -25978, 8421, 12624, -28439, 32466, -23039, 4062, 16596, -30378, 31569, -19677, -371, 20264, -31760, 30092, -15955, -4797, 23559, -32558, 28063, -11939, -9135, 26421, -32759, 25519, -7704, -13305, 28799, -32358, 22506, -3327, -17232, 30647, -31363, 19079, 1110, -20841, 31933, -29792, 15303, 5527, -24068, 32633, -27675, 11245, 9843, -26853, 32733, -25049, 6981, 13978, -29146, 32232, -21963, 2589, 17856, -30902, 31140, -18473, -1851, 21406, -32092, 29475, -14645, -6257, 24564, -32692, 27270, -10548, -10548, 27270, -32692, 24564, -6257, -14645, 29475, -32092, 21406, -1851, -18473, 31140, -30902, 17856, 2589, -21963, 32232, -29146, 13978, 6981, -25049, 32733, -26853, 9843, 11245, -27675, 32633, -24068, 5527, 15303, -29792, 31933, -20841, 1110, 19079, -31363, 30647, -17232, -3327, 22506, -32358, 28799, -13305, -7704, 25519, -32759, 26421, -9135, -11939, 28063, -32558, 23559, -4797, -15955, 30092, -31760, 20264, -371, -19677, 31569, -30378, 16596, 4062, -23039, 32466, -28439, 12624, 8421, -25978}, +{32767, -26853, 11245, 8421, -25049, 32633, -28439, 13978, 5527, -23039, 32232, -29792, 16596, 2589, -20841, 31569, -30902, 19079, -371, -18473, 30647, -31760, 21406, -3327, -15955, 29475, -32358, 23559, -6257, -13305, 28063, -32692, 25519, -9135, -10548, 26421, -32759, 27270, -11939, -7704, 24564, -32558, 28799, -14645, -4797, 22506, -32092, 30092, -17232, -1851, 20264, -31363, 31140, -19677, 1110, 17856, -30378, 31933, -21963, 4062, 15303, -29146, 32466, -24068, 6981, 12624, -27675, 32733, -25978, 9843, 9843, -25978, 32733, -27675, 12624, 6981, -24068, 32466, -29146, 15303, 4062, -21963, 31933, -30378, 17856, 1110, -19677, 31140, -31363, 20264, -1851, -17232, 30092, -32092, 22506, -4797, -14645, 28799, -32558, 24564, -7704, -11939, 27270, -32759, 26421, -10548, -9135, 25519, -32692, 28063, -13305, -6257, 23559, -32358, 29475, -15955, -3327, 21406, -31760, 30647, -18473, -371, 19079, -30902, 31569, -20841, 2589, 16596, -29792, 32232, -23039, 5527, 13978, -28439, 32633, -25049, 8421, 11245, -26853}, +{32767, -27675, 13978, 4062, -20841, 31140, -31760, 22506, -6257, -11939, 26421, -32692, 28799, -15955, -1851, 19079, -30378, 32232, -24068, 8421, 9843, -25049, 32466, -29792, 17856, -371, -17232, 29475, -32558, 25519, -10548, -7704, 23559, -32092, 30647, -19677, 2589, 15303, -28439, 32733, -26853, 12624, 5527, -21963, 31569, -31363, 21406, -4797, -13305, 27270, -32759, 28063, -14645, -3327, 20264, -30902, 31933, -23039, 6981, 11245, -25978, 32633, -29146, 16596, 1110, -18473, 30092, -32358, 24564, -9135, -9135, 24564, -32358, 30092, -18473, 1110, 16596, -29146, 32633, -25978, 11245, 6981, -23039, 31933, -30902, 20264, -3327, -14645, 28063, -32759, 27270, -13305, -4797, 21406, -31363, 31569, -21963, 5527, 12624, -26853, 32733, -28439, 15303, 2589, -19677, 30647, -32092, 23559, -7704, -10548, 25519, -32558, 29475, -17232, -371, 17856, -29792, 32466, -25049, 9843, 8421, -24068, 32232, -30378, 19079, -1851, -15955, 28799, -32692, 26421, -11939, -6257, 22506, -31760, 31140, -20841, 4062, 13978, -27675}, +{32767, -28439, 16596, -371, -15955, 28063, -32759, 28799, -17232, 1110, 15303, -27675, 32733, -29146, 17856, -1851, -14645, 27270, -32692, 29475, -18473, 2589, 13978, -26853, 32633, -29792, 19079, -3327, -13305, 26421, -32558, 30092, -19677, 4062, 12624, -25978, 32466, -30378, 20264, -4797, -11939, 25519, -32358, 30647, -20841, 5527, 11245, -25049, 32232, -30902, 21406, -6257, -10548, 24564, -32092, 31140, -21963, 6981, 9843, -24068, 31933, -31363, 22506, -7704, -9135, 23559, -31760, 31569, -23039, 8421, 8421, -23039, 31569, -31760, 23559, -9135, -7704, 22506, -31363, 31933, -24068, 9843, 6981, -21963, 31140, -32092, 24564, -10548, -6257, 21406, -30902, 32232, -25049, 11245, 5527, -20841, 30647, -32358, 25519, -11939, -4797, 20264, -30378, 32466, -25978, 12624, 4062, -19677, 30092, -32558, 26421, -13305, -3327, 19079, -29792, 32633, -26853, 13978, 2589, -18473, 29475, -32692, 27270, -14645, -1851, 17856, -29146, 32733, -27675, 15303, 1110, -17232, 28799, -32759, 28063, -15955, -371, 16596, -28439}, +{32767, -29146, 19079, -4797, -10548, 23559, -31363, 32232, -25978, 13978, 1110, -15955, 27270, -32558, 30647, -21963, 8421, 6981, -20841, 30092, -32692, 28063, -17232, 2589, 12624, -25049, 31933, -31760, 24564, -11939, -3327, 17856, -28439, 32733, -29792, 20264, -6257, -9135, 22506, -30902, 32466, -26853, 15303, -371, -14645, 26421, -32358, 31140, -23039, 9843, 5527, -19677, 29475, -32759, 28799, -18473, 4062, 11245, -24068, 31569, -32092, 25519, -13305, -1851, 16596, -27675, 32633, -30378, 21406, -7704, -7704, 21406, -30378, 32633, -27675, 16596, -1851, -13305, 25519, -32092, 31569, -24068, 11245, 4062, -18473, 28799, -32759, 29475, -19677, 5527, 9843, -23039, 31140, -32358, 26421, -14645, -371, 15303, -26853, 32466, -30902, 22506, -9135, -6257, 20264, -29792, 32733, -28439, 17856, -3327, -11939, 24564, -31760, 31933, -25049, 12624, 2589, -17232, 28063, -32692, 30092, -20841, 6981, 8421, -21963, 30647, -32558, 27270, -15955, 1110, 13978, -25978, 32232, -31363, 23559, -10548, -4797, 19079, -29146}, +{32767, -29792, 21406, -9135, -4797, 17856, -27675, 32466, -31363, 24564, -13305, -371, 13978, -25049, 31569, -32358, 27270, -17232, 4062, 9843, -21963, 30092, -32759, 29475, -20841, 8421, 5527, -18473, 28063, -32558, 31140, -24068, 12624, 1110, -14645, 25519, -31760, 32232, -26853, 16596, -3327, -10548, 22506, -30378, 32733, -29146, 20264, -7704, -6257, 19079, -28439, 32633, -30902, 23559, -11939, -1851, 15303, -25978, 31933, -32092, 26421, -15955, 2589, 11245, -23039, 30647, -32692, 28799, -19677, 6981, 6981, -19677, 28799, -32692, 30647, -23039, 11245, 2589, -15955, 26421, -32092, 31933, -25978, 15303, -1851, -11939, 23559, -30902, 32633, -28439, 19079, -6257, -7704, 20264, -29146, 32733, -30378, 22506, -10548, -3327, 16596, -26853, 32232, -31760, 25519, -14645, 1110, 12624, -24068, 31140, -32558, 28063, -18473, 5527, 8421, -20841, 29475, -32759, 30092, -21963, 9843, 4062, -17232, 27270, -32358, 31569, -25049, 13978, -371, -13305, 24564, -31363, 32466, -27675, 17856, -4797, -9135, 21406, -29792}, +{32767, -30378, 23559, -13305, 1110, 11245, -21963, 29475, -32692, 31140, -25049, 15303, -3327, -9135, 20264, -28439, 32466, -31760, 26421, -17232, 5527, 6981, -18473, 27270, -32092, 32232, -27675, 19079, -7704, -4797, 16596, -25978, 31569, -32558, 28799, -20841, 9843, 2589, -14645, 24564, -30902, 32733, -29792, 22506, -11939, -371, 12624, -23039, 30092, -32759, 30647, -24068, 13978, -1851, -10548, 21406, -29146, 32633, -31363, 25519, -15955, 4062, 8421, -19677, 28063, -32358, 31933, -26853, 17856, -6257, -6257, 17856, -26853, 31933, -32358, 28063, -19677, 8421, 4062, -15955, 25519, -31363, 32633, -29146, 21406, -10548, -1851, 13978, -24068, 30647, -32759, 30092, -23039, 12624, -371, -11939, 22506, -29792, 32733, -30902, 24564, -14645, 2589, 9843, -20841, 28799, -32558, 31569, -25978, 16596, -4797, -7704, 19079, -27675, 32232, -32092, 27270, -18473, 6981, 5527, -17232, 26421, -31760, 32466, -28439, 20264, -9135, -3327, 15303, -25049, 31140, -32692, 29475, -21963, 11245, 1110, -13305, 23559, -30378}, +{32767, -30902, 25519, -17232, 6981, 4062, -14645, 23559, -29792, 32633, -31760, 27270, -19677, 9843, 1110, -11939, 21406, -28439, 32232, -32358, 28799, -21963, 12624, -1851, -9135, 19079, -26853, 31569, -32692, 30092, -24068, 15303, -4797, -6257, 16596, -25049, 30647, -32759, 31140, -25978, 17856, -7704, -3327, 13978, -23039, 29475, -32558, 31933, -27675, 20264, -10548, -371, 11245, -20841, 28063, -32092, 32466, -29146, 22506, -13305, 2589, 8421, -18473, 26421, -31363, 32733, -30378, 24564, -15955, 5527, 5527, -15955, 24564, -30378, 32733, -31363, 26421, -18473, 8421, 2589, -13305, 22506, -29146, 32466, -32092, 28063, -20841, 11245, -371, -10548, 20264, -27675, 31933, -32558, 29475, -23039, 13978, -3327, -7704, 17856, -25978, 31140, -32759, 30647, -25049, 16596, -6257, -4797, 15303, -24068, 30092, -32692, 31569, -26853, 19079, -9135, -1851, 12624, -21963, 28799, -32358, 32232, -28439, 21406, -11939, 1110, 9843, -19677, 27270, -31760, 32633, -29792, 23559, -14645, 4062, 6981, -17232, 25519, -30902}, +{32767, -31363, 27270, -20841, 12624, -3327, -6257, 15303, -23039, 28799, -32092, 32633, -30378, 25519, -18473, 9843, -371, -9135, 17856, -25049, 30092, -32558, 32232, -29146, 23559, -15955, 6981, 2589, -11939, 20264, -26853, 31140, -32759, 31569, -27675, 21406, -13305, 4062, 5527, -14645, 22506, -28439, 31933, -32692, 30647, -25978, 19079, -10548, 1110, 8421, -17232, 24564, -29792, 32466, -32358, 29475, -24068, 16596, -7704, -1851, 11245, -19677, 26421, -30902, 32733, -31760, 28063, -21963, 13978, -4797, -4797, 13978, -21963, 28063, -31760, 32733, -30902, 26421, -19677, 11245, -1851, -7704, 16596, -24068, 29475, -32358, 32466, -29792, 24564, -17232, 8421, 1110, -10548, 19079, -25978, 30647, -32692, 31933, -28439, 22506, -14645, 5527, 4062, -13305, 21406, -27675, 31569, -32759, 31140, -26853, 20264, -11939, 2589, 6981, -15955, 23559, -29146, 32232, -32558, 30092, -25049, 17856, -9135, -371, 9843, -18473, 25519, -30378, 32633, -32092, 28799, -23039, 15303, -6257, -3327, 12624, -20841, 27270, -31363}, +{32767, -31760, 28799, -24068, 17856, -10548, 2589, 5527, -13305, 20264, -25978, 30092, -32358, 32633, -30902, 27270, -21963, 15303, -7704, -371, 8421, -15955, 22506, -27675, 31140, -32692, 32232, -29792, 25519, -19677, 12624, -4797, -3327, 11245, -18473, 24564, -29146, 31933, -32759, 31569, -28439, 23559, -17232, 9843, -1851, -6257, 13978, -20841, 26421, -30378, 32466, -32558, 30647, -26853, 21406, -14645, 6981, 1110, -9135, 16596, -23039, 28063, -31363, 32733, -32092, 29475, -25049, 19079, -11939, 4062, 4062, -11939, 19079, -25049, 29475, -32092, 32733, -31363, 28063, -23039, 16596, -9135, 1110, 6981, -14645, 21406, -26853, 30647, -32558, 32466, -30378, 26421, -20841, 13978, -6257, -1851, 9843, -17232, 23559, -28439, 31569, -32759, 31933, -29146, 24564, -18473, 11245, -3327, -4797, 12624, -19677, 25519, -29792, 32232, -32692, 31140, -27675, 22506, -15955, 8421, -371, -7704, 15303, -21963, 27270, -30902, 32633, -32358, 30092, -25978, 20264, -13305, 5527, 2589, -10548, 17856, -24068, 28799, -31760}, +{32767, -32092, 30092, -26853, 22506, -17232, 11245, -4797, -1851, 8421, -14645, 20264, -25049, 28799, -31363, 32633, -32558, 31140, -28439, 24564, -19677, 13978, -7704, 1110, 5527, -11939, 17856, -23039, 27270, -30378, 32232, -32759, 31933, -29792, 26421, -21963, 16596, -10548, 4062, 2589, -9135, 15303, -20841, 25519, -29146, 31569, -32692, 32466, -30902, 28063, -24068, 19079, -13305, 6981, -371, -6257, 12624, -18473, 23559, -27675, 30647, -32358, 32733, -31760, 29475, -25978, 21406, -15955, 9843, -3327, -3327, 9843, -15955, 21406, -25978, 29475, -31760, 32733, -32358, 30647, -27675, 23559, -18473, 12624, -6257, -371, 6981, -13305, 19079, -24068, 28063, -30902, 32466, -32692, 31569, -29146, 25519, -20841, 15303, -9135, 2589, 4062, -10548, 16596, -21963, 26421, -29792, 31933, -32759, 32232, -30378, 27270, -23039, 17856, -11939, 5527, 1110, -7704, 13978, -19677, 24564, -28439, 31140, -32558, 32633, -31363, 28799, -25049, 20264, -14645, 8421, -1851, -4797, 11245, -17232, 22506, -26853, 30092, -32092}, +{32767, -32358, 31140, -29146, 26421, -23039, 19079, -14645, 9843, -4797, -371, 5527, -10548, 15303, -19677, 23559, -26853, 29475, -31363, 32466, -32759, 32232, -30902, 28799, -25978, 22506, -18473, 13978, -9135, 4062, 1110, -6257, 11245, -15955, 20264, -24068, 27270, -29792, 31569, -32558, 32733, -32092, 30647, -28439, 25519, -21963, 17856, -13305, 8421, -3327, -1851, 6981, -11939, 16596, -20841, 24564, -27675, 30092, -31760, 32633, -32692, 31933, -30378, 28063, -25049, 21406, -17232, 12624, -7704, 2589, 2589, -7704, 12624, -17232, 21406, -25049, 28063, -30378, 31933, -32692, 32633, -31760, 30092, -27675, 24564, -20841, 16596, -11939, 6981, -1851, -3327, 8421, -13305, 17856, -21963, 25519, -28439, 30647, -32092, 32733, -32558, 31569, -29792, 27270, -24068, 20264, -15955, 11245, -6257, 1110, 4062, -9135, 13978, -18473, 22506, -25978, 28799, -30902, 32232, -32759, 32466, -31363, 29475, -26853, 23559, -19677, 15303, -10548, 5527, -371, -4797, 9843, -14645, 19079, -23039, 26421, -29146, 31140, -32358}, +{32767, -32558, 31933, -30902, 29475, -27675, 25519, -23039, 20264, -17232, 13978, -10548, 6981, -3327, -371, 4062, -7704, 11245, -14645, 17856, -20841, 23559, -25978, 28063, -29792, 31140, -32092, 32633, -32759, 32466, -31760, 30647, -29146, 27270, -25049, 22506, -19677, 16596, -13305, 9843, -6257, 2589, 1110, -4797, 8421, -11939, 15303, -18473, 21406, -24068, 26421, -28439, 30092, -31363, 32232, -32692, 32733, -32358, 31569, -30378, 28799, -26853, 24564, -21963, 19079, -15955, 12624, -9135, 5527, -1851, -1851, 5527, -9135, 12624, -15955, 19079, -21963, 24564, -26853, 28799, -30378, 31569, -32358, 32733, -32692, 32232, -31363, 30092, -28439, 26421, -24068, 21406, -18473, 15303, -11939, 8421, -4797, 1110, 2589, -6257, 9843, -13305, 16596, -19677, 22506, -25049, 27270, -29146, 30647, -31760, 32466, -32759, 32633, -32092, 31140, -29792, 28063, -25978, 23559, -20841, 17856, -14645, 11245, -7704, 4062, -371, -3327, 6981, -10548, 13978, -17232, 20264, -23039, 25519, -27675, 29475, -30902, 31933, -32558}, +{32767, -32692, 32466, -32092, 31569, -30902, 30092, -29146, 28063, -26853, 25519, -24068, 22506, -20841, 19079, -17232, 15303, -13305, 11245, -9135, 6981, -4797, 2589, -371, -1851, 4062, -6257, 8421, -10548, 12624, -14645, 16596, -18473, 20264, -21963, 23559, -25049, 26421, -27675, 28799, -29792, 30647, -31363, 31933, -32358, 32633, -32759, 32733, -32558, 32232, -31760, 31140, -30378, 29475, -28439, 27270, -25978, 24564, -23039, 21406, -19677, 17856, -15955, 13978, -11939, 9843, -7704, 5527, -3327, 1110, 1110, -3327, 5527, -7704, 9843, -11939, 13978, -15955, 17856, -19677, 21406, -23039, 24564, -25978, 27270, -28439, 29475, -30378, 31140, -31760, 32232, -32558, 32733, -32759, 32633, -32358, 31933, -31363, 30647, -29792, 28799, -27675, 26421, -25049, 23559, -21963, 20264, -18473, 16596, -14645, 12624, -10548, 8421, -6257, 4062, -1851, -371, 2589, -4797, 6981, -9135, 11245, -13305, 15303, -17232, 19079, -20841, 22506, -24068, 25519, -26853, 28063, -29146, 30092, -30902, 31569, -32092, 32466, -32692}, +{32767, -32759, 32733, -32692, 32633, -32558, 32466, -32358, 32232, -32092, 31933, -31760, 31569, -31363, 31140, -30902, 30647, -30378, 30092, -29792, 29475, -29146, 28799, -28439, 28063, -27675, 27270, -26853, 26421, -25978, 25519, -25049, 24564, -24068, 23559, -23039, 22506, -21963, 21406, -20841, 20264, -19677, 19079, -18473, 17856, -17232, 16596, -15955, 15303, -14645, 13978, -13305, 12624, -11939, 11245, -10548, 9843, -9135, 8421, -7704, 6981, -6257, 5527, -4797, 4062, -3327, 2589, -1851, 1110, -371, -371, 1110, -1851, 2589, -3327, 4062, -4797, 5527, -6257, 6981, -7704, 8421, -9135, 9843, -10548, 11245, -11939, 12624, -13305, 13978, -14645, 15303, -15955, 16596, -17232, 17856, -18473, 19079, -19677, 20264, -20841, 21406, -21963, 22506, -23039, 23559, -24068, 24564, -25049, 25519, -25978, 26421, -26853, 27270, -27675, 28063, -28439, 28799, -29146, 29475, -29792, 30092, -30378, 30647, -30902, 31140, -31363, 31569, -31760, 31933, -32092, 32232, -32358, 32466, -32558, 32633, -32692, 32733, -32759}, +{32767, -32759, 32733, -32692, 32633, -32558, 32466, -32358, 32232, -32092, 31933, -31760, 31569, -31363, 31140, -30902, 30647, -30378, 30092, -29792, 29475, -29146, 28799, -28439, 28063, -27675, 27270, -26853, 26421, -25978, 25519, -25049, 24564, -24068, 23559, -23039, 22506, -21963, 21406, -20841, 20264, -19677, 19079, -18473, 17856, -17232, 16596, -15955, 15303, -14645, 13978, -13305, 12624, -11939, 11245, -10548, 9843, -9135, 8421, -7704, 6981, -6257, 5527, -4797, 4062, -3327, 2589, -1851, 1110, -371, -371, 1110, -1851, 2589, -3327, 4062, -4797, 5527, -6257, 6981, -7704, 8421, -9135, 9843, -10548, 11245, -11939, 12624, -13305, 13978, -14645, 15303, -15955, 16596, -17232, 17856, -18473, 19079, -19677, 20264, -20841, 21406, -21963, 22506, -23039, 23559, -24068, 24564, -25049, 25519, -25978, 26421, -26853, 27270, -27675, 28063, -28439, 28799, -29146, 29475, -29792, 30092, -30378, 30647, -30902, 31140, -31363, 31569, -31760, 31933, -32092, 32232, -32358, 32466, -32558, 32633, -32692, 32733, -32759}, +{32767, -32692, 32466, -32092, 31569, -30902, 30092, -29146, 28063, -26853, 25519, -24068, 22506, -20841, 19079, -17232, 15303, -13305, 11245, -9135, 6981, -4797, 2589, -371, -1851, 4062, -6257, 8421, -10548, 12624, -14645, 16596, -18473, 20264, -21963, 23559, -25049, 26421, -27675, 28799, -29792, 30647, -31363, 31933, -32358, 32633, -32759, 32733, -32558, 32232, -31760, 31140, -30378, 29475, -28439, 27270, -25978, 24564, -23039, 21406, -19677, 17856, -15955, 13978, -11939, 9843, -7704, 5527, -3327, 1110, 1110, -3327, 5527, -7704, 9843, -11939, 13978, -15955, 17856, -19677, 21406, -23039, 24564, -25978, 27270, -28439, 29475, -30378, 31140, -31760, 32232, -32558, 32733, -32759, 32633, -32358, 31933, -31363, 30647, -29792, 28799, -27675, 26421, -25049, 23559, -21963, 20264, -18473, 16596, -14645, 12624, -10548, 8421, -6257, 4062, -1851, -371, 2589, -4797, 6981, -9135, 11245, -13305, 15303, -17232, 19079, -20841, 22506, -24068, 25519, -26853, 28063, -29146, 30092, -30902, 31569, -32092, 32466, -32692}, +{32767, -32558, 31933, -30902, 29475, -27675, 25519, -23039, 20264, -17232, 13978, -10548, 6981, -3327, -371, 4062, -7704, 11245, -14645, 17856, -20841, 23559, -25978, 28063, -29792, 31140, -32092, 32633, -32759, 32466, -31760, 30647, -29146, 27270, -25049, 22506, -19677, 16596, -13305, 9843, -6257, 2589, 1110, -4797, 8421, -11939, 15303, -18473, 21406, -24068, 26421, -28439, 30092, -31363, 32232, -32692, 32733, -32358, 31569, -30378, 28799, -26853, 24564, -21963, 19079, -15955, 12624, -9135, 5527, -1851, -1851, 5527, -9135, 12624, -15955, 19079, -21963, 24564, -26853, 28799, -30378, 31569, -32358, 32733, -32692, 32232, -31363, 30092, -28439, 26421, -24068, 21406, -18473, 15303, -11939, 8421, -4797, 1110, 2589, -6257, 9843, -13305, 16596, -19677, 22506, -25049, 27270, -29146, 30647, -31760, 32466, -32759, 32633, -32092, 31140, -29792, 28063, -25978, 23559, -20841, 17856, -14645, 11245, -7704, 4062, -371, -3327, 6981, -10548, 13978, -17232, 20264, -23039, 25519, -27675, 29475, -30902, 31933, -32558}, +{32767, -32358, 31140, -29146, 26421, -23039, 19079, -14645, 9843, -4797, -371, 5527, -10548, 15303, -19677, 23559, -26853, 29475, -31363, 32466, -32759, 32232, -30902, 28799, -25978, 22506, -18473, 13978, -9135, 4062, 1110, -6257, 11245, -15955, 20264, -24068, 27270, -29792, 31569, -32558, 32733, -32092, 30647, -28439, 25519, -21963, 17856, -13305, 8421, -3327, -1851, 6981, -11939, 16596, -20841, 24564, -27675, 30092, -31760, 32633, -32692, 31933, -30378, 28063, -25049, 21406, -17232, 12624, -7704, 2589, 2589, -7704, 12624, -17232, 21406, -25049, 28063, -30378, 31933, -32692, 32633, -31760, 30092, -27675, 24564, -20841, 16596, -11939, 6981, -1851, -3327, 8421, -13305, 17856, -21963, 25519, -28439, 30647, -32092, 32733, -32558, 31569, -29792, 27270, -24068, 20264, -15955, 11245, -6257, 1110, 4062, -9135, 13978, -18473, 22506, -25978, 28799, -30902, 32232, -32759, 32466, -31363, 29475, -26853, 23559, -19677, 15303, -10548, 5527, -371, -4797, 9843, -14645, 19079, -23039, 26421, -29146, 31140, -32358}, +{32767, -32092, 30092, -26853, 22506, -17232, 11245, -4797, -1851, 8421, -14645, 20264, -25049, 28799, -31363, 32633, -32558, 31140, -28439, 24564, -19677, 13978, -7704, 1110, 5527, -11939, 17856, -23039, 27270, -30378, 32232, -32759, 31933, -29792, 26421, -21963, 16596, -10548, 4062, 2589, -9135, 15303, -20841, 25519, -29146, 31569, -32692, 32466, -30902, 28063, -24068, 19079, -13305, 6981, -371, -6257, 12624, -18473, 23559, -27675, 30647, -32358, 32733, -31760, 29475, -25978, 21406, -15955, 9843, -3327, -3327, 9843, -15955, 21406, -25978, 29475, -31760, 32733, -32358, 30647, -27675, 23559, -18473, 12624, -6257, -371, 6981, -13305, 19079, -24068, 28063, -30902, 32466, -32692, 31569, -29146, 25519, -20841, 15303, -9135, 2589, 4062, -10548, 16596, -21963, 26421, -29792, 31933, -32759, 32232, -30378, 27270, -23039, 17856, -11939, 5527, 1110, -7704, 13978, -19677, 24564, -28439, 31140, -32558, 32633, -31363, 28799, -25049, 20264, -14645, 8421, -1851, -4797, 11245, -17232, 22506, -26853, 30092, -32092}, +{32767, -31760, 28799, -24068, 17856, -10548, 2589, 5527, -13305, 20264, -25978, 30092, -32358, 32633, -30902, 27270, -21963, 15303, -7704, -371, 8421, -15955, 22506, -27675, 31140, -32692, 32232, -29792, 25519, -19677, 12624, -4797, -3327, 11245, -18473, 24564, -29146, 31933, -32759, 31569, -28439, 23559, -17232, 9843, -1851, -6257, 13978, -20841, 26421, -30378, 32466, -32558, 30647, -26853, 21406, -14645, 6981, 1110, -9135, 16596, -23039, 28063, -31363, 32733, -32092, 29475, -25049, 19079, -11939, 4062, 4062, -11939, 19079, -25049, 29475, -32092, 32733, -31363, 28063, -23039, 16596, -9135, 1110, 6981, -14645, 21406, -26853, 30647, -32558, 32466, -30378, 26421, -20841, 13978, -6257, -1851, 9843, -17232, 23559, -28439, 31569, -32759, 31933, -29146, 24564, -18473, 11245, -3327, -4797, 12624, -19677, 25519, -29792, 32232, -32692, 31140, -27675, 22506, -15955, 8421, -371, -7704, 15303, -21963, 27270, -30902, 32633, -32358, 30092, -25978, 20264, -13305, 5527, 2589, -10548, 17856, -24068, 28799, -31760}, +{32767, -31363, 27270, -20841, 12624, -3327, -6257, 15303, -23039, 28799, -32092, 32633, -30378, 25519, -18473, 9843, -371, -9135, 17856, -25049, 30092, -32558, 32232, -29146, 23559, -15955, 6981, 2589, -11939, 20264, -26853, 31140, -32759, 31569, -27675, 21406, -13305, 4062, 5527, -14645, 22506, -28439, 31933, -32692, 30647, -25978, 19079, -10548, 1110, 8421, -17232, 24564, -29792, 32466, -32358, 29475, -24068, 16596, -7704, -1851, 11245, -19677, 26421, -30902, 32733, -31760, 28063, -21963, 13978, -4797, -4797, 13978, -21963, 28063, -31760, 32733, -30902, 26421, -19677, 11245, -1851, -7704, 16596, -24068, 29475, -32358, 32466, -29792, 24564, -17232, 8421, 1110, -10548, 19079, -25978, 30647, -32692, 31933, -28439, 22506, -14645, 5527, 4062, -13305, 21406, -27675, 31569, -32759, 31140, -26853, 20264, -11939, 2589, 6981, -15955, 23559, -29146, 32232, -32558, 30092, -25049, 17856, -9135, -371, 9843, -18473, 25519, -30378, 32633, -32092, 28799, -23039, 15303, -6257, -3327, 12624, -20841, 27270, -31363}, +{32767, -30902, 25519, -17232, 6981, 4062, -14645, 23559, -29792, 32633, -31760, 27270, -19677, 9843, 1110, -11939, 21406, -28439, 32232, -32358, 28799, -21963, 12624, -1851, -9135, 19079, -26853, 31569, -32692, 30092, -24068, 15303, -4797, -6257, 16596, -25049, 30647, -32759, 31140, -25978, 17856, -7704, -3327, 13978, -23039, 29475, -32558, 31933, -27675, 20264, -10548, -371, 11245, -20841, 28063, -32092, 32466, -29146, 22506, -13305, 2589, 8421, -18473, 26421, -31363, 32733, -30378, 24564, -15955, 5527, 5527, -15955, 24564, -30378, 32733, -31363, 26421, -18473, 8421, 2589, -13305, 22506, -29146, 32466, -32092, 28063, -20841, 11245, -371, -10548, 20264, -27675, 31933, -32558, 29475, -23039, 13978, -3327, -7704, 17856, -25978, 31140, -32759, 30647, -25049, 16596, -6257, -4797, 15303, -24068, 30092, -32692, 31569, -26853, 19079, -9135, -1851, 12624, -21963, 28799, -32358, 32232, -28439, 21406, -11939, 1110, 9843, -19677, 27270, -31760, 32633, -29792, 23559, -14645, 4062, 6981, -17232, 25519, -30902}, +{32767, -30378, 23559, -13305, 1110, 11245, -21963, 29475, -32692, 31140, -25049, 15303, -3327, -9135, 20264, -28439, 32466, -31760, 26421, -17232, 5527, 6981, -18473, 27270, -32092, 32232, -27675, 19079, -7704, -4797, 16596, -25978, 31569, -32558, 28799, -20841, 9843, 2589, -14645, 24564, -30902, 32733, -29792, 22506, -11939, -371, 12624, -23039, 30092, -32759, 30647, -24068, 13978, -1851, -10548, 21406, -29146, 32633, -31363, 25519, -15955, 4062, 8421, -19677, 28063, -32358, 31933, -26853, 17856, -6257, -6257, 17856, -26853, 31933, -32358, 28063, -19677, 8421, 4062, -15955, 25519, -31363, 32633, -29146, 21406, -10548, -1851, 13978, -24068, 30647, -32759, 30092, -23039, 12624, -371, -11939, 22506, -29792, 32733, -30902, 24564, -14645, 2589, 9843, -20841, 28799, -32558, 31569, -25978, 16596, -4797, -7704, 19079, -27675, 32232, -32092, 27270, -18473, 6981, 5527, -17232, 26421, -31760, 32466, -28439, 20264, -9135, -3327, 15303, -25049, 31140, -32692, 29475, -21963, 11245, 1110, -13305, 23559, -30378}, +{32767, -29792, 21406, -9135, -4797, 17856, -27675, 32466, -31363, 24564, -13305, -371, 13978, -25049, 31569, -32358, 27270, -17232, 4062, 9843, -21963, 30092, -32759, 29475, -20841, 8421, 5527, -18473, 28063, -32558, 31140, -24068, 12624, 1110, -14645, 25519, -31760, 32232, -26853, 16596, -3327, -10548, 22506, -30378, 32733, -29146, 20264, -7704, -6257, 19079, -28439, 32633, -30902, 23559, -11939, -1851, 15303, -25978, 31933, -32092, 26421, -15955, 2589, 11245, -23039, 30647, -32692, 28799, -19677, 6981, 6981, -19677, 28799, -32692, 30647, -23039, 11245, 2589, -15955, 26421, -32092, 31933, -25978, 15303, -1851, -11939, 23559, -30902, 32633, -28439, 19079, -6257, -7704, 20264, -29146, 32733, -30378, 22506, -10548, -3327, 16596, -26853, 32232, -31760, 25519, -14645, 1110, 12624, -24068, 31140, -32558, 28063, -18473, 5527, 8421, -20841, 29475, -32759, 30092, -21963, 9843, 4062, -17232, 27270, -32358, 31569, -25049, 13978, -371, -13305, 24564, -31363, 32466, -27675, 17856, -4797, -9135, 21406, -29792}, +{32767, -29146, 19079, -4797, -10548, 23559, -31363, 32232, -25978, 13978, 1110, -15955, 27270, -32558, 30647, -21963, 8421, 6981, -20841, 30092, -32692, 28063, -17232, 2589, 12624, -25049, 31933, -31760, 24564, -11939, -3327, 17856, -28439, 32733, -29792, 20264, -6257, -9135, 22506, -30902, 32466, -26853, 15303, -371, -14645, 26421, -32358, 31140, -23039, 9843, 5527, -19677, 29475, -32759, 28799, -18473, 4062, 11245, -24068, 31569, -32092, 25519, -13305, -1851, 16596, -27675, 32633, -30378, 21406, -7704, -7704, 21406, -30378, 32633, -27675, 16596, -1851, -13305, 25519, -32092, 31569, -24068, 11245, 4062, -18473, 28799, -32759, 29475, -19677, 5527, 9843, -23039, 31140, -32358, 26421, -14645, -371, 15303, -26853, 32466, -30902, 22506, -9135, -6257, 20264, -29792, 32733, -28439, 17856, -3327, -11939, 24564, -31760, 31933, -25049, 12624, 2589, -17232, 28063, -32692, 30092, -20841, 6981, 8421, -21963, 30647, -32558, 27270, -15955, 1110, 13978, -25978, 32232, -31363, 23559, -10548, -4797, 19079, -29146}, +{32767, -28439, 16596, -371, -15955, 28063, -32759, 28799, -17232, 1110, 15303, -27675, 32733, -29146, 17856, -1851, -14645, 27270, -32692, 29475, -18473, 2589, 13978, -26853, 32633, -29792, 19079, -3327, -13305, 26421, -32558, 30092, -19677, 4062, 12624, -25978, 32466, -30378, 20264, -4797, -11939, 25519, -32358, 30647, -20841, 5527, 11245, -25049, 32232, -30902, 21406, -6257, -10548, 24564, -32092, 31140, -21963, 6981, 9843, -24068, 31933, -31363, 22506, -7704, -9135, 23559, -31760, 31569, -23039, 8421, 8421, -23039, 31569, -31760, 23559, -9135, -7704, 22506, -31363, 31933, -24068, 9843, 6981, -21963, 31140, -32092, 24564, -10548, -6257, 21406, -30902, 32232, -25049, 11245, 5527, -20841, 30647, -32358, 25519, -11939, -4797, 20264, -30378, 32466, -25978, 12624, 4062, -19677, 30092, -32558, 26421, -13305, -3327, 19079, -29792, 32633, -26853, 13978, 2589, -18473, 29475, -32692, 27270, -14645, -1851, 17856, -29146, 32733, -27675, 15303, 1110, -17232, 28799, -32759, 28063, -15955, -371, 16596, -28439}, +{32767, -27675, 13978, 4062, -20841, 31140, -31760, 22506, -6257, -11939, 26421, -32692, 28799, -15955, -1851, 19079, -30378, 32232, -24068, 8421, 9843, -25049, 32466, -29792, 17856, -371, -17232, 29475, -32558, 25519, -10548, -7704, 23559, -32092, 30647, -19677, 2589, 15303, -28439, 32733, -26853, 12624, 5527, -21963, 31569, -31363, 21406, -4797, -13305, 27270, -32759, 28063, -14645, -3327, 20264, -30902, 31933, -23039, 6981, 11245, -25978, 32633, -29146, 16596, 1110, -18473, 30092, -32358, 24564, -9135, -9135, 24564, -32358, 30092, -18473, 1110, 16596, -29146, 32633, -25978, 11245, 6981, -23039, 31933, -30902, 20264, -3327, -14645, 28063, -32759, 27270, -13305, -4797, 21406, -31363, 31569, -21963, 5527, 12624, -26853, 32733, -28439, 15303, 2589, -19677, 30647, -32092, 23559, -7704, -10548, 25519, -32558, 29475, -17232, -371, 17856, -29792, 32466, -25049, 9843, 8421, -24068, 32232, -30378, 19079, -1851, -15955, 28799, -32692, 26421, -11939, -6257, 22506, -31760, 31140, -20841, 4062, 13978, -27675}, +{32767, -26853, 11245, 8421, -25049, 32633, -28439, 13978, 5527, -23039, 32232, -29792, 16596, 2589, -20841, 31569, -30902, 19079, -371, -18473, 30647, -31760, 21406, -3327, -15955, 29475, -32358, 23559, -6257, -13305, 28063, -32692, 25519, -9135, -10548, 26421, -32759, 27270, -11939, -7704, 24564, -32558, 28799, -14645, -4797, 22506, -32092, 30092, -17232, -1851, 20264, -31363, 31140, -19677, 1110, 17856, -30378, 31933, -21963, 4062, 15303, -29146, 32466, -24068, 6981, 12624, -27675, 32733, -25978, 9843, 9843, -25978, 32733, -27675, 12624, 6981, -24068, 32466, -29146, 15303, 4062, -21963, 31933, -30378, 17856, 1110, -19677, 31140, -31363, 20264, -1851, -17232, 30092, -32092, 22506, -4797, -14645, 28799, -32558, 24564, -7704, -11939, 27270, -32759, 26421, -10548, -9135, 25519, -32692, 28063, -13305, -6257, 23559, -32358, 29475, -15955, -3327, 21406, -31760, 30647, -18473, -371, 19079, -30902, 31569, -20841, 2589, 16596, -29792, 32232, -23039, 5527, 13978, -28439, 32633, -25049, 8421, 11245, -26853}, +{32767, -25978, 8421, 12624, -28439, 32466, -23039, 4062, 16596, -30378, 31569, -19677, -371, 20264, -31760, 30092, -15955, -4797, 23559, -32558, 28063, -11939, -9135, 26421, -32759, 25519, -7704, -13305, 28799, -32358, 22506, -3327, -17232, 30647, -31363, 19079, 1110, -20841, 31933, -29792, 15303, 5527, -24068, 32633, -27675, 11245, 9843, -26853, 32733, -25049, 6981, 13978, -29146, 32232, -21963, 2589, 17856, -30902, 31140, -18473, -1851, 21406, -32092, 29475, -14645, -6257, 24564, -32692, 27270, -10548, -10548, 27270, -32692, 24564, -6257, -14645, 29475, -32092, 21406, -1851, -18473, 31140, -30902, 17856, 2589, -21963, 32232, -29146, 13978, 6981, -25049, 32733, -26853, 9843, 11245, -27675, 32633, -24068, 5527, 15303, -29792, 31933, -20841, 1110, 19079, -31363, 30647, -17232, -3327, 22506, -32358, 28799, -13305, -7704, 25519, -32759, 26421, -9135, -11939, 28063, -32558, 23559, -4797, -15955, 30092, -31760, 20264, -371, -19677, 31569, -30378, 16596, 4062, -23039, 32466, -28439, 12624, 8421, -25978}, +{32767, -25049, 5527, 16596, -30902, 30647, -15955, -6257, 25519, -32759, 24564, -4797, -17232, 31140, -30378, 15303, 6981, -25978, 32733, -24068, 4062, 17856, -31363, 30092, -14645, -7704, 26421, -32692, 23559, -3327, -18473, 31569, -29792, 13978, 8421, -26853, 32633, -23039, 2589, 19079, -31760, 29475, -13305, -9135, 27270, -32558, 22506, -1851, -19677, 31933, -29146, 12624, 9843, -27675, 32466, -21963, 1110, 20264, -32092, 28799, -11939, -10548, 28063, -32358, 21406, -371, -20841, 32232, -28439, 11245, 11245, -28439, 32232, -20841, -371, 21406, -32358, 28063, -10548, -11939, 28799, -32092, 20264, 1110, -21963, 32466, -27675, 9843, 12624, -29146, 31933, -19677, -1851, 22506, -32558, 27270, -9135, -13305, 29475, -31760, 19079, 2589, -23039, 32633, -26853, 8421, 13978, -29792, 31569, -18473, -3327, 23559, -32692, 26421, -7704, -14645, 30092, -31363, 17856, 4062, -24068, 32733, -25978, 6981, 15303, -30378, 31140, -17232, -4797, 24564, -32759, 25519, -6257, -15955, 30647, -30902, 16596, 5527, -25049}, +{32767, -24068, 2589, 20264, -32358, 27270, -7704, -15955, 31140, -29792, 12624, 11245, -29146, 31569, -17232, -6257, 26421, -32558, 21406, 1110, -23039, 32733, -25049, 4062, 19079, -32092, 28063, -9135, -14645, 30647, -30378, 13978, 9843, -28439, 31933, -18473, -4797, 25519, -32692, 22506, -371, -21963, 32633, -25978, 5527, 17856, -31760, 28799, -10548, -13305, 30092, -30902, 15303, 8421, -27675, 32232, -19677, -3327, 24564, -32759, 23559, -1851, -20841, 32466, -26853, 6981, 16596, -31363, 29475, -11939, -11939, 29475, -31363, 16596, 6981, -26853, 32466, -20841, -1851, 23559, -32759, 24564, -3327, -19677, 32232, -27675, 8421, 15303, -30902, 30092, -13305, -10548, 28799, -31760, 17856, 5527, -25978, 32633, -21963, -371, 22506, -32692, 25519, -4797, -18473, 31933, -28439, 9843, 13978, -30378, 30647, -14645, -9135, 28063, -32092, 19079, 4062, -25049, 32733, -23039, 1110, 21406, -32558, 26421, -6257, -17232, 31569, -29146, 11245, 12624, -29792, 31140, -15955, -7704, 27270, -32358, 20264, 2589, -24068}, +{32767, -23039, -371, 23559, -32759, 22506, 1110, -24068, 32733, -21963, -1851, 24564, -32692, 21406, 2589, -25049, 32633, -20841, -3327, 25519, -32558, 20264, 4062, -25978, 32466, -19677, -4797, 26421, -32358, 19079, 5527, -26853, 32232, -18473, -6257, 27270, -32092, 17856, 6981, -27675, 31933, -17232, -7704, 28063, -31760, 16596, 8421, -28439, 31569, -15955, -9135, 28799, -31363, 15303, 9843, -29146, 31140, -14645, -10548, 29475, -30902, 13978, 11245, -29792, 30647, -13305, -11939, 30092, -30378, 12624, 12624, -30378, 30092, -11939, -13305, 30647, -29792, 11245, 13978, -30902, 29475, -10548, -14645, 31140, -29146, 9843, 15303, -31363, 28799, -9135, -15955, 31569, -28439, 8421, 16596, -31760, 28063, -7704, -17232, 31933, -27675, 6981, 17856, -32092, 27270, -6257, -18473, 32232, -26853, 5527, 19079, -32358, 26421, -4797, -19677, 32466, -25978, 4062, 20264, -32558, 25519, -3327, -20841, 32633, -25049, 2589, 21406, -32692, 24564, -1851, -21963, 32733, -24068, 1110, 22506, -32759, 23559, -371, -23039}, +{32767, -21963, -3327, 26421, -32092, 16596, 9843, -29792, 30092, -10548, -15955, 31933, -26853, 4062, 21406, -32759, 22506, 2589, -25978, 32232, -17232, -9135, 29475, -30378, 11245, 15303, -31760, 27270, -4797, -20841, 32733, -23039, -1851, 25519, -32358, 17856, 8421, -29146, 30647, -11939, -14645, 31569, -27675, 5527, 20264, -32692, 23559, 1110, -25049, 32466, -18473, -7704, 28799, -30902, 12624, 13978, -31363, 28063, -6257, -19677, 32633, -24068, -371, 24564, -32558, 19079, 6981, -28439, 31140, -13305, -13305, 31140, -28439, 6981, 19079, -32558, 24564, -371, -24068, 32633, -19677, -6257, 28063, -31363, 13978, 12624, -30902, 28799, -7704, -18473, 32466, -25049, 1110, 23559, -32692, 20264, 5527, -27675, 31569, -14645, -11939, 30647, -29146, 8421, 17856, -32358, 25519, -1851, -23039, 32733, -20841, -4797, 27270, -31760, 15303, 11245, -30378, 29475, -9135, -17232, 32232, -25978, 2589, 22506, -32759, 21406, 4062, -26853, 31933, -15955, -10548, 30092, -29792, 9843, 16596, -32092, 26421, -3327, -21963}, +{32767, -20841, -6257, 28799, -30378, 9843, 17856, -32558, 23559, 2589, -26853, 31569, -13305, -14645, 31933, -25978, 1110, 24564, -32358, 16596, 11245, -30902, 28063, -4797, -21963, 32733, -19677, -7704, 29475, -29792, 8421, 19079, -32692, 22506, 4062, -27675, 31140, -11939, -15955, 32232, -25049, -371, 25519, -32092, 15303, 12624, -31363, 27270, -3327, -23039, 32633, -18473, -9135, 30092, -29146, 6981, 20264, -32759, 21406, 5527, -28439, 30647, -10548, -17232, 32466, -24068, -1851, 26421, -31760, 13978, 13978, -31760, 26421, -1851, -24068, 32466, -17232, -10548, 30647, -28439, 5527, 21406, -32759, 20264, 6981, -29146, 30092, -9135, -18473, 32633, -23039, -3327, 27270, -31363, 12624, 15303, -32092, 25519, -371, -25049, 32232, -15955, -11939, 31140, -27675, 4062, 22506, -32692, 19079, 8421, -29792, 29475, -7704, -19677, 32733, -21963, -4797, 28063, -30902, 11245, 16596, -32358, 24564, 1110, -25978, 31933, -14645, -13305, 31569, -26853, 2589, 23559, -32558, 17856, 9843, -30378, 28799, -6257, -20841}, +{32767, -19677, -9135, 30647, -27675, 2589, 24564, -32092, 13978, 15303, -32358, 23559, 4062, -28439, 30092, -7704, -20841, 32733, -18473, -10548, 31140, -26853, 1110, 25519, -31760, 12624, 16596, -32558, 22506, 5527, -29146, 29475, -6257, -21963, 32633, -17232, -11939, 31569, -25978, -371, 26421, -31363, 11245, 17856, -32692, 21406, 6981, -29792, 28799, -4797, -23039, 32466, -15955, -13305, 31933, -25049, -1851, 27270, -30902, 9843, 19079, -32759, 20264, 8421, -30378, 28063, -3327, -24068, 32232, -14645, -14645, 32232, -24068, -3327, 28063, -30378, 8421, 20264, -32759, 19079, 9843, -30902, 27270, -1851, -25049, 31933, -13305, -15955, 32466, -23039, -4797, 28799, -29792, 6981, 21406, -32692, 17856, 11245, -31363, 26421, -371, -25978, 31569, -11939, -17232, 32633, -21963, -6257, 29475, -29146, 5527, 22506, -32558, 16596, 12624, -31760, 25519, 1110, -26853, 31140, -10548, -18473, 32733, -20841, -7704, 30092, -28439, 4062, 23559, -32358, 15303, 13978, -32092, 24564, 2589, -27675, 30647, -9135, -19677}, +{32767, -18473, -11939, 31933, -24068, -4797, 29475, -28439, 2589, 25519, -31363, 9843, 20264, -32692, 16596, 13978, -32358, 22506, 6981, -30378, 27270, -371, -26853, 30647, -7704, -21963, 32466, -14645, -15955, 32633, -20841, -9135, 31140, -25978, -1851, 28063, -29792, 5527, 23559, -32092, 12624, 17856, -32759, 19079, 11245, -31760, 24564, 4062, -29146, 28799, -3327, -25049, 31569, -10548, -19677, 32733, -17232, -13305, 32232, -23039, -6257, 30092, -27675, 1110, 26421, -30902, 8421, 21406, -32558, 15303, 15303, -32558, 21406, 8421, -30902, 26421, 1110, -27675, 30092, -6257, -23039, 32232, -13305, -17232, 32733, -19677, -10548, 31569, -25049, -3327, 28799, -29146, 4062, 24564, -31760, 11245, 19079, -32759, 17856, 12624, -32092, 23559, 5527, -29792, 28063, -1851, -25978, 31140, -9135, -20841, 32633, -15955, -14645, 32466, -21963, -7704, 30647, -26853, -371, 27270, -30378, 6981, 22506, -32358, 13978, 16596, -32692, 20264, 9843, -31363, 25519, 2589, -28439, 29475, -4797, -24068, 31933, -11939, -18473}, +{32767, -17232, -14645, 32633, -19677, -11939, 32232, -21963, -9135, 31569, -24068, -6257, 30647, -25978, -3327, 29475, -27675, -371, 28063, -29146, 2589, 26421, -30378, 5527, 24564, -31363, 8421, 22506, -32092, 11245, 20264, -32558, 13978, 17856, -32759, 16596, 15303, -32692, 19079, 12624, -32358, 21406, 9843, -31760, 23559, 6981, -30902, 25519, 4062, -29792, 27270, 1110, -28439, 28799, -1851, -26853, 30092, -4797, -25049, 31140, -7704, -23039, 31933, -10548, -20841, 32466, -13305, -18473, 32733, -15955, -15955, 32733, -18473, -13305, 32466, -20841, -10548, 31933, -23039, -7704, 31140, -25049, -4797, 30092, -26853, -1851, 28799, -28439, 1110, 27270, -29792, 4062, 25519, -30902, 6981, 23559, -31760, 9843, 21406, -32358, 12624, 19079, -32692, 15303, 16596, -32759, 17856, 13978, -32558, 20264, 11245, -32092, 22506, 8421, -31363, 24564, 5527, -30378, 26421, 2589, -29146, 28063, -371, -27675, 29475, -3327, -25978, 30647, -6257, -24068, 31569, -9135, -21963, 32232, -11939, -19677, 32633, -14645, -17232}, +{32767, -15955, -17232, 32733, -14645, -18473, 32633, -13305, -19677, 32466, -11939, -20841, 32232, -10548, -21963, 31933, -9135, -23039, 31569, -7704, -24068, 31140, -6257, -25049, 30647, -4797, -25978, 30092, -3327, -26853, 29475, -1851, -27675, 28799, -371, -28439, 28063, 1110, -29146, 27270, 2589, -29792, 26421, 4062, -30378, 25519, 5527, -30902, 24564, 6981, -31363, 23559, 8421, -31760, 22506, 9843, -32092, 21406, 11245, -32358, 20264, 12624, -32558, 19079, 13978, -32692, 17856, 15303, -32759, 16596, 16596, -32759, 15303, 17856, -32692, 13978, 19079, -32558, 12624, 20264, -32358, 11245, 21406, -32092, 9843, 22506, -31760, 8421, 23559, -31363, 6981, 24564, -30902, 5527, 25519, -30378, 4062, 26421, -29792, 2589, 27270, -29146, 1110, 28063, -28439, -371, 28799, -27675, -1851, 29475, -26853, -3327, 30092, -25978, -4797, 30647, -25049, -6257, 31140, -24068, -7704, 31569, -23039, -9135, 31933, -21963, -10548, 32232, -20841, -11939, 32466, -19677, -13305, 32633, -18473, -14645, 32733, -17232, -15955}, +{32767, -14645, -19677, 32232, -9135, -24068, 30647, -3327, -27675, 28063, 2589, -30378, 24564, 8421, -32092, 20264, 13978, -32759, 15303, 19079, -32358, 9843, 23559, -30902, 4062, 27270, -28439, -1851, 30092, -25049, -7704, 31933, -20841, -13305, 32733, -15955, -18473, 32466, -10548, -23039, 31140, -4797, -26853, 28799, 1110, -29792, 25519, 6981, -31760, 21406, 12624, -32692, 16596, 17856, -32558, 11245, 22506, -31363, 5527, 26421, -29146, -371, 29475, -25978, -6257, 31569, -21963, -11939, 32633, -17232, -17232, 32633, -11939, -21963, 31569, -6257, -25978, 29475, -371, -29146, 26421, 5527, -31363, 22506, 11245, -32558, 17856, 16596, -32692, 12624, 21406, -31760, 6981, 25519, -29792, 1110, 28799, -26853, -4797, 31140, -23039, -10548, 32466, -18473, -15955, 32733, -13305, -20841, 31933, -7704, -25049, 30092, -1851, -28439, 27270, 4062, -30902, 23559, 9843, -32358, 19079, 15303, -32759, 13978, 20264, -32092, 8421, 24564, -30378, 2589, 28063, -27675, -3327, 30647, -24068, -9135, 32232, -19677, -14645}, +{32767, -13305, -21963, 31140, -3327, -28439, 26421, 6981, -32092, 19079, 16596, -32558, 9843, 24564, -29792, -371, 30092, -24068, -10548, 32633, -15955, -19677, 31933, -6257, -26853, 28063, 4062, -31363, 21406, 13978, -32759, 12624, 22506, -30902, 2589, 28799, -25978, -7704, 32232, -18473, -17232, 32466, -9135, -25049, 29475, 1110, -30378, 23559, 11245, -32692, 15303, 20264, -31760, 5527, 27270, -27675, -4797, 31569, -20841, -14645, 32733, -11939, -23039, 30647, -1851, -29146, 25519, 8421, -32358, 17856, 17856, -32358, 8421, 25519, -29146, -1851, 30647, -23039, -11939, 32733, -14645, -20841, 31569, -4797, -27675, 27270, 5527, -31760, 20264, 15303, -32692, 11245, 23559, -30378, 1110, 29475, -25049, -9135, 32466, -17232, -18473, 32232, -7704, -25978, 28799, 2589, -30902, 22506, 12624, -32759, 13978, 21406, -31363, 4062, 28063, -26853, -6257, 31933, -19677, -15955, 32633, -10548, -24068, 30092, -371, -29792, 24564, 9843, -32558, 16596, 19079, -32092, 6981, 26421, -28439, -3327, 31140, -21963, -13305}, +{32767, -11939, -24068, 29475, 2589, -31363, 20264, 16596, -32358, 6981, 27270, -26853, -7704, 32466, -15955, -20841, 31140, -1851, -29792, 23559, 12624, -32759, 11245, 24564, -29146, -3327, 31569, -19677, -17232, 32232, -6257, -27675, 26421, 8421, -32558, 15303, 21406, -30902, 1110, 30092, -23039, -13305, 32733, -10548, -25049, 28799, 4062, -31760, 19079, 17856, -32092, 5527, 28063, -25978, -9135, 32633, -14645, -21963, 30647, -371, -30378, 22506, 13978, -32692, 9843, 25519, -28439, -4797, 31933, -18473, -18473, 31933, -4797, -28439, 25519, 9843, -32692, 13978, 22506, -30378, -371, 30647, -21963, -14645, 32633, -9135, -25978, 28063, 5527, -32092, 17856, 19079, -31760, 4062, 28799, -25049, -10548, 32733, -13305, -23039, 30092, 1110, -30902, 21406, 15303, -32558, 8421, 26421, -27675, -6257, 32232, -17232, -19677, 31569, -3327, -29146, 24564, 11245, -32759, 12624, 23559, -29792, -1851, 31140, -20841, -15955, 32466, -7704, -26853, 27270, 6981, -32358, 16596, 20264, -31363, 2589, 29475, -24068, -11939}, +{32767, -10548, -25978, 27270, 8421, -32692, 12624, 24564, -28439, -6257, 32466, -14645, -23039, 29475, 4062, -32092, 16596, 21406, -30378, -1851, 31569, -18473, -19677, 31140, -371, -30902, 20264, 17856, -31760, 2589, 30092, -21963, -15955, 32232, -4797, -29146, 23559, 13978, -32558, 6981, 28063, -25049, -11939, 32733, -9135, -26853, 26421, 9843, -32759, 11245, 25519, -27675, -7704, 32633, -13305, -24068, 28799, 5527, -32358, 15303, 22506, -29792, -3327, 31933, -17232, -20841, 30647, 1110, -31363, 19079, 19079, -31363, 1110, 30647, -20841, -17232, 31933, -3327, -29792, 22506, 15303, -32358, 5527, 28799, -24068, -13305, 32633, -7704, -27675, 25519, 11245, -32759, 9843, 26421, -26853, -9135, 32733, -11939, -25049, 28063, 6981, -32558, 13978, 23559, -29146, -4797, 32232, -15955, -21963, 30092, 2589, -31760, 17856, 20264, -30902, -371, 31140, -19677, -18473, 31569, -1851, -30378, 21406, 16596, -32092, 4062, 29475, -23039, -14645, 32466, -6257, -28439, 24564, 12624, -32692, 8421, 27270, -25978, -10548}, +{32767, -9135, -27675, 24564, 13978, -32358, 4062, 30092, -20841, -18473, 31140, 1110, -31760, 16596, 22506, -29146, -6257, 32633, -11939, -25978, 26421, 11245, -32692, 6981, 28799, -23039, -15955, 31933, -1851, -30902, 19079, 20264, -30378, -3327, 32232, -14645, -24068, 28063, 8421, -32759, 9843, 27270, -25049, -13305, 32466, -4797, -29792, 21406, 17856, -31363, -371, 31569, -17232, -21963, 29475, 5527, -32558, 12624, 25519, -26853, -10548, 32733, -7704, -28439, 23559, 15303, -32092, 2589, 30647, -19677, -19677, 30647, 2589, -32092, 15303, 23559, -28439, -7704, 32733, -10548, -26853, 25519, 12624, -32558, 5527, 29475, -21963, -17232, 31569, -371, -31363, 17856, 21406, -29792, -4797, 32466, -13305, -25049, 27270, 9843, -32759, 8421, 28063, -24068, -14645, 32232, -3327, -30378, 20264, 19079, -30902, -1851, 31933, -15955, -23039, 28799, 6981, -32692, 11245, 26421, -25978, -11939, 32633, -6257, -29146, 22506, 16596, -31760, 1110, 31140, -18473, -20841, 30092, 4062, -32358, 13978, 24564, -27675, -9135}, +{32767, -7704, -29146, 21406, 19079, -30378, -4797, 32633, -10548, -27675, 23559, 16596, -31363, -1851, 32232, -13305, -25978, 25519, 13978, -32092, 1110, 31569, -15955, -24068, 27270, 11245, -32558, 4062, 30647, -18473, -21963, 28799, 8421, -32759, 6981, 29475, -20841, -19677, 30092, 5527, -32692, 9843, 28063, -23039, -17232, 31140, 2589, -32358, 12624, 26421, -25049, -14645, 31933, -371, -31760, 15303, 24564, -26853, -11939, 32466, -3327, -30902, 17856, 22506, -28439, -9135, 32733, -6257, -29792, 20264, 20264, -29792, -6257, 32733, -9135, -28439, 22506, 17856, -30902, -3327, 32466, -11939, -26853, 24564, 15303, -31760, -371, 31933, -14645, -25049, 26421, 12624, -32358, 2589, 31140, -17232, -23039, 28063, 9843, -32692, 5527, 30092, -19677, -20841, 29475, 6981, -32759, 8421, 28799, -21963, -18473, 30647, 4062, -32558, 11245, 27270, -24068, -15955, 31569, 1110, -32092, 13978, 25519, -25978, -13305, 32232, -1851, -31363, 16596, 23559, -27675, -10548, 32633, -4797, -30378, 19079, 21406, -29146, -7704}, +{32767, -6257, -30378, 17856, 23559, -26853, -13305, 31933, 1110, -32358, 11245, 28063, -21963, -19677, 29475, 8421, -32692, 4062, 31140, -15955, -25049, 25519, 15303, -31363, -3327, 32633, -9135, -29146, 20264, 21406, -28439, -10548, 32466, -1851, -31760, 13978, 26421, -24068, -17232, 30647, 5527, -32759, 6981, 30092, -18473, -23039, 27270, 12624, -32092, -371, 32232, -11939, -27675, 22506, 19079, -29792, -7704, 32733, -4797, -30902, 16596, 24564, -25978, -14645, 31569, 2589, -32558, 9843, 28799, -20841, -20841, 28799, 9843, -32558, 2589, 31569, -14645, -25978, 24564, 16596, -30902, -4797, 32733, -7704, -29792, 19079, 22506, -27675, -11939, 32232, -371, -32092, 12624, 27270, -23039, -18473, 30092, 6981, -32759, 5527, 30647, -17232, -24068, 26421, 13978, -31760, -1851, 32466, -10548, -28439, 21406, 20264, -29146, -9135, 32633, -3327, -31363, 15303, 25519, -25049, -15955, 31140, 4062, -32692, 8421, 29475, -19677, -21963, 28063, 11245, -32358, 1110, 31933, -13305, -26853, 23559, 17856, -30378, -6257}, +{32767, -4797, -31363, 13978, 27270, -21963, -20841, 28063, 12624, -31760, -3327, 32733, -6257, -30902, 15303, 26421, -23039, -19677, 28799, 11245, -32092, -1851, 32633, -7704, -30378, 16596, 25519, -24068, -18473, 29475, 9843, -32358, -371, 32466, -9135, -29792, 17856, 24564, -25049, -17232, 30092, 8421, -32558, 1110, 32232, -10548, -29146, 19079, 23559, -25978, -15955, 30647, 6981, -32692, 2589, 31933, -11939, -28439, 20264, 22506, -26853, -14645, 31140, 5527, -32759, 4062, 31569, -13305, -27675, 21406, 21406, -27675, -13305, 31569, 4062, -32759, 5527, 31140, -14645, -26853, 22506, 20264, -28439, -11939, 31933, 2589, -32692, 6981, 30647, -15955, -25978, 23559, 19079, -29146, -10548, 32232, 1110, -32558, 8421, 30092, -17232, -25049, 24564, 17856, -29792, -9135, 32466, -371, -32358, 9843, 29475, -18473, -24068, 25519, 16596, -30378, -7704, 32633, -1851, -32092, 11245, 28799, -19677, -23039, 26421, 15303, -30902, -6257, 32733, -3327, -31760, 12624, 28063, -20841, -21963, 27270, 13978, -31363, -4797}, +{32767, -3327, -32092, 9843, 30092, -15955, -26853, 21406, 22506, -25978, -17232, 29475, 11245, -31760, -4797, 32733, -1851, -32358, 8421, 30647, -14645, -27675, 20264, 23559, -25049, -18473, 28799, 12624, -31363, -6257, 32633, -371, -32558, 6981, 31140, -13305, -28439, 19079, 24564, -24068, -19677, 28063, 13978, -30902, -7704, 32466, 1110, -32692, 5527, 31569, -11939, -29146, 17856, 25519, -23039, -20841, 27270, 15303, -30378, -9135, 32232, 2589, -32759, 4062, 31933, -10548, -29792, 16596, 26421, -21963, -21963, 26421, 16596, -29792, -10548, 31933, 4062, -32759, 2589, 32232, -9135, -30378, 15303, 27270, -20841, -23039, 25519, 17856, -29146, -11939, 31569, 5527, -32692, 1110, 32466, -7704, -30902, 13978, 28063, -19677, -24068, 24564, 19079, -28439, -13305, 31140, 6981, -32558, -371, 32633, -6257, -31363, 12624, 28799, -18473, -25049, 23559, 20264, -27675, -14645, 30647, 8421, -32358, -1851, 32733, -4797, -31760, 11245, 29475, -17232, -25978, 22506, 21406, -26853, -15955, 30092, 9843, -32092, -3327}, +{32767, -1851, -32558, 5527, 31933, -9135, -30902, 12624, 29475, -15955, -27675, 19079, 25519, -21963, -23039, 24564, 20264, -26853, -17232, 28799, 13978, -30378, -10548, 31569, 6981, -32358, -3327, 32733, -371, -32692, 4062, 32232, -7704, -31363, 11245, 30092, -14645, -28439, 17856, 26421, -20841, -24068, 23559, 21406, -25978, -18473, 28063, 15303, -29792, -11939, 31140, 8421, -32092, -4797, 32633, 1110, -32759, 2589, 32466, -6257, -31760, 9843, 30647, -13305, -29146, 16596, 27270, -19677, -25049, 22506, 22506, -25049, -19677, 27270, 16596, -29146, -13305, 30647, 9843, -31760, -6257, 32466, 2589, -32759, 1110, 32633, -4797, -32092, 8421, 31140, -11939, -29792, 15303, 28063, -18473, -25978, 21406, 23559, -24068, -20841, 26421, 17856, -28439, -14645, 30092, 11245, -31363, -7704, 32232, 4062, -32692, -371, 32733, -3327, -32358, 6981, 31569, -10548, -30378, 13978, 28799, -17232, -26853, 20264, 24564, -23039, -21963, 25519, 19079, -27675, -15955, 29475, 12624, -30902, -9135, 31933, 5527, -32558, -1851}, +{32767, -371, -32759, 1110, 32733, -1851, -32692, 2589, 32633, -3327, -32558, 4062, 32466, -4797, -32358, 5527, 32232, -6257, -32092, 6981, 31933, -7704, -31760, 8421, 31569, -9135, -31363, 9843, 31140, -10548, -30902, 11245, 30647, -11939, -30378, 12624, 30092, -13305, -29792, 13978, 29475, -14645, -29146, 15303, 28799, -15955, -28439, 16596, 28063, -17232, -27675, 17856, 27270, -18473, -26853, 19079, 26421, -19677, -25978, 20264, 25519, -20841, -25049, 21406, 24564, -21963, -24068, 22506, 23559, -23039, -23039, 23559, 22506, -24068, -21963, 24564, 21406, -25049, -20841, 25519, 20264, -25978, -19677, 26421, 19079, -26853, -18473, 27270, 17856, -27675, -17232, 28063, 16596, -28439, -15955, 28799, 15303, -29146, -14645, 29475, 13978, -29792, -13305, 30092, 12624, -30378, -11939, 30647, 11245, -30902, -10548, 31140, 9843, -31363, -9135, 31569, 8421, -31760, -7704, 31933, 6981, -32092, -6257, 32232, 5527, -32358, -4797, 32466, 4062, -32558, -3327, 32633, 2589, -32692, -1851, 32733, 1110, -32759, -371}, +{32767, 1110, -32692, -3327, 32466, 5527, -32092, -7704, 31569, 9843, -30902, -11939, 30092, 13978, -29146, -15955, 28063, 17856, -26853, -19677, 25519, 21406, -24068, -23039, 22506, 24564, -20841, -25978, 19079, 27270, -17232, -28439, 15303, 29475, -13305, -30378, 11245, 31140, -9135, -31760, 6981, 32232, -4797, -32558, 2589, 32733, -371, -32759, -1851, 32633, 4062, -32358, -6257, 31933, 8421, -31363, -10548, 30647, 12624, -29792, -14645, 28799, 16596, -27675, -18473, 26421, 20264, -25049, -21963, 23559, 23559, -21963, -25049, 20264, 26421, -18473, -27675, 16596, 28799, -14645, -29792, 12624, 30647, -10548, -31363, 8421, 31933, -6257, -32358, 4062, 32633, -1851, -32759, -371, 32733, 2589, -32558, -4797, 32232, 6981, -31760, -9135, 31140, 11245, -30378, -13305, 29475, 15303, -28439, -17232, 27270, 19079, -25978, -20841, 24564, 22506, -23039, -24068, 21406, 25519, -19677, -26853, 17856, 28063, -15955, -29146, 13978, 30092, -11939, -30902, 9843, 31569, -7704, -32092, 5527, 32466, -3327, -32692, 1110}, +{32767, 2589, -32358, -7704, 31140, 12624, -29146, -17232, 26421, 21406, -23039, -25049, 19079, 28063, -14645, -30378, 9843, 31933, -4797, -32692, -371, 32633, 5527, -31760, -10548, 30092, 15303, -27675, -19677, 24564, 23559, -20841, -26853, 16596, 29475, -11939, -31363, 6981, 32466, -1851, -32759, -3327, 32232, 8421, -30902, -13305, 28799, 17856, -25978, -21963, 22506, 25519, -18473, -28439, 13978, 30647, -9135, -32092, 4062, 32733, 1110, -32558, -6257, 31569, 11245, -29792, -15955, 27270, 20264, -24068, -24068, 20264, 27270, -15955, -29792, 11245, 31569, -6257, -32558, 1110, 32733, 4062, -32092, -9135, 30647, 13978, -28439, -18473, 25519, 22506, -21963, -25978, 17856, 28799, -13305, -30902, 8421, 32232, -3327, -32759, -1851, 32466, 6981, -31363, -11939, 29475, 16596, -26853, -20841, 23559, 24564, -19677, -27675, 15303, 30092, -10548, -31760, 5527, 32633, -371, -32692, -4797, 31933, 9843, -30378, -14645, 28063, 19079, -25049, -23039, 21406, 26421, -17232, -29146, 12624, 31140, -7704, -32358, 2589}, +{32767, 4062, -31760, -11939, 28799, 19079, -24068, -25049, 17856, 29475, -10548, -32092, 2589, 32733, 5527, -31363, -13305, 28063, 20264, -23039, -25978, 16596, 30092, -9135, -32358, 1110, 32633, 6981, -30902, -14645, 27270, 21406, -21963, -26853, 15303, 30647, -7704, -32558, -371, 32466, 8421, -30378, -15955, 26421, 22506, -20841, -27675, 13978, 31140, -6257, -32692, -1851, 32232, 9843, -29792, -17232, 25519, 23559, -19677, -28439, 12624, 31569, -4797, -32759, -3327, 31933, 11245, -29146, -18473, 24564, 24564, -18473, -29146, 11245, 31933, -3327, -32759, -4797, 31569, 12624, -28439, -19677, 23559, 25519, -17232, -29792, 9843, 32232, -1851, -32692, -6257, 31140, 13978, -27675, -20841, 22506, 26421, -15955, -30378, 8421, 32466, -371, -32558, -7704, 30647, 15303, -26853, -21963, 21406, 27270, -14645, -30902, 6981, 32633, 1110, -32358, -9135, 30092, 16596, -25978, -23039, 20264, 28063, -13305, -31363, 5527, 32733, 2589, -32092, -10548, 29475, 17856, -25049, -24068, 19079, 28799, -11939, -31760, 4062}, +{32767, 5527, -30902, -15955, 25519, 24564, -17232, -30378, 6981, 32733, 4062, -31363, -14645, 26421, 23559, -18473, -29792, 8421, 32633, 2589, -31760, -13305, 27270, 22506, -19677, -29146, 9843, 32466, 1110, -32092, -11939, 28063, 21406, -20841, -28439, 11245, 32232, -371, -32358, -10548, 28799, 20264, -21963, -27675, 12624, 31933, -1851, -32558, -9135, 29475, 19079, -23039, -26853, 13978, 31569, -3327, -32692, -7704, 30092, 17856, -24068, -25978, 15303, 31140, -4797, -32759, -6257, 30647, 16596, -25049, -25049, 16596, 30647, -6257, -32759, -4797, 31140, 15303, -25978, -24068, 17856, 30092, -7704, -32692, -3327, 31569, 13978, -26853, -23039, 19079, 29475, -9135, -32558, -1851, 31933, 12624, -27675, -21963, 20264, 28799, -10548, -32358, -371, 32232, 11245, -28439, -20841, 21406, 28063, -11939, -32092, 1110, 32466, 9843, -29146, -19677, 22506, 27270, -13305, -31760, 2589, 32633, 8421, -29792, -18473, 23559, 26421, -14645, -31363, 4062, 32733, 6981, -30378, -17232, 24564, 25519, -15955, -30902, 5527}, +{32767, 6981, -29792, -19677, 21406, 28799, -9135, -32692, -4797, 30647, 17856, -23039, -27675, 11245, 32466, 2589, -31363, -15955, 24564, 26421, -13305, -32092, -371, 31933, 13978, -25978, -25049, 15303, 31569, -1851, -32358, -11939, 27270, 23559, -17232, -30902, 4062, 32633, 9843, -28439, -21963, 19079, 30092, -6257, -32759, -7704, 29475, 20264, -20841, -29146, 8421, 32733, 5527, -30378, -18473, 22506, 28063, -10548, -32558, -3327, 31140, 16596, -24068, -26853, 12624, 32232, 1110, -31760, -14645, 25519, 25519, -14645, -31760, 1110, 32232, 12624, -26853, -24068, 16596, 31140, -3327, -32558, -10548, 28063, 22506, -18473, -30378, 5527, 32733, 8421, -29146, -20841, 20264, 29475, -7704, -32759, -6257, 30092, 19079, -21963, -28439, 9843, 32633, 4062, -30902, -17232, 23559, 27270, -11939, -32358, -1851, 31569, 15303, -25049, -25978, 13978, 31933, -371, -32092, -13305, 26421, 24564, -15955, -31363, 2589, 32466, 11245, -27675, -23039, 17856, 30647, -4797, -32692, -9135, 28799, 21406, -19677, -29792, 6981}, +{32767, 8421, -28439, -23039, 16596, 31569, -371, -31760, -15955, 23559, 28063, -9135, -32759, -7704, 28799, 22506, -17232, -31363, 1110, 31933, 15303, -24068, -27675, 9843, 32733, 6981, -29146, -21963, 17856, 31140, -1851, -32092, -14645, 24564, 27270, -10548, -32692, -6257, 29475, 21406, -18473, -30902, 2589, 32232, 13978, -25049, -26853, 11245, 32633, 5527, -29792, -20841, 19079, 30647, -3327, -32358, -13305, 25519, 26421, -11939, -32558, -4797, 30092, 20264, -19677, -30378, 4062, 32466, 12624, -25978, -25978, 12624, 32466, 4062, -30378, -19677, 20264, 30092, -4797, -32558, -11939, 26421, 25519, -13305, -32358, -3327, 30647, 19079, -20841, -29792, 5527, 32633, 11245, -26853, -25049, 13978, 32232, 2589, -30902, -18473, 21406, 29475, -6257, -32692, -10548, 27270, 24564, -14645, -32092, -1851, 31140, 17856, -21963, -29146, 6981, 32733, 9843, -27675, -24068, 15303, 31933, 1110, -31363, -17232, 22506, 28799, -7704, -32759, -9135, 28063, 23559, -15955, -31760, -371, 31569, 16596, -23039, -28439, 8421}, +{32767, 9843, -26853, -25978, 11245, 32733, 8421, -27675, -25049, 12624, 32633, 6981, -28439, -24068, 13978, 32466, 5527, -29146, -23039, 15303, 32232, 4062, -29792, -21963, 16596, 31933, 2589, -30378, -20841, 17856, 31569, 1110, -30902, -19677, 19079, 31140, -371, -31363, -18473, 20264, 30647, -1851, -31760, -17232, 21406, 30092, -3327, -32092, -15955, 22506, 29475, -4797, -32358, -14645, 23559, 28799, -6257, -32558, -13305, 24564, 28063, -7704, -32692, -11939, 25519, 27270, -9135, -32759, -10548, 26421, 26421, -10548, -32759, -9135, 27270, 25519, -11939, -32692, -7704, 28063, 24564, -13305, -32558, -6257, 28799, 23559, -14645, -32358, -4797, 29475, 22506, -15955, -32092, -3327, 30092, 21406, -17232, -31760, -1851, 30647, 20264, -18473, -31363, -371, 31140, 19079, -19677, -30902, 1110, 31569, 17856, -20841, -30378, 2589, 31933, 16596, -21963, -29792, 4062, 32232, 15303, -23039, -29146, 5527, 32466, 13978, -24068, -28439, 6981, 32633, 12624, -25049, -27675, 8421, 32733, 11245, -25978, -26853, 9843}, +{32767, 11245, -25049, -28439, 5527, 32232, 16596, -20841, -30902, -371, 30647, 21406, -15955, -32358, -6257, 28063, 25519, -10548, -32759, -11939, 24564, 28799, -4797, -32092, -17232, 20264, 31140, 1110, -30378, -21963, 15303, 32466, 6981, -27675, -25978, 9843, 32733, 12624, -24068, -29146, 4062, 31933, 17856, -19677, -31363, -1851, 30092, 22506, -14645, -32558, -7704, 27270, 26421, -9135, -32692, -13305, 23559, 29475, -3327, -31760, -18473, 19079, 31569, 2589, -29792, -23039, 13978, 32633, 8421, -26853, -26853, 8421, 32633, 13978, -23039, -29792, 2589, 31569, 19079, -18473, -31760, -3327, 29475, 23559, -13305, -32692, -9135, 26421, 27270, -7704, -32558, -14645, 22506, 30092, -1851, -31363, -19677, 17856, 31933, 4062, -29146, -24068, 12624, 32733, 9843, -25978, -27675, 6981, 32466, 15303, -21963, -30378, 1110, 31140, 20264, -17232, -32092, -4797, 28799, 24564, -11939, -32759, -10548, 25519, 28063, -6257, -32358, -15955, 21406, 30647, -371, -30902, -20841, 16596, 32232, 5527, -28439, -25049, 11245}, +{32767, 12624, -23039, -30378, -371, 30092, 23559, -11939, -32759, -13305, 22506, 30647, 1110, -29792, -24068, 11245, 32733, 13978, -21963, -30902, -1851, 29475, 24564, -10548, -32692, -14645, 21406, 31140, 2589, -29146, -25049, 9843, 32633, 15303, -20841, -31363, -3327, 28799, 25519, -9135, -32558, -15955, 20264, 31569, 4062, -28439, -25978, 8421, 32466, 16596, -19677, -31760, -4797, 28063, 26421, -7704, -32358, -17232, 19079, 31933, 5527, -27675, -26853, 6981, 32232, 17856, -18473, -32092, -6257, 27270, 27270, -6257, -32092, -18473, 17856, 32232, 6981, -26853, -27675, 5527, 31933, 19079, -17232, -32358, -7704, 26421, 28063, -4797, -31760, -19677, 16596, 32466, 8421, -25978, -28439, 4062, 31569, 20264, -15955, -32558, -9135, 25519, 28799, -3327, -31363, -20841, 15303, 32633, 9843, -25049, -29146, 2589, 31140, 21406, -14645, -32692, -10548, 24564, 29475, -1851, -30902, -21963, 13978, 32733, 11245, -24068, -29792, 1110, 30647, 22506, -13305, -32759, -11939, 23559, 30092, -371, -30378, -23039, 12624}, +{32767, 13978, -20841, -31760, -6257, 26421, 28799, -1851, -30378, -24068, 9843, 32466, 17856, -17232, -32558, -10548, 23559, 30647, 2589, -28439, -26853, 5527, 31569, 21406, -13305, -32759, -14645, 20264, 31933, 6981, -25978, -29146, 1110, 30092, 24564, -9135, -32358, -18473, 16596, 32633, 11245, -23039, -30902, -3327, 28063, 27270, -4797, -31363, -21963, 12624, 32733, 15303, -19677, -32092, -7704, 25519, 29475, -371, -29792, -25049, 8421, 32232, 19079, -15955, -32692, -11939, 22506, 31140, 4062, -27675, -27675, 4062, 31140, 22506, -11939, -32692, -15955, 19079, 32232, 8421, -25049, -29792, -371, 29475, 25519, -7704, -32092, -19677, 15303, 32733, 12624, -21963, -31363, -4797, 27270, 28063, -3327, -30902, -23039, 11245, 32633, 16596, -18473, -32358, -9135, 24564, 30092, 1110, -29146, -25978, 6981, 31933, 20264, -14645, -32759, -13305, 21406, 31569, 5527, -26853, -28439, 2589, 30647, 23559, -10548, -32558, -17232, 17856, 32466, 9843, -24068, -30378, -1851, 28799, 26421, -6257, -31760, -20841, 13978}, +{32767, 15303, -18473, -32558, -11939, 21406, 31933, 8421, -24068, -30902, -4797, 26421, 29475, 1110, -28439, -27675, 2589, 30092, 25519, -6257, -31363, -23039, 9843, 32232, 20264, -13305, -32692, -17232, 16596, 32733, 13978, -19677, -32358, -10548, 22506, 31569, 6981, -25049, -30378, -3327, 27270, 28799, -371, -29146, -26853, 4062, 30647, 24564, -7704, -31760, -21963, 11245, 32466, 19079, -14645, -32759, -15955, 17856, 32633, 12624, -20841, -32092, -9135, 23559, 31140, 5527, -25978, -29792, -1851, 28063, 28063, -1851, -29792, -25978, 5527, 31140, 23559, -9135, -32092, -20841, 12624, 32633, 17856, -15955, -32759, -14645, 19079, 32466, 11245, -21963, -31760, -7704, 24564, 30647, 4062, -26853, -29146, -371, 28799, 27270, -3327, -30378, -25049, 6981, 31569, 22506, -10548, -32358, -19677, 13978, 32733, 16596, -17232, -32692, -13305, 20264, 32232, 9843, -23039, -31363, -6257, 25519, 30092, 2589, -27675, -28439, 1110, 29475, 26421, -4797, -30902, -24068, 8421, 31933, 21406, -11939, -32558, -18473, 15303}, +{32767, 16596, -15955, -32759, -17232, 15303, 32733, 17856, -14645, -32692, -18473, 13978, 32633, 19079, -13305, -32558, -19677, 12624, 32466, 20264, -11939, -32358, -20841, 11245, 32232, 21406, -10548, -32092, -21963, 9843, 31933, 22506, -9135, -31760, -23039, 8421, 31569, 23559, -7704, -31363, -24068, 6981, 31140, 24564, -6257, -30902, -25049, 5527, 30647, 25519, -4797, -30378, -25978, 4062, 30092, 26421, -3327, -29792, -26853, 2589, 29475, 27270, -1851, -29146, -27675, 1110, 28799, 28063, -371, -28439, -28439, -371, 28063, 28799, 1110, -27675, -29146, -1851, 27270, 29475, 2589, -26853, -29792, -3327, 26421, 30092, 4062, -25978, -30378, -4797, 25519, 30647, 5527, -25049, -30902, -6257, 24564, 31140, 6981, -24068, -31363, -7704, 23559, 31569, 8421, -23039, -31760, -9135, 22506, 31933, 9843, -21963, -32092, -10548, 21406, 32232, 11245, -20841, -32358, -11939, 20264, 32466, 12624, -19677, -32558, -13305, 19079, 32633, 13978, -18473, -32692, -14645, 17856, 32733, 15303, -17232, -32759, -15955, 16596}, +{32767, 17856, -13305, -32358, -21963, 8421, 31140, 25519, -3327, -29146, -28439, -1851, 26421, 30647, 6981, -23039, -32092, -11939, 19079, 32733, 16596, -14645, -32558, -20841, 9843, 31569, 24564, -4797, -29792, -27675, -371, 27270, 30092, 5527, -24068, -31760, -10548, 20264, 32633, 15303, -15955, -32692, -19677, 11245, 31933, 23559, -6257, -30378, -26853, 1110, 28063, 29475, 4062, -25049, -31363, -9135, 21406, 32466, 13978, -17232, -32759, -18473, 12624, 32232, 22506, -7704, -30902, -25978, 2589, 28799, 28799, 2589, -25978, -30902, -7704, 22506, 32232, 12624, -18473, -32759, -17232, 13978, 32466, 21406, -9135, -31363, -25049, 4062, 29475, 28063, 1110, -26853, -30378, -6257, 23559, 31933, 11245, -19677, -32692, -15955, 15303, 32633, 20264, -10548, -31760, -24068, 5527, 30092, 27270, -371, -27675, -29792, -4797, 24564, 31569, 9843, -20841, -32558, -14645, 16596, 32733, 19079, -11939, -32092, -23039, 6981, 30647, 26421, -1851, -28439, -29146, -3327, 25519, 31140, 8421, -21963, -32358, -13305, 17856}, +{32767, 19079, -10548, -31363, -25978, 1110, 27270, 30647, 8421, -20841, -32692, -17232, 12624, 31933, 24564, -3327, -28439, -29792, -6257, 22506, 32466, 15303, -14645, -32358, -23039, 5527, 29475, 28799, 4062, -24068, -32092, -13305, 16596, 32633, 21406, -7704, -30378, -27675, -1851, 25519, 31569, 11245, -18473, -32759, -19677, 9843, 31140, 26421, -371, -26853, -30902, -9135, 20264, 32733, 17856, -11939, -31760, -25049, 2589, 28063, 30092, 6981, -21963, -32558, -15955, 13978, 32232, 23559, -4797, -29146, -29146, -4797, 23559, 32232, 13978, -15955, -32558, -21963, 6981, 30092, 28063, 2589, -25049, -31760, -11939, 17856, 32733, 20264, -9135, -30902, -26853, -371, 26421, 31140, 9843, -19677, -32759, -18473, 11245, 31569, 25519, -1851, -27675, -30378, -7704, 21406, 32633, 16596, -13305, -32092, -24068, 4062, 28799, 29475, 5527, -23039, -32358, -14645, 15303, 32466, 22506, -6257, -29792, -28439, -3327, 24564, 31933, 12624, -17232, -32692, -20841, 8421, 30647, 27270, 1110, -25978, -31363, -10548, 19079}, +{32767, 20264, -7704, -29792, -29146, -6257, 21406, 32733, 19079, -9135, -30378, -28439, -4797, 22506, 32633, 17856, -10548, -30902, -27675, -3327, 23559, 32466, 16596, -11939, -31363, -26853, -1851, 24564, 32232, 15303, -13305, -31760, -25978, -371, 25519, 31933, 13978, -14645, -32092, -25049, 1110, 26421, 31569, 12624, -15955, -32358, -24068, 2589, 27270, 31140, 11245, -17232, -32558, -23039, 4062, 28063, 30647, 9843, -18473, -32692, -21963, 5527, 28799, 30092, 8421, -19677, -32759, -20841, 6981, 29475, 29475, 6981, -20841, -32759, -19677, 8421, 30092, 28799, 5527, -21963, -32692, -18473, 9843, 30647, 28063, 4062, -23039, -32558, -17232, 11245, 31140, 27270, 2589, -24068, -32358, -15955, 12624, 31569, 26421, 1110, -25049, -32092, -14645, 13978, 31933, 25519, -371, -25978, -31760, -13305, 15303, 32232, 24564, -1851, -26853, -31363, -11939, 16596, 32466, 23559, -3327, -27675, -30902, -10548, 17856, 32633, 22506, -4797, -28439, -30378, -9135, 19079, 32733, 21406, -6257, -29146, -29792, -7704, 20264}, +{32767, 21406, -4797, -27675, -31363, -13305, 13978, 31569, 27270, 4062, -21963, -32759, -20841, 5527, 28063, 31140, 12624, -14645, -31760, -26853, -3327, 22506, 32733, 20264, -6257, -28439, -30902, -11939, 15303, 31933, 26421, 2589, -23039, -32692, -19677, 6981, 28799, 30647, 11245, -15955, -32092, -25978, -1851, 23559, 32633, 19079, -7704, -29146, -30378, -10548, 16596, 32232, 25519, 1110, -24068, -32558, -18473, 8421, 29475, 30092, 9843, -17232, -32358, -25049, -371, 24564, 32466, 17856, -9135, -29792, -29792, -9135, 17856, 32466, 24564, -371, -25049, -32358, -17232, 9843, 30092, 29475, 8421, -18473, -32558, -24068, 1110, 25519, 32232, 16596, -10548, -30378, -29146, -7704, 19079, 32633, 23559, -1851, -25978, -32092, -15955, 11245, 30647, 28799, 6981, -19677, -32692, -23039, 2589, 26421, 31933, 15303, -11939, -30902, -28439, -6257, 20264, 32733, 22506, -3327, -26853, -31760, -14645, 12624, 31140, 28063, 5527, -20841, -32759, -21963, 4062, 27270, 31569, 13978, -13305, -31363, -27675, -4797, 21406}, +{32767, 22506, -1851, -25049, -32558, -19677, 5527, 27270, 31933, 16596, -9135, -29146, -30902, -13305, 12624, 30647, 29475, 9843, -15955, -31760, -27675, -6257, 19079, 32466, 25519, 2589, -21963, -32759, -23039, 1110, 24564, 32633, 20264, -4797, -26853, -32092, -17232, 8421, 28799, 31140, 13978, -11939, -30378, -29792, -10548, 15303, 31569, 28063, 6981, -18473, -32358, -25978, -3327, 21406, 32733, 23559, -371, -24068, -32692, -20841, 4062, 26421, 32232, 17856, -7704, -28439, -31363, -14645, 11245, 30092, 30092, 11245, -14645, -31363, -28439, -7704, 17856, 32232, 26421, 4062, -20841, -32692, -24068, -371, 23559, 32733, 21406, -3327, -25978, -32358, -18473, 6981, 28063, 31569, 15303, -10548, -29792, -30378, -11939, 13978, 31140, 28799, 8421, -17232, -32092, -26853, -4797, 20264, 32633, 24564, 1110, -23039, -32759, -21963, 2589, 25519, 32466, 19079, -6257, -27675, -31760, -15955, 9843, 29475, 30647, 12624, -13305, -30902, -29146, -9135, 16596, 31933, 27270, 5527, -19677, -32558, -25049, -1851, 22506}, +{32767, 23559, 1110, -21963, -32692, -25049, -3327, 20264, 32466, 26421, 5527, -18473, -32092, -27675, -7704, 16596, 31569, 28799, 9843, -14645, -30902, -29792, -11939, 12624, 30092, 30647, 13978, -10548, -29146, -31363, -15955, 8421, 28063, 31933, 17856, -6257, -26853, -32358, -19677, 4062, 25519, 32633, 21406, -1851, -24068, -32759, -23039, -371, 22506, 32733, 24564, 2589, -20841, -32558, -25978, -4797, 19079, 32232, 27270, 6981, -17232, -31760, -28439, -9135, 15303, 31140, 29475, 11245, -13305, -30378, -30378, -13305, 11245, 29475, 31140, 15303, -9135, -28439, -31760, -17232, 6981, 27270, 32232, 19079, -4797, -25978, -32558, -20841, 2589, 24564, 32733, 22506, -371, -23039, -32759, -24068, -1851, 21406, 32633, 25519, 4062, -19677, -32358, -26853, -6257, 17856, 31933, 28063, 8421, -15955, -31363, -29146, -10548, 13978, 30647, 30092, 12624, -11939, -29792, -30902, -14645, 9843, 28799, 31569, 16596, -7704, -27675, -32092, -18473, 5527, 26421, 32466, 20264, -3327, -25049, -32692, -21963, 1110, 23559}, +{32767, 24564, 4062, -18473, -31760, -29146, -11939, 11245, 28799, 31933, 19079, -3327, -24068, -32759, -25049, -4797, 17856, 31569, 29475, 12624, -10548, -28439, -32092, -19677, 2589, 23559, 32733, 25519, 5527, -17232, -31363, -29792, -13305, 9843, 28063, 32232, 20264, -1851, -23039, -32692, -25978, -6257, 16596, 31140, 30092, 13978, -9135, -27675, -32358, -20841, 1110, 22506, 32633, 26421, 6981, -15955, -30902, -30378, -14645, 8421, 27270, 32466, 21406, -371, -21963, -32558, -26853, -7704, 15303, 30647, 30647, 15303, -7704, -26853, -32558, -21963, -371, 21406, 32466, 27270, 8421, -14645, -30378, -30902, -15955, 6981, 26421, 32633, 22506, 1110, -20841, -32358, -27675, -9135, 13978, 30092, 31140, 16596, -6257, -25978, -32692, -23039, -1851, 20264, 32232, 28063, 9843, -13305, -29792, -31363, -17232, 5527, 25519, 32733, 23559, 2589, -19677, -32092, -28439, -10548, 12624, 29475, 31569, 17856, -4797, -25049, -32759, -24068, -3327, 19079, 31933, 28799, 11245, -11939, -29146, -31760, -18473, 4062, 24564}, +{32767, 25519, 6981, -14645, -29792, -31760, -19677, 1110, 21406, 32232, 28799, 12624, -9135, -26853, -32692, -24068, -4797, 16596, 30647, 31140, 17856, -3327, -23039, -32558, -27675, -10548, 11245, 28063, 32466, 22506, 2589, -18473, -31363, -30378, -15955, 5527, 24564, 32733, 26421, 8421, -13305, -29146, -32092, -20841, -371, 20264, 31933, 29475, 13978, -7704, -25978, -32759, -25049, -6257, 15303, 30092, 31569, 19079, -1851, -21963, -32358, -28439, -11939, 9843, 27270, 32633, 23559, 4062, -17232, -30902, -30902, -17232, 4062, 23559, 32633, 27270, 9843, -11939, -28439, -32358, -21963, -1851, 19079, 31569, 30092, 15303, -6257, -25049, -32759, -25978, -7704, 13978, 29475, 31933, 20264, -371, -20841, -32092, -29146, -13305, 8421, 26421, 32733, 24564, 5527, -15955, -30378, -31363, -18473, 2589, 22506, 32466, 28063, 11245, -10548, -27675, -32558, -23039, -3327, 17856, 31140, 30647, 16596, -4797, -24068, -32692, -26853, -9135, 12624, 28799, 32232, 21406, 1110, -19677, -31760, -29792, -14645, 6981, 25519}, +{32767, 26421, 9843, -10548, -26853, -32759, -25978, -9135, 11245, 27270, 32733, 25519, 8421, -11939, -27675, -32692, -25049, -7704, 12624, 28063, 32633, 24564, 6981, -13305, -28439, -32558, -24068, -6257, 13978, 28799, 32466, 23559, 5527, -14645, -29146, -32358, -23039, -4797, 15303, 29475, 32232, 22506, 4062, -15955, -29792, -32092, -21963, -3327, 16596, 30092, 31933, 21406, 2589, -17232, -30378, -31760, -20841, -1851, 17856, 30647, 31569, 20264, 1110, -18473, -30902, -31363, -19677, -371, 19079, 31140, 31140, 19079, -371, -19677, -31363, -30902, -18473, 1110, 20264, 31569, 30647, 17856, -1851, -20841, -31760, -30378, -17232, 2589, 21406, 31933, 30092, 16596, -3327, -21963, -32092, -29792, -15955, 4062, 22506, 32232, 29475, 15303, -4797, -23039, -32358, -29146, -14645, 5527, 23559, 32466, 28799, 13978, -6257, -24068, -32558, -28439, -13305, 6981, 24564, 32633, 28063, 12624, -7704, -25049, -32692, -27675, -11939, 8421, 25519, 32733, 27270, 11245, -9135, -25978, -32759, -26853, -10548, 9843, 26421}, +{32767, 27270, 12624, -6257, -23039, -32092, -30378, -18473, -371, 17856, 30092, 32232, 23559, 6981, -11939, -26853, -32759, -27675, -13305, 5527, 22506, 31933, 30647, 19079, 1110, -17232, -29792, -32358, -24068, -7704, 11245, 26421, 32733, 28063, 13978, -4797, -21963, -31760, -30902, -19677, -1851, 16596, 29475, 32466, 24564, 8421, -10548, -25978, -32692, -28439, -14645, 4062, 21406, 31569, 31140, 20264, 2589, -15955, -29146, -32558, -25049, -9135, 9843, 25519, 32633, 28799, 15303, -3327, -20841, -31363, -31363, -20841, -3327, 15303, 28799, 32633, 25519, 9843, -9135, -25049, -32558, -29146, -15955, 2589, 20264, 31140, 31569, 21406, 4062, -14645, -28439, -32692, -25978, -10548, 8421, 24564, 32466, 29475, 16596, -1851, -19677, -30902, -31760, -21963, -4797, 13978, 28063, 32733, 26421, 11245, -7704, -24068, -32358, -29792, -17232, 1110, 19079, 30647, 31933, 22506, 5527, -13305, -27675, -32759, -26853, -11939, 6981, 23559, 32232, 30092, 17856, -371, -18473, -30378, -32092, -23039, -6257, 12624, 27270}, +{32767, 28063, 15303, -1851, -18473, -29792, -32558, -25978, -11939, 5527, 21406, 31140, 31933, 23559, 8421, -9135, -24068, -32092, -30902, -20841, -4797, 12624, 26421, 32633, 29475, 17856, 1110, -15955, -28439, -32759, -27675, -14645, 2589, 19079, 30092, 32466, 25519, 11245, -6257, -21963, -31363, -31760, -23039, -7704, 9843, 24564, 32232, 30647, 20264, 4062, -13305, -26853, -32692, -29146, -17232, -371, 16596, 28799, 32733, 27270, 13978, -3327, -19677, -30378, -32358, -25049, -10548, 6981, 22506, 31569, 31569, 22506, 6981, -10548, -25049, -32358, -30378, -19677, -3327, 13978, 27270, 32733, 28799, 16596, -371, -17232, -29146, -32692, -26853, -13305, 4062, 20264, 30647, 32232, 24564, 9843, -7704, -23039, -31760, -31363, -21963, -6257, 11245, 25519, 32466, 30092, 19079, 2589, -14645, -27675, -32759, -28439, -15955, 1110, 17856, 29475, 32633, 26421, 12624, -4797, -20841, -30902, -32092, -24068, -9135, 8421, 23559, 31933, 31140, 21406, 5527, -11939, -25978, -32558, -29792, -18473, -1851, 15303, 28063}, +{32767, 28799, 17856, 2589, -13305, -25978, -32358, -30902, -21963, -7704, 8421, 22506, 31140, 32232, 25519, 12624, -3327, -18473, -29146, -32759, -28439, -17232, -1851, 13978, 26421, 32466, 30647, 21406, 6981, -9135, -23039, -31363, -32092, -25049, -11939, 4062, 19079, 29475, 32733, 28063, 16596, 1110, -14645, -26853, -32558, -30378, -20841, -6257, 9843, 23559, 31569, 31933, 24564, 11245, -4797, -19677, -29792, -32692, -27675, -15955, -371, 15303, 27270, 32633, 30092, 20264, 5527, -10548, -24068, -31760, -31760, -24068, -10548, 5527, 20264, 30092, 32633, 27270, 15303, -371, -15955, -27675, -32692, -29792, -19677, -4797, 11245, 24564, 31933, 31569, 23559, 9843, -6257, -20841, -30378, -32558, -26853, -14645, 1110, 16596, 28063, 32733, 29475, 19079, 4062, -11939, -25049, -32092, -31363, -23039, -9135, 6981, 21406, 30647, 32466, 26421, 13978, -1851, -17232, -28439, -32759, -29146, -18473, -3327, 12624, 25519, 32232, 31140, 22506, 8421, -7704, -21963, -30902, -32358, -25978, -13305, 2589, 17856, 28799}, +{32767, 29475, 20264, 6981, -7704, -20841, -29792, -32759, -29146, -19677, -6257, 8421, 21406, 30092, 32733, 28799, 19079, 5527, -9135, -21963, -30378, -32692, -28439, -18473, -4797, 9843, 22506, 30647, 32633, 28063, 17856, 4062, -10548, -23039, -30902, -32558, -27675, -17232, -3327, 11245, 23559, 31140, 32466, 27270, 16596, 2589, -11939, -24068, -31363, -32358, -26853, -15955, -1851, 12624, 24564, 31569, 32232, 26421, 15303, 1110, -13305, -25049, -31760, -32092, -25978, -14645, -371, 13978, 25519, 31933, 31933, 25519, 13978, -371, -14645, -25978, -32092, -31760, -25049, -13305, 1110, 15303, 26421, 32232, 31569, 24564, 12624, -1851, -15955, -26853, -32358, -31363, -24068, -11939, 2589, 16596, 27270, 32466, 31140, 23559, 11245, -3327, -17232, -27675, -32558, -30902, -23039, -10548, 4062, 17856, 28063, 32633, 30647, 22506, 9843, -4797, -18473, -28439, -32692, -30378, -21963, -9135, 5527, 19079, 28799, 32733, 30092, 21406, 8421, -6257, -19677, -29146, -32759, -29792, -20841, -7704, 6981, 20264, 29475}, +{32767, 30092, 22506, 11245, -1851, -14645, -25049, -31363, -32558, -28439, -19677, -7704, 5527, 17856, 27270, 32232, 31933, 26421, 16596, 4062, -9135, -20841, -29146, -32692, -30902, -24068, -13305, -371, 12624, 23559, 30647, 32733, 29475, 21406, 9843, -3327, -15955, -25978, -31760, -32358, -27675, -18473, -6257, 6981, 19079, 28063, 32466, 31569, 25519, 15303, 2589, -10548, -21963, -29792, -32759, -30378, -23039, -11939, 1110, 13978, 24564, 31140, 32633, 28799, 20264, 8421, -4797, -17232, -26853, -32092, -32092, -26853, -17232, -4797, 8421, 20264, 28799, 32633, 31140, 24564, 13978, 1110, -11939, -23039, -30378, -32759, -29792, -21963, -10548, 2589, 15303, 25519, 31569, 32466, 28063, 19079, 6981, -6257, -18473, -27675, -32358, -31760, -25978, -15955, -3327, 9843, 21406, 29475, 32733, 30647, 23559, 12624, -371, -13305, -24068, -30902, -32692, -29146, -20841, -9135, 4062, 16596, 26421, 31933, 32232, 27270, 17856, 5527, -7704, -19677, -28439, -32558, -31363, -25049, -14645, -1851, 11245, 22506, 30092}, +{32767, 30647, 24564, 15303, 4062, -7704, -18473, -26853, -31760, -32558, -29146, -21963, -11939, -371, 11245, 21406, 28799, 32466, 31933, 27270, 19079, 8421, -3327, -14645, -24068, -30378, -32759, -30902, -25049, -15955, -4797, 6981, 17856, 26421, 31569, 32633, 29475, 22506, 12624, 1110, -10548, -20841, -28439, -32358, -32092, -27675, -19677, -9135, 2589, 13978, 23559, 30092, 32733, 31140, 25519, 16596, 5527, -6257, -17232, -25978, -31363, -32692, -29792, -23039, -13305, -1851, 9843, 20264, 28063, 32232, 32232, 28063, 20264, 9843, -1851, -13305, -23039, -29792, -32692, -31363, -25978, -17232, -6257, 5527, 16596, 25519, 31140, 32733, 30092, 23559, 13978, 2589, -9135, -19677, -27675, -32092, -32358, -28439, -20841, -10548, 1110, 12624, 22506, 29475, 32633, 31569, 26421, 17856, 6981, -4797, -15955, -25049, -30902, -32759, -30378, -24068, -14645, -3327, 8421, 19079, 27270, 31933, 32466, 28799, 21406, 11245, -371, -11939, -21963, -29146, -32558, -31760, -26853, -18473, -7704, 4062, 15303, 24564, 30647}, +{32767, 31140, 26421, 19079, 9843, -371, -10548, -19677, -26853, -31363, -32759, -30902, -25978, -18473, -9135, 1110, 11245, 20264, 27270, 31569, 32733, 30647, 25519, 17856, 8421, -1851, -11939, -20841, -27675, -31760, -32692, -30378, -25049, -17232, -7704, 2589, 12624, 21406, 28063, 31933, 32633, 30092, 24564, 16596, 6981, -3327, -13305, -21963, -28439, -32092, -32558, -29792, -24068, -15955, -6257, 4062, 13978, 22506, 28799, 32232, 32466, 29475, 23559, 15303, 5527, -4797, -14645, -23039, -29146, -32358, -32358, -29146, -23039, -14645, -4797, 5527, 15303, 23559, 29475, 32466, 32232, 28799, 22506, 13978, 4062, -6257, -15955, -24068, -29792, -32558, -32092, -28439, -21963, -13305, -3327, 6981, 16596, 24564, 30092, 32633, 31933, 28063, 21406, 12624, 2589, -7704, -17232, -25049, -30378, -32692, -31760, -27675, -20841, -11939, -1851, 8421, 17856, 25519, 30647, 32733, 31569, 27270, 20264, 11245, 1110, -9135, -18473, -25978, -30902, -32759, -31363, -26853, -19677, -10548, -371, 9843, 19079, 26421, 31140}, +{32767, 31569, 28063, 22506, 15303, 6981, -1851, -10548, -18473, -25049, -29792, -32358, -32558, -30378, -25978, -19677, -11939, -3327, 5527, 13978, 21406, 27270, 31140, 32733, 31933, 28799, 23559, 16596, 8421, -371, -9135, -17232, -24068, -29146, -32092, -32692, -30902, -26853, -20841, -13305, -4797, 4062, 12624, 20264, 26421, 30647, 32633, 32232, 29475, 24564, 17856, 9843, 1110, -7704, -15955, -23039, -28439, -31760, -32759, -31363, -27675, -21963, -14645, -6257, 2589, 11245, 19079, 25519, 30092, 32466, 32466, 30092, 25519, 19079, 11245, 2589, -6257, -14645, -21963, -27675, -31363, -32759, -31760, -28439, -23039, -15955, -7704, 1110, 9843, 17856, 24564, 29475, 32232, 32633, 30647, 26421, 20264, 12624, 4062, -4797, -13305, -20841, -26853, -30902, -32692, -32092, -29146, -24068, -17232, -9135, -371, 8421, 16596, 23559, 28799, 31933, 32733, 31140, 27270, 21406, 13978, 5527, -3327, -11939, -19677, -25978, -30378, -32558, -32358, -29792, -25049, -18473, -10548, -1851, 6981, 15303, 22506, 28063, 31569}, +{32767, 31933, 29475, 25519, 20264, 13978, 6981, -371, -7704, -14645, -20841, -25978, -29792, -32092, -32759, -31760, -29146, -25049, -19677, -13305, -6257, 1110, 8421, 15303, 21406, 26421, 30092, 32232, 32733, 31569, 28799, 24564, 19079, 12624, 5527, -1851, -9135, -15955, -21963, -26853, -30378, -32358, -32692, -31363, -28439, -24068, -18473, -11939, -4797, 2589, 9843, 16596, 22506, 27270, 30647, 32466, 32633, 31140, 28063, 23559, 17856, 11245, 4062, -3327, -10548, -17232, -23039, -27675, -30902, -32558, -32558, -30902, -27675, -23039, -17232, -10548, -3327, 4062, 11245, 17856, 23559, 28063, 31140, 32633, 32466, 30647, 27270, 22506, 16596, 9843, 2589, -4797, -11939, -18473, -24068, -28439, -31363, -32692, -32358, -30378, -26853, -21963, -15955, -9135, -1851, 5527, 12624, 19079, 24564, 28799, 31569, 32733, 32232, 30092, 26421, 21406, 15303, 8421, 1110, -6257, -13305, -19677, -25049, -29146, -31760, -32759, -32092, -29792, -25978, -20841, -14645, -7704, -371, 6981, 13978, 20264, 25519, 29475, 31933}, +{32767, 32232, 30647, 28063, 24564, 20264, 15303, 9843, 4062, -1851, -7704, -13305, -18473, -23039, -26853, -29792, -31760, -32692, -32558, -31363, -29146, -25978, -21963, -17232, -11939, -6257, -371, 5527, 11245, 16596, 21406, 25519, 28799, 31140, 32466, 32733, 31933, 30092, 27270, 23559, 19079, 13978, 8421, 2589, -3327, -9135, -14645, -19677, -24068, -27675, -30378, -32092, -32759, -32358, -30902, -28439, -25049, -20841, -15955, -10548, -4797, 1110, 6981, 12624, 17856, 22506, 26421, 29475, 31569, 32633, 32633, 31569, 29475, 26421, 22506, 17856, 12624, 6981, 1110, -4797, -10548, -15955, -20841, -25049, -28439, -30902, -32358, -32759, -32092, -30378, -27675, -24068, -19677, -14645, -9135, -3327, 2589, 8421, 13978, 19079, 23559, 27270, 30092, 31933, 32733, 32466, 31140, 28799, 25519, 21406, 16596, 11245, 5527, -371, -6257, -11939, -17232, -21963, -25978, -29146, -31363, -32558, -32692, -31760, -29792, -26853, -23039, -18473, -13305, -7704, -1851, 4062, 9843, 15303, 20264, 24564, 28063, 30647, 32232}, +{32767, 32466, 31569, 30092, 28063, 25519, 22506, 19079, 15303, 11245, 6981, 2589, -1851, -6257, -10548, -14645, -18473, -21963, -25049, -27675, -29792, -31363, -32358, -32759, -32558, -31760, -30378, -28439, -25978, -23039, -19677, -15955, -11939, -7704, -3327, 1110, 5527, 9843, 13978, 17856, 21406, 24564, 27270, 29475, 31140, 32232, 32733, 32633, 31933, 30647, 28799, 26421, 23559, 20264, 16596, 12624, 8421, 4062, -371, -4797, -9135, -13305, -17232, -20841, -24068, -26853, -29146, -30902, -32092, -32692, -32692, -32092, -30902, -29146, -26853, -24068, -20841, -17232, -13305, -9135, -4797, -371, 4062, 8421, 12624, 16596, 20264, 23559, 26421, 28799, 30647, 31933, 32633, 32733, 32232, 31140, 29475, 27270, 24564, 21406, 17856, 13978, 9843, 5527, 1110, -3327, -7704, -11939, -15955, -19677, -23039, -25978, -28439, -30378, -31760, -32558, -32759, -32358, -31363, -29792, -27675, -25049, -21963, -18473, -14645, -10548, -6257, -1851, 2589, 6981, 11245, 15303, 19079, 22506, 25519, 28063, 30092, 31569, 32466}, +{32767, 32633, 32232, 31569, 30647, 29475, 28063, 26421, 24564, 22506, 20264, 17856, 15303, 12624, 9843, 6981, 4062, 1110, -1851, -4797, -7704, -10548, -13305, -15955, -18473, -20841, -23039, -25049, -26853, -28439, -29792, -30902, -31760, -32358, -32692, -32759, -32558, -32092, -31363, -30378, -29146, -27675, -25978, -24068, -21963, -19677, -17232, -14645, -11939, -9135, -6257, -3327, -371, 2589, 5527, 8421, 11245, 13978, 16596, 19079, 21406, 23559, 25519, 27270, 28799, 30092, 31140, 31933, 32466, 32733, 32733, 32466, 31933, 31140, 30092, 28799, 27270, 25519, 23559, 21406, 19079, 16596, 13978, 11245, 8421, 5527, 2589, -371, -3327, -6257, -9135, -11939, -14645, -17232, -19677, -21963, -24068, -25978, -27675, -29146, -30378, -31363, -32092, -32558, -32759, -32692, -32358, -31760, -30902, -29792, -28439, -26853, -25049, -23039, -20841, -18473, -15955, -13305, -10548, -7704, -4797, -1851, 1110, 4062, 6981, 9843, 12624, 15303, 17856, 20264, 22506, 24564, 26421, 28063, 29475, 30647, 31569, 32232, 32633}, +{32767, 32733, 32633, 32466, 32232, 31933, 31569, 31140, 30647, 30092, 29475, 28799, 28063, 27270, 26421, 25519, 24564, 23559, 22506, 21406, 20264, 19079, 17856, 16596, 15303, 13978, 12624, 11245, 9843, 8421, 6981, 5527, 4062, 2589, 1110, -371, -1851, -3327, -4797, -6257, -7704, -9135, -10548, -11939, -13305, -14645, -15955, -17232, -18473, -19677, -20841, -21963, -23039, -24068, -25049, -25978, -26853, -27675, -28439, -29146, -29792, -30378, -30902, -31363, -31760, -32092, -32358, -32558, -32692, -32759, -32759, -32692, -32558, -32358, -32092, -31760, -31363, -30902, -30378, -29792, -29146, -28439, -27675, -26853, -25978, -25049, -24068, -23039, -21963, -20841, -19677, -18473, -17232, -15955, -14645, -13305, -11939, -10548, -9135, -7704, -6257, -4797, -3327, -1851, -371, 1110, 2589, 4062, 5527, 6981, 8421, 9843, 11245, 12624, 13978, 15303, 16596, 17856, 19079, 20264, 21406, 22506, 23559, 24564, 25519, 26421, 27270, 28063, 28799, 29475, 30092, 30647, 31140, 31569, 31933, 32232, 32466, 32633, 32733} +}; + + +int16_t prach_fft139_im[139][139] = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, -1481, -2959, -4430, -5893, -7343, -8779, -10196, -11593, -12966, -14313, -15630, -16916, -18166, -19380, -20554, -21686, -22774, -23816, -24808, -25750, -26640, -27474, -28253, -28974, -29636, -30238, -30777, -31254, -31667, -32015, -32298, -32515, -32665, -32749, -32765, -32715, -32598, -32415, -32165, -31849, -31469, -31024, -30515, -29945, -29313, -28621, -27871, -27064, -26202, -25286, -24318, -23301, -22236, -21126, -19972, -18778, -17545, -16277, -14975, -13643, -12283, -10898, -9490, -8063, -6620, -5163, -3696, -2221, -741, 740, 2220, 3695, 5162, 6619, 8062, 9489, 10897, 12282, 13642, 14974, 16276, 17544, 18777, 19971, 21125, 22235, 23300, 24317, 25285, 26201, 27063, 27870, 28620, 29312, 29944, 30514, 31023, 31468, 31848, 32164, 32414, 32597, 32714, 32764, 32748, 32664, 32514, 32297, 32014, 31666, 31253, 30776, 30237, 29635, 28973, 28252, 27473, 26639, 25749, 24807, 23815, 22773, 21685, 20553, 19379, 18165, 16915, 15629, 14312, 12965, 11592, 10195, 8778, 7342, 5892, 4429, 2958, 1480}, +{0, -2959, -5893, -8779, -11593, -14313, -16916, -19380, -21686, -23816, -25750, -27474, -28974, -30238, -31254, -32015, -32515, -32749, -32715, -32415, -31849, -31024, -29945, -28621, -27064, -25286, -23301, -21126, -18778, -16277, -13643, -10898, -8063, -5163, -2221, 740, 3695, 6619, 9489, 12282, 14974, 17544, 19971, 22235, 24317, 26201, 27870, 29312, 30514, 31468, 32164, 32597, 32764, 32664, 32297, 31666, 30776, 29635, 28252, 26639, 24807, 22773, 20553, 18165, 15629, 12965, 10195, 7342, 4429, 1480, -1481, -4430, -7343, -10196, -12966, -15630, -18166, -20554, -22774, -24808, -26640, -28253, -29636, -30777, -31667, -32298, -32665, -32765, -32598, -32165, -31469, -30515, -29313, -27871, -26202, -24318, -22236, -19972, -17545, -14975, -12283, -9490, -6620, -3696, -741, 2220, 5162, 8062, 10897, 13642, 16276, 18777, 21125, 23300, 25285, 27063, 28620, 29944, 31023, 31848, 32414, 32714, 32748, 32514, 32014, 31253, 30237, 28973, 27473, 25749, 23815, 21685, 19379, 16915, 14312, 11592, 8778, 5892, 2958}, +{0, -4430, -8779, -12966, -16916, -20554, -23816, -26640, -28974, -30777, -32015, -32665, -32715, -32165, -31024, -29313, -27064, -24318, -21126, -17545, -13643, -9490, -5163, -741, 3695, 8062, 12282, 16276, 19971, 23300, 26201, 28620, 30514, 31848, 32597, 32748, 32297, 31253, 29635, 27473, 24807, 21685, 18165, 14312, 10195, 5892, 1480, -2959, -7343, -11593, -15630, -19380, -22774, -25750, -28253, -30238, -31667, -32515, -32765, -32415, -31469, -29945, -27871, -25286, -22236, -18778, -14975, -10898, -6620, -2221, 2220, 6619, 10897, 14974, 18777, 22235, 25285, 27870, 29944, 31468, 32414, 32764, 32514, 31666, 30237, 28252, 25749, 22773, 19379, 15629, 11592, 7342, 2958, -1481, -5893, -10196, -14313, -18166, -21686, -24808, -27474, -29636, -31254, -32298, -32749, -32598, -31849, -30515, -28621, -26202, -23301, -19972, -16277, -12283, -8063, -3696, 740, 5162, 9489, 13642, 17544, 21125, 24317, 27063, 29312, 31023, 32164, 32714, 32664, 32014, 30776, 28973, 26639, 23815, 20553, 16915, 12965, 8778, 4429}, +{0, -5893, -11593, -16916, -21686, -25750, -28974, -31254, -32515, -32715, -31849, -29945, -27064, -23301, -18778, -13643, -8063, -2221, 3695, 9489, 14974, 19971, 24317, 27870, 30514, 32164, 32764, 32297, 30776, 28252, 24807, 20553, 15629, 10195, 4429, -1481, -7343, -12966, -18166, -22774, -26640, -29636, -31667, -32665, -32598, -31469, -29313, -26202, -22236, -17545, -12283, -6620, -741, 5162, 10897, 16276, 21125, 25285, 28620, 31023, 32414, 32748, 32014, 30237, 27473, 23815, 19379, 14312, 8778, 2958, -2959, -8779, -14313, -19380, -23816, -27474, -30238, -32015, -32749, -32415, -31024, -28621, -25286, -21126, -16277, -10898, -5163, 740, 6619, 12282, 17544, 22235, 26201, 29312, 31468, 32597, 32664, 31666, 29635, 26639, 22773, 18165, 12965, 7342, 1480, -4430, -10196, -15630, -20554, -24808, -28253, -30777, -32298, -32765, -32165, -30515, -27871, -24318, -19972, -14975, -9490, -3696, 2220, 8062, 13642, 18777, 23300, 27063, 29944, 31848, 32714, 32514, 31253, 28973, 25749, 21685, 16915, 11592, 5892}, +{0, -7343, -14313, -20554, -25750, -29636, -32015, -32765, -31849, -29313, -25286, -19972, -13643, -6620, 740, 8062, 14974, 21125, 26201, 29944, 32164, 32748, 31666, 28973, 24807, 19379, 12965, 5892, -1481, -8779, -15630, -21686, -26640, -30238, -32298, -32715, -31469, -28621, -24318, -18778, -12283, -5163, 2220, 9489, 16276, 22235, 27063, 30514, 32414, 32664, 31253, 28252, 23815, 18165, 11592, 4429, -2959, -10196, -16916, -22774, -27474, -30777, -32515, -32598, -31024, -27871, -23301, -17545, -10898, -3696, 3695, 10897, 17544, 23300, 27870, 31023, 32597, 32514, 30776, 27473, 22773, 16915, 10195, 2958, -4430, -11593, -18166, -23816, -28253, -31254, -32665, -32415, -30515, -27064, -22236, -16277, -9490, -2221, 5162, 12282, 18777, 24317, 28620, 31468, 32714, 32297, 30237, 26639, 21685, 15629, 8778, 1480, -5893, -12966, -19380, -24808, -28974, -31667, -32749, -32165, -29945, -26202, -21126, -14975, -8063, -741, 6619, 13642, 19971, 25285, 29312, 31848, 32764, 32014, 29635, 25749, 20553, 14312, 7342}, +{0, -8779, -16916, -23816, -28974, -32015, -32715, -31024, -27064, -21126, -13643, -5163, 3695, 12282, 19971, 26201, 30514, 32597, 32297, 29635, 24807, 18165, 10195, 1480, -7343, -15630, -22774, -28253, -31667, -32765, -31469, -27871, -22236, -14975, -6620, 2220, 10897, 18777, 25285, 29944, 32414, 32514, 30237, 25749, 19379, 11592, 2958, -5893, -14313, -21686, -27474, -31254, -32749, -31849, -28621, -23301, -16277, -8063, 740, 9489, 17544, 24317, 29312, 32164, 32664, 30776, 26639, 20553, 12965, 4429, -4430, -12966, -20554, -26640, -30777, -32665, -32165, -29313, -24318, -17545, -9490, -741, 8062, 16276, 23300, 28620, 31848, 32748, 31253, 27473, 21685, 14312, 5892, -2959, -11593, -19380, -25750, -30238, -32515, -32415, -29945, -25286, -18778, -10898, -2221, 6619, 14974, 22235, 27870, 31468, 32764, 31666, 28252, 22773, 15629, 7342, -1481, -10196, -18166, -24808, -29636, -32298, -32598, -30515, -26202, -19972, -12283, -3696, 5162, 13642, 21125, 27063, 31023, 32714, 32014, 28973, 23815, 16915, 8778}, +{0, -10196, -19380, -26640, -31254, -32765, -31024, -26202, -18778, -9490, 740, 10897, 19971, 27063, 31468, 32748, 30776, 25749, 18165, 8778, -1481, -11593, -20554, -27474, -31667, -32715, -30515, -25286, -17545, -8063, 2220, 12282, 21125, 27870, 31848, 32664, 30237, 24807, 16915, 7342, -2959, -12966, -21686, -28253, -32015, -32598, -29945, -24318, -16277, -6620, 3695, 13642, 22235, 28620, 32164, 32514, 29635, 23815, 15629, 5892, -4430, -14313, -22774, -28974, -32298, -32415, -29313, -23301, -14975, -5163, 5162, 14974, 23300, 29312, 32414, 32297, 28973, 22773, 14312, 4429, -5893, -15630, -23816, -29636, -32515, -32165, -28621, -22236, -13643, -3696, 6619, 16276, 24317, 29944, 32597, 32014, 28252, 21685, 12965, 2958, -7343, -16916, -24808, -30238, -32665, -31849, -27871, -21126, -12283, -2221, 8062, 17544, 25285, 30514, 32714, 31666, 27473, 20553, 11592, 1480, -8779, -18166, -25750, -30777, -32749, -31469, -27064, -19972, -10898, -741, 9489, 18777, 26201, 31023, 32764, 31253, 26639, 19379, 10195}, +{0, -11593, -21686, -28974, -32515, -31849, -27064, -18778, -8063, 3695, 14974, 24317, 30514, 32764, 30776, 24807, 15629, 4429, -7343, -18166, -26640, -31667, -32598, -29313, -22236, -12283, -741, 10897, 21125, 28620, 32414, 32014, 27473, 19379, 8778, -2959, -14313, -23816, -30238, -32749, -31024, -25286, -16277, -5163, 6619, 17544, 26201, 31468, 32664, 29635, 22773, 12965, 1480, -10196, -20554, -28253, -32298, -32165, -27871, -19972, -9490, 2220, 13642, 23300, 29944, 32714, 31253, 25749, 16915, 5892, -5893, -16916, -25750, -31254, -32715, -29945, -23301, -13643, -2221, 9489, 19971, 27870, 32164, 32297, 28252, 20553, 10195, -1481, -12966, -22774, -29636, -32665, -31469, -26202, -17545, -6620, 5162, 16276, 25285, 31023, 32748, 30237, 23815, 14312, 2958, -8779, -19380, -27474, -32015, -32415, -28621, -21126, -10898, 740, 12282, 22235, 29312, 32597, 31666, 26639, 18165, 7342, -4430, -15630, -24808, -30777, -32765, -30515, -24318, -14975, -3696, 8062, 18777, 27063, 31848, 32514, 28973, 21685, 11592}, +{0, -12966, -23816, -30777, -32715, -29313, -21126, -9490, 3695, 16276, 26201, 31848, 32297, 27473, 18165, 5892, -7343, -19380, -28253, -32515, -31469, -25286, -14975, -2221, 10897, 22235, 29944, 32764, 30237, 22773, 11592, -1481, -14313, -24808, -31254, -32598, -28621, -19972, -8063, 5162, 17544, 27063, 32164, 32014, 26639, 16915, 4429, -8779, -20554, -28974, -32665, -31024, -24318, -13643, -741, 12282, 23300, 30514, 32748, 29635, 21685, 10195, -2959, -15630, -25750, -31667, -32415, -27871, -18778, -6620, 6619, 18777, 27870, 32414, 31666, 25749, 15629, 2958, -10196, -21686, -29636, -32749, -30515, -23301, -12283, 740, 13642, 24317, 31023, 32664, 28973, 20553, 8778, -4430, -16916, -26640, -32015, -32165, -27064, -17545, -5163, 8062, 19971, 28620, 32597, 31253, 24807, 14312, 1480, -11593, -22774, -30238, -32765, -29945, -22236, -10898, 2220, 14974, 25285, 31468, 32514, 28252, 19379, 7342, -5893, -18166, -27474, -32298, -31849, -26202, -16277, -3696, 9489, 21125, 29312, 32714, 30776, 23815, 12965}, +{0, -14313, -25750, -32015, -31849, -25286, -13643, 740, 14974, 26201, 32164, 31666, 24807, 12965, -1481, -15630, -26640, -32298, -31469, -24318, -12283, 2220, 16276, 27063, 32414, 31253, 23815, 11592, -2959, -16916, -27474, -32515, -31024, -23301, -10898, 3695, 17544, 27870, 32597, 30776, 22773, 10195, -4430, -18166, -28253, -32665, -30515, -22236, -9490, 5162, 18777, 28620, 32714, 30237, 21685, 8778, -5893, -19380, -28974, -32749, -29945, -21126, -8063, 6619, 19971, 29312, 32764, 29635, 20553, 7342, -7343, -20554, -29636, -32765, -29313, -19972, -6620, 8062, 21125, 29944, 32748, 28973, 19379, 5892, -8779, -21686, -30238, -32715, -28621, -18778, -5163, 9489, 22235, 30514, 32664, 28252, 18165, 4429, -10196, -22774, -30777, -32598, -27871, -17545, -3696, 10897, 23300, 31023, 32514, 27473, 16915, 2958, -11593, -23816, -31254, -32415, -27064, -16277, -2221, 12282, 24317, 31468, 32297, 26639, 15629, 1480, -12966, -24808, -31667, -32165, -26202, -14975, -741, 13642, 25285, 31848, 32014, 25749, 14312}, +{0, -15630, -27474, -32665, -29945, -19972, -5163, 10897, 24317, 31848, 31666, 23815, 10195, -5893, -20554, -30238, -32598, -27064, -14975, 740, 16276, 27870, 32714, 29635, 19379, 4429, -11593, -24808, -32015, -31469, -23301, -9490, 6619, 21125, 30514, 32514, 26639, 14312, -1481, -16916, -28253, -32749, -29313, -18778, -3696, 12282, 25285, 32164, 31253, 22773, 8778, -7343, -21686, -30777, -32415, -26202, -13643, 2220, 17544, 28620, 32764, 28973, 18165, 2958, -12966, -25750, -32298, -31024, -22236, -8063, 8062, 22235, 31023, 32297, 25749, 12965, -2959, -18166, -28974, -32765, -28621, -17545, -2221, 13642, 26201, 32414, 30776, 21685, 7342, -8779, -22774, -31254, -32165, -25286, -12283, 3695, 18777, 29312, 32748, 28252, 16915, 1480, -14313, -26640, -32515, -30515, -21126, -6620, 9489, 23300, 31468, 32014, 24807, 11592, -4430, -19380, -29636, -32715, -27871, -16277, -741, 14974, 27063, 32597, 30237, 20553, 5892, -10196, -23816, -31667, -31849, -24318, -10898, 5162, 19971, 29944, 32664, 27473, 15629}, +{0, -16916, -28974, -32715, -27064, -13643, 3695, 19971, 30514, 32297, 24807, 10195, -7343, -22774, -31667, -31469, -22236, -6620, 10897, 25285, 32414, 30237, 19379, 2958, -14313, -27474, -32749, -28621, -16277, 740, 17544, 29312, 32664, 26639, 12965, -4430, -20554, -30777, -32165, -24318, -9490, 8062, 23300, 31848, 31253, 21685, 5892, -11593, -25750, -32515, -29945, -18778, -2221, 14974, 27870, 32764, 28252, 15629, -1481, -18166, -29636, -32598, -26202, -12283, 5162, 21125, 31023, 32014, 23815, 8778, -8779, -23816, -32015, -31024, -21126, -5163, 12282, 26201, 32597, 29635, 18165, 1480, -15630, -28253, -32765, -27871, -14975, 2220, 18777, 29944, 32514, 25749, 11592, -5893, -21686, -31254, -31849, -23301, -8063, 9489, 24317, 32164, 30776, 20553, 4429, -12966, -26640, -32665, -29313, -17545, -741, 16276, 28620, 32748, 27473, 14312, -2959, -19380, -30238, -32415, -25286, -10898, 6619, 22235, 31468, 31666, 22773, 7342, -10196, -24808, -32298, -30515, -19972, -3696, 13642, 27063, 32714, 28973, 16915}, +{0, -18166, -30238, -32165, -23301, -6620, 12282, 27063, 32764, 27473, 12965, -5893, -22774, -32015, -30515, -18778, -741, 17544, 29944, 32297, 23815, 7342, -11593, -26640, -32749, -27871, -13643, 5162, 22235, 31848, 30776, 19379, 1480, -16916, -29636, -32415, -24318, -8063, 10897, 26201, 32714, 28252, 14312, -4430, -21686, -31667, -31024, -19972, -2221, 16276, 29312, 32514, 24807, 8778, -10196, -25750, -32665, -28621, -14975, 3695, 21125, 31468, 31253, 20553, 2958, -15630, -28974, -32598, -25286, -9490, 9489, 25285, 32597, 28973, 15629, -2959, -20554, -31254, -31469, -21126, -3696, 14974, 28620, 32664, 25749, 10195, -8779, -24808, -32515, -29313, -16277, 2220, 19971, 31023, 31666, 21685, 4429, -14313, -28253, -32715, -26202, -10898, 8062, 24317, 32414, 29635, 16915, -1481, -19380, -30777, -31849, -22236, -5163, 13642, 27870, 32748, 26639, 11592, -7343, -23816, -32298, -29945, -17545, 740, 18777, 30514, 32014, 22773, 5892, -12966, -27474, -32765, -27064, -12283, 6619, 23300, 32164, 30237, 18165}, +{0, -19380, -31254, -31024, -18778, 740, 19971, 31468, 30776, 18165, -1481, -20554, -31667, -30515, -17545, 2220, 21125, 31848, 30237, 16915, -2959, -21686, -32015, -29945, -16277, 3695, 22235, 32164, 29635, 15629, -4430, -22774, -32298, -29313, -14975, 5162, 23300, 32414, 28973, 14312, -5893, -23816, -32515, -28621, -13643, 6619, 24317, 32597, 28252, 12965, -7343, -24808, -32665, -27871, -12283, 8062, 25285, 32714, 27473, 11592, -8779, -25750, -32749, -27064, -10898, 9489, 26201, 32764, 26639, 10195, -10196, -26640, -32765, -26202, -9490, 10897, 27063, 32748, 25749, 8778, -11593, -27474, -32715, -25286, -8063, 12282, 27870, 32664, 24807, 7342, -12966, -28253, -32598, -24318, -6620, 13642, 28620, 32514, 23815, 5892, -14313, -28974, -32415, -23301, -5163, 14974, 29312, 32297, 22773, 4429, -15630, -29636, -32165, -22236, -3696, 16276, 29944, 32014, 21685, 2958, -16916, -30238, -31849, -21126, -2221, 17544, 30514, 31666, 20553, 1480, -18166, -30777, -31469, -19972, -741, 18777, 31023, 31253, 19379}, +{0, -20554, -32015, -29313, -13643, 8062, 26201, 32748, 24807, 5892, -15630, -30238, -31469, -18778, 2220, 22235, 32414, 28252, 11592, -10196, -27474, -32598, -23301, -3696, 17544, 31023, 30776, 16915, -4430, -23816, -32665, -27064, -9490, 12282, 28620, 32297, 21685, 1480, -19380, -31667, -29945, -14975, 6619, 25285, 32764, 25749, 7342, -14313, -29636, -31849, -19972, 740, 21125, 32164, 28973, 12965, -8779, -26640, -32715, -24318, -5163, 16276, 30514, 31253, 18165, -2959, -22774, -32515, -27871, -10898, 10897, 27870, 32514, 22773, 2958, -18166, -31254, -30515, -16277, 5162, 24317, 32714, 26639, 8778, -12966, -28974, -32165, -21126, -741, 19971, 31848, 29635, 14312, -7343, -25750, -32765, -25286, -6620, 14974, 29944, 31666, 19379, -1481, -21686, -32298, -28621, -12283, 9489, 27063, 32664, 23815, 4429, -16916, -30777, -31024, -17545, 3695, 23300, 32597, 27473, 10195, -11593, -28253, -32415, -22236, -2221, 18777, 31468, 30237, 15629, -5893, -24808, -32749, -26202, -8063, 13642, 29312, 32014, 20553}, +{0, -21686, -32515, -27064, -8063, 14974, 30514, 30776, 15629, -7343, -26640, -32598, -22236, -741, 21125, 32414, 27473, 8778, -14313, -30238, -31024, -16277, 6619, 26201, 32664, 22773, 1480, -20554, -32298, -27871, -9490, 13642, 29944, 31253, 16915, -5893, -25750, -32715, -23301, -2221, 19971, 32164, 28252, 10195, -12966, -29636, -31469, -17545, 5162, 25285, 32748, 23815, 2958, -19380, -32015, -28621, -10898, 12282, 29312, 31666, 18165, -4430, -24808, -32765, -24318, -3696, 18777, 31848, 28973, 11592, -11593, -28974, -31849, -18778, 3695, 24317, 32764, 24807, 4429, -18166, -31667, -29313, -12283, 10897, 28620, 32014, 19379, -2959, -23816, -32749, -25286, -5163, 17544, 31468, 29635, 12965, -10196, -28253, -32165, -19972, 2220, 23300, 32714, 25749, 5892, -16916, -31254, -29945, -13643, 9489, 27870, 32297, 20553, -1481, -22774, -32665, -26202, -6620, 16276, 31023, 30237, 14312, -8779, -27474, -32415, -21126, 740, 22235, 32597, 26639, 7342, -15630, -30777, -30515, -14975, 8062, 27063, 32514, 21685}, +{0, -22774, -32749, -24318, -2221, 21125, 32597, 25749, 4429, -19380, -32298, -27064, -6620, 17544, 31848, 28252, 8778, -15630, -31254, -29313, -10898, 13642, 30514, 30237, 12965, -11593, -29636, -31024, -14975, 9489, 28620, 31666, 16915, -7343, -27474, -32165, -18778, 5162, 26201, 32514, 20553, -2959, -24808, -32715, -22236, 740, 23300, 32764, 23815, 1480, -21686, -32665, -25286, -3696, 19971, 32414, 26639, 5892, -18166, -32015, -27871, -8063, 16276, 31468, 28973, 10195, -14313, -30777, -29945, -12283, 12282, 29944, 30776, 14312, -10196, -28974, -31469, -16277, 8062, 27870, 32014, 18165, -5893, -26640, -32415, -19972, 3695, 25285, 32664, 21685, -1481, -23816, -32765, -23301, -741, 22235, 32714, 24807, 2958, -20554, -32515, -26202, -5163, 18777, 32164, 27473, 7342, -16916, -31667, -28621, -9490, 14974, 31023, 29635, 11592, -12966, -30238, -30515, -13643, 10897, 29312, 31253, 15629, -8779, -28253, -31849, -17545, 6619, 27063, 32297, 19379, -4430, -25750, -32598, -21126, 2220, 24317, 32748, 22773}, +{0, -23816, -32715, -21126, 3695, 26201, 32297, 18165, -7343, -28253, -31469, -14975, 10897, 29944, 30237, 11592, -14313, -31254, -28621, -8063, 17544, 32164, 26639, 4429, -20554, -32665, -24318, -741, 23300, 32748, 21685, -2959, -25750, -32415, -18778, 6619, 27870, 31666, 15629, -10196, -29636, -30515, -12283, 13642, 31023, 28973, 8778, -16916, -32015, -27064, -5163, 19971, 32597, 24807, 1480, -22774, -32765, -22236, 2220, 25285, 32514, 19379, -5893, -27474, -31849, -16277, 9489, 29312, 30776, 12965, -12966, -30777, -29313, -9490, 16276, 31848, 27473, 5892, -19380, -32515, -25286, -2221, 22235, 32764, 22773, -1481, -24808, -32598, -19972, 5162, 27063, 32014, 16915, -8779, -28974, -31024, -13643, 12282, 30514, 29635, 10195, -15630, -31667, -27871, -6620, 18777, 32414, 25749, 2958, -21686, -32749, -23301, 740, 24317, 32664, 20553, -4430, -26640, -32165, -17545, 8062, 28620, 31253, 14312, -11593, -30238, -29945, -10898, 14974, 31468, 28252, 7342, -18166, -32298, -26202, -3696, 21125, 32714, 23815}, +{0, -24808, -32415, -17545, 9489, 29944, 29635, 8778, -18166, -32515, -24318, 740, 25285, 32297, 16915, -10196, -30238, -29313, -8063, 18777, 32597, 23815, -1481, -25750, -32165, -16277, 10897, 30514, 28973, 7342, -19380, -32665, -23301, 2220, 26201, 32014, 15629, -11593, -30777, -28621, -6620, 19971, 32714, 22773, -2959, -26640, -31849, -14975, 12282, 31023, 28252, 5892, -20554, -32749, -22236, 3695, 27063, 31666, 14312, -12966, -31254, -27871, -5163, 21125, 32764, 21685, -4430, -27474, -31469, -13643, 13642, 31468, 27473, 4429, -21686, -32765, -21126, 5162, 27870, 31253, 12965, -14313, -31667, -27064, -3696, 22235, 32748, 20553, -5893, -28253, -31024, -12283, 14974, 31848, 26639, 2958, -22774, -32715, -19972, 6619, 28620, 30776, 11592, -15630, -32015, -26202, -2221, 23300, 32664, 19379, -7343, -28974, -30515, -10898, 16276, 32164, 25749, 1480, -23816, -32598, -18778, 8062, 29312, 30237, 10195, -16916, -32298, -25286, -741, 24317, 32514, 18165, -8779, -29636, -29945, -9490, 17544, 32414, 24807}, +{0, -25750, -31849, -13643, 14974, 32164, 24807, -1481, -26640, -31469, -12283, 16276, 32414, 23815, -2959, -27474, -31024, -10898, 17544, 32597, 22773, -4430, -28253, -30515, -9490, 18777, 32714, 21685, -5893, -28974, -29945, -8063, 19971, 32764, 20553, -7343, -29636, -29313, -6620, 21125, 32748, 19379, -8779, -30238, -28621, -5163, 22235, 32664, 18165, -10196, -30777, -27871, -3696, 23300, 32514, 16915, -11593, -31254, -27064, -2221, 24317, 32297, 15629, -12966, -31667, -26202, -741, 25285, 32014, 14312, -14313, -32015, -25286, 740, 26201, 31666, 12965, -15630, -32298, -24318, 2220, 27063, 31253, 11592, -16916, -32515, -23301, 3695, 27870, 30776, 10195, -18166, -32665, -22236, 5162, 28620, 30237, 8778, -19380, -32749, -21126, 6619, 29312, 29635, 7342, -20554, -32765, -19972, 8062, 29944, 28973, 5892, -21686, -32715, -18778, 9489, 30514, 28252, 4429, -22774, -32598, -17545, 10897, 31023, 27473, 2958, -23816, -32415, -16277, 12282, 31468, 26639, 1480, -24808, -32165, -14975, 13642, 31848, 25749}, +{0, -26640, -31024, -9490, 19971, 32748, 18165, -11593, -31667, -25286, 2220, 27870, 30237, 7342, -21686, -32598, -16277, 13642, 32164, 23815, -4430, -28974, -29313, -5163, 23300, 32297, 14312, -15630, -32515, -22236, 6619, 29944, 28252, 2958, -24808, -31849, -12283, 17544, 32714, 20553, -8779, -30777, -27064, -741, 26201, 31253, 10195, -19380, -32765, -18778, 10897, 31468, 25749, -1481, -27474, -30515, -8063, 21125, 32664, 16915, -12966, -32015, -24318, 3695, 28620, 29635, 5892, -22774, -32415, -14975, 14974, 32414, 22773, -5893, -29636, -28621, -3696, 24317, 32014, 12965, -16916, -32665, -21126, 8062, 30514, 27473, 1480, -25750, -31469, -10898, 18777, 32764, 19379, -10196, -31254, -26202, 740, 27063, 30776, 8778, -20554, -32715, -17545, 12282, 31848, 24807, -2959, -28253, -29945, -6620, 22235, 32514, 15629, -14313, -32298, -23301, 5162, 29312, 28973, 4429, -23816, -32165, -13643, 16276, 32597, 21685, -7343, -30238, -27871, -2221, 25285, 31666, 11592, -18166, -32749, -19972, 9489, 31023, 26639}, +{0, -27474, -29945, -5163, 24317, 31666, 10195, -20554, -32598, -14975, 16276, 32714, 19379, -11593, -32015, -23301, 6619, 30514, 26639, -1481, -28253, -29313, -3696, 25285, 31253, 8778, -21686, -32415, -13643, 17544, 32764, 18165, -12966, -32298, -22236, 8062, 31023, 25749, -2959, -28974, -28621, -2221, 26201, 30776, 7342, -22774, -32165, -12283, 18777, 32748, 16915, -14313, -32515, -21126, 9489, 31468, 24807, -4430, -29636, -27871, -741, 27063, 30237, 5892, -23816, -31849, -10898, 19971, 32664, 15629, -15630, -32665, -19972, 10897, 31848, 23815, -5893, -30238, -27064, 740, 27870, 29635, 4429, -24808, -31469, -9490, 21125, 32514, 14312, -16916, -32749, -18778, 12282, 32164, 22773, -7343, -30777, -26202, 2220, 28620, 28973, 2958, -25750, -31024, -8063, 22235, 32297, 12965, -18166, -32765, -17545, 13642, 32414, 21685, -8779, -31254, -25286, 3695, 29312, 28252, 1480, -26640, -30515, -6620, 23300, 32014, 11592, -19380, -32715, -16277, 14974, 32597, 20553, -10196, -31667, -24318, 5162, 29944, 27473}, +{0, -28253, -28621, -741, 27870, 28973, 1480, -27474, -29313, -2221, 27063, 29635, 2958, -26640, -29945, -3696, 26201, 30237, 4429, -25750, -30515, -5163, 25285, 30776, 5892, -24808, -31024, -6620, 24317, 31253, 7342, -23816, -31469, -8063, 23300, 31666, 8778, -22774, -31849, -9490, 22235, 32014, 10195, -21686, -32165, -10898, 21125, 32297, 11592, -20554, -32415, -12283, 19971, 32514, 12965, -19380, -32598, -13643, 18777, 32664, 14312, -18166, -32715, -14975, 17544, 32748, 15629, -16916, -32765, -16277, 16276, 32764, 16915, -15630, -32749, -17545, 14974, 32714, 18165, -14313, -32665, -18778, 13642, 32597, 19379, -12966, -32515, -19972, 12282, 32414, 20553, -11593, -32298, -21126, 10897, 32164, 21685, -10196, -32015, -22236, 9489, 31848, 22773, -8779, -31667, -23301, 8062, 31468, 23815, -7343, -31254, -24318, 6619, 31023, 24807, -5893, -30777, -25286, 5162, 30514, 25749, -4430, -30238, -26202, 3695, 29944, 26639, -2959, -29636, -27064, 2220, 29312, 27473, -1481, -28974, -27871, 740, 28620, 28252}, +{0, -28974, -27064, 3695, 30514, 24807, -7343, -31667, -22236, 10897, 32414, 19379, -14313, -32749, -16277, 17544, 32664, 12965, -20554, -32165, -9490, 23300, 31253, 5892, -25750, -29945, -2221, 27870, 28252, -1481, -29636, -26202, 5162, 31023, 23815, -8779, -32015, -21126, 12282, 32597, 18165, -15630, -32765, -14975, 18777, 32514, 11592, -21686, -31849, -8063, 24317, 30776, 4429, -26640, -29313, -741, 28620, 27473, -2959, -30238, -25286, 6619, 31468, 22773, -10196, -32298, -19972, 13642, 32714, 16915, -16916, -32715, -13643, 19971, 32297, 10195, -22774, -31469, -6620, 25285, 30237, 2958, -27474, -28621, 740, 29312, 26639, -4430, -30777, -24318, 8062, 31848, 21685, -11593, -32515, -18778, 14974, 32764, 15629, -18166, -32598, -12283, 21125, 32014, 8778, -23816, -31024, -5163, 26201, 29635, 1480, -28253, -27871, 2220, 29944, 25749, -5893, -31254, -23301, 9489, 32164, 20553, -12966, -32665, -17545, 16276, 32748, 14312, -19380, -32415, -10898, 22235, 31666, 7342, -24808, -30515, -3696, 27063, 28973}, +{0, -29636, -25286, 8062, 32164, 19379, -15630, -32715, -12283, 22235, 31253, 4429, -27474, -27871, 3695, 31023, 22773, -11593, -32665, -16277, 18777, 32297, 8778, -24808, -29945, -741, 29312, 25749, -7343, -32015, -19972, 14974, 32748, 12965, -21686, -31469, -5163, 27063, 28252, -2959, -30777, -23301, 10897, 32597, 16915, -18166, -32415, -9490, 24317, 30237, 1480, -28974, -26202, 6619, 31848, 20553, -14313, -32765, -13643, 21125, 31666, 5892, -26640, -28621, 2220, 30514, 23815, -10196, -32515, -17545, 17544, 32514, 10195, -23816, -30515, -2221, 28620, 26639, -5893, -31667, -21126, 13642, 32764, 14312, -20554, -31849, -6620, 26201, 28973, -1481, -30238, -24318, 9489, 32414, 18165, -16916, -32598, -10898, 23300, 30776, 2958, -28253, -27064, 5162, 31468, 21685, -12966, -32749, -14975, 19971, 32014, 7342, -25750, -29313, 740, 29944, 24807, -8779, -32298, -18778, 16276, 32664, 11592, -22774, -31024, -3696, 27870, 27473, -4430, -31254, -22236, 12282, 32714, 15629, -19380, -32165, -8063, 25285, 29635}, +{0, -30238, -23301, 12282, 32764, 12965, -22774, -30515, -741, 29944, 23815, -11593, -32749, -13643, 22235, 30776, 1480, -29636, -24318, 10897, 32714, 14312, -21686, -31024, -2221, 29312, 24807, -10196, -32665, -14975, 21125, 31253, 2958, -28974, -25286, 9489, 32597, 15629, -20554, -31469, -3696, 28620, 25749, -8779, -32515, -16277, 19971, 31666, 4429, -28253, -26202, 8062, 32414, 16915, -19380, -31849, -5163, 27870, 26639, -7343, -32298, -17545, 18777, 32014, 5892, -27474, -27064, 6619, 32164, 18165, -18166, -32165, -6620, 27063, 27473, -5893, -32015, -18778, 17544, 32297, 7342, -26640, -27871, 5162, 31848, 19379, -16916, -32415, -8063, 26201, 28252, -4430, -31667, -19972, 16276, 32514, 8778, -25750, -28621, 3695, 31468, 20553, -15630, -32598, -9490, 25285, 28973, -2959, -31254, -21126, 14974, 32664, 10195, -24808, -29313, 2220, 31023, 21685, -14313, -32715, -10898, 24317, 29635, -1481, -30777, -22236, 13642, 32748, 11592, -23816, -29945, 740, 30514, 22773, -12966, -32765, -12283, 23300, 30237}, +{0, -30777, -21126, 16276, 32297, 5892, -28253, -25286, 10897, 32764, 11592, -24808, -28621, 5162, 32164, 16915, -20554, -31024, -741, 30514, 21685, -15630, -32415, -6620, 27870, 25749, -10196, -32749, -12283, 24317, 28973, -4430, -32015, -17545, 19971, 31253, 1480, -30238, -22236, 14974, 32514, 7342, -27474, -26202, 9489, 32714, 12965, -23816, -29313, 3695, 31848, 18165, -19380, -31469, -2221, 29944, 22773, -14313, -32598, -8063, 27063, 26639, -8779, -32665, -13643, 23300, 29635, -2959, -31667, -18778, 18777, 31666, 2958, -29636, -23301, 13642, 32664, 8778, -26640, -27064, 8062, 32597, 14312, -22774, -29945, 2220, 31468, 19379, -18166, -31849, -3696, 29312, 23815, -12966, -32715, -9490, 26201, 27473, -7343, -32515, -14975, 22235, 30237, -1481, -31254, -19972, 17544, 32014, 4429, -28974, -24318, 12282, 32748, 10195, -25750, -27871, 6619, 32414, 15629, -21686, -30515, 740, 31023, 20553, -16916, -32165, -5163, 28620, 24807, -11593, -32765, -10898, 25285, 28252, -5893, -32298, -16277, 21125, 30776}, +{0, -31254, -18778, 19971, 30776, -1481, -31667, -17545, 21125, 30237, -2959, -32015, -16277, 22235, 29635, -4430, -32298, -14975, 23300, 28973, -5893, -32515, -13643, 24317, 28252, -7343, -32665, -12283, 25285, 27473, -8779, -32749, -10898, 26201, 26639, -10196, -32765, -9490, 27063, 25749, -11593, -32715, -8063, 27870, 24807, -12966, -32598, -6620, 28620, 23815, -14313, -32415, -5163, 29312, 22773, -15630, -32165, -3696, 29944, 21685, -16916, -31849, -2221, 30514, 20553, -18166, -31469, -741, 31023, 19379, -19380, -31024, 740, 31468, 18165, -20554, -30515, 2220, 31848, 16915, -21686, -29945, 3695, 32164, 15629, -22774, -29313, 5162, 32414, 14312, -23816, -28621, 6619, 32597, 12965, -24808, -27871, 8062, 32714, 11592, -25750, -27064, 9489, 32764, 10195, -26640, -26202, 10897, 32748, 8778, -27474, -25286, 12282, 32664, 7342, -28253, -24318, 13642, 32514, 5892, -28974, -23301, 14974, 32297, 4429, -29636, -22236, 16276, 32014, 2958, -30238, -21126, 17544, 31666, 1480, -30777, -19972, 18777, 31253}, +{0, -31667, -16277, 23300, 28252, -8779, -32765, -8063, 28620, 22773, -16916, -31469, 740, 31848, 15629, -23816, -27871, 9489, 32748, 7342, -28974, -22236, 17544, 31253, -1481, -32015, -14975, 24317, 27473, -10196, -32715, -6620, 29312, 21685, -18166, -31024, 2220, 32164, 14312, -24808, -27064, 10897, 32664, 5892, -29636, -21126, 18777, 30776, -2959, -32298, -13643, 25285, 26639, -11593, -32598, -5163, 29944, 20553, -19380, -30515, 3695, 32414, 12965, -25750, -26202, 12282, 32514, 4429, -30238, -19972, 19971, 30237, -4430, -32515, -12283, 26201, 25749, -12966, -32415, -3696, 30514, 19379, -20554, -29945, 5162, 32597, 11592, -26640, -25286, 13642, 32297, 2958, -30777, -18778, 21125, 29635, -5893, -32665, -10898, 27063, 24807, -14313, -32165, -2221, 31023, 18165, -21686, -29313, 6619, 32714, 10195, -27474, -24318, 14974, 32014, 1480, -31254, -17545, 22235, 28973, -7343, -32749, -9490, 27870, 23815, -15630, -31849, -741, 31468, 16915, -22774, -28621, 8062, 32764, 8778, -28253, -23301, 16276, 31666}, +{0, -32015, -13643, 26201, 24807, -15630, -31469, 2220, 32414, 11592, -27474, -23301, 17544, 30776, -4430, -32665, -9490, 28620, 21685, -19380, -29945, 6619, 32764, 7342, -29636, -19972, 21125, 28973, -8779, -32715, -5163, 30514, 18165, -22774, -27871, 10897, 32514, 2958, -31254, -16277, 24317, 26639, -12966, -32165, -741, 31848, 14312, -25750, -25286, 14974, 31666, -1481, -32298, -12283, 27063, 23815, -16916, -31024, 3695, 32597, 10195, -28253, -22236, 18777, 30237, -5893, -32749, -8063, 29312, 20553, -20554, -29313, 8062, 32748, 5892, -30238, -18778, 22235, 28252, -10196, -32598, -3696, 31023, 16915, -23816, -27064, 12282, 32297, 1480, -31667, -14975, 25285, 25749, -14313, -31849, 740, 32164, 12965, -26640, -24318, 16276, 31253, -2959, -32515, -10898, 27870, 22773, -18166, -30515, 5162, 32714, 8778, -28974, -21126, 19971, 29635, -7343, -32765, -6620, 29944, 19379, -21686, -28621, 9489, 32664, 4429, -30777, -17545, 23300, 27473, -11593, -32415, -2221, 31468, 15629, -24808, -26202, 13642, 32014}, +{0, -32298, -10898, 28620, 20553, -21686, -27871, 12282, 32014, -1481, -32515, -9490, 29312, 19379, -22774, -27064, 13642, 31666, -2959, -32665, -8063, 29944, 18165, -23816, -26202, 14974, 31253, -4430, -32749, -6620, 30514, 16915, -24808, -25286, 16276, 30776, -5893, -32765, -5163, 31023, 15629, -25750, -24318, 17544, 30237, -7343, -32715, -3696, 31468, 14312, -26640, -23301, 18777, 29635, -8779, -32598, -2221, 31848, 12965, -27474, -22236, 19971, 28973, -10196, -32415, -741, 32164, 11592, -28253, -21126, 21125, 28252, -11593, -32165, 740, 32414, 10195, -28974, -19972, 22235, 27473, -12966, -31849, 2220, 32597, 8778, -29636, -18778, 23300, 26639, -14313, -31469, 3695, 32714, 7342, -30238, -17545, 24317, 25749, -15630, -31024, 5162, 32764, 5892, -30777, -16277, 25285, 24807, -16916, -30515, 6619, 32748, 4429, -31254, -14975, 26201, 23815, -18166, -29945, 8062, 32664, 2958, -31667, -13643, 27063, 22773, -19380, -29313, 9489, 32514, 1480, -32015, -12283, 27870, 21685, -20554, -28621, 10897, 32297}, +{0, -32515, -8063, 30514, 15629, -26640, -22236, 21125, 27473, -14313, -31024, 6619, 32664, 1480, -32298, -9490, 29944, 16915, -25750, -23301, 19971, 28252, -12966, -31469, 5162, 32748, 2958, -32015, -10898, 29312, 18165, -24808, -24318, 18777, 28973, -11593, -31849, 3695, 32764, 4429, -31667, -12283, 28620, 19379, -23816, -25286, 17544, 29635, -10196, -32165, 2220, 32714, 5892, -31254, -13643, 27870, 20553, -22774, -26202, 16276, 30237, -8779, -32415, 740, 32597, 7342, -30777, -14975, 27063, 21685, -21686, -27064, 14974, 30776, -7343, -32598, -741, 32414, 8778, -30238, -16277, 26201, 22773, -20554, -27871, 13642, 31253, -5893, -32715, -2221, 32164, 10195, -29636, -17545, 25285, 23815, -19380, -28621, 12282, 31666, -4430, -32765, -3696, 31848, 11592, -28974, -18778, 24317, 24807, -18166, -29313, 10897, 32014, -2959, -32749, -5163, 31468, 12965, -28253, -19972, 23300, 25749, -16916, -29945, 9489, 32297, -1481, -32665, -6620, 31023, 14312, -27474, -21126, 22235, 26639, -15630, -30515, 8062, 32514}, +{0, -32665, -5163, 31848, 10195, -30238, -14975, 27870, 19379, -24808, -23301, 21125, 26639, -16916, -29313, 12282, 31253, -7343, -32415, 2220, 32764, 2958, -32298, -8063, 31023, 12965, -28974, -17545, 26201, 21685, -22774, -25286, 18777, 28252, -14313, -30515, 9489, 32014, -4430, -32715, -741, 32597, 5892, -31667, -10898, 29944, 15629, -27474, -19972, 24317, 23815, -20554, -27064, 16276, 29635, -11593, -31469, 6619, 32514, -1481, -32749, -3696, 32164, 8778, -30777, -13643, 28620, 18165, -25750, -22236, 22235, 25749, -18166, -28621, 13642, 30776, -8779, -32165, 3695, 32748, 1480, -32515, -6620, 31468, 11592, -29636, -16277, 27063, 20553, -23816, -24318, 19971, 27473, -15630, -29945, 10897, 31666, -5893, -32598, 740, 32714, 4429, -32015, -9490, 30514, 14312, -28253, -18778, 25285, 22773, -21686, -26202, 17544, 28973, -12966, -31024, 8062, 32297, -2959, -32765, -2221, 32414, 7342, -31254, -12283, 29312, 16915, -26640, -21126, 23300, 24807, -19380, -27871, 14974, 30237, -10196, -31849, 5162, 32664}, +{0, -32749, -2221, 32597, 4429, -32298, -6620, 31848, 8778, -31254, -10898, 30514, 12965, -29636, -14975, 28620, 16915, -27474, -18778, 26201, 20553, -24808, -22236, 23300, 23815, -21686, -25286, 19971, 26639, -18166, -27871, 16276, 28973, -14313, -29945, 12282, 30776, -10196, -31469, 8062, 32014, -5893, -32415, 3695, 32664, -1481, -32765, -741, 32714, 2958, -32515, -5163, 32164, 7342, -31667, -9490, 31023, 11592, -30238, -13643, 29312, 15629, -28253, -17545, 27063, 19379, -25750, -21126, 24317, 22773, -22774, -24318, 21125, 25749, -19380, -27064, 17544, 28252, -15630, -29313, 13642, 30237, -11593, -31024, 9489, 31666, -7343, -32165, 5162, 32514, -2959, -32715, 740, 32764, 1480, -32665, -3696, 32414, 5892, -32015, -8063, 31468, 10195, -30777, -12283, 29944, 14312, -28974, -16277, 27870, 18165, -26640, -19972, 25285, 21685, -23816, -23301, 22235, 24807, -20554, -26202, 18777, 27473, -16916, -28621, 14974, 29635, -12966, -30515, 10897, 31253, -8779, -31849, 6619, 32297, -4430, -32598, 2220, 32748}, +{0, -32765, 740, 32748, -1481, -32715, 2220, 32664, -2959, -32598, 3695, 32514, -4430, -32415, 5162, 32297, -5893, -32165, 6619, 32014, -7343, -31849, 8062, 31666, -8779, -31469, 9489, 31253, -10196, -31024, 10897, 30776, -11593, -30515, 12282, 30237, -12966, -29945, 13642, 29635, -14313, -29313, 14974, 28973, -15630, -28621, 16276, 28252, -16916, -27871, 17544, 27473, -18166, -27064, 18777, 26639, -19380, -26202, 19971, 25749, -20554, -25286, 21125, 24807, -21686, -24318, 22235, 23815, -22774, -23301, 23300, 22773, -23816, -22236, 24317, 21685, -24808, -21126, 25285, 20553, -25750, -19972, 26201, 19379, -26640, -18778, 27063, 18165, -27474, -17545, 27870, 16915, -28253, -16277, 28620, 15629, -28974, -14975, 29312, 14312, -29636, -13643, 29944, 12965, -30238, -12283, 30514, 11592, -30777, -10898, 31023, 10195, -31254, -9490, 31468, 8778, -31667, -8063, 31848, 7342, -32015, -6620, 32164, 5892, -32298, -5163, 32414, 4429, -32515, -3696, 32597, 2958, -32665, -2221, 32714, 1480, -32749, -741, 32764}, +{0, -32715, 3695, 32297, -7343, -31469, 10897, 30237, -14313, -28621, 17544, 26639, -20554, -24318, 23300, 21685, -25750, -18778, 27870, 15629, -29636, -12283, 31023, 8778, -32015, -5163, 32597, 1480, -32765, 2220, 32514, -5893, -31849, 9489, 30776, -12966, -29313, 16276, 27473, -19380, -25286, 22235, 22773, -24808, -19972, 27063, 16915, -28974, -13643, 30514, 10195, -31667, -6620, 32414, 2958, -32749, 740, 32664, -4430, -32165, 8062, 31253, -11593, -29945, 14974, 28252, -18166, -26202, 21125, 23815, -23816, -21126, 26201, 18165, -28253, -14975, 29944, 11592, -31254, -8063, 32164, 4429, -32665, -741, 32748, -2959, -32415, 6619, 31666, -10196, -30515, 13642, 28973, -16916, -27064, 19971, 24807, -22774, -22236, 25285, 19379, -27474, -16277, 29312, 12965, -30777, -9490, 31848, 5892, -32515, -2221, 32764, -1481, -32598, 5162, 32014, -8779, -31024, 12282, 29635, -15630, -27871, 18777, 25749, -21686, -23301, 24317, 20553, -26640, -17545, 28620, 14312, -30238, -10898, 31468, 7342, -32298, -3696, 32714}, +{0, -32598, 6619, 31253, -12966, -28621, 18777, 24807, -23816, -19972, 27870, 14312, -30777, -8063, 32414, 1480, -32715, 5162, 31666, -11593, -29313, 17544, 25749, -22774, -21126, 27063, 15629, -30238, -9490, 32164, 2958, -32765, 3695, 32014, -10196, -29945, 16276, 26639, -21686, -22236, 26201, 16915, -29636, -10898, 31848, 4429, -32749, 2220, 32297, -8779, -30515, 14974, 27473, -20554, -23301, 25285, 18165, -28974, -12283, 31468, 5892, -32665, 740, 32514, -7343, -31024, 13642, 28252, -19380, -24318, 24317, 19379, -28253, -13643, 31023, 7342, -32515, -741, 32664, -5893, -31469, 12282, 28973, -18166, -25286, 23300, 20553, -27474, -14975, 30514, 8778, -32298, -2221, 32748, -4430, -31849, 10897, 29635, -16916, -26202, 22235, 21685, -26640, -16277, 29944, 10195, -32015, -3696, 32764, -2959, -32165, 9489, 30237, -15630, -27064, 21125, 22773, -25750, -17545, 29312, 11592, -31667, -5163, 32714, -1481, -32415, 8062, 30776, -14313, -27871, 19971, 23815, -24808, -18778, 28620, 12965, -31254, -6620, 32597}, +{0, -32415, 9489, 29635, -18166, -24318, 25285, 16915, -30238, -8063, 32597, -1481, -32165, 10897, 28973, -19380, -23301, 26201, 15629, -30777, -6620, 32714, -2959, -31849, 12282, 28252, -20554, -22236, 27063, 14312, -31254, -5163, 32764, -4430, -31469, 13642, 27473, -21686, -21126, 27870, 12965, -31667, -3696, 32748, -5893, -31024, 14974, 26639, -22774, -19972, 28620, 11592, -32015, -2221, 32664, -7343, -30515, 16276, 25749, -23816, -18778, 29312, 10195, -32298, -741, 32514, -8779, -29945, 17544, 24807, -24808, -17545, 29944, 8778, -32515, 740, 32297, -10196, -29313, 18777, 23815, -25750, -16277, 30514, 7342, -32665, 2220, 32014, -11593, -28621, 19971, 22773, -26640, -14975, 31023, 5892, -32749, 3695, 31666, -12966, -27871, 21125, 21685, -27474, -13643, 31468, 4429, -32765, 5162, 31253, -14313, -27064, 22235, 20553, -28253, -12283, 31848, 2958, -32715, 6619, 30776, -15630, -26202, 23300, 19379, -28974, -10898, 32164, 1480, -32598, 8062, 30237, -16916, -25286, 24317, 18165, -29636, -9490, 32414}, +{0, -32165, 12282, 27473, -22774, -18778, 29944, 7342, -32749, 5162, 30776, -16916, -24318, 26201, 14312, -31667, -2221, 32514, -10196, -28621, 21125, 20553, -28974, -9490, 32597, -2959, -31469, 14974, 25749, -24808, -16277, 31023, 4429, -32715, 8062, 29635, -19380, -22236, 27870, 11592, -32298, 740, 32014, -12966, -27064, 23300, 18165, -30238, -6620, 32764, -5893, -30515, 17544, 23815, -26640, -13643, 31848, 1480, -32415, 10897, 28252, -21686, -19972, 29312, 8778, -32665, 3695, 31253, -15630, -25286, 25285, 15629, -31254, -3696, 32664, -8779, -29313, 19971, 21685, -28253, -10898, 32414, -1481, -31849, 13642, 26639, -23816, -17545, 30514, 5892, -32765, 6619, 30237, -18166, -23301, 27063, 12965, -32015, -741, 32297, -11593, -27871, 22235, 19379, -29636, -8063, 32714, -4430, -31024, 16276, 24807, -25750, -14975, 31468, 2958, -32598, 9489, 28973, -20554, -21126, 28620, 10195, -32515, 2220, 31666, -14313, -26202, 24317, 16915, -30777, -5163, 32748, -7343, -29945, 18777, 22773, -27474, -12283, 32164}, +{0, -31849, 14974, 24807, -26640, -12283, 32414, -2959, -31024, 17544, 22773, -28253, -9490, 32714, -5893, -29945, 19971, 20553, -29636, -6620, 32748, -8779, -28621, 22235, 18165, -30777, -3696, 32514, -11593, -27064, 24317, 15629, -31667, -741, 32014, -14313, -25286, 26201, 12965, -32298, 2220, 31253, -16916, -23301, 27870, 10195, -32665, 5162, 30237, -19380, -21126, 29312, 7342, -32765, 8062, 28973, -21686, -18778, 30514, 4429, -32598, 10897, 27473, -23816, -16277, 31468, 1480, -32165, 13642, 25749, -25750, -13643, 32164, -1481, -31469, 16276, 23815, -27474, -10898, 32597, -4430, -30515, 18777, 21685, -28974, -8063, 32764, -7343, -29313, 21125, 19379, -30238, -5163, 32664, -10196, -27871, 23300, 16915, -31254, -2221, 32297, -12966, -26202, 25285, 14312, -32015, 740, 31666, -15630, -24318, 27063, 11592, -32515, 3695, 30776, -18166, -22236, 28620, 8778, -32749, 6619, 29635, -20554, -19972, 29944, 5892, -32715, 9489, 28252, -22774, -17545, 31023, 2958, -32415, 12282, 26639, -24808, -14975, 31848}, +{0, -31469, 17544, 21685, -29636, -5163, 32514, -12966, -25286, 27063, 10195, -32749, 8062, 28252, -23816, -14975, 32164, -2959, -30515, 19971, 19379, -30777, -2221, 32014, -15630, -23301, 28620, 7342, -32715, 10897, 26639, -25750, -12283, 32597, -5893, -29313, 22235, 16915, -31667, 740, 31253, -18166, -21126, 29944, 4429, -32415, 13642, 24807, -27474, -9490, 32764, -8779, -27871, 24317, 14312, -32298, 3695, 30237, -20554, -18778, 31023, 1480, -31849, 16276, 22773, -28974, -6620, 32664, -11593, -26202, 26201, 11592, -32665, 6619, 28973, -22774, -16277, 31848, -1481, -31024, 18777, 20553, -30238, -3696, 32297, -14313, -24318, 27870, 8778, -32765, 9489, 27473, -24808, -13643, 32414, -4430, -29945, 21125, 18165, -31254, -741, 31666, -16916, -22236, 29312, 5892, -32598, 12282, 25749, -26640, -10898, 32714, -7343, -28621, 23300, 15629, -32015, 2220, 30776, -19380, -19972, 30514, 2958, -32165, 14974, 23815, -28253, -8063, 32748, -10196, -27064, 25285, 12965, -32515, 5162, 29635, -21686, -17545, 31468}, +{0, -31024, 19971, 18165, -31667, 2220, 30237, -21686, -16277, 32164, -4430, -29313, 23300, 14312, -32515, 6619, 28252, -24808, -12283, 32714, -8779, -27064, 26201, 10195, -32765, 10897, 25749, -27474, -8063, 32664, -12966, -24318, 28620, 5892, -32415, 14974, 22773, -29636, -3696, 32014, -16916, -21126, 30514, 1480, -31469, 18777, 19379, -31254, 740, 30776, -20554, -17545, 31848, -2959, -29945, 22235, 15629, -32298, 5162, 28973, -23816, -13643, 32597, -7343, -27871, 25285, 11592, -32749, 9489, 26639, -26640, -9490, 32748, -11593, -25286, 27870, 7342, -32598, 13642, 23815, -28974, -5163, 32297, -15630, -22236, 29944, 2958, -31849, 17544, 20553, -30777, -741, 31253, -19380, -18778, 31468, -1481, -30515, 21125, 16915, -32015, 3695, 29635, -22774, -14975, 32414, -5893, -28621, 24317, 12965, -32665, 8062, 27473, -25750, -10898, 32764, -10196, -26202, 27063, 8778, -32715, 12282, 24807, -28253, -6620, 32514, -14313, -23301, 29312, 4429, -32165, 16276, 21685, -30238, -2221, 31666, -18166, -19972, 31023}, +{0, -30515, 22235, 14312, -32665, 9489, 25749, -28253, -5163, 32014, -18166, -18778, 31848, -4430, -28621, 25285, 10195, -32715, 13642, 22773, -30238, -741, 30776, -21686, -14975, 32597, -8779, -26202, 27870, 5892, -32165, 17544, 19379, -31667, 3695, 28973, -24808, -10898, 32748, -12966, -23301, 29944, 1480, -31024, 21125, 15629, -32515, 8062, 26639, -27474, -6620, 32297, -16916, -19972, 31468, -2959, -29313, 24317, 11592, -32765, 12282, 23815, -29636, -2221, 31253, -20554, -16277, 32414, -7343, -27064, 27063, 7342, -32415, 16276, 20553, -31254, 2220, 29635, -23816, -12283, 32764, -11593, -24318, 29312, 2958, -31469, 19971, 16915, -32298, 6619, 27473, -26640, -8063, 32514, -15630, -21126, 31023, -1481, -29945, 23300, 12965, -32749, 10897, 24807, -28974, -3696, 31666, -19380, -17545, 32164, -5893, -27871, 26201, 8778, -32598, 14974, 21685, -30777, 740, 30237, -22774, -13643, 32714, -10196, -25286, 28620, 4429, -31849, 18777, 18165, -32015, 5162, 28252, -25750, -9490, 32664, -14313, -22236, 30514}, +{0, -29945, 24317, 10195, -32598, 16276, 19379, -32015, 6619, 26639, -28253, -3696, 31253, -21686, -13643, 32764, -12966, -22236, 31023, -2959, -28621, 26201, 7342, -32165, 18777, 16915, -32515, 9489, 24807, -29636, -741, 30237, -23816, -10898, 32664, -15630, -19972, 31848, -5893, -27064, 27870, 4429, -31469, 21125, 14312, -32749, 12282, 22773, -30777, 2220, 28973, -25750, -8063, 32297, -18166, -17545, 32414, -8779, -25286, 29312, 1480, -30515, 23300, 11592, -32715, 14974, 20553, -31667, 5162, 27473, -27474, -5163, 31666, -20554, -14975, 32714, -11593, -23301, 30514, -1481, -29313, 25285, 8778, -32415, 17544, 18165, -32298, 8062, 25749, -28974, -2221, 30776, -22774, -12283, 32748, -14313, -21126, 31468, -4430, -27871, 27063, 5892, -31849, 19971, 15629, -32665, 10897, 23815, -30238, 740, 29635, -24808, -9490, 32514, -16916, -18778, 32164, -7343, -26202, 28620, 2958, -31024, 22235, 12965, -32765, 13642, 21685, -31254, 3695, 28252, -26640, -6620, 32014, -19380, -16277, 32597, -10196, -24318, 29944}, +{0, -29313, 26201, 5892, -31469, 22235, 11592, -32598, 17544, 16915, -32665, 12282, 21685, -31667, 6619, 25749, -29636, 740, 28973, -26640, -5163, 31253, -22774, -10898, 32514, -18166, -16277, 32714, -12966, -21126, 31848, -7343, -25286, 29944, -1481, -28621, 27063, 4429, -31024, 23300, 10195, -32415, 18777, 15629, -32749, 13642, 20553, -32015, 8062, 24807, -30238, 2220, 28252, -27474, -3696, 30776, -23816, -9490, 32297, -19380, -14975, 32764, -14313, -19972, 32164, -8779, -24318, 30514, -2959, -27871, 27870, 2958, -30515, 24317, 8778, -32165, 19971, 14312, -32765, 14974, 19379, -32298, 9489, 23815, -30777, 3695, 27473, -28253, -2221, 30237, -24808, -8063, 32014, -20554, -13643, 32748, -15630, -18778, 32414, -10196, -23301, 31023, -4430, -27064, 28620, 1480, -29945, 25285, 7342, -31849, 21125, 12965, -32715, 16276, 18165, -32515, 10897, 22773, -31254, 5162, 26639, -28974, -741, 29635, -25750, -6620, 31666, -21686, -12283, 32664, -16916, -17545, 32597, -11593, -22236, 31468, -5893, -26202, 29312}, +{0, -28621, 27870, 1480, -29313, 27063, 2958, -29945, 26201, 4429, -30515, 25285, 5892, -31024, 24317, 7342, -31469, 23300, 8778, -31849, 22235, 10195, -32165, 21125, 11592, -32415, 19971, 12965, -32598, 18777, 14312, -32715, 17544, 15629, -32765, 16276, 16915, -32749, 14974, 18165, -32665, 13642, 19379, -32515, 12282, 20553, -32298, 10897, 21685, -32015, 9489, 22773, -31667, 8062, 23815, -31254, 6619, 24807, -30777, 5162, 25749, -30238, 3695, 26639, -29636, 2220, 27473, -28974, 740, 28252, -28253, -741, 28973, -27474, -2221, 29635, -26640, -3696, 30237, -25750, -5163, 30776, -24808, -6620, 31253, -23816, -8063, 31666, -22774, -9490, 32014, -21686, -10898, 32297, -20554, -12283, 32514, -19380, -13643, 32664, -18166, -14975, 32748, -16916, -16277, 32764, -15630, -17545, 32714, -14313, -18778, 32597, -12966, -19972, 32414, -11593, -21126, 32164, -10196, -22236, 31848, -8779, -23301, 31468, -7343, -24318, 31023, -5893, -25286, 30514, -4430, -26202, 29944, -2959, -27064, 29312, -1481, -27871, 28620}, +{0, -27871, 29312, -2959, -26202, 30514, -5893, -24318, 31468, -8779, -22236, 32164, -11593, -19972, 32597, -14313, -17545, 32764, -16916, -14975, 32664, -19380, -12283, 32297, -21686, -9490, 31666, -23816, -6620, 30776, -25750, -3696, 29635, -27474, -741, 28252, -28974, 2220, 26639, -30238, 5162, 24807, -31254, 8062, 22773, -32015, 10897, 20553, -32515, 13642, 18165, -32749, 16276, 15629, -32715, 18777, 12965, -32415, 21125, 10195, -31849, 23300, 7342, -31024, 25285, 4429, -29945, 27063, 1480, -28621, 28620, -1481, -27064, 29944, -4430, -25286, 31023, -7343, -23301, 31848, -10196, -21126, 32414, -12966, -18778, 32714, -15630, -16277, 32748, -18166, -13643, 32514, -20554, -10898, 32014, -22774, -8063, 31253, -24808, -5163, 30237, -26640, -2221, 28973, -28253, 740, 27473, -29636, 3695, 25749, -30777, 6619, 23815, -31667, 9489, 21685, -32298, 12282, 19379, -32665, 14974, 16915, -32765, 17544, 14312, -32598, 19971, 11592, -32165, 22235, 8778, -31469, 24317, 5892, -30515, 26201, 2958, -29313, 27870}, +{0, -27064, 30514, -7343, -22236, 32414, -14313, -16277, 32664, -20554, -9490, 31253, -25750, -2221, 28252, -29636, 5162, 23815, -32015, 12282, 18165, -32765, 18777, 11592, -31849, 24317, 4429, -29313, 28620, -2959, -25286, 31468, -10196, -19972, 32714, -16916, -13643, 32297, -22774, -6620, 30237, -27474, 740, 26639, -30777, 8062, 21685, -32515, 14974, 15629, -32598, 21125, 8778, -31024, 26201, 1480, -27871, 29944, -5893, -23301, 32164, -12966, -17545, 32748, -19380, -10898, 31666, -24808, -3696, 28973, -28974, 3695, 24807, -31667, 10897, 19379, -32749, 17544, 12965, -32165, 23300, 5892, -29945, 27870, -1481, -26202, 31023, -8779, -21126, 32597, -15630, -14975, 32514, -21686, -8063, 30776, -26640, -741, 27473, -30238, 6619, 22773, -32298, 13642, 16915, -32715, 19971, 10195, -31469, 25285, 2958, -28621, 29312, -4430, -24318, 31848, -11593, -18778, 32764, -18166, -12283, 32014, -23816, -5163, 29635, -28253, 2220, 25749, -31254, 9489, 20553, -32665, 16276, 14312, -32415, 22235, 7342, -30515, 27063}, +{0, -26202, 31468, -11593, -17545, 32664, -21686, -6620, 29635, -28974, 5162, 22773, -32515, 16276, 12965, -31849, 25285, 1480, -27064, 31023, -10196, -18778, 32748, -20554, -8063, 30237, -28253, 3695, 23815, -32298, 14974, 14312, -32165, 24317, 2958, -27871, 30514, -8779, -19972, 32764, -19380, -9490, 30776, -27474, 2220, 24807, -32015, 13642, 15629, -32415, 23300, 4429, -28621, 29944, -7343, -21126, 32714, -18166, -10898, 31253, -26640, 740, 25749, -31667, 12282, 16915, -32598, 22235, 5892, -29313, 29312, -5893, -22236, 32597, -16916, -12283, 31666, -25750, -741, 26639, -31254, 10897, 18165, -32715, 21125, 7342, -29945, 28620, -4430, -23301, 32414, -15630, -13643, 32014, -24808, -2221, 27473, -30777, 9489, 19379, -32765, 19971, 8778, -30515, 27870, -2959, -24318, 32164, -14313, -14975, 32297, -23816, -3696, 28252, -30238, 8062, 20553, -32749, 18777, 10195, -31024, 27063, -1481, -25286, 31848, -12966, -16277, 32514, -22774, -5163, 28973, -29636, 6619, 21685, -32665, 17544, 11592, -31469, 26201}, +{0, -25286, 32164, -15630, -12283, 31253, -27474, 3695, 22773, -32665, 18777, 8778, -29945, 29312, -7343, -19972, 32748, -21686, -5163, 28252, -30777, 10897, 16915, -32415, 24317, 1480, -26202, 31848, -14313, -13643, 31666, -26640, 2220, 23815, -32515, 17544, 10195, -30515, 28620, -5893, -21126, 32764, -20554, -6620, 28973, -30238, 9489, 18165, -32598, 23300, 2958, -27064, 31468, -12966, -14975, 32014, -25750, 740, 24807, -32298, 16276, 11592, -31024, 27870, -4430, -22236, 32714, -19380, -8063, 29635, -29636, 8062, 19379, -32715, 22235, 4429, -27871, 31023, -11593, -16277, 32297, -24808, -741, 25749, -32015, 14974, 12965, -31469, 27063, -2959, -23301, 32597, -18166, -9490, 30237, -28974, 6619, 20553, -32765, 21125, 5892, -28621, 30514, -10196, -17545, 32514, -23816, -2221, 26639, -31667, 13642, 14312, -31849, 26201, -1481, -24318, 32414, -16916, -10898, 30776, -28253, 5162, 21685, -32749, 19971, 7342, -29313, 29944, -8779, -18778, 32664, -22774, -3696, 27473, -31254, 12282, 15629, -32165, 25285}, +{0, -24318, 32597, -19380, -6620, 28252, -31254, 13642, 12965, -31024, 28620, -7343, -18778, 32514, -24808, 740, 23815, -32665, 19971, 5892, -27871, 31468, -14313, -12283, 30776, -28974, 8062, 18165, -32415, 25285, -1481, -23301, 32714, -20554, -5163, 27473, -31667, 14974, 11592, -30515, 29312, -8779, -17545, 32297, -25750, 2220, 22773, -32749, 21125, 4429, -27064, 31848, -15630, -10898, 30237, -29636, 9489, 16915, -32165, 26201, -2959, -22236, 32764, -21686, -3696, 26639, -32015, 16276, 10195, -29945, 29944, -10196, -16277, 32014, -26640, 3695, 21685, -32765, 22235, 2958, -26202, 32164, -16916, -9490, 29635, -30238, 10897, 15629, -31849, 27063, -4430, -21126, 32748, -22774, -2221, 25749, -32298, 17544, 8778, -29313, 30514, -11593, -14975, 31666, -27474, 5162, 20553, -32715, 23300, 1480, -25286, 32414, -18166, -8063, 28973, -30777, 12282, 14312, -31469, 27870, -5893, -19972, 32664, -23816, -741, 24807, -32515, 18777, 7342, -28621, 31023, -12966, -13643, 31253, -28253, 6619, 19379, -32598, 24317}, +{0, -23301, 32764, -22774, -741, 23815, -32749, 22235, 1480, -24318, 32714, -21686, -2221, 24807, -32665, 21125, 2958, -25286, 32597, -20554, -3696, 25749, -32515, 19971, 4429, -26202, 32414, -19380, -5163, 26639, -32298, 18777, 5892, -27064, 32164, -18166, -6620, 27473, -32015, 17544, 7342, -27871, 31848, -16916, -8063, 28252, -31667, 16276, 8778, -28621, 31468, -15630, -9490, 28973, -31254, 14974, 10195, -29313, 31023, -14313, -10898, 29635, -30777, 13642, 11592, -29945, 30514, -12966, -12283, 30237, -30238, 12282, 12965, -30515, 29944, -11593, -13643, 30776, -29636, 10897, 14312, -31024, 29312, -10196, -14975, 31253, -28974, 9489, 15629, -31469, 28620, -8779, -16277, 31666, -28253, 8062, 16915, -31849, 27870, -7343, -17545, 32014, -27474, 6619, 18165, -32165, 27063, -5893, -18778, 32297, -26640, 5162, 19379, -32415, 26201, -4430, -19972, 32514, -25750, 3695, 20553, -32598, 25285, -2959, -21126, 32664, -24808, 2220, 21685, -32715, 24317, -1481, -22236, 32748, -23816, 740, 22773, -32765, 23300}, +{0, -22236, 32664, -25750, 5162, 18165, -31849, 28620, -10196, -13643, 30237, -30777, 14974, 8778, -27871, 32164, -19380, -3696, 24807, -32749, 23300, -1481, -21126, 32514, -26640, 6619, 16915, -31469, 29312, -11593, -12283, 29635, -31254, 16276, 7342, -27064, 32414, -20554, -2221, 23815, -32765, 24317, -2959, -19972, 32297, -27474, 8062, 15629, -31024, 29944, -12966, -10898, 28973, -31667, 17544, 5892, -26202, 32597, -21686, -741, 22773, -32715, 25285, -4430, -18778, 32014, -28253, 9489, 14312, -30515, 30514, -14313, -9490, 28252, -32015, 18777, 4429, -25286, 32714, -22774, 740, 21685, -32598, 26201, -5893, -17545, 31666, -28974, 10897, 12965, -29945, 31023, -15630, -8063, 27473, -32298, 19971, 2958, -24318, 32764, -23816, 2220, 20553, -32415, 27063, -7343, -16277, 31253, -29636, 12282, 11592, -29313, 31468, -16916, -6620, 26639, -32515, 21125, 1480, -23301, 32748, -24808, 3695, 19379, -32165, 27870, -8779, -14975, 30776, -30238, 13642, 10195, -28621, 31848, -18166, -5163, 25749, -32665, 22235}, +{0, -21126, 32297, -28253, 10897, 11592, -28621, 32164, -20554, -741, 21685, -32415, 27870, -10196, -12283, 28973, -32015, 19971, 1480, -22236, 32514, -27474, 9489, 12965, -29313, 31848, -19380, -2221, 22773, -32598, 27063, -8779, -13643, 29635, -31667, 18777, 2958, -23301, 32664, -26640, 8062, 14312, -29945, 31468, -18166, -3696, 23815, -32715, 26201, -7343, -14975, 30237, -31254, 17544, 4429, -24318, 32748, -25750, 6619, 15629, -30515, 31023, -16916, -5163, 24807, -32765, 25285, -5893, -16277, 30776, -30777, 16276, 5892, -25286, 32764, -24808, 5162, 16915, -31024, 30514, -15630, -6620, 25749, -32749, 24317, -4430, -17545, 31253, -30238, 14974, 7342, -26202, 32714, -23816, 3695, 18165, -31469, 29944, -14313, -8063, 26639, -32665, 23300, -2959, -18778, 31666, -29636, 13642, 8778, -27064, 32597, -22774, 2220, 19379, -31849, 29312, -12966, -9490, 27473, -32515, 22235, -1481, -19972, 32014, -28974, 12282, 10195, -27871, 32414, -21686, 740, 20553, -32165, 28620, -11593, -10898, 28252, -32298, 21125}, +{0, -19972, 31666, -30238, 16276, 4429, -23301, 32514, -28253, 12282, 8778, -26202, 32764, -25750, 8062, 12965, -28621, 32414, -22774, 3695, 16915, -30515, 31468, -19380, -741, 20553, -31849, 29944, -15630, -5163, 23815, -32598, 27870, -11593, -9490, 26639, -32749, 25285, -7343, -13643, 28973, -32298, 22235, -2959, -17545, 30776, -31254, 18777, 1480, -21126, 32014, -29636, 14974, 5892, -24318, 32664, -27474, 10897, 10195, -27064, 32714, -24808, 6619, 14312, -29313, 32164, -21686, 2220, 18165, -31024, 31023, -18166, -2221, 21685, -32165, 29312, -14313, -6620, 24807, -32715, 27063, -10196, -10898, 27473, -32665, 24317, -5893, -14975, 29635, -32015, 21125, -1481, -18778, 31253, -30777, 17544, 2958, -22236, 32297, -28974, 13642, 7342, -25286, 32748, -26640, 9489, 11592, -27871, 32597, -23816, 5162, 15629, -29945, 31848, -20554, 740, 19379, -31469, 30514, -16916, -3696, 22773, -32415, 28620, -12966, -8063, 25749, -32765, 26201, -8779, -12283, 28252, -32515, 23300, -4430, -16277, 30237, -31667, 19971}, +{0, -18778, 30776, -31667, 21125, -2959, -16277, 29635, -32298, 23300, -5893, -13643, 28252, -32665, 25285, -8779, -10898, 26639, -32765, 27063, -11593, -8063, 24807, -32598, 28620, -14313, -5163, 22773, -32165, 29944, -16916, -2221, 20553, -31469, 31023, -19380, 740, 18165, -30515, 31848, -21686, 3695, 15629, -29313, 32414, -23816, 6619, 12965, -27871, 32714, -25750, 9489, 10195, -26202, 32748, -27474, 12282, 7342, -24318, 32514, -28974, 14974, 4429, -22236, 32014, -30238, 17544, 1480, -19972, 31253, -31254, 19971, -1481, -17545, 30237, -32015, 22235, -4430, -14975, 28973, -32515, 24317, -7343, -12283, 27473, -32749, 26201, -10196, -9490, 25749, -32715, 27870, -12966, -6620, 23815, -32415, 29312, -15630, -3696, 21685, -31849, 30514, -18166, -741, 19379, -31024, 31468, -20554, 2220, 16915, -29945, 32164, -22774, 5162, 14312, -28621, 32597, -24808, 8062, 11592, -27064, 32764, -26640, 10897, 8778, -25286, 32664, -28253, 13642, 5892, -23301, 32297, -29636, 16276, 2958, -21126, 31666, -30777, 18777}, +{0, -17545, 29635, -32515, 25285, -10196, -8063, 23815, -32165, 30514, -19380, 2220, 15629, -28621, 32714, -26640, 12282, 5892, -22236, 31666, -31254, 21125, -4430, -13643, 27473, -32765, 27870, -14313, -3696, 20553, -31024, 31848, -22774, 6619, 11592, -26202, 32664, -28974, 16276, 1480, -18778, 30237, -32298, 24317, -8779, -9490, 24807, -32415, 29944, -18166, 740, 16915, -29313, 32597, -25750, 10897, 7342, -23301, 32014, -30777, 19971, -2959, -14975, 28252, -32749, 27063, -12966, -5163, 21685, -31469, 31468, -21686, 5162, 12965, -27064, 32748, -28253, 14974, 2958, -19972, 30776, -32015, 23300, -7343, -10898, 25749, -32598, 29312, -16916, -741, 18165, -29945, 32414, -24808, 9489, 8778, -24318, 32297, -30238, 18777, -1481, -16277, 28973, -32665, 26201, -11593, -6620, 22773, -31849, 31023, -20554, 3695, 14312, -27871, 32764, -27474, 13642, 4429, -21126, 31253, -31667, 22235, -5893, -12283, 26639, -32715, 28620, -15630, -2221, 19379, -30515, 32164, -23816, 8062, 10195, -25286, 32514, -29636, 17544}, +{0, -16277, 28252, -32765, 28620, -16916, 740, 15629, -27871, 32748, -28974, 17544, -1481, -14975, 27473, -32715, 29312, -18166, 2220, 14312, -27064, 32664, -29636, 18777, -2959, -13643, 26639, -32598, 29944, -19380, 3695, 12965, -26202, 32514, -30238, 19971, -4430, -12283, 25749, -32415, 30514, -20554, 5162, 11592, -25286, 32297, -30777, 21125, -5893, -10898, 24807, -32165, 31023, -21686, 6619, 10195, -24318, 32014, -31254, 22235, -7343, -9490, 23815, -31849, 31468, -22774, 8062, 8778, -23301, 31666, -31667, 23300, -8779, -8063, 22773, -31469, 31848, -23816, 9489, 7342, -22236, 31253, -32015, 24317, -10196, -6620, 21685, -31024, 32164, -24808, 10897, 5892, -21126, 30776, -32298, 25285, -11593, -5163, 20553, -30515, 32414, -25750, 12282, 4429, -19972, 30237, -32515, 26201, -12966, -3696, 19379, -29945, 32597, -26640, 13642, 2958, -18778, 29635, -32665, 27063, -14313, -2221, 18165, -29313, 32714, -27474, 14974, 1480, -17545, 28973, -32749, 27870, -15630, -741, 16915, -28621, 32764, -28253, 16276}, +{0, -14975, 26639, -32415, 31023, -22774, 9489, 5892, -19972, 29635, -32749, 28620, -18166, 3695, 11592, -24318, 31666, -32015, 25285, -12966, -2221, 16915, -27871, 32664, -30238, 21125, -7343, -8063, 21685, -30515, 32597, -27474, 16276, -1481, -13643, 25749, -32165, 31468, -23816, 10897, 4429, -18778, 28973, -32765, 29312, -19380, 5162, 10195, -23301, 31253, -32298, 26201, -14313, -741, 15629, -27064, 32514, -30777, 22235, -8779, -6620, 20553, -29945, 32714, -28253, 17544, -2959, -12283, 24807, -31849, 31848, -24808, 12282, 2958, -17545, 28252, -32715, 29944, -20554, 6619, 8778, -22236, 30776, -32515, 27063, -15630, 740, 14312, -26202, 32297, -31254, 23300, -10196, -5163, 19379, -29313, 32764, -28974, 18777, -4430, -10898, 23815, -31469, 32164, -25750, 13642, 1480, -16277, 27473, -32598, 30514, -21686, 8062, 7342, -21126, 30237, -32665, 27870, -16916, 2220, 12965, -25286, 32014, -31667, 24317, -11593, -3696, 18165, -28621, 32748, -29636, 19971, -5893, -9490, 22773, -31024, 32414, -26640, 14974}, +{0, -13643, 24807, -31469, 32414, -27474, 17544, -4430, -9490, 21685, -29945, 32764, -29636, 21125, -8779, -5163, 18165, -27871, 32514, -31254, 24317, -12966, -741, 14312, -25286, 31666, -32298, 27063, -16916, 3695, 10195, -22236, 30237, -32749, 29312, -20554, 8062, 5892, -18778, 28252, -32598, 31023, -23816, 12282, 1480, -14975, 25749, -31849, 32164, -26640, 16276, -2959, -10898, 22773, -30515, 32714, -28974, 19971, -7343, -6620, 19379, -28621, 32664, -30777, 23300, -11593, -2221, 15629, -26202, 32014, -32015, 26201, -15630, 2220, 11592, -23301, 30776, -32665, 28620, -19380, 6619, 7342, -19972, 28973, -32715, 30514, -22774, 10897, 2958, -16277, 26639, -32165, 31848, -25750, 14974, -1481, -12283, 23815, -31024, 32597, -28253, 18777, -5893, -8063, 20553, -29313, 32748, -30238, 22235, -10196, -3696, 16915, -27064, 32297, -31667, 25285, -14313, 740, 12965, -24318, 31253, -32515, 27870, -18166, 5162, 8778, -21126, 29635, -32765, 29944, -21686, 9489, 4429, -17545, 27473, -32415, 31468, -24808, 13642}, +{0, -12283, 22773, -29945, 32748, -30777, 24317, -14313, 2220, 10195, -21126, 28973, -32598, 31468, -25750, 16276, -4430, -8063, 19379, -27871, 32297, -32015, 27063, -18166, 6619, 5892, -17545, 26639, -31849, 32414, -28253, 19971, -8779, -3696, 15629, -25286, 31253, -32665, 29312, -21686, 10897, 1480, -13643, 23815, -30515, 32764, -30238, 23300, -12966, 740, 11592, -22236, 29635, -32715, 31023, -24808, 14974, -2959, -9490, 20553, -28621, 32514, -31667, 26201, -16916, 5162, 7342, -18778, 27473, -32165, 32164, -27474, 18777, -7343, -5163, 16915, -26202, 31666, -32515, 28620, -20554, 9489, 2958, -14975, 24807, -31024, 32714, -29636, 22235, -11593, -741, 12965, -23301, 30237, -32765, 30514, -23816, 13642, -1481, -10898, 21685, -29313, 32664, -31254, 25285, -15630, 3695, 8778, -19972, 28252, -32415, 31848, -26640, 17544, -5893, -6620, 18165, -27064, 32014, -32298, 27870, -19380, 8062, 4429, -16277, 25749, -31469, 32597, -28974, 21125, -10196, -2221, 14312, -24318, 30776, -32749, 29944, -22774, 12282}, +{0, -10898, 20553, -27871, 32014, -32515, 29312, -22774, 13642, -2959, -8063, 18165, -26202, 31253, -32749, 30514, -24808, 16276, -5893, -5163, 15629, -24318, 30237, -32715, 31468, -26640, 18777, -8779, -2221, 12965, -22236, 28973, -32415, 32164, -28253, 21125, -11593, 740, 10195, -19972, 27473, -31849, 32597, -29636, 23300, -14313, 3695, 7342, -17545, 25749, -31024, 32764, -30777, 25285, -16916, 6619, 4429, -14975, 23815, -29945, 32664, -31667, 27063, -19380, 9489, 1480, -12283, 21685, -28621, 32297, -32298, 28620, -21686, 12282, -1481, -9490, 19379, -27064, 31666, -32665, 29944, -23816, 14974, -4430, -6620, 16915, -25286, 30776, -32765, 31023, -25750, 17544, -7343, -3696, 14312, -23301, 29635, -32598, 31848, -27474, 19971, -10196, -741, 11592, -21126, 28252, -32165, 32414, -28974, 22235, -12966, 2220, 8778, -18778, 26639, -31469, 32714, -30238, 24317, -15630, 5162, 5892, -16277, 24807, -30515, 32748, -31254, 26201, -18166, 8062, 2958, -13643, 22773, -29313, 32514, -32015, 27870, -20554, 10897}, +{0, -9490, 18165, -25286, 30237, -32598, 32164, -28974, 23300, -15630, 6619, 2958, -12283, 20553, -27064, 31253, -32765, 31468, -27474, 21125, -12966, 3695, 5892, -14975, 22773, -28621, 32014, -32665, 30514, -25750, 18777, -10196, 740, 8778, -17545, 24807, -29945, 32514, -32298, 29312, -23816, 16276, -7343, -2221, 11592, -19972, 26639, -31024, 32748, -31667, 27870, -21686, 13642, -4430, -5163, 14312, -22236, 28252, -31849, 32714, -30777, 26201, -19380, 10897, -1481, -8063, 16915, -24318, 29635, -32415, 32414, -29636, 24317, -16916, 8062, 1480, -10898, 19379, -26202, 30776, -32715, 31848, -28253, 22235, -14313, 5162, 4429, -13643, 21685, -27871, 31666, -32749, 31023, -26640, 19971, -11593, 2220, 7342, -16277, 23815, -29313, 32297, -32515, 29944, -24808, 17544, -8779, -741, 10195, -18778, 25749, -30515, 32664, -32015, 28620, -22774, 14974, -5893, -3696, 12965, -21126, 27473, -31469, 32764, -31254, 27063, -20554, 12282, -2959, -6620, 15629, -23301, 28973, -32165, 32597, -30238, 25285, -18166, 9489}, +{0, -8063, 15629, -22236, 27473, -31024, 32664, -32298, 29944, -25750, 19971, -12966, 5162, 2958, -10898, 18165, -24318, 28973, -31849, 32764, -31667, 28620, -23816, 17544, -10196, 2220, 5892, -13643, 20553, -26202, 30237, -32415, 32597, -30777, 27063, -21686, 14974, -7343, -741, 8778, -16277, 22773, -27871, 31253, -32715, 32164, -29636, 25285, -19380, 12282, -4430, -3696, 11592, -18778, 24807, -29313, 32014, -32749, 31468, -28253, 23300, -16916, 9489, -1481, -6620, 14312, -21126, 26639, -30515, 32514, -32515, 30514, -26640, 21125, -14313, 6619, 1480, -9490, 16915, -23301, 28252, -31469, 32748, -32015, 29312, -24808, 18777, -11593, 3695, 4429, -12283, 19379, -25286, 29635, -32165, 32714, -31254, 27870, -22774, 16276, -8779, 740, 7342, -14975, 21685, -27064, 30776, -32598, 32414, -30238, 26201, -20554, 13642, -5893, -2221, 10195, -17545, 23815, -28621, 31666, -32765, 31848, -28974, 24317, -18166, 10897, -2959, -5163, 12965, -19972, 25749, -29945, 32297, -32665, 31023, -27474, 22235, -15630, 8062}, +{0, -6620, 12965, -18778, 23815, -27871, 30776, -32415, 32714, -31667, 29312, -25750, 21125, -15630, 9489, -2959, -3696, 10195, -16277, 21685, -26202, 29635, -31849, 32748, -32298, 30514, -27474, 23300, -18166, 12282, -5893, -741, 7342, -13643, 19379, -24318, 28252, -31024, 32514, -32665, 31468, -28974, 25285, -20554, 14974, -8779, 2220, 4429, -10898, 16915, -22236, 26639, -29945, 32014, -32765, 32164, -30238, 27063, -22774, 17544, -11593, 5162, 1480, -8063, 14312, -19972, 24807, -28621, 31253, -32598, 32597, -31254, 28620, -24808, 19971, -14313, 8062, -1481, -5163, 11592, -17545, 22773, -27064, 30237, -32165, 32764, -32015, 29944, -26640, 22235, -16916, 10897, -4430, -2221, 8778, -14975, 20553, -25286, 28973, -31469, 32664, -32515, 31023, -28253, 24317, -19380, 13642, -7343, 740, 5892, -12283, 18165, -23301, 27473, -30515, 32297, -32749, 31848, -29636, 26201, -21686, 16276, -10196, 3695, 2958, -9490, 15629, -21126, 25749, -29313, 31666, -32715, 32414, -30777, 27870, -23816, 18777, -12966, 6619}, +{0, -5163, 10195, -14975, 19379, -23301, 26639, -29313, 31253, -32415, 32764, -32298, 31023, -28974, 26201, -22774, 18777, -14313, 9489, -4430, -741, 5892, -10898, 15629, -19972, 23815, -27064, 29635, -31469, 32514, -32749, 32164, -30777, 28620, -25750, 22235, -18166, 13642, -8779, 3695, 1480, -6620, 11592, -16277, 20553, -24318, 27473, -29945, 31666, -32598, 32714, -32015, 30514, -28253, 25285, -21686, 17544, -12966, 8062, -2959, -2221, 7342, -12283, 16915, -21126, 24807, -27871, 30237, -31849, 32664, -32665, 31848, -30238, 27870, -24808, 21125, -16916, 12282, -7343, 2220, 2958, -8063, 12965, -17545, 21685, -25286, 28252, -30515, 32014, -32715, 32597, -31667, 29944, -27474, 24317, -20554, 16276, -11593, 6619, -1481, -3696, 8778, -13643, 18165, -22236, 25749, -28621, 30776, -32165, 32748, -32515, 31468, -29636, 27063, -23816, 19971, -15630, 10897, -5893, 740, 4429, -9490, 14312, -18778, 22773, -26202, 28973, -31024, 32297, -32765, 32414, -31254, 29312, -26640, 23300, -19380, 14974, -10196, 5162}, +{0, -3696, 7342, -10898, 14312, -17545, 20553, -23301, 25749, -27871, 29635, -31024, 32014, -32598, 32764, -32515, 31848, -30777, 29312, -27474, 25285, -22774, 19971, -16916, 13642, -10196, 6619, -2959, -741, 4429, -8063, 11592, -14975, 18165, -21126, 23815, -26202, 28252, -29945, 31253, -32165, 32664, -32749, 32414, -31667, 30514, -28974, 27063, -24808, 22235, -19380, 16276, -12966, 9489, -5893, 2220, 1480, -5163, 8778, -12283, 15629, -18778, 21685, -24318, 26639, -28621, 30237, -31469, 32297, -32715, 32714, -32298, 31468, -30238, 28620, -26640, 24317, -21686, 18777, -15630, 12282, -8779, 5162, -1481, -2221, 5892, -9490, 12965, -16277, 19379, -22236, 24807, -27064, 28973, -30515, 31666, -32415, 32748, -32665, 32164, -31254, 29944, -28253, 26201, -23816, 21125, -18166, 14974, -11593, 8062, -4430, 740, 2958, -6620, 10195, -13643, 16915, -19972, 22773, -25286, 27473, -29313, 30776, -31849, 32514, -32765, 32597, -32015, 31023, -29636, 27870, -25750, 23300, -20554, 17544, -14313, 10897, -7343, 3695}, +{0, -2221, 4429, -6620, 8778, -10898, 12965, -14975, 16915, -18778, 20553, -22236, 23815, -25286, 26639, -27871, 28973, -29945, 30776, -31469, 32014, -32415, 32664, -32765, 32714, -32515, 32164, -31667, 31023, -30238, 29312, -28253, 27063, -25750, 24317, -22774, 21125, -19380, 17544, -15630, 13642, -11593, 9489, -7343, 5162, -2959, 740, 1480, -3696, 5892, -8063, 10195, -12283, 14312, -16277, 18165, -19972, 21685, -23301, 24807, -26202, 27473, -28621, 29635, -30515, 31253, -31849, 32297, -32598, 32748, -32749, 32597, -32298, 31848, -31254, 30514, -29636, 28620, -27474, 26201, -24808, 23300, -21686, 19971, -18166, 16276, -14313, 12282, -10196, 8062, -5893, 3695, -1481, -741, 2958, -5163, 7342, -9490, 11592, -13643, 15629, -17545, 19379, -21126, 22773, -24318, 25749, -27064, 28252, -29313, 30237, -31024, 31666, -32165, 32514, -32715, 32764, -32665, 32414, -32015, 31468, -30777, 29944, -28974, 27870, -26640, 25285, -23816, 22235, -20554, 18777, -16916, 14974, -12966, 10897, -8779, 6619, -4430, 2220}, +{0, -741, 1480, -2221, 2958, -3696, 4429, -5163, 5892, -6620, 7342, -8063, 8778, -9490, 10195, -10898, 11592, -12283, 12965, -13643, 14312, -14975, 15629, -16277, 16915, -17545, 18165, -18778, 19379, -19972, 20553, -21126, 21685, -22236, 22773, -23301, 23815, -24318, 24807, -25286, 25749, -26202, 26639, -27064, 27473, -27871, 28252, -28621, 28973, -29313, 29635, -29945, 30237, -30515, 30776, -31024, 31253, -31469, 31666, -31849, 32014, -32165, 32297, -32415, 32514, -32598, 32664, -32715, 32748, -32765, 32764, -32749, 32714, -32665, 32597, -32515, 32414, -32298, 32164, -32015, 31848, -31667, 31468, -31254, 31023, -30777, 30514, -30238, 29944, -29636, 29312, -28974, 28620, -28253, 27870, -27474, 27063, -26640, 26201, -25750, 25285, -24808, 24317, -23816, 23300, -22774, 22235, -21686, 21125, -20554, 19971, -19380, 18777, -18166, 17544, -16916, 16276, -15630, 14974, -14313, 13642, -12966, 12282, -11593, 10897, -10196, 9489, -8779, 8062, -7343, 6619, -5893, 5162, -4430, 3695, -2959, 2220, -1481, 740}, +{0, 740, -1481, 2220, -2959, 3695, -4430, 5162, -5893, 6619, -7343, 8062, -8779, 9489, -10196, 10897, -11593, 12282, -12966, 13642, -14313, 14974, -15630, 16276, -16916, 17544, -18166, 18777, -19380, 19971, -20554, 21125, -21686, 22235, -22774, 23300, -23816, 24317, -24808, 25285, -25750, 26201, -26640, 27063, -27474, 27870, -28253, 28620, -28974, 29312, -29636, 29944, -30238, 30514, -30777, 31023, -31254, 31468, -31667, 31848, -32015, 32164, -32298, 32414, -32515, 32597, -32665, 32714, -32749, 32764, -32765, 32748, -32715, 32664, -32598, 32514, -32415, 32297, -32165, 32014, -31849, 31666, -31469, 31253, -31024, 30776, -30515, 30237, -29945, 29635, -29313, 28973, -28621, 28252, -27871, 27473, -27064, 26639, -26202, 25749, -25286, 24807, -24318, 23815, -23301, 22773, -22236, 21685, -21126, 20553, -19972, 19379, -18778, 18165, -17545, 16915, -16277, 15629, -14975, 14312, -13643, 12965, -12283, 11592, -10898, 10195, -9490, 8778, -8063, 7342, -6620, 5892, -5163, 4429, -3696, 2958, -2221, 1480, -741}, +{0, 2220, -4430, 6619, -8779, 10897, -12966, 14974, -16916, 18777, -20554, 22235, -23816, 25285, -26640, 27870, -28974, 29944, -30777, 31468, -32015, 32414, -32665, 32764, -32715, 32514, -32165, 31666, -31024, 30237, -29313, 28252, -27064, 25749, -24318, 22773, -21126, 19379, -17545, 15629, -13643, 11592, -9490, 7342, -5163, 2958, -741, -1481, 3695, -5893, 8062, -10196, 12282, -14313, 16276, -18166, 19971, -21686, 23300, -24808, 26201, -27474, 28620, -29636, 30514, -31254, 31848, -32298, 32597, -32749, 32748, -32598, 32297, -31849, 31253, -30515, 29635, -28621, 27473, -26202, 24807, -23301, 21685, -19972, 18165, -16277, 14312, -12283, 10195, -8063, 5892, -3696, 1480, 740, -2959, 5162, -7343, 9489, -11593, 13642, -15630, 17544, -19380, 21125, -22774, 24317, -25750, 27063, -28253, 29312, -30238, 31023, -31667, 32164, -32515, 32714, -32765, 32664, -32415, 32014, -31469, 30776, -29945, 28973, -27871, 26639, -25286, 23815, -22236, 20553, -18778, 16915, -14975, 12965, -10898, 8778, -6620, 4429, -2221}, +{0, 3695, -7343, 10897, -14313, 17544, -20554, 23300, -25750, 27870, -29636, 31023, -32015, 32597, -32765, 32514, -31849, 30776, -29313, 27473, -25286, 22773, -19972, 16915, -13643, 10195, -6620, 2958, 740, -4430, 8062, -11593, 14974, -18166, 21125, -23816, 26201, -28253, 29944, -31254, 32164, -32665, 32748, -32415, 31666, -30515, 28973, -27064, 24807, -22236, 19379, -16277, 12965, -9490, 5892, -2221, -1481, 5162, -8779, 12282, -15630, 18777, -21686, 24317, -26640, 28620, -30238, 31468, -32298, 32714, -32715, 32297, -31469, 30237, -28621, 26639, -24318, 21685, -18778, 15629, -12283, 8778, -5163, 1480, 2220, -5893, 9489, -12966, 16276, -19380, 22235, -24808, 27063, -28974, 30514, -31667, 32414, -32749, 32664, -32165, 31253, -29945, 28252, -26202, 23815, -21126, 18165, -14975, 11592, -8063, 4429, -741, -2959, 6619, -10196, 13642, -16916, 19971, -22774, 25285, -27474, 29312, -30777, 31848, -32515, 32764, -32598, 32014, -31024, 29635, -27871, 25749, -23301, 20553, -17545, 14312, -10898, 7342, -3696}, +{0, 5162, -10196, 14974, -19380, 23300, -26640, 29312, -31254, 32414, -32765, 32297, -31024, 28973, -26202, 22773, -18778, 14312, -9490, 4429, 740, -5893, 10897, -15630, 19971, -23816, 27063, -29636, 31468, -32515, 32748, -32165, 30776, -28621, 25749, -22236, 18165, -13643, 8778, -3696, -1481, 6619, -11593, 16276, -20554, 24317, -27474, 29944, -31667, 32597, -32715, 32014, -30515, 28252, -25286, 21685, -17545, 12965, -8063, 2958, 2220, -7343, 12282, -16916, 21125, -24808, 27870, -30238, 31848, -32665, 32664, -31849, 30237, -27871, 24807, -21126, 16915, -12283, 7342, -2221, -2959, 8062, -12966, 17544, -21686, 25285, -28253, 30514, -32015, 32714, -32598, 31666, -29945, 27473, -24318, 20553, -16277, 11592, -6620, 1480, 3695, -8779, 13642, -18166, 22235, -25750, 28620, -30777, 32164, -32749, 32514, -31469, 29635, -27064, 23815, -19972, 15629, -10898, 5892, -741, -4430, 9489, -14313, 18777, -22774, 26201, -28974, 31023, -32298, 32764, -32415, 31253, -29313, 26639, -23301, 19379, -14975, 10195, -5163}, +{0, 6619, -12966, 18777, -23816, 27870, -30777, 32414, -32715, 31666, -29313, 25749, -21126, 15629, -9490, 2958, 3695, -10196, 16276, -21686, 26201, -29636, 31848, -32749, 32297, -30515, 27473, -23301, 18165, -12283, 5892, 740, -7343, 13642, -19380, 24317, -28253, 31023, -32515, 32664, -31469, 28973, -25286, 20553, -14975, 8778, -2221, -4430, 10897, -16916, 22235, -26640, 29944, -32015, 32764, -32165, 30237, -27064, 22773, -17545, 11592, -5163, -1481, 8062, -14313, 19971, -24808, 28620, -31254, 32597, -32598, 31253, -28621, 24807, -19972, 14312, -8063, 1480, 5162, -11593, 17544, -22774, 27063, -30238, 32164, -32765, 32014, -29945, 26639, -22236, 16915, -10898, 4429, 2220, -8779, 14974, -20554, 25285, -28974, 31468, -32665, 32514, -31024, 28252, -24318, 19379, -13643, 7342, -741, -5893, 12282, -18166, 23300, -27474, 30514, -32298, 32748, -31849, 29635, -26202, 21685, -16277, 10195, -3696, -2959, 9489, -15630, 21125, -25750, 29312, -31667, 32714, -32415, 30776, -27871, 23815, -18778, 12965, -6620}, +{0, 8062, -15630, 22235, -27474, 31023, -32665, 32297, -29945, 25749, -19972, 12965, -5163, -2959, 10897, -18166, 24317, -28974, 31848, -32765, 31666, -28621, 23815, -17545, 10195, -2221, -5893, 13642, -20554, 26201, -30238, 32414, -32598, 30776, -27064, 21685, -14975, 7342, 740, -8779, 16276, -22774, 27870, -31254, 32714, -32165, 29635, -25286, 19379, -12283, 4429, 3695, -11593, 18777, -24808, 29312, -32015, 32748, -31469, 28252, -23301, 16915, -9490, 1480, 6619, -14313, 21125, -26640, 30514, -32515, 32514, -30515, 26639, -21126, 14312, -6620, -1481, 9489, -16916, 23300, -28253, 31468, -32749, 32014, -29313, 24807, -18778, 11592, -3696, -4430, 12282, -19380, 25285, -29636, 32164, -32715, 31253, -27871, 22773, -16277, 8778, -741, -7343, 14974, -21686, 27063, -30777, 32597, -32415, 30237, -26202, 20553, -13643, 5892, 2220, -10196, 17544, -23816, 28620, -31667, 32764, -31849, 28973, -24318, 18165, -10898, 2958, 5162, -12966, 19971, -25750, 29944, -32298, 32664, -31024, 27473, -22236, 15629, -8063}, +{0, 9489, -18166, 25285, -30238, 32597, -32165, 28973, -23301, 15629, -6620, -2959, 12282, -20554, 27063, -31254, 32764, -31469, 27473, -21126, 12965, -3696, -5893, 14974, -22774, 28620, -32015, 32664, -30515, 25749, -18778, 10195, -741, -8779, 17544, -24808, 29944, -32515, 32297, -29313, 23815, -16277, 7342, 2220, -11593, 19971, -26640, 31023, -32749, 31666, -27871, 21685, -13643, 4429, 5162, -14313, 22235, -28253, 31848, -32715, 30776, -26202, 19379, -10898, 1480, 8062, -16916, 24317, -29636, 32414, -32415, 29635, -24318, 16915, -8063, -1481, 10897, -19380, 26201, -30777, 32714, -31849, 28252, -22236, 14312, -5163, -4430, 13642, -21686, 27870, -31667, 32748, -31024, 26639, -19972, 11592, -2221, -7343, 16276, -23816, 29312, -32298, 32514, -29945, 24807, -17545, 8778, 740, -10196, 18777, -25750, 30514, -32665, 32014, -28621, 22773, -14975, 5892, 3695, -12966, 21125, -27474, 31468, -32765, 31253, -27064, 20553, -12283, 2958, 6619, -15630, 23300, -28974, 32164, -32598, 30237, -25286, 18165, -9490}, +{0, 10897, -20554, 27870, -32015, 32514, -29313, 22773, -13643, 2958, 8062, -18166, 26201, -31254, 32748, -30515, 24807, -16277, 5892, 5162, -15630, 24317, -30238, 32714, -31469, 26639, -18778, 8778, 2220, -12966, 22235, -28974, 32414, -32165, 28252, -21126, 11592, -741, -10196, 19971, -27474, 31848, -32598, 29635, -23301, 14312, -3696, -7343, 17544, -25750, 31023, -32765, 30776, -25286, 16915, -6620, -4430, 14974, -23816, 29944, -32665, 31666, -27064, 19379, -9490, -1481, 12282, -21686, 28620, -32298, 32297, -28621, 21685, -12283, 1480, 9489, -19380, 27063, -31667, 32664, -29945, 23815, -14975, 4429, 6619, -16916, 25285, -30777, 32764, -31024, 25749, -17545, 7342, 3695, -14313, 23300, -29636, 32597, -31849, 27473, -19972, 10195, 740, -11593, 21125, -28253, 32164, -32415, 28973, -22236, 12965, -2221, -8779, 18777, -26640, 31468, -32715, 30237, -24318, 15629, -5163, -5893, 16276, -24808, 30514, -32749, 31253, -26202, 18165, -8063, -2959, 13642, -22774, 29312, -32515, 32014, -27871, 20553, -10898}, +{0, 12282, -22774, 29944, -32749, 30776, -24318, 14312, -2221, -10196, 21125, -28974, 32597, -31469, 25749, -16277, 4429, 8062, -19380, 27870, -32298, 32014, -27064, 18165, -6620, -5893, 17544, -26640, 31848, -32415, 28252, -19972, 8778, 3695, -15630, 25285, -31254, 32664, -29313, 21685, -10898, -1481, 13642, -23816, 30514, -32765, 30237, -23301, 12965, -741, -11593, 22235, -29636, 32714, -31024, 24807, -14975, 2958, 9489, -20554, 28620, -32515, 31666, -26202, 16915, -5163, -7343, 18777, -27474, 32164, -32165, 27473, -18778, 7342, 5162, -16916, 26201, -31667, 32514, -28621, 20553, -9490, -2959, 14974, -24808, 31023, -32715, 29635, -22236, 11592, 740, -12966, 23300, -30238, 32764, -30515, 23815, -13643, 1480, 10897, -21686, 29312, -32665, 31253, -25286, 15629, -3696, -8779, 19971, -28253, 32414, -31849, 26639, -17545, 5892, 6619, -18166, 27063, -32015, 32297, -27871, 19379, -8063, -4430, 16276, -25750, 31468, -32598, 28973, -21126, 10195, 2220, -14313, 24317, -30777, 32748, -29945, 22773, -12283}, +{0, 13642, -24808, 31468, -32415, 27473, -17545, 4429, 9489, -21686, 29944, -32765, 29635, -21126, 8778, 5162, -18166, 27870, -32515, 31253, -24318, 12965, 740, -14313, 25285, -31667, 32297, -27064, 16915, -3696, -10196, 22235, -30238, 32748, -29313, 20553, -8063, -5893, 18777, -28253, 32597, -31024, 23815, -12283, -1481, 14974, -25750, 31848, -32165, 26639, -16277, 2958, 10897, -22774, 30514, -32715, 28973, -19972, 7342, 6619, -19380, 28620, -32665, 30776, -23301, 11592, 2220, -15630, 26201, -32015, 32014, -26202, 15629, -2221, -11593, 23300, -30777, 32664, -28621, 19379, -6620, -7343, 19971, -28974, 32714, -30515, 22773, -10898, -2959, 16276, -26640, 32164, -31849, 25749, -14975, 1480, 12282, -23816, 31023, -32598, 28252, -18778, 5892, 8062, -20554, 29312, -32749, 30237, -22236, 10195, 3695, -16916, 27063, -32298, 31666, -25286, 14312, -741, -12966, 24317, -31254, 32514, -27871, 18165, -5163, -8779, 21125, -29636, 32764, -29945, 21685, -9490, -4430, 17544, -27474, 32414, -31469, 24807, -13643}, +{0, 14974, -26640, 32414, -31024, 22773, -9490, -5893, 19971, -29636, 32748, -28621, 18165, -3696, -11593, 24317, -31667, 32014, -25286, 12965, 2220, -16916, 27870, -32665, 30237, -21126, 7342, 8062, -21686, 30514, -32598, 27473, -16277, 1480, 13642, -25750, 32164, -31469, 23815, -10898, -4430, 18777, -28974, 32764, -29313, 19379, -5163, -10196, 23300, -31254, 32297, -26202, 14312, 740, -15630, 27063, -32515, 30776, -22236, 8778, 6619, -20554, 29944, -32715, 28252, -17545, 2958, 12282, -24808, 31848, -31849, 24807, -12283, -2959, 17544, -28253, 32714, -29945, 20553, -6620, -8779, 22235, -30777, 32514, -27064, 15629, -741, -14313, 26201, -32298, 31253, -23301, 10195, 5162, -19380, 29312, -32765, 28973, -18778, 4429, 10897, -23816, 31468, -32165, 25749, -13643, -1481, 16276, -27474, 32597, -30515, 21685, -8063, -7343, 21125, -30238, 32664, -27871, 16915, -2221, -12966, 25285, -32015, 31666, -24318, 11592, 3695, -18166, 28620, -32749, 29635, -19972, 5892, 9489, -22774, 31023, -32415, 26639, -14975}, +{0, 16276, -28253, 32764, -28621, 16915, -741, -15630, 27870, -32749, 28973, -17545, 1480, 14974, -27474, 32714, -29313, 18165, -2221, -14313, 27063, -32665, 29635, -18778, 2958, 13642, -26640, 32597, -29945, 19379, -3696, -12966, 26201, -32515, 30237, -19972, 4429, 12282, -25750, 32414, -30515, 20553, -5163, -11593, 25285, -32298, 30776, -21126, 5892, 10897, -24808, 32164, -31024, 21685, -6620, -10196, 24317, -32015, 31253, -22236, 7342, 9489, -23816, 31848, -31469, 22773, -8063, -8779, 23300, -31667, 31666, -23301, 8778, 8062, -22774, 31468, -31849, 23815, -9490, -7343, 22235, -31254, 32014, -24318, 10195, 6619, -21686, 31023, -32165, 24807, -10898, -5893, 21125, -30777, 32297, -25286, 11592, 5162, -20554, 30514, -32415, 25749, -12283, -4430, 19971, -30238, 32514, -26202, 12965, 3695, -19380, 29944, -32598, 26639, -13643, -2959, 18777, -29636, 32664, -27064, 14312, 2220, -18166, 29312, -32715, 27473, -14975, -1481, 17544, -28974, 32748, -27871, 15629, 740, -16916, 28620, -32765, 28252, -16277}, +{0, 17544, -29636, 32514, -25286, 10195, 8062, -23816, 32164, -30515, 19379, -2221, -15630, 28620, -32715, 26639, -12283, -5893, 22235, -31667, 31253, -21126, 4429, 13642, -27474, 32764, -27871, 14312, 3695, -20554, 31023, -31849, 22773, -6620, -11593, 26201, -32665, 28973, -16277, -1481, 18777, -30238, 32297, -24318, 8778, 9489, -24808, 32414, -29945, 18165, -741, -16916, 29312, -32598, 25749, -10898, -7343, 23300, -32015, 30776, -19972, 2958, 14974, -28253, 32748, -27064, 12965, 5162, -21686, 31468, -31469, 21685, -5163, -12966, 27063, -32749, 28252, -14975, -2959, 19971, -30777, 32014, -23301, 7342, 10897, -25750, 32597, -29313, 16915, 740, -18166, 29944, -32415, 24807, -9490, -8779, 24317, -32298, 30237, -18778, 1480, 16276, -28974, 32664, -26202, 11592, 6619, -22774, 31848, -31024, 20553, -3696, -14313, 27870, -32765, 27473, -13643, -4430, 21125, -31254, 31666, -22236, 5892, 12282, -26640, 32714, -28621, 15629, 2220, -19380, 30514, -32165, 23815, -8063, -10196, 25285, -32515, 29635, -17545}, +{0, 18777, -30777, 31666, -21126, 2958, 16276, -29636, 32297, -23301, 5892, 13642, -28253, 32664, -25286, 8778, 10897, -26640, 32764, -27064, 11592, 8062, -24808, 32597, -28621, 14312, 5162, -22774, 32164, -29945, 16915, 2220, -20554, 31468, -31024, 19379, -741, -18166, 30514, -31849, 21685, -3696, -15630, 29312, -32415, 23815, -6620, -12966, 27870, -32715, 25749, -9490, -10196, 26201, -32749, 27473, -12283, -7343, 24317, -32515, 28973, -14975, -4430, 22235, -32015, 30237, -17545, -1481, 19971, -31254, 31253, -19972, 1480, 17544, -30238, 32014, -22236, 4429, 14974, -28974, 32514, -24318, 7342, 12282, -27474, 32748, -26202, 10195, 9489, -25750, 32714, -27871, 12965, 6619, -23816, 32414, -29313, 15629, 3695, -21686, 31848, -30515, 18165, 740, -19380, 31023, -31469, 20553, -2221, -16916, 29944, -32165, 22773, -5163, -14313, 28620, -32598, 24807, -8063, -11593, 27063, -32765, 26639, -10898, -8779, 25285, -32665, 28252, -13643, -5893, 23300, -32298, 29635, -16277, -2959, 21125, -31667, 30776, -18778}, +{0, 19971, -31667, 30237, -16277, -4430, 23300, -32515, 28252, -12283, -8779, 26201, -32765, 25749, -8063, -12966, 28620, -32415, 22773, -3696, -16916, 30514, -31469, 19379, 740, -20554, 31848, -29945, 15629, 5162, -23816, 32597, -27871, 11592, 9489, -26640, 32748, -25286, 7342, 13642, -28974, 32297, -22236, 2958, 17544, -30777, 31253, -18778, -1481, 21125, -32015, 29635, -14975, -5893, 24317, -32665, 27473, -10898, -10196, 27063, -32715, 24807, -6620, -14313, 29312, -32165, 21685, -2221, -18166, 31023, -31024, 18165, 2220, -21686, 32164, -29313, 14312, 6619, -24808, 32714, -27064, 10195, 10897, -27474, 32664, -24318, 5892, 14974, -29636, 32014, -21126, 1480, 18777, -31254, 30776, -17545, -2959, 22235, -32298, 28973, -13643, -7343, 25285, -32749, 26639, -9490, -11593, 27870, -32598, 23815, -5163, -15630, 29944, -31849, 20553, -741, -19380, 31468, -30515, 16915, 3695, -22774, 32414, -28621, 12965, 8062, -25750, 32764, -26202, 8778, 12282, -28253, 32514, -23301, 4429, 16276, -30238, 31666, -19972}, +{0, 21125, -32298, 28252, -10898, -11593, 28620, -32165, 20553, 740, -21686, 32414, -27871, 10195, 12282, -28974, 32014, -19972, -1481, 22235, -32515, 27473, -9490, -12966, 29312, -31849, 19379, 2220, -22774, 32597, -27064, 8778, 13642, -29636, 31666, -18778, -2959, 23300, -32665, 26639, -8063, -14313, 29944, -31469, 18165, 3695, -23816, 32714, -26202, 7342, 14974, -30238, 31253, -17545, -4430, 24317, -32749, 25749, -6620, -15630, 30514, -31024, 16915, 5162, -24808, 32764, -25286, 5892, 16276, -30777, 30776, -16277, -5893, 25285, -32765, 24807, -5163, -16916, 31023, -30515, 15629, 6619, -25750, 32748, -24318, 4429, 17544, -31254, 30237, -14975, -7343, 26201, -32715, 23815, -3696, -18166, 31468, -29945, 14312, 8062, -26640, 32664, -23301, 2958, 18777, -31667, 29635, -13643, -8779, 27063, -32598, 22773, -2221, -19380, 31848, -29313, 12965, 9489, -27474, 32514, -22236, 1480, 19971, -32015, 28973, -12283, -10196, 27870, -32415, 21685, -741, -20554, 32164, -28621, 11592, 10897, -28253, 32297, -21126}, +{0, 22235, -32665, 25749, -5163, -18166, 31848, -28621, 10195, 13642, -30238, 30776, -14975, -8779, 27870, -32165, 19379, 3695, -24808, 32748, -23301, 1480, 21125, -32515, 26639, -6620, -16916, 31468, -29313, 11592, 12282, -29636, 31253, -16277, -7343, 27063, -32415, 20553, 2220, -23816, 32764, -24318, 2958, 19971, -32298, 27473, -8063, -15630, 31023, -29945, 12965, 10897, -28974, 31666, -17545, -5893, 26201, -32598, 21685, 740, -22774, 32714, -25286, 4429, 18777, -32015, 28252, -9490, -14313, 30514, -30515, 14312, 9489, -28253, 32014, -18778, -4430, 25285, -32715, 22773, -741, -21686, 32597, -26202, 5892, 17544, -31667, 28973, -10898, -12966, 29944, -31024, 15629, 8062, -27474, 32297, -19972, -2959, 24317, -32765, 23815, -2221, -20554, 32414, -27064, 7342, 16276, -31254, 29635, -12283, -11593, 29312, -31469, 16915, 6619, -26640, 32514, -21126, -1481, 23300, -32749, 24807, -3696, -19380, 32164, -27871, 8778, 14974, -30777, 30237, -13643, -10196, 28620, -31849, 18165, 5162, -25750, 32664, -22236}, +{0, 23300, -32765, 22773, 740, -23816, 32748, -22236, -1481, 24317, -32715, 21685, 2220, -24808, 32664, -21126, -2959, 25285, -32598, 20553, 3695, -25750, 32514, -19972, -4430, 26201, -32415, 19379, 5162, -26640, 32297, -18778, -5893, 27063, -32165, 18165, 6619, -27474, 32014, -17545, -7343, 27870, -31849, 16915, 8062, -28253, 31666, -16277, -8779, 28620, -31469, 15629, 9489, -28974, 31253, -14975, -10196, 29312, -31024, 14312, 10897, -29636, 30776, -13643, -11593, 29944, -30515, 12965, 12282, -30238, 30237, -12283, -12966, 30514, -29945, 11592, 13642, -30777, 29635, -10898, -14313, 31023, -29313, 10195, 14974, -31254, 28973, -9490, -15630, 31468, -28621, 8778, 16276, -31667, 28252, -8063, -16916, 31848, -27871, 7342, 17544, -32015, 27473, -6620, -18166, 32164, -27064, 5892, 18777, -32298, 26639, -5163, -19380, 32414, -26202, 4429, 19971, -32515, 25749, -3696, -20554, 32597, -25286, 2958, 21125, -32665, 24807, -2221, -21686, 32714, -24318, 1480, 22235, -32749, 23815, -741, -22774, 32764, -23301}, +{0, 24317, -32598, 19379, 6619, -28253, 31253, -13643, -12966, 31023, -28621, 7342, 18777, -32515, 24807, -741, -23816, 32664, -19972, -5893, 27870, -31469, 14312, 12282, -30777, 28973, -8063, -18166, 32414, -25286, 1480, 23300, -32715, 20553, 5162, -27474, 31666, -14975, -11593, 30514, -29313, 8778, 17544, -32298, 25749, -2221, -22774, 32748, -21126, -4430, 27063, -31849, 15629, 10897, -30238, 29635, -9490, -16916, 32164, -26202, 2958, 22235, -32765, 21685, 3695, -26640, 32014, -16277, -10196, 29944, -29945, 10195, 16276, -32015, 26639, -3696, -21686, 32764, -22236, -2959, 26201, -32165, 16915, 9489, -29636, 30237, -10898, -15630, 31848, -27064, 4429, 21125, -32749, 22773, 2220, -25750, 32297, -17545, -8779, 29312, -30515, 11592, 14974, -31667, 27473, -5163, -20554, 32714, -23301, -1481, 25285, -32415, 18165, 8062, -28974, 30776, -12283, -14313, 31468, -27871, 5892, 19971, -32665, 23815, 740, -24808, 32514, -18778, -7343, 28620, -31024, 12965, 13642, -31254, 28252, -6620, -19380, 32597, -24318}, +{0, 25285, -32165, 15629, 12282, -31254, 27473, -3696, -22774, 32664, -18778, -8779, 29944, -29313, 7342, 19971, -32749, 21685, 5162, -28253, 30776, -10898, -16916, 32414, -24318, -1481, 26201, -31849, 14312, 13642, -31667, 26639, -2221, -23816, 32514, -17545, -10196, 30514, -28621, 5892, 21125, -32765, 20553, 6619, -28974, 30237, -9490, -18166, 32597, -23301, -2959, 27063, -31469, 12965, 14974, -32015, 25749, -741, -24808, 32297, -16277, -11593, 31023, -27871, 4429, 22235, -32715, 19379, 8062, -29636, 29635, -8063, -19380, 32714, -22236, -4430, 27870, -31024, 11592, 16276, -32298, 24807, 740, -25750, 32014, -14975, -12966, 31468, -27064, 2958, 23300, -32598, 18165, 9489, -30238, 28973, -6620, -20554, 32764, -21126, -5893, 28620, -30515, 10195, 17544, -32515, 23815, 2220, -26640, 31666, -13643, -14313, 31848, -26202, 1480, 24317, -32415, 16915, 10897, -30777, 28252, -5163, -21686, 32748, -19972, -7343, 29312, -29945, 8778, 18777, -32665, 22773, 3695, -27474, 31253, -12283, -15630, 32164, -25286}, +{0, 26201, -31469, 11592, 17544, -32665, 21685, 6619, -29636, 28973, -5163, -22774, 32514, -16277, -12966, 31848, -25286, -1481, 27063, -31024, 10195, 18777, -32749, 20553, 8062, -30238, 28252, -3696, -23816, 32297, -14975, -14313, 32164, -24318, -2959, 27870, -30515, 8778, 19971, -32765, 19379, 9489, -30777, 27473, -2221, -24808, 32014, -13643, -15630, 32414, -23301, -4430, 28620, -29945, 7342, 21125, -32715, 18165, 10897, -31254, 26639, -741, -25750, 31666, -12283, -16916, 32597, -22236, -5893, 29312, -29313, 5892, 22235, -32598, 16915, 12282, -31667, 25749, 740, -26640, 31253, -10898, -18166, 32714, -21126, -7343, 29944, -28621, 4429, 23300, -32415, 15629, 13642, -32015, 24807, 2220, -27474, 30776, -9490, -19380, 32764, -19972, -8779, 30514, -27871, 2958, 24317, -32165, 14312, 14974, -32298, 23815, 3695, -28253, 30237, -8063, -20554, 32748, -18778, -10196, 31023, -27064, 1480, 25285, -31849, 12965, 16276, -32515, 22773, 5162, -28974, 29635, -6620, -21686, 32664, -17545, -11593, 31468, -26202}, +{0, 27063, -30515, 7342, 22235, -32415, 14312, 16276, -32665, 20553, 9489, -31254, 25749, 2220, -28253, 29635, -5163, -23816, 32014, -12283, -18166, 32764, -18778, -11593, 31848, -24318, -4430, 29312, -28621, 2958, 25285, -31469, 10195, 19971, -32715, 16915, 13642, -32298, 22773, 6619, -30238, 27473, -741, -26640, 30776, -8063, -21686, 32514, -14975, -15630, 32597, -21126, -8779, 31023, -26202, -1481, 27870, -29945, 5892, 23300, -32165, 12965, 17544, -32749, 19379, 10897, -31667, 24807, 3695, -28974, 28973, -3696, -24808, 31666, -10898, -19380, 32748, -17545, -12966, 32164, -23301, -5893, 29944, -27871, 1480, 26201, -31024, 8778, 21125, -32598, 15629, 14974, -32515, 21685, 8062, -30777, 26639, 740, -27474, 30237, -6620, -22774, 32297, -13643, -16916, 32714, -19972, -10196, 31468, -25286, -2959, 28620, -29313, 4429, 24317, -31849, 11592, 18777, -32765, 18165, 12282, -32015, 23815, 5162, -29636, 28252, -2221, -25750, 31253, -9490, -20554, 32664, -16277, -14313, 32414, -22236, -7343, 30514, -27064}, +{0, 27870, -29313, 2958, 26201, -30515, 5892, 24317, -31469, 8778, 22235, -32165, 11592, 19971, -32598, 14312, 17544, -32765, 16915, 14974, -32665, 19379, 12282, -32298, 21685, 9489, -31667, 23815, 6619, -30777, 25749, 3695, -29636, 27473, 740, -28253, 28973, -2221, -26640, 30237, -5163, -24808, 31253, -8063, -22774, 32014, -10898, -20554, 32514, -13643, -18166, 32748, -16277, -15630, 32714, -18778, -12966, 32414, -21126, -10196, 31848, -23301, -7343, 31023, -25286, -4430, 29944, -27064, -1481, 28620, -28621, 1480, 27063, -29945, 4429, 25285, -31024, 7342, 23300, -31849, 10195, 21125, -32415, 12965, 18777, -32715, 15629, 16276, -32749, 18165, 13642, -32515, 20553, 10897, -32015, 22773, 8062, -31254, 24807, 5162, -30238, 26639, 2220, -28974, 28252, -741, -27474, 29635, -3696, -25750, 30776, -6620, -23816, 31666, -9490, -21686, 32297, -12283, -19380, 32664, -14975, -16916, 32764, -17545, -14313, 32597, -19972, -11593, 32164, -22236, -8779, 31468, -24318, -5893, 30514, -26202, -2959, 29312, -27871}, +{0, 28620, -27871, -1481, 29312, -27064, -2959, 29944, -26202, -4430, 30514, -25286, -5893, 31023, -24318, -7343, 31468, -23301, -8779, 31848, -22236, -10196, 32164, -21126, -11593, 32414, -19972, -12966, 32597, -18778, -14313, 32714, -17545, -15630, 32764, -16277, -16916, 32748, -14975, -18166, 32664, -13643, -19380, 32514, -12283, -20554, 32297, -10898, -21686, 32014, -9490, -22774, 31666, -8063, -23816, 31253, -6620, -24808, 30776, -5163, -25750, 30237, -3696, -26640, 29635, -2221, -27474, 28973, -741, -28253, 28252, 740, -28974, 27473, 2220, -29636, 26639, 3695, -30238, 25749, 5162, -30777, 24807, 6619, -31254, 23815, 8062, -31667, 22773, 9489, -32015, 21685, 10897, -32298, 20553, 12282, -32515, 19379, 13642, -32665, 18165, 14974, -32749, 16915, 16276, -32765, 15629, 17544, -32715, 14312, 18777, -32598, 12965, 19971, -32415, 11592, 21125, -32165, 10195, 22235, -31849, 8778, 23300, -31469, 7342, 24317, -31024, 5892, 25285, -30515, 4429, 26201, -29945, 2958, 27063, -29313, 1480, 27870, -28621}, +{0, 29312, -26202, -5893, 31468, -22236, -11593, 32597, -17545, -16916, 32664, -12283, -21686, 31666, -6620, -25750, 29635, -741, -28974, 26639, 5162, -31254, 22773, 10897, -32515, 18165, 16276, -32715, 12965, 21125, -31849, 7342, 25285, -29945, 1480, 28620, -27064, -4430, 31023, -23301, -10196, 32414, -18778, -15630, 32748, -13643, -20554, 32014, -8063, -24808, 30237, -2221, -28253, 27473, 3695, -30777, 23815, 9489, -32298, 19379, 14974, -32765, 14312, 19971, -32165, 8778, 24317, -30515, 2958, 27870, -27871, -2959, 30514, -24318, -8779, 32164, -19972, -14313, 32764, -14975, -19380, 32297, -9490, -23816, 30776, -3696, -27474, 28252, 2220, -30238, 24807, 8062, -32015, 20553, 13642, -32749, 15629, 18777, -32415, 10195, 23300, -31024, 4429, 27063, -28621, -1481, 29944, -25286, -7343, 31848, -21126, -12966, 32714, -16277, -18166, 32514, -10898, -22774, 31253, -5163, -26640, 28973, 740, -29636, 25749, 6619, -31667, 21685, 12282, -32665, 16915, 17544, -32598, 11592, 22235, -31469, 5892, 26201, -29313}, +{0, 29944, -24318, -10196, 32597, -16277, -19380, 32014, -6620, -26640, 28252, 3695, -31254, 21685, 13642, -32765, 12965, 22235, -31024, 2958, 28620, -26202, -7343, 32164, -18778, -16916, 32514, -9490, -24808, 29635, 740, -30238, 23815, 10897, -32665, 15629, 19971, -31849, 5892, 27063, -27871, -4430, 31468, -21126, -14313, 32748, -12283, -22774, 30776, -2221, -28974, 25749, 8062, -32298, 18165, 17544, -32415, 8778, 25285, -29313, -1481, 30514, -23301, -11593, 32714, -14975, -20554, 31666, -5163, -27474, 27473, 5162, -31667, 20553, 14974, -32715, 11592, 23300, -30515, 1480, 29312, -25286, -8779, 32414, -17545, -18166, 32297, -8063, -25750, 28973, 2220, -30777, 22773, 12282, -32749, 14312, 21125, -31469, 4429, 27870, -27064, -5893, 31848, -19972, -15630, 32664, -10898, -23816, 30237, -741, -29636, 24807, 9489, -32515, 16915, 18777, -32165, 7342, 26201, -28621, -2959, 31023, -22236, -12966, 32764, -13643, -21686, 31253, -3696, -28253, 26639, 6619, -32015, 19379, 16276, -32598, 10195, 24317, -29945}, +{0, 30514, -22236, -14313, 32664, -9490, -25750, 28252, 5162, -32015, 18165, 18777, -31849, 4429, 28620, -25286, -10196, 32714, -13643, -22774, 30237, 740, -30777, 21685, 14974, -32598, 8778, 26201, -27871, -5893, 32164, -17545, -19380, 31666, -3696, -28974, 24807, 10897, -32749, 12965, 23300, -29945, -1481, 31023, -21126, -15630, 32514, -8063, -26640, 27473, 6619, -32298, 16915, 19971, -31469, 2958, 29312, -24318, -11593, 32764, -12283, -23816, 29635, 2220, -31254, 20553, 16276, -32415, 7342, 27063, -27064, -7343, 32414, -16277, -20554, 31253, -2221, -29636, 23815, 12282, -32765, 11592, 24317, -29313, -2959, 31468, -19972, -16916, 32297, -6620, -27474, 26639, 8062, -32515, 15629, 21125, -31024, 1480, 29944, -23301, -12966, 32748, -10898, -24808, 28973, 3695, -31667, 19379, 17544, -32165, 5892, 27870, -26202, -8779, 32597, -14975, -21686, 30776, -741, -30238, 22773, 13642, -32715, 10195, 25285, -28621, -4430, 31848, -18778, -18166, 32014, -5163, -28253, 25749, 9489, -32665, 14312, 22235, -30515}, +{0, 31023, -19972, -18166, 31666, -2221, -30238, 21685, 16276, -32165, 4429, 29312, -23301, -14313, 32514, -6620, -28253, 24807, 12282, -32715, 8778, 27063, -26202, -10196, 32764, -10898, -25750, 27473, 8062, -32665, 12965, 24317, -28621, -5893, 32414, -14975, -22774, 29635, 3695, -32015, 16915, 21125, -30515, -1481, 31468, -18778, -19380, 31253, -741, -30777, 20553, 17544, -31849, 2958, 29944, -22236, -15630, 32297, -5163, -28974, 23815, 13642, -32598, 7342, 27870, -25286, -11593, 32748, -9490, -26640, 26639, 9489, -32749, 11592, 25285, -27871, -7343, 32597, -13643, -23816, 28973, 5162, -32298, 15629, 22235, -29945, -2959, 31848, -17545, -20554, 30776, 740, -31254, 19379, 18777, -31469, 1480, 30514, -21126, -16916, 32014, -3696, -29636, 22773, 14974, -32415, 5892, 28620, -24318, -12966, 32664, -8063, -27474, 25749, 10897, -32765, 10195, 26201, -27064, -8779, 32714, -12283, -24808, 28252, 6619, -32515, 14312, 23300, -29313, -4430, 32164, -16277, -21686, 30237, 2220, -31667, 18165, 19971, -31024}, +{0, 31468, -17545, -21686, 29635, 5162, -32515, 12965, 25285, -27064, -10196, 32748, -8063, -28253, 23815, 14974, -32165, 2958, 30514, -19972, -19380, 30776, 2220, -32015, 15629, 23300, -28621, -7343, 32714, -10898, -26640, 25749, 12282, -32598, 5892, 29312, -22236, -16916, 31666, -741, -31254, 18165, 21125, -29945, -4430, 32414, -13643, -24808, 27473, 9489, -32765, 8778, 27870, -24318, -14313, 32297, -3696, -30238, 20553, 18777, -31024, -1481, 31848, -16277, -22774, 28973, 6619, -32665, 11592, 26201, -26202, -11593, 32664, -6620, -28974, 22773, 16276, -31849, 1480, 31023, -18778, -20554, 30237, 3695, -32298, 14312, 24317, -27871, -8779, 32764, -9490, -27474, 24807, 13642, -32415, 4429, 29944, -21126, -18166, 31253, 740, -31667, 16915, 22235, -29313, -5893, 32597, -12283, -25750, 26639, 10897, -32715, 7342, 28620, -23301, -15630, 32014, -2221, -30777, 19379, 19971, -30515, -2959, 32164, -14975, -23816, 28252, 8062, -32749, 10195, 27063, -25286, -12966, 32514, -5163, -29636, 21685, 17544, -31469}, +{0, 31848, -14975, -24808, 26639, 12282, -32415, 2958, 31023, -17545, -22774, 28252, 9489, -32715, 5892, 29944, -19972, -20554, 29635, 6619, -32749, 8778, 28620, -22236, -18166, 30776, 3695, -32515, 11592, 27063, -24318, -15630, 31666, 740, -32015, 14312, 25285, -26202, -12966, 32297, -2221, -31254, 16915, 23300, -27871, -10196, 32664, -5163, -30238, 19379, 21125, -29313, -7343, 32764, -8063, -28974, 21685, 18777, -30515, -4430, 32597, -10898, -27474, 23815, 16276, -31469, -1481, 32164, -13643, -25750, 25749, 13642, -32165, 1480, 31468, -16277, -23816, 27473, 10897, -32598, 4429, 30514, -18778, -21686, 28973, 8062, -32765, 7342, 29312, -21126, -19380, 30237, 5162, -32665, 10195, 27870, -23301, -16916, 31253, 2220, -32298, 12965, 26201, -25286, -14313, 32014, -741, -31667, 15629, 24317, -27064, -11593, 32514, -3696, -30777, 18165, 22235, -28621, -8779, 32748, -6620, -29636, 20553, 19971, -29945, -5893, 32714, -9490, -28253, 22773, 17544, -31024, -2959, 32414, -12283, -26640, 24807, 14974, -31849}, +{0, 32164, -12283, -27474, 22773, 18777, -29945, -7343, 32748, -5163, -30777, 16915, 24317, -26202, -14313, 31666, 2220, -32515, 10195, 28620, -21126, -20554, 28973, 9489, -32598, 2958, 31468, -14975, -25750, 24807, 16276, -31024, -4430, 32714, -8063, -29636, 19379, 22235, -27871, -11593, 32297, -741, -32015, 12965, 27063, -23301, -18166, 30237, 6619, -32765, 5892, 30514, -17545, -23816, 26639, 13642, -31849, -1481, 32414, -10898, -28253, 21685, 19971, -29313, -8779, 32664, -3696, -31254, 15629, 25285, -25286, -15630, 31253, 3695, -32665, 8778, 29312, -19972, -21686, 28252, 10897, -32415, 1480, 31848, -13643, -26640, 23815, 17544, -30515, -5893, 32764, -6620, -30238, 18165, 23300, -27064, -12966, 32014, 740, -32298, 11592, 27870, -22236, -19380, 29635, 8062, -32715, 4429, 31023, -16277, -24808, 25749, 14974, -31469, -2959, 32597, -9490, -28974, 20553, 21125, -28621, -10196, 32514, -2221, -31667, 14312, 26201, -24318, -16916, 30776, 5162, -32749, 7342, 29944, -18778, -22774, 27473, 12282, -32165}, +{0, 32414, -9490, -29636, 18165, 24317, -25286, -16916, 30237, 8062, -32598, 1480, 32164, -10898, -28974, 19379, 23300, -26202, -15630, 30776, 6619, -32715, 2958, 31848, -12283, -28253, 20553, 22235, -27064, -14313, 31253, 5162, -32765, 4429, 31468, -13643, -27474, 21685, 21125, -27871, -12966, 31666, 3695, -32749, 5892, 31023, -14975, -26640, 22773, 19971, -28621, -11593, 32014, 2220, -32665, 7342, 30514, -16277, -25750, 23815, 18777, -29313, -10196, 32297, 740, -32515, 8778, 29944, -17545, -24808, 24807, 17544, -29945, -8779, 32514, -741, -32298, 10195, 29312, -18778, -23816, 25749, 16276, -30515, -7343, 32664, -2221, -32015, 11592, 28620, -19972, -22774, 26639, 14974, -31024, -5893, 32748, -3696, -31667, 12965, 27870, -21126, -21686, 27473, 13642, -31469, -4430, 32764, -5163, -31254, 14312, 27063, -22236, -20554, 28252, 12282, -31849, -2959, 32714, -6620, -30777, 15629, 26201, -23301, -19380, 28973, 10897, -32165, -1481, 32597, -8063, -30238, 16915, 25285, -24318, -18166, 29635, 9489, -32415}, +{0, 32597, -6620, -31254, 12965, 28620, -18778, -24808, 23815, 19971, -27871, -14313, 30776, 8062, -32415, -1481, 32714, -5163, -31667, 11592, 29312, -17545, -25750, 22773, 21125, -27064, -15630, 30237, 9489, -32165, -2959, 32764, -3696, -32015, 10195, 29944, -16277, -26640, 21685, 22235, -26202, -16916, 29635, 10897, -31849, -4430, 32748, -2221, -32298, 8778, 30514, -14975, -27474, 20553, 23300, -25286, -18166, 28973, 12282, -31469, -5893, 32664, -741, -32515, 7342, 31023, -13643, -28253, 19379, 24317, -24318, -19380, 28252, 13642, -31024, -7343, 32514, 740, -32665, 5892, 31468, -12283, -28974, 18165, 25285, -23301, -20554, 27473, 14974, -30515, -8779, 32297, 2220, -32749, 4429, 31848, -10898, -29636, 16915, 26201, -22236, -21686, 26639, 16276, -29945, -10196, 32014, 3695, -32765, 2958, 32164, -9490, -30238, 15629, 27063, -21126, -22774, 25749, 17544, -29313, -11593, 31666, 5162, -32715, 1480, 32414, -8063, -30777, 14312, 27870, -19972, -23816, 24807, 18777, -28621, -12966, 31253, 6619, -32598}, +{0, 32714, -3696, -32298, 7342, 31468, -10898, -30238, 14312, 28620, -17545, -26640, 20553, 24317, -23301, -21686, 25749, 18777, -27871, -15630, 29635, 12282, -31024, -8779, 32014, 5162, -32598, -1481, 32764, -2221, -32515, 5892, 31848, -9490, -30777, 12965, 29312, -16277, -27474, 19379, 25285, -22236, -22774, 24807, 19971, -27064, -16916, 28973, 13642, -30515, -10196, 31666, 6619, -32415, -2959, 32748, -741, -32665, 4429, 32164, -8063, -31254, 11592, 29944, -14975, -28253, 18165, 26201, -21126, -23816, 23815, 21125, -26202, -18166, 28252, 14974, -29945, -11593, 31253, 8062, -32165, -4430, 32664, 740, -32749, 2958, 32414, -6620, -31667, 10195, 30514, -13643, -28974, 16915, 27063, -19972, -24808, 22773, 22235, -25286, -19380, 27473, 16276, -29313, -12966, 30776, 9489, -31849, -5893, 32514, 2220, -32765, 1480, 32597, -5163, -32015, 8778, 31023, -12283, -29636, 15629, 27870, -18778, -25750, 21685, 23300, -24318, -20554, 26639, 17544, -28621, -14313, 30237, 10897, -31469, -7343, 32297, 3695, -32715}, +{0, 32764, -741, -32749, 1480, 32714, -2221, -32665, 2958, 32597, -3696, -32515, 4429, 32414, -5163, -32298, 5892, 32164, -6620, -32015, 7342, 31848, -8063, -31667, 8778, 31468, -9490, -31254, 10195, 31023, -10898, -30777, 11592, 30514, -12283, -30238, 12965, 29944, -13643, -29636, 14312, 29312, -14975, -28974, 15629, 28620, -16277, -28253, 16915, 27870, -17545, -27474, 18165, 27063, -18778, -26640, 19379, 26201, -19972, -25750, 20553, 25285, -21126, -24808, 21685, 24317, -22236, -23816, 22773, 23300, -23301, -22774, 23815, 22235, -24318, -21686, 24807, 21125, -25286, -20554, 25749, 19971, -26202, -19380, 26639, 18777, -27064, -18166, 27473, 17544, -27871, -16916, 28252, 16276, -28621, -15630, 28973, 14974, -29313, -14313, 29635, 13642, -29945, -12966, 30237, 12282, -30515, -11593, 30776, 10897, -31024, -10196, 31253, 9489, -31469, -8779, 31666, 8062, -31849, -7343, 32014, 6619, -32165, -5893, 32297, 5162, -32415, -4430, 32514, 3695, -32598, -2959, 32664, 2220, -32715, -1481, 32748, 740, -32765}, +{0, 32748, 2220, -32598, -4430, 32297, 6619, -31849, -8779, 31253, 10897, -30515, -12966, 29635, 14974, -28621, -16916, 27473, 18777, -26202, -20554, 24807, 22235, -23301, -23816, 21685, 25285, -19972, -26640, 18165, 27870, -16277, -28974, 14312, 29944, -12283, -30777, 10195, 31468, -8063, -32015, 5892, 32414, -3696, -32665, 1480, 32764, 740, -32715, -2959, 32514, 5162, -32165, -7343, 31666, 9489, -31024, -11593, 30237, 13642, -29313, -15630, 28252, 17544, -27064, -19380, 25749, 21125, -24318, -22774, 22773, 24317, -21126, -25750, 19379, 27063, -17545, -28253, 15629, 29312, -13643, -30238, 11592, 31023, -9490, -31667, 7342, 32164, -5163, -32515, 2958, 32714, -741, -32765, -1481, 32664, 3695, -32415, -5893, 32014, 8062, -31469, -10196, 30776, 12282, -29945, -14313, 28973, 16276, -27871, -18166, 26639, 19971, -25286, -21686, 23815, 23300, -22236, -24808, 20553, 26201, -18778, -27474, 16915, 28620, -14975, -29636, 12965, 30514, -10898, -31254, 8778, 31848, -6620, -32298, 4429, 32597, -2221, -32749}, +{0, 32664, 5162, -31849, -10196, 30237, 14974, -27871, -19380, 24807, 23300, -21126, -26640, 16915, 29312, -12283, -31254, 7342, 32414, -2221, -32765, -2959, 32297, 8062, -31024, -12966, 28973, 17544, -26202, -21686, 22773, 25285, -18778, -28253, 14312, 30514, -9490, -32015, 4429, 32714, 740, -32598, -5893, 31666, 10897, -29945, -15630, 27473, 19971, -24318, -23816, 20553, 27063, -16277, -29636, 11592, 31468, -6620, -32515, 1480, 32748, 3695, -32165, -8779, 30776, 13642, -28621, -18166, 25749, 22235, -22236, -25750, 18165, 28620, -13643, -30777, 8778, 32164, -3696, -32749, -1481, 32514, 6619, -31469, -11593, 29635, 16276, -27064, -20554, 23815, 24317, -19972, -27474, 15629, 29944, -10898, -31667, 5892, 32597, -741, -32715, -4430, 32014, 9489, -30515, -14313, 28252, 18777, -25286, -22774, 21685, 26201, -17545, -28974, 12965, 31023, -8063, -32298, 2958, 32764, 2220, -32415, -7343, 31253, 12282, -29313, -16916, 26639, 21125, -23301, -24808, 19379, 27870, -14975, -30238, 10195, 31848, -5163, -32665}, +{0, 32514, 8062, -30515, -15630, 26639, 22235, -21126, -27474, 14312, 31023, -6620, -32665, -1481, 32297, 9489, -29945, -16916, 25749, 23300, -19972, -28253, 12965, 31468, -5163, -32749, -2959, 32014, 10897, -29313, -18166, 24807, 24317, -18778, -28974, 11592, 31848, -3696, -32765, -4430, 31666, 12282, -28621, -19380, 23815, 25285, -17545, -29636, 10195, 32164, -2221, -32715, -5893, 31253, 13642, -27871, -20554, 22773, 26201, -16277, -30238, 8778, 32414, -741, -32598, -7343, 30776, 14974, -27064, -21686, 21685, 27063, -14975, -30777, 7342, 32597, 740, -32415, -8779, 30237, 16276, -26202, -22774, 20553, 27870, -13643, -31254, 5892, 32714, 2220, -32165, -10196, 29635, 17544, -25286, -23816, 19379, 28620, -12283, -31667, 4429, 32764, 3695, -31849, -11593, 28973, 18777, -24318, -24808, 18165, 29312, -10898, -32015, 2958, 32748, 5162, -31469, -12966, 28252, 19971, -23301, -25750, 16915, 29944, -9490, -32298, 1480, 32664, 6619, -31024, -14313, 27473, 21125, -22236, -26640, 15629, 30514, -8063, -32515}, +{0, 32297, 10897, -28621, -20554, 21685, 27870, -12283, -32015, 1480, 32514, 9489, -29313, -19380, 22773, 27063, -13643, -31667, 2958, 32664, 8062, -29945, -18166, 23815, 26201, -14975, -31254, 4429, 32748, 6619, -30515, -16916, 24807, 25285, -16277, -30777, 5892, 32764, 5162, -31024, -15630, 25749, 24317, -17545, -30238, 7342, 32714, 3695, -31469, -14313, 26639, 23300, -18778, -29636, 8778, 32597, 2220, -31849, -12966, 27473, 22235, -19972, -28974, 10195, 32414, 740, -32165, -11593, 28252, 21125, -21126, -28253, 11592, 32164, -741, -32415, -10196, 28973, 19971, -22236, -27474, 12965, 31848, -2221, -32598, -8779, 29635, 18777, -23301, -26640, 14312, 31468, -3696, -32715, -7343, 30237, 17544, -24318, -25750, 15629, 31023, -5163, -32765, -5893, 30776, 16276, -25286, -24808, 16915, 30514, -6620, -32749, -4430, 31253, 14974, -26202, -23816, 18165, 29944, -8063, -32665, -2959, 31666, 13642, -27064, -22774, 19379, 29312, -9490, -32515, -1481, 32014, 12282, -27871, -21686, 20553, 28620, -10898, -32298}, +{0, 32014, 13642, -26202, -24808, 15629, 31468, -2221, -32415, -11593, 27473, 23300, -17545, -30777, 4429, 32664, 9489, -28621, -21686, 19379, 29944, -6620, -32765, -7343, 29635, 19971, -21126, -28974, 8778, 32714, 5162, -30515, -18166, 22773, 27870, -10898, -32515, -2959, 31253, 16276, -24318, -26640, 12965, 32164, 740, -31849, -14313, 25749, 25285, -14975, -31667, 1480, 32297, 12282, -27064, -23816, 16915, 31023, -3696, -32598, -10196, 28252, 22235, -18778, -30238, 5892, 32748, 8062, -29313, -20554, 20553, 29312, -8063, -32749, -5893, 30237, 18777, -22236, -28253, 10195, 32597, 3695, -31024, -16916, 23815, 27063, -12283, -32298, -1481, 31666, 14974, -25286, -25750, 14312, 31848, -741, -32165, -12966, 26639, 24317, -16277, -31254, 2958, 32514, 10897, -27871, -22774, 18165, 30514, -5163, -32715, -8779, 28973, 21125, -19972, -29636, 7342, 32764, 6619, -29945, -19380, 21685, 28620, -9490, -32665, -4430, 30776, 17544, -23301, -27474, 11592, 32414, 2220, -31469, -15630, 24807, 26201, -13643, -32015}, +{0, 31666, 16276, -23301, -28253, 8778, 32764, 8062, -28621, -22774, 16915, 31468, -741, -31849, -15630, 23815, 27870, -9490, -32749, -7343, 28973, 22235, -17545, -31254, 1480, 32014, 14974, -24318, -27474, 10195, 32714, 6619, -29313, -21686, 18165, 31023, -2221, -32165, -14313, 24807, 27063, -10898, -32665, -5893, 29635, 21125, -18778, -30777, 2958, 32297, 13642, -25286, -26640, 11592, 32597, 5162, -29945, -20554, 19379, 30514, -3696, -32415, -12966, 25749, 26201, -12283, -32515, -4430, 30237, 19971, -19972, -30238, 4429, 32514, 12282, -26202, -25750, 12965, 32414, 3695, -30515, -19380, 20553, 29944, -5163, -32598, -11593, 26639, 25285, -13643, -32298, -2959, 30776, 18777, -21126, -29636, 5892, 32664, 10897, -27064, -24808, 14312, 32164, 2220, -31024, -18166, 21685, 29312, -6620, -32715, -10196, 27473, 24317, -14975, -32015, -1481, 31253, 17544, -22236, -28974, 7342, 32748, 9489, -27871, -23816, 15629, 31848, 740, -31469, -16916, 22773, 28620, -8063, -32765, -8779, 28252, 23300, -16277, -31667}, +{0, 31253, 18777, -19972, -30777, 1480, 31666, 17544, -21126, -30238, 2958, 32014, 16276, -22236, -29636, 4429, 32297, 14974, -23301, -28974, 5892, 32514, 13642, -24318, -28253, 7342, 32664, 12282, -25286, -27474, 8778, 32748, 10897, -26202, -26640, 10195, 32764, 9489, -27064, -25750, 11592, 32714, 8062, -27871, -24808, 12965, 32597, 6619, -28621, -23816, 14312, 32414, 5162, -29313, -22774, 15629, 32164, 3695, -29945, -21686, 16915, 31848, 2220, -30515, -20554, 18165, 31468, 740, -31024, -19380, 19379, 31023, -741, -31469, -18166, 20553, 30514, -2221, -31849, -16916, 21685, 29944, -3696, -32165, -15630, 22773, 29312, -5163, -32415, -14313, 23815, 28620, -6620, -32598, -12966, 24807, 27870, -8063, -32715, -11593, 25749, 27063, -9490, -32765, -10196, 26639, 26201, -10898, -32749, -8779, 27473, 25285, -12283, -32665, -7343, 28252, 24317, -13643, -32515, -5893, 28973, 23300, -14975, -32298, -4430, 29635, 22235, -16277, -32015, -2959, 30237, 21125, -17545, -31667, -1481, 30776, 19971, -18778, -31254}, +{0, 30776, 21125, -16277, -32298, -5893, 28252, 25285, -10898, -32765, -11593, 24807, 28620, -5163, -32165, -16916, 20553, 31023, 740, -30515, -21686, 15629, 32414, 6619, -27871, -25750, 10195, 32748, 12282, -24318, -28974, 4429, 32014, 17544, -19972, -31254, -1481, 30237, 22235, -14975, -32515, -7343, 27473, 26201, -9490, -32715, -12966, 23815, 29312, -3696, -31849, -18166, 19379, 31468, 2220, -29945, -22774, 14312, 32597, 8062, -27064, -26640, 8778, 32664, 13642, -23301, -29636, 2958, 31666, 18777, -18778, -31667, -2959, 29635, 23300, -13643, -32665, -8779, 26639, 27063, -8063, -32598, -14313, 22773, 29944, -2221, -31469, -19380, 18165, 31848, 3695, -29313, -23816, 12965, 32714, 9489, -26202, -27474, 7342, 32514, 14974, -22236, -30238, 1480, 31253, 19971, -17545, -32015, -4430, 28973, 24317, -12283, -32749, -10196, 25749, 27870, -6620, -32415, -15630, 21685, 30514, -741, -31024, -20554, 16915, 32164, 5162, -28621, -24808, 11592, 32764, 10897, -25286, -28253, 5892, 32297, 16276, -21126, -30777}, +{0, 30237, 23300, -12283, -32765, -12966, 22773, 30514, 740, -29945, -23816, 11592, 32748, 13642, -22236, -30777, -1481, 29635, 24317, -10898, -32715, -14313, 21685, 31023, 2220, -29313, -24808, 10195, 32664, 14974, -21126, -31254, -2959, 28973, 25285, -9490, -32598, -15630, 20553, 31468, 3695, -28621, -25750, 8778, 32514, 16276, -19972, -31667, -4430, 28252, 26201, -8063, -32415, -16916, 19379, 31848, 5162, -27871, -26640, 7342, 32297, 17544, -18778, -32015, -5893, 27473, 27063, -6620, -32165, -18166, 18165, 32164, 6619, -27064, -27474, 5892, 32014, 18777, -17545, -32298, -7343, 26639, 27870, -5163, -31849, -19380, 16915, 32414, 8062, -26202, -28253, 4429, 31666, 19971, -16277, -32515, -8779, 25749, 28620, -3696, -31469, -20554, 15629, 32597, 9489, -25286, -28974, 2958, 31253, 21125, -14975, -32665, -10196, 24807, 29312, -2221, -31024, -21686, 14312, 32714, 10897, -24318, -29636, 1480, 30776, 22235, -13643, -32749, -11593, 23815, 29944, -741, -30515, -22774, 12965, 32764, 12282, -23301, -30238}, +{0, 29635, 25285, -8063, -32165, -19380, 15629, 32714, 12282, -22236, -31254, -4430, 27473, 27870, -3696, -31024, -22774, 11592, 32664, 16276, -18778, -32298, -8779, 24807, 29944, 740, -29313, -25750, 7342, 32014, 19971, -14975, -32749, -12966, 21685, 31468, 5162, -27064, -28253, 2958, 30776, 23300, -10898, -32598, -16916, 18165, 32414, 9489, -24318, -30238, -1481, 28973, 26201, -6620, -31849, -20554, 14312, 32764, 13642, -21126, -31667, -5893, 26639, 28620, -2221, -30515, -23816, 10195, 32514, 17544, -17545, -32515, -10196, 23815, 30514, 2220, -28621, -26640, 5892, 31666, 21125, -13643, -32765, -14313, 20553, 31848, 6619, -26202, -28974, 1480, 30237, 24317, -9490, -32415, -18166, 16915, 32597, 10897, -23301, -30777, -2959, 28252, 27063, -5163, -31469, -21686, 12965, 32748, 14974, -19972, -32015, -7343, 25749, 29312, -741, -29945, -24808, 8778, 32297, 18777, -16277, -32665, -11593, 22773, 31023, 3695, -27871, -27474, 4429, 31253, 22235, -12283, -32715, -15630, 19379, 32164, 8062, -25286, -29636}, +{0, 28973, 27063, -3696, -30515, -24808, 7342, 31666, 22235, -10898, -32415, -19380, 14312, 32748, 16276, -17545, -32665, -12966, 20553, 32164, 9489, -23301, -31254, -5893, 25749, 29944, 2220, -27871, -28253, 1480, 29635, 26201, -5163, -31024, -23816, 8778, 32014, 21125, -12283, -32598, -18166, 15629, 32764, 14974, -18778, -32515, -11593, 21685, 31848, 8062, -24318, -30777, -4430, 26639, 29312, 740, -28621, -27474, 2958, 30237, 25285, -6620, -31469, -22774, 10195, 32297, 19971, -13643, -32715, -16916, 16915, 32714, 13642, -19972, -32298, -10196, 22773, 31468, 6619, -25286, -30238, -2959, 27473, 28620, -741, -29313, -26640, 4429, 30776, 24317, -8063, -31849, -21686, 11592, 32514, 18777, -14975, -32765, -15630, 18165, 32597, 12282, -21126, -32015, -8779, 23815, 31023, 5162, -26202, -29636, -1481, 28252, 27870, -2221, -29945, -25750, 5892, 31253, 23300, -9490, -32165, -20554, 12965, 32664, 17544, -16277, -32749, -14313, 19379, 32414, 10897, -22236, -31667, -7343, 24807, 30514, 3695, -27064, -28974}, +{0, 28252, 28620, 740, -27871, -28974, -1481, 27473, 29312, 2220, -27064, -29636, -2959, 26639, 29944, 3695, -26202, -30238, -4430, 25749, 30514, 5162, -25286, -30777, -5893, 24807, 31023, 6619, -24318, -31254, -7343, 23815, 31468, 8062, -23301, -31667, -8779, 22773, 31848, 9489, -22236, -32015, -10196, 21685, 32164, 10897, -21126, -32298, -11593, 20553, 32414, 12282, -19972, -32515, -12966, 19379, 32597, 13642, -18778, -32665, -14313, 18165, 32714, 14974, -17545, -32749, -15630, 16915, 32764, 16276, -16277, -32765, -16916, 15629, 32748, 17544, -14975, -32715, -18166, 14312, 32664, 18777, -13643, -32598, -19380, 12965, 32514, 19971, -12283, -32415, -20554, 11592, 32297, 21125, -10898, -32165, -21686, 10195, 32014, 22235, -9490, -31849, -22774, 8778, 31666, 23300, -8063, -31469, -23816, 7342, 31253, 24317, -6620, -31024, -24808, 5892, 30776, 25285, -5163, -30515, -25750, 4429, 30237, 26201, -3696, -29945, -26640, 2958, 29635, 27063, -2221, -29313, -27474, 1480, 28973, 27870, -741, -28621, -28253}, +{0, 27473, 29944, 5162, -24318, -31667, -10196, 20553, 32597, 14974, -16277, -32715, -19380, 11592, 32014, 23300, -6620, -30515, -26640, 1480, 28252, 29312, 3695, -25286, -31254, -8779, 21685, 32414, 13642, -17545, -32765, -18166, 12965, 32297, 22235, -8063, -31024, -25750, 2958, 28973, 28620, 2220, -26202, -30777, -7343, 22773, 32164, 12282, -18778, -32749, -16916, 14312, 32514, 21125, -9490, -31469, -24808, 4429, 29635, 27870, 740, -27064, -30238, -5893, 23815, 31848, 10897, -19972, -32665, -15630, 15629, 32664, 19971, -10898, -31849, -23816, 5892, 30237, 27063, -741, -27871, -29636, -4430, 24807, 31468, 9489, -21126, -32515, -14313, 16915, 32748, 18777, -12283, -32165, -22774, 7342, 30776, 26201, -2221, -28621, -28974, -2959, 25749, 31023, 8062, -22236, -32298, -12966, 18165, 32764, 17544, -13643, -32415, -21686, 8778, 31253, 25285, -3696, -29313, -28253, -1481, 26639, 30514, 6619, -23301, -32015, -11593, 19379, 32714, 16276, -14975, -32598, -20554, 10195, 31666, 24317, -5163, -29945, -27474}, +{0, 26639, 31023, 9489, -19972, -32749, -18166, 11592, 31666, 25285, -2221, -27871, -30238, -7343, 21685, 32597, 16276, -13643, -32165, -23816, 4429, 28973, 29312, 5162, -23301, -32298, -14313, 15629, 32514, 22235, -6620, -29945, -28253, -2959, 24807, 31848, 12282, -17545, -32715, -20554, 8778, 30776, 27063, 740, -26202, -31254, -10196, 19379, 32764, 18777, -10898, -31469, -25750, 1480, 27473, 30514, 8062, -21126, -32665, -16916, 12965, 32014, 24317, -3696, -28621, -29636, -5893, 22773, 32414, 14974, -14975, -32415, -22774, 5892, 29635, 28620, 3695, -24318, -32015, -12966, 16915, 32664, 21125, -8063, -30515, -27474, -1481, 25749, 31468, 10897, -18778, -32765, -19380, 10195, 31253, 26201, -741, -27064, -30777, -8779, 20553, 32714, 17544, -12283, -31849, -24808, 2958, 28252, 29944, 6619, -22236, -32515, -15630, 14312, 32297, 23300, -5163, -29313, -28974, -4430, 23815, 32164, 13642, -16277, -32598, -21686, 7342, 30237, 27870, 2220, -25286, -31667, -11593, 18165, 32748, 19971, -9490, -31024, -26640}, +{0, 25749, 31848, 13642, -14975, -32165, -24808, 1480, 26639, 31468, 12282, -16277, -32415, -23816, 2958, 27473, 31023, 10897, -17545, -32598, -22774, 4429, 28252, 30514, 9489, -18778, -32715, -21686, 5892, 28973, 29944, 8062, -19972, -32765, -20554, 7342, 29635, 29312, 6619, -21126, -32749, -19380, 8778, 30237, 28620, 5162, -22236, -32665, -18166, 10195, 30776, 27870, 3695, -23301, -32515, -16916, 11592, 31253, 27063, 2220, -24318, -32298, -15630, 12965, 31666, 26201, 740, -25286, -32015, -14313, 14312, 32014, 25285, -741, -26202, -31667, -12966, 15629, 32297, 24317, -2221, -27064, -31254, -11593, 16915, 32514, 23300, -3696, -27871, -30777, -10196, 18165, 32664, 22235, -5163, -28621, -30238, -8779, 19379, 32748, 21125, -6620, -29313, -29636, -7343, 20553, 32764, 19971, -8063, -29945, -28974, -5893, 21685, 32714, 18777, -9490, -30515, -28253, -4430, 22773, 32597, 17544, -10898, -31024, -27474, -2959, 23815, 32414, 16276, -12283, -31469, -26640, -1481, 24807, 32164, 14974, -13643, -31849, -25750}, +{0, 24807, 32414, 17544, -9490, -29945, -29636, -8779, 18165, 32514, 24317, -741, -25286, -32298, -16916, 10195, 30237, 29312, 8062, -18778, -32598, -23816, 1480, 25749, 32164, 16276, -10898, -30515, -28974, -7343, 19379, 32664, 23300, -2221, -26202, -32015, -15630, 11592, 30776, 28620, 6619, -19972, -32715, -22774, 2958, 26639, 31848, 14974, -12283, -31024, -28253, -5893, 20553, 32748, 22235, -3696, -27064, -31667, -14313, 12965, 31253, 27870, 5162, -21126, -32765, -21686, 4429, 27473, 31468, 13642, -13643, -31469, -27474, -4430, 21685, 32764, 21125, -5163, -27871, -31254, -12966, 14312, 31666, 27063, 3695, -22236, -32749, -20554, 5892, 28252, 31023, 12282, -14975, -31849, -26640, -2959, 22773, 32714, 19971, -6620, -28621, -30777, -11593, 15629, 32014, 26201, 2220, -23301, -32665, -19380, 7342, 28973, 30514, 10897, -16277, -32165, -25750, -1481, 23815, 32597, 18777, -8063, -29313, -30238, -10196, 16915, 32297, 25285, 740, -24318, -32515, -18166, 8778, 29635, 29944, 9489, -17545, -32415, -24808}, +{0, 23815, 32714, 21125, -3696, -26202, -32298, -18166, 7342, 28252, 31468, 14974, -10898, -29945, -30238, -11593, 14312, 31253, 28620, 8062, -17545, -32165, -26640, -4430, 20553, 32664, 24317, 740, -23301, -32749, -21686, 2958, 25749, 32414, 18777, -6620, -27871, -31667, -15630, 10195, 29635, 30514, 12282, -13643, -31024, -28974, -8779, 16915, 32014, 27063, 5162, -19972, -32598, -24808, -1481, 22773, 32764, 22235, -2221, -25286, -32515, -19380, 5892, 27473, 31848, 16276, -9490, -29313, -30777, -12966, 12965, 30776, 29312, 9489, -16277, -31849, -27474, -5893, 19379, 32514, 25285, 2220, -22236, -32765, -22774, 1480, 24807, 32597, 19971, -5163, -27064, -32015, -16916, 8778, 28973, 31023, 13642, -12283, -30515, -29636, -10196, 15629, 31666, 27870, 6619, -18778, -32415, -25750, -2959, 21685, 32748, 23300, -741, -24318, -32665, -20554, 4429, 26639, 32164, 17544, -8063, -28621, -31254, -14313, 11592, 30237, 29944, 10897, -14975, -31469, -28253, -7343, 18165, 32297, 26201, 3695, -21126, -32715, -23816}, +{0, 22773, 32748, 24317, 2220, -21126, -32598, -25750, -4430, 19379, 32297, 27063, 6619, -17545, -31849, -28253, -8779, 15629, 31253, 29312, 10897, -13643, -30515, -30238, -12966, 11592, 29635, 31023, 14974, -9490, -28621, -31667, -16916, 7342, 27473, 32164, 18777, -5163, -26202, -32515, -20554, 2958, 24807, 32714, 22235, -741, -23301, -32765, -23816, -1481, 21685, 32664, 25285, 3695, -19972, -32415, -26640, -5893, 18165, 32014, 27870, 8062, -16277, -31469, -28974, -10196, 14312, 30776, 29944, 12282, -12283, -29945, -30777, -14313, 10195, 28973, 31468, 16276, -8063, -27871, -32015, -18166, 5892, 26639, 32414, 19971, -3696, -25286, -32665, -21686, 1480, 23815, 32764, 23300, 740, -22236, -32715, -24808, -2959, 20553, 32514, 26201, 5162, -18778, -32165, -27474, -7343, 16915, 31666, 28620, 9489, -14975, -31024, -29636, -11593, 12965, 30237, 30514, 13642, -10898, -29313, -31254, -15630, 8778, 28252, 31848, 17544, -6620, -27064, -32298, -19380, 4429, 25749, 32597, 21125, -2221, -24318, -32749, -22774}, +{0, 21685, 32514, 27063, 8062, -14975, -30515, -30777, -15630, 7342, 26639, 32597, 22235, 740, -21126, -32415, -27474, -8779, 14312, 30237, 31023, 16276, -6620, -26202, -32665, -22774, -1481, 20553, 32297, 27870, 9489, -13643, -29945, -31254, -16916, 5892, 25749, 32714, 23300, 2220, -19972, -32165, -28253, -10196, 12965, 29635, 31468, 17544, -5163, -25286, -32749, -23816, -2959, 19379, 32014, 28620, 10897, -12283, -29313, -31667, -18166, 4429, 24807, 32764, 24317, 3695, -18778, -31849, -28974, -11593, 11592, 28973, 31848, 18777, -3696, -24318, -32765, -24808, -4430, 18165, 31666, 29312, 12282, -10898, -28621, -32015, -19380, 2958, 23815, 32748, 25285, 5162, -17545, -31469, -29636, -12966, 10195, 28252, 32164, 19971, -2221, -23301, -32715, -25750, -5893, 16915, 31253, 29944, 13642, -9490, -27871, -32298, -20554, 1480, 22773, 32664, 26201, 6619, -16277, -31024, -30238, -14313, 8778, 27473, 32414, 21125, -741, -22236, -32598, -26640, -7343, 15629, 30776, 30514, 14974, -8063, -27064, -32515, -21686}, +{0, 20553, 32014, 29312, 13642, -8063, -26202, -32749, -24808, -5893, 15629, 30237, 31468, 18777, -2221, -22236, -32415, -28253, -11593, 10195, 27473, 32597, 23300, 3695, -17545, -31024, -30777, -16916, 4429, 23815, 32664, 27063, 9489, -12283, -28621, -32298, -21686, -1481, 19379, 31666, 29944, 14974, -6620, -25286, -32765, -25750, -7343, 14312, 29635, 31848, 19971, -741, -21126, -32165, -28974, -12966, 8778, 26639, 32714, 24317, 5162, -16277, -30515, -31254, -18166, 2958, 22773, 32514, 27870, 10897, -10898, -27871, -32515, -22774, -2959, 18165, 31253, 30514, 16276, -5163, -24318, -32715, -26640, -8779, 12965, 28973, 32164, 21125, 740, -19972, -31849, -29636, -14313, 7342, 25749, 32764, 25285, 6619, -14975, -29945, -31667, -19380, 1480, 21685, 32297, 28620, 12282, -9490, -27064, -32665, -23816, -4430, 16915, 30776, 31023, 17544, -3696, -23301, -32598, -27474, -10196, 11592, 28252, 32414, 22235, 2220, -18778, -31469, -30238, -15630, 5892, 24807, 32748, 26201, 8062, -13643, -29313, -32015, -20554}, +{0, 19379, 31253, 31023, 18777, -741, -19972, -31469, -30777, -18166, 1480, 20553, 31666, 30514, 17544, -2221, -21126, -31849, -30238, -16916, 2958, 21685, 32014, 29944, 16276, -3696, -22236, -32165, -29636, -15630, 4429, 22773, 32297, 29312, 14974, -5163, -23301, -32415, -28974, -14313, 5892, 23815, 32514, 28620, 13642, -6620, -24318, -32598, -28253, -12966, 7342, 24807, 32664, 27870, 12282, -8063, -25286, -32715, -27474, -11593, 8778, 25749, 32748, 27063, 10897, -9490, -26202, -32765, -26640, -10196, 10195, 26639, 32764, 26201, 9489, -10898, -27064, -32749, -25750, -8779, 11592, 27473, 32714, 25285, 8062, -12283, -27871, -32665, -24808, -7343, 12965, 28252, 32597, 24317, 6619, -13643, -28621, -32515, -23816, -5893, 14312, 28973, 32414, 23300, 5162, -14975, -29313, -32298, -22774, -4430, 15629, 29635, 32164, 22235, 3695, -16277, -29945, -32015, -21686, -2959, 16915, 30237, 31848, 21125, 2220, -17545, -30515, -31667, -20554, -1481, 18165, 30776, 31468, 19971, 740, -18778, -31024, -31254, -19380}, +{0, 18165, 30237, 32164, 23300, 6619, -12283, -27064, -32765, -27474, -12966, 5892, 22773, 32014, 30514, 18777, 740, -17545, -29945, -32298, -23816, -7343, 11592, 26639, 32748, 27870, 13642, -5163, -22236, -31849, -30777, -19380, -1481, 16915, 29635, 32414, 24317, 8062, -10898, -26202, -32715, -28253, -14313, 4429, 21685, 31666, 31023, 19971, 2220, -16277, -29313, -32515, -24808, -8779, 10195, 25749, 32664, 28620, 14974, -3696, -21126, -31469, -31254, -20554, -2959, 15629, 28973, 32597, 25285, 9489, -9490, -25286, -32598, -28974, -15630, 2958, 20553, 31253, 31468, 21125, 3695, -14975, -28621, -32665, -25750, -10196, 8778, 24807, 32514, 29312, 16276, -2221, -19972, -31024, -31667, -21686, -4430, 14312, 28252, 32714, 26201, 10897, -8063, -24318, -32415, -29636, -16916, 1480, 19379, 30776, 31848, 22235, 5162, -13643, -27871, -32749, -26640, -11593, 7342, 23815, 32297, 29944, 17544, -741, -18778, -30515, -32015, -22774, -5893, 12965, 27473, 32764, 27063, 12282, -6620, -23301, -32165, -30238, -18166}, +{0, 16915, 28973, 32714, 27063, 13642, -3696, -19972, -30515, -32298, -24808, -10196, 7342, 22773, 31666, 31468, 22235, 6619, -10898, -25286, -32415, -30238, -19380, -2959, 14312, 27473, 32748, 28620, 16276, -741, -17545, -29313, -32665, -26640, -12966, 4429, 20553, 30776, 32164, 24317, 9489, -8063, -23301, -31849, -31254, -21686, -5893, 11592, 25749, 32514, 29944, 18777, 2220, -14975, -27871, -32765, -28253, -15630, 1480, 18165, 29635, 32597, 26201, 12282, -5163, -21126, -31024, -32015, -23816, -8779, 8778, 23815, 32014, 31023, 21125, 5162, -12283, -26202, -32598, -29636, -18166, -1481, 15629, 28252, 32764, 27870, 14974, -2221, -18778, -29945, -32515, -25750, -11593, 5892, 21685, 31253, 31848, 23300, 8062, -9490, -24318, -32165, -30777, -20554, -4430, 12965, 26639, 32664, 29312, 17544, 740, -16277, -28621, -32749, -27474, -14313, 2958, 19379, 30237, 32414, 25285, 10897, -6620, -22236, -31469, -31667, -22774, -7343, 10195, 24807, 32297, 30514, 19971, 3695, -13643, -27064, -32715, -28974, -16916}, +{0, 15629, 27473, 32664, 29944, 19971, 5162, -10898, -24318, -31849, -31667, -23816, -10196, 5892, 20553, 30237, 32597, 27063, 14974, -741, -16277, -27871, -32715, -29636, -19380, -4430, 11592, 24807, 32014, 31468, 23300, 9489, -6620, -21126, -30515, -32515, -26640, -14313, 1480, 16915, 28252, 32748, 29312, 18777, 3695, -12283, -25286, -32165, -31254, -22774, -8779, 7342, 21685, 30776, 32414, 26201, 13642, -2221, -17545, -28621, -32765, -28974, -18166, -2959, 12965, 25749, 32297, 31023, 22235, 8062, -8063, -22236, -31024, -32298, -25750, -12966, 2958, 18165, 28973, 32764, 28620, 17544, 2220, -13643, -26202, -32415, -30777, -21686, -7343, 8778, 22773, 31253, 32164, 25285, 12282, -3696, -18778, -29313, -32749, -28253, -16916, -1481, 14312, 26639, 32514, 30514, 21125, 6619, -9490, -23301, -31469, -32015, -24808, -11593, 4429, 19379, 29635, 32714, 27870, 16276, 740, -14975, -27064, -32598, -30238, -20554, -5893, 10195, 23815, 31666, 31848, 24317, 10897, -5163, -19972, -29945, -32665, -27474, -15630}, +{0, 14312, 25749, 32014, 31848, 25285, 13642, -741, -14975, -26202, -32165, -31667, -24808, -12966, 1480, 15629, 26639, 32297, 31468, 24317, 12282, -2221, -16277, -27064, -32415, -31254, -23816, -11593, 2958, 16915, 27473, 32514, 31023, 23300, 10897, -3696, -17545, -27871, -32598, -30777, -22774, -10196, 4429, 18165, 28252, 32664, 30514, 22235, 9489, -5163, -18778, -28621, -32715, -30238, -21686, -8779, 5892, 19379, 28973, 32748, 29944, 21125, 8062, -6620, -19972, -29313, -32765, -29636, -20554, -7343, 7342, 20553, 29635, 32764, 29312, 19971, 6619, -8063, -21126, -29945, -32749, -28974, -19380, -5893, 8778, 21685, 30237, 32714, 28620, 18777, 5162, -9490, -22236, -30515, -32665, -28253, -18166, -4430, 10195, 22773, 30776, 32597, 27870, 17544, 3695, -10898, -23301, -31024, -32515, -27474, -16916, -2959, 11592, 23815, 31253, 32414, 27063, 16276, 2220, -12283, -24318, -31469, -32298, -26640, -15630, -1481, 12965, 24807, 31666, 32164, 26201, 14974, 740, -13643, -25286, -31849, -32015, -25750, -14313}, +{0, 12965, 23815, 30776, 32714, 29312, 21125, 9489, -3696, -16277, -26202, -31849, -32298, -27474, -18166, -5893, 7342, 19379, 28252, 32514, 31468, 25285, 14974, 2220, -10898, -22236, -29945, -32765, -30238, -22774, -11593, 1480, 14312, 24807, 31253, 32597, 28620, 19971, 8062, -5163, -17545, -27064, -32165, -32015, -26640, -16916, -4430, 8778, 20553, 28973, 32664, 31023, 24317, 13642, 740, -12283, -23301, -30515, -32749, -29636, -21686, -10196, 2958, 15629, 25749, 31666, 32414, 27870, 18777, 6619, -6620, -18778, -27871, -32415, -31667, -25750, -15630, -2959, 10195, 21685, 29635, 32748, 30514, 23300, 12282, -741, -13643, -24318, -31024, -32665, -28974, -20554, -8779, 4429, 16915, 26639, 32014, 32164, 27063, 17544, 5162, -8063, -19972, -28621, -32598, -31254, -24808, -14313, -1481, 11592, 22773, 30237, 32764, 29944, 22235, 10897, -2221, -14975, -25286, -31469, -32515, -28253, -19380, -7343, 5892, 18165, 27473, 32297, 31848, 26201, 16276, 3695, -9490, -21126, -29313, -32715, -30777, -23816, -12966}, +{0, 11592, 21685, 28973, 32514, 31848, 27063, 18777, 8062, -3696, -14975, -24318, -30515, -32765, -30777, -24808, -15630, -4430, 7342, 18165, 26639, 31666, 32597, 29312, 22235, 12282, 740, -10898, -21126, -28621, -32415, -32015, -27474, -19380, -8779, 2958, 14312, 23815, 30237, 32748, 31023, 25285, 16276, 5162, -6620, -17545, -26202, -31469, -32665, -29636, -22774, -12966, -1481, 10195, 20553, 28252, 32297, 32164, 27870, 19971, 9489, -2221, -13643, -23301, -29945, -32715, -31254, -25750, -16916, -5893, 5892, 16915, 25749, 31253, 32714, 29944, 23300, 13642, 2220, -9490, -19972, -27871, -32165, -32298, -28253, -20554, -10196, 1480, 12965, 22773, 29635, 32664, 31468, 26201, 17544, 6619, -5163, -16277, -25286, -31024, -32749, -30238, -23816, -14313, -2959, 8778, 19379, 27473, 32014, 32414, 28620, 21125, 10897, -741, -12283, -22236, -29313, -32598, -31667, -26640, -18166, -7343, 4429, 15629, 24807, 30776, 32764, 30514, 24317, 14974, 3695, -8063, -18778, -27064, -31849, -32515, -28974, -21686, -11593}, +{0, 10195, 19379, 26639, 31253, 32764, 31023, 26201, 18777, 9489, -741, -10898, -19972, -27064, -31469, -32749, -30777, -25750, -18166, -8779, 1480, 11592, 20553, 27473, 31666, 32714, 30514, 25285, 17544, 8062, -2221, -12283, -21126, -27871, -31849, -32665, -30238, -24808, -16916, -7343, 2958, 12965, 21685, 28252, 32014, 32597, 29944, 24317, 16276, 6619, -3696, -13643, -22236, -28621, -32165, -32515, -29636, -23816, -15630, -5893, 4429, 14312, 22773, 28973, 32297, 32414, 29312, 23300, 14974, 5162, -5163, -14975, -23301, -29313, -32415, -32298, -28974, -22774, -14313, -4430, 5892, 15629, 23815, 29635, 32514, 32164, 28620, 22235, 13642, 3695, -6620, -16277, -24318, -29945, -32598, -32015, -28253, -21686, -12966, -2959, 7342, 16915, 24807, 30237, 32664, 31848, 27870, 21125, 12282, 2220, -8063, -17545, -25286, -30515, -32715, -31667, -27474, -20554, -11593, -1481, 8778, 18165, 25749, 30776, 32748, 31468, 27063, 19971, 10897, 740, -9490, -18778, -26202, -31024, -32765, -31254, -26640, -19380, -10196}, +{0, 8778, 16915, 23815, 28973, 32014, 32714, 31023, 27063, 21125, 13642, 5162, -3696, -12283, -19972, -26202, -30515, -32598, -32298, -29636, -24808, -18166, -10196, -1481, 7342, 15629, 22773, 28252, 31666, 32764, 31468, 27870, 22235, 14974, 6619, -2221, -10898, -18778, -25286, -29945, -32415, -32515, -30238, -25750, -19380, -11593, -2959, 5892, 14312, 21685, 27473, 31253, 32748, 31848, 28620, 23300, 16276, 8062, -741, -9490, -17545, -24318, -29313, -32165, -32665, -30777, -26640, -20554, -12966, -4430, 4429, 12965, 20553, 26639, 30776, 32664, 32164, 29312, 24317, 17544, 9489, 740, -8063, -16277, -23301, -28621, -31849, -32749, -31254, -27474, -21686, -14313, -5893, 2958, 11592, 19379, 25749, 30237, 32514, 32414, 29944, 25285, 18777, 10897, 2220, -6620, -14975, -22236, -27871, -31469, -32765, -31667, -28253, -22774, -15630, -7343, 1480, 10195, 18165, 24807, 29635, 32297, 32597, 30514, 26201, 19971, 12282, 3695, -5163, -13643, -21126, -27064, -31024, -32715, -32015, -28974, -23816, -16916, -8779}, +{0, 7342, 14312, 20553, 25749, 29635, 32014, 32764, 31848, 29312, 25285, 19971, 13642, 6619, -741, -8063, -14975, -21126, -26202, -29945, -32165, -32749, -31667, -28974, -24808, -19380, -12966, -5893, 1480, 8778, 15629, 21685, 26639, 30237, 32297, 32714, 31468, 28620, 24317, 18777, 12282, 5162, -2221, -9490, -16277, -22236, -27064, -30515, -32415, -32665, -31254, -28253, -23816, -18166, -11593, -4430, 2958, 10195, 16915, 22773, 27473, 30776, 32514, 32597, 31023, 27870, 23300, 17544, 10897, 3695, -3696, -10898, -17545, -23301, -27871, -31024, -32598, -32515, -30777, -27474, -22774, -16916, -10196, -2959, 4429, 11592, 18165, 23815, 28252, 31253, 32664, 32414, 30514, 27063, 22235, 16276, 9489, 2220, -5163, -12283, -18778, -24318, -28621, -31469, -32715, -32298, -30238, -26640, -21686, -15630, -8779, -1481, 5892, 12965, 19379, 24807, 28973, 31666, 32748, 32164, 29944, 26201, 21125, 14974, 8062, 740, -6620, -13643, -19972, -25286, -29313, -31849, -32765, -32015, -29636, -25750, -20554, -14313, -7343}, +{0, 5892, 11592, 16915, 21685, 25749, 28973, 31253, 32514, 32714, 31848, 29944, 27063, 23300, 18777, 13642, 8062, 2220, -3696, -9490, -14975, -19972, -24318, -27871, -30515, -32165, -32765, -32298, -30777, -28253, -24808, -20554, -15630, -10196, -4430, 1480, 7342, 12965, 18165, 22773, 26639, 29635, 31666, 32664, 32597, 31468, 29312, 26201, 22235, 17544, 12282, 6619, 740, -5163, -10898, -16277, -21126, -25286, -28621, -31024, -32415, -32749, -32015, -30238, -27474, -23816, -19380, -14313, -8779, -2959, 2958, 8778, 14312, 19379, 23815, 27473, 30237, 32014, 32748, 32414, 31023, 28620, 25285, 21125, 16276, 10897, 5162, -741, -6620, -12283, -17545, -22236, -26202, -29313, -31469, -32598, -32665, -31667, -29636, -26640, -22774, -18166, -12966, -7343, -1481, 4429, 10195, 15629, 20553, 24807, 28252, 30776, 32297, 32764, 32164, 30514, 27870, 24317, 19971, 14974, 9489, 3695, -2221, -8063, -13643, -18778, -23301, -27064, -29945, -31849, -32715, -32515, -31254, -28974, -25750, -21686, -16916, -11593, -5893}, +{0, 4429, 8778, 12965, 16915, 20553, 23815, 26639, 28973, 30776, 32014, 32664, 32714, 32164, 31023, 29312, 27063, 24317, 21125, 17544, 13642, 9489, 5162, 740, -3696, -8063, -12283, -16277, -19972, -23301, -26202, -28621, -30515, -31849, -32598, -32749, -32298, -31254, -29636, -27474, -24808, -21686, -18166, -14313, -10196, -5893, -1481, 2958, 7342, 11592, 15629, 19379, 22773, 25749, 28252, 30237, 31666, 32514, 32764, 32414, 31468, 29944, 27870, 25285, 22235, 18777, 14974, 10897, 6619, 2220, -2221, -6620, -10898, -14975, -18778, -22236, -25286, -27871, -29945, -31469, -32415, -32765, -32515, -31667, -30238, -28253, -25750, -22774, -19380, -15630, -11593, -7343, -2959, 1480, 5892, 10195, 14312, 18165, 21685, 24807, 27473, 29635, 31253, 32297, 32748, 32597, 31848, 30514, 28620, 26201, 23300, 19971, 16276, 12282, 8062, 3695, -741, -5163, -9490, -13643, -17545, -21126, -24318, -27064, -29313, -31024, -32165, -32715, -32665, -32015, -30777, -28974, -26640, -23816, -20554, -16916, -12966, -8779, -4430}, +{0, 2958, 5892, 8778, 11592, 14312, 16915, 19379, 21685, 23815, 25749, 27473, 28973, 30237, 31253, 32014, 32514, 32748, 32714, 32414, 31848, 31023, 29944, 28620, 27063, 25285, 23300, 21125, 18777, 16276, 13642, 10897, 8062, 5162, 2220, -741, -3696, -6620, -9490, -12283, -14975, -17545, -19972, -22236, -24318, -26202, -27871, -29313, -30515, -31469, -32165, -32598, -32765, -32665, -32298, -31667, -30777, -29636, -28253, -26640, -24808, -22774, -20554, -18166, -15630, -12966, -10196, -7343, -4430, -1481, 1480, 4429, 7342, 10195, 12965, 15629, 18165, 20553, 22773, 24807, 26639, 28252, 29635, 30776, 31666, 32297, 32664, 32764, 32597, 32164, 31468, 30514, 29312, 27870, 26201, 24317, 22235, 19971, 17544, 14974, 12282, 9489, 6619, 3695, 740, -2221, -5163, -8063, -10898, -13643, -16277, -18778, -21126, -23301, -25286, -27064, -28621, -29945, -31024, -31849, -32415, -32715, -32749, -32515, -32015, -31254, -30238, -28974, -27474, -25750, -23816, -21686, -19380, -16916, -14313, -11593, -8779, -5893, -2959}, +{0, 1480, 2958, 4429, 5892, 7342, 8778, 10195, 11592, 12965, 14312, 15629, 16915, 18165, 19379, 20553, 21685, 22773, 23815, 24807, 25749, 26639, 27473, 28252, 28973, 29635, 30237, 30776, 31253, 31666, 32014, 32297, 32514, 32664, 32748, 32764, 32714, 32597, 32414, 32164, 31848, 31468, 31023, 30514, 29944, 29312, 28620, 27870, 27063, 26201, 25285, 24317, 23300, 22235, 21125, 19971, 18777, 17544, 16276, 14974, 13642, 12282, 10897, 9489, 8062, 6619, 5162, 3695, 2220, 740, -741, -2221, -3696, -5163, -6620, -8063, -9490, -10898, -12283, -13643, -14975, -16277, -17545, -18778, -19972, -21126, -22236, -23301, -24318, -25286, -26202, -27064, -27871, -28621, -29313, -29945, -30515, -31024, -31469, -31849, -32165, -32415, -32598, -32715, -32765, -32749, -32665, -32515, -32298, -32015, -31667, -31254, -30777, -30238, -29636, -28974, -28253, -27474, -26640, -25750, -24808, -23816, -22774, -21686, -20554, -19380, -18166, -16916, -15630, -14313, -12966, -11593, -10196, -8779, -7343, -5893, -4430, -2959, -1481} +}; \ No newline at end of file diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach_common.c b/openair1/PHY/NR_TRANSPORT/nr_prach_common.c index a95c519d43..8cc5951b19 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach_common.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach_common.c @@ -127,6 +127,8 @@ void compute_nr_prach_seq(uint8_t short_sequence, LOG_D( PHY, "compute_prach_seq: done init prach_tables\n" ); + int16_t *x_u_time = calloc(1, sizeof(int32_t)*N_ZC); + for (i=0; i>1); + x_u_time[k<<1] = (int16_t)nr_ru[nr_ru_index<<1]; + x_u_time[1+(k<<1)] = (int16_t)nr_ru[1+(nr_ru_index<<1)]; } + + int16_t *x_u_freq = (int16_t*)X_u[i]; + bzero(x_u_freq,sizeof(int32_t)*N_ZC); + for (int line=0; line>19); + x_u_freq[1+(line<<1)] = x_u_freq[1+(line<<1)] + (im>>19); + } + } + +#ifdef PRACH_DEBUG + for (k=0; k>16)); + } +#endif } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_OUT); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 1a330da02c..1d8f3a9caf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -523,9 +523,9 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, } else { LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); - LOG_I(NR_MAC,"[RAPROC] Received Msg3:\n"); + LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); for (int k = 0; k < sdu_lenP; k++) { - LOG_I(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); + LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); } // UE Contention Resolution Identity From 642c639406421df70a9d8826b9ead4cef91ed18c Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Thu, 18 Mar 2021 17:14:31 +0100 Subject: [PATCH 55/94] Revert "Fix preamble sequence" This reverts commit 9efe4187e72f25fd2936be5b9e4daa5473383afb --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- openair1/PHY/NR_TRANSPORT/nr_prach.h | 285 ------------------ openair1/PHY/NR_TRANSPORT/nr_prach_common.c | 27 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 +- 4 files changed, 5 insertions(+), 313 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 0c1fde07a2..1d971a8831 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -681,7 +681,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, preamble_shift -= NCS; if (preamble_shift < 0) - preamble_shift+=((N_ZC/NCS)*NCS); + preamble_shift+=N_ZC; } } else { // This is the high-speed case new_dft = 0; diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.h b/openair1/PHY/NR_TRANSPORT/nr_prach.h index d97689a5a6..d158e04c79 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.h +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.h @@ -93,288 +93,3 @@ uint16_t prach_root_sequence_map_abc[138] = { 51, 88 , 52, 87 , 53, 86 , 54, 85 , 55, 84 , 56, 83 , 57, 82 , 58, 81 , 59, 80 , 60, 79 , 61, 78 , 62, 77 , 63, 76 , 64, 75 , 65, 74 , 66, 73 , 67, 72 , 68, 71 , 69, 70 }; - -int16_t prach_fft139_re[139][139] = { -{32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767}, -{32767, 32733, 32633, 32466, 32232, 31933, 31569, 31140, 30647, 30092, 29475, 28799, 28063, 27270, 26421, 25519, 24564, 23559, 22506, 21406, 20264, 19079, 17856, 16596, 15303, 13978, 12624, 11245, 9843, 8421, 6981, 5527, 4062, 2589, 1110, -371, -1851, -3327, -4797, -6257, -7704, -9135, -10548, -11939, -13305, -14645, -15955, -17232, -18473, -19677, -20841, -21963, -23039, -24068, -25049, -25978, -26853, -27675, -28439, -29146, -29792, -30378, -30902, -31363, -31760, -32092, -32358, -32558, -32692, -32759, -32759, -32692, -32558, -32358, -32092, -31760, -31363, -30902, -30378, -29792, -29146, -28439, -27675, -26853, -25978, -25049, -24068, -23039, -21963, -20841, -19677, -18473, -17232, -15955, -14645, -13305, -11939, -10548, -9135, -7704, -6257, -4797, -3327, -1851, -371, 1110, 2589, 4062, 5527, 6981, 8421, 9843, 11245, 12624, 13978, 15303, 16596, 17856, 19079, 20264, 21406, 22506, 23559, 24564, 25519, 26421, 27270, 28063, 28799, 29475, 30092, 30647, 31140, 31569, 31933, 32232, 32466, 32633, 32733}, -{32767, 32633, 32232, 31569, 30647, 29475, 28063, 26421, 24564, 22506, 20264, 17856, 15303, 12624, 9843, 6981, 4062, 1110, -1851, -4797, -7704, -10548, -13305, -15955, -18473, -20841, -23039, -25049, -26853, -28439, -29792, -30902, -31760, -32358, -32692, -32759, -32558, -32092, -31363, -30378, -29146, -27675, -25978, -24068, -21963, -19677, -17232, -14645, -11939, -9135, -6257, -3327, -371, 2589, 5527, 8421, 11245, 13978, 16596, 19079, 21406, 23559, 25519, 27270, 28799, 30092, 31140, 31933, 32466, 32733, 32733, 32466, 31933, 31140, 30092, 28799, 27270, 25519, 23559, 21406, 19079, 16596, 13978, 11245, 8421, 5527, 2589, -371, -3327, -6257, -9135, -11939, -14645, -17232, -19677, -21963, -24068, -25978, -27675, -29146, -30378, -31363, -32092, -32558, -32759, -32692, -32358, -31760, -30902, -29792, -28439, -26853, -25049, -23039, -20841, -18473, -15955, -13305, -10548, -7704, -4797, -1851, 1110, 4062, 6981, 9843, 12624, 15303, 17856, 20264, 22506, 24564, 26421, 28063, 29475, 30647, 31569, 32232, 32633}, -{32767, 32466, 31569, 30092, 28063, 25519, 22506, 19079, 15303, 11245, 6981, 2589, -1851, -6257, -10548, -14645, -18473, -21963, -25049, -27675, -29792, -31363, -32358, -32759, -32558, -31760, -30378, -28439, -25978, -23039, -19677, -15955, -11939, -7704, -3327, 1110, 5527, 9843, 13978, 17856, 21406, 24564, 27270, 29475, 31140, 32232, 32733, 32633, 31933, 30647, 28799, 26421, 23559, 20264, 16596, 12624, 8421, 4062, -371, -4797, -9135, -13305, -17232, -20841, -24068, -26853, -29146, -30902, -32092, -32692, -32692, -32092, -30902, -29146, -26853, -24068, -20841, -17232, -13305, -9135, -4797, -371, 4062, 8421, 12624, 16596, 20264, 23559, 26421, 28799, 30647, 31933, 32633, 32733, 32232, 31140, 29475, 27270, 24564, 21406, 17856, 13978, 9843, 5527, 1110, -3327, -7704, -11939, -15955, -19677, -23039, -25978, -28439, -30378, -31760, -32558, -32759, -32358, -31363, -29792, -27675, -25049, -21963, -18473, -14645, -10548, -6257, -1851, 2589, 6981, 11245, 15303, 19079, 22506, 25519, 28063, 30092, 31569, 32466}, -{32767, 32232, 30647, 28063, 24564, 20264, 15303, 9843, 4062, -1851, -7704, -13305, -18473, -23039, -26853, -29792, -31760, -32692, -32558, -31363, -29146, -25978, -21963, -17232, -11939, -6257, -371, 5527, 11245, 16596, 21406, 25519, 28799, 31140, 32466, 32733, 31933, 30092, 27270, 23559, 19079, 13978, 8421, 2589, -3327, -9135, -14645, -19677, -24068, -27675, -30378, -32092, -32759, -32358, -30902, -28439, -25049, -20841, -15955, -10548, -4797, 1110, 6981, 12624, 17856, 22506, 26421, 29475, 31569, 32633, 32633, 31569, 29475, 26421, 22506, 17856, 12624, 6981, 1110, -4797, -10548, -15955, -20841, -25049, -28439, -30902, -32358, -32759, -32092, -30378, -27675, -24068, -19677, -14645, -9135, -3327, 2589, 8421, 13978, 19079, 23559, 27270, 30092, 31933, 32733, 32466, 31140, 28799, 25519, 21406, 16596, 11245, 5527, -371, -6257, -11939, -17232, -21963, -25978, -29146, -31363, -32558, -32692, -31760, -29792, -26853, -23039, -18473, -13305, -7704, -1851, 4062, 9843, 15303, 20264, 24564, 28063, 30647, 32232}, -{32767, 31933, 29475, 25519, 20264, 13978, 6981, -371, -7704, -14645, -20841, -25978, -29792, -32092, -32759, -31760, -29146, -25049, -19677, -13305, -6257, 1110, 8421, 15303, 21406, 26421, 30092, 32232, 32733, 31569, 28799, 24564, 19079, 12624, 5527, -1851, -9135, -15955, -21963, -26853, -30378, -32358, -32692, -31363, -28439, -24068, -18473, -11939, -4797, 2589, 9843, 16596, 22506, 27270, 30647, 32466, 32633, 31140, 28063, 23559, 17856, 11245, 4062, -3327, -10548, -17232, -23039, -27675, -30902, -32558, -32558, -30902, -27675, -23039, -17232, -10548, -3327, 4062, 11245, 17856, 23559, 28063, 31140, 32633, 32466, 30647, 27270, 22506, 16596, 9843, 2589, -4797, -11939, -18473, -24068, -28439, -31363, -32692, -32358, -30378, -26853, -21963, -15955, -9135, -1851, 5527, 12624, 19079, 24564, 28799, 31569, 32733, 32232, 30092, 26421, 21406, 15303, 8421, 1110, -6257, -13305, -19677, -25049, -29146, -31760, -32759, -32092, -29792, -25978, -20841, -14645, -7704, -371, 6981, 13978, 20264, 25519, 29475, 31933}, -{32767, 31569, 28063, 22506, 15303, 6981, -1851, -10548, -18473, -25049, -29792, -32358, -32558, -30378, -25978, -19677, -11939, -3327, 5527, 13978, 21406, 27270, 31140, 32733, 31933, 28799, 23559, 16596, 8421, -371, -9135, -17232, -24068, -29146, -32092, -32692, -30902, -26853, -20841, -13305, -4797, 4062, 12624, 20264, 26421, 30647, 32633, 32232, 29475, 24564, 17856, 9843, 1110, -7704, -15955, -23039, -28439, -31760, -32759, -31363, -27675, -21963, -14645, -6257, 2589, 11245, 19079, 25519, 30092, 32466, 32466, 30092, 25519, 19079, 11245, 2589, -6257, -14645, -21963, -27675, -31363, -32759, -31760, -28439, -23039, -15955, -7704, 1110, 9843, 17856, 24564, 29475, 32232, 32633, 30647, 26421, 20264, 12624, 4062, -4797, -13305, -20841, -26853, -30902, -32692, -32092, -29146, -24068, -17232, -9135, -371, 8421, 16596, 23559, 28799, 31933, 32733, 31140, 27270, 21406, 13978, 5527, -3327, -11939, -19677, -25978, -30378, -32558, -32358, -29792, -25049, -18473, -10548, -1851, 6981, 15303, 22506, 28063, 31569}, -{32767, 31140, 26421, 19079, 9843, -371, -10548, -19677, -26853, -31363, -32759, -30902, -25978, -18473, -9135, 1110, 11245, 20264, 27270, 31569, 32733, 30647, 25519, 17856, 8421, -1851, -11939, -20841, -27675, -31760, -32692, -30378, -25049, -17232, -7704, 2589, 12624, 21406, 28063, 31933, 32633, 30092, 24564, 16596, 6981, -3327, -13305, -21963, -28439, -32092, -32558, -29792, -24068, -15955, -6257, 4062, 13978, 22506, 28799, 32232, 32466, 29475, 23559, 15303, 5527, -4797, -14645, -23039, -29146, -32358, -32358, -29146, -23039, -14645, -4797, 5527, 15303, 23559, 29475, 32466, 32232, 28799, 22506, 13978, 4062, -6257, -15955, -24068, -29792, -32558, -32092, -28439, -21963, -13305, -3327, 6981, 16596, 24564, 30092, 32633, 31933, 28063, 21406, 12624, 2589, -7704, -17232, -25049, -30378, -32692, -31760, -27675, -20841, -11939, -1851, 8421, 17856, 25519, 30647, 32733, 31569, 27270, 20264, 11245, 1110, -9135, -18473, -25978, -30902, -32759, -31363, -26853, -19677, -10548, -371, 9843, 19079, 26421, 31140}, -{32767, 30647, 24564, 15303, 4062, -7704, -18473, -26853, -31760, -32558, -29146, -21963, -11939, -371, 11245, 21406, 28799, 32466, 31933, 27270, 19079, 8421, -3327, -14645, -24068, -30378, -32759, -30902, -25049, -15955, -4797, 6981, 17856, 26421, 31569, 32633, 29475, 22506, 12624, 1110, -10548, -20841, -28439, -32358, -32092, -27675, -19677, -9135, 2589, 13978, 23559, 30092, 32733, 31140, 25519, 16596, 5527, -6257, -17232, -25978, -31363, -32692, -29792, -23039, -13305, -1851, 9843, 20264, 28063, 32232, 32232, 28063, 20264, 9843, -1851, -13305, -23039, -29792, -32692, -31363, -25978, -17232, -6257, 5527, 16596, 25519, 31140, 32733, 30092, 23559, 13978, 2589, -9135, -19677, -27675, -32092, -32358, -28439, -20841, -10548, 1110, 12624, 22506, 29475, 32633, 31569, 26421, 17856, 6981, -4797, -15955, -25049, -30902, -32759, -30378, -24068, -14645, -3327, 8421, 19079, 27270, 31933, 32466, 28799, 21406, 11245, -371, -11939, -21963, -29146, -32558, -31760, -26853, -18473, -7704, 4062, 15303, 24564, 30647}, -{32767, 30092, 22506, 11245, -1851, -14645, -25049, -31363, -32558, -28439, -19677, -7704, 5527, 17856, 27270, 32232, 31933, 26421, 16596, 4062, -9135, -20841, -29146, -32692, -30902, -24068, -13305, -371, 12624, 23559, 30647, 32733, 29475, 21406, 9843, -3327, -15955, -25978, -31760, -32358, -27675, -18473, -6257, 6981, 19079, 28063, 32466, 31569, 25519, 15303, 2589, -10548, -21963, -29792, -32759, -30378, -23039, -11939, 1110, 13978, 24564, 31140, 32633, 28799, 20264, 8421, -4797, -17232, -26853, -32092, -32092, -26853, -17232, -4797, 8421, 20264, 28799, 32633, 31140, 24564, 13978, 1110, -11939, -23039, -30378, -32759, -29792, -21963, -10548, 2589, 15303, 25519, 31569, 32466, 28063, 19079, 6981, -6257, -18473, -27675, -32358, -31760, -25978, -15955, -3327, 9843, 21406, 29475, 32733, 30647, 23559, 12624, -371, -13305, -24068, -30902, -32692, -29146, -20841, -9135, 4062, 16596, 26421, 31933, 32232, 27270, 17856, 5527, -7704, -19677, -28439, -32558, -31363, -25049, -14645, -1851, 11245, 22506, 30092}, -{32767, 29475, 20264, 6981, -7704, -20841, -29792, -32759, -29146, -19677, -6257, 8421, 21406, 30092, 32733, 28799, 19079, 5527, -9135, -21963, -30378, -32692, -28439, -18473, -4797, 9843, 22506, 30647, 32633, 28063, 17856, 4062, -10548, -23039, -30902, -32558, -27675, -17232, -3327, 11245, 23559, 31140, 32466, 27270, 16596, 2589, -11939, -24068, -31363, -32358, -26853, -15955, -1851, 12624, 24564, 31569, 32232, 26421, 15303, 1110, -13305, -25049, -31760, -32092, -25978, -14645, -371, 13978, 25519, 31933, 31933, 25519, 13978, -371, -14645, -25978, -32092, -31760, -25049, -13305, 1110, 15303, 26421, 32232, 31569, 24564, 12624, -1851, -15955, -26853, -32358, -31363, -24068, -11939, 2589, 16596, 27270, 32466, 31140, 23559, 11245, -3327, -17232, -27675, -32558, -30902, -23039, -10548, 4062, 17856, 28063, 32633, 30647, 22506, 9843, -4797, -18473, -28439, -32692, -30378, -21963, -9135, 5527, 19079, 28799, 32733, 30092, 21406, 8421, -6257, -19677, -29146, -32759, -29792, -20841, -7704, 6981, 20264, 29475}, -{32767, 28799, 17856, 2589, -13305, -25978, -32358, -30902, -21963, -7704, 8421, 22506, 31140, 32232, 25519, 12624, -3327, -18473, -29146, -32759, -28439, -17232, -1851, 13978, 26421, 32466, 30647, 21406, 6981, -9135, -23039, -31363, -32092, -25049, -11939, 4062, 19079, 29475, 32733, 28063, 16596, 1110, -14645, -26853, -32558, -30378, -20841, -6257, 9843, 23559, 31569, 31933, 24564, 11245, -4797, -19677, -29792, -32692, -27675, -15955, -371, 15303, 27270, 32633, 30092, 20264, 5527, -10548, -24068, -31760, -31760, -24068, -10548, 5527, 20264, 30092, 32633, 27270, 15303, -371, -15955, -27675, -32692, -29792, -19677, -4797, 11245, 24564, 31933, 31569, 23559, 9843, -6257, -20841, -30378, -32558, -26853, -14645, 1110, 16596, 28063, 32733, 29475, 19079, 4062, -11939, -25049, -32092, -31363, -23039, -9135, 6981, 21406, 30647, 32466, 26421, 13978, -1851, -17232, -28439, -32759, -29146, -18473, -3327, 12624, 25519, 32232, 31140, 22506, 8421, -7704, -21963, -30902, -32358, -25978, -13305, 2589, 17856, 28799}, -{32767, 28063, 15303, -1851, -18473, -29792, -32558, -25978, -11939, 5527, 21406, 31140, 31933, 23559, 8421, -9135, -24068, -32092, -30902, -20841, -4797, 12624, 26421, 32633, 29475, 17856, 1110, -15955, -28439, -32759, -27675, -14645, 2589, 19079, 30092, 32466, 25519, 11245, -6257, -21963, -31363, -31760, -23039, -7704, 9843, 24564, 32232, 30647, 20264, 4062, -13305, -26853, -32692, -29146, -17232, -371, 16596, 28799, 32733, 27270, 13978, -3327, -19677, -30378, -32358, -25049, -10548, 6981, 22506, 31569, 31569, 22506, 6981, -10548, -25049, -32358, -30378, -19677, -3327, 13978, 27270, 32733, 28799, 16596, -371, -17232, -29146, -32692, -26853, -13305, 4062, 20264, 30647, 32232, 24564, 9843, -7704, -23039, -31760, -31363, -21963, -6257, 11245, 25519, 32466, 30092, 19079, 2589, -14645, -27675, -32759, -28439, -15955, 1110, 17856, 29475, 32633, 26421, 12624, -4797, -20841, -30902, -32092, -24068, -9135, 8421, 23559, 31933, 31140, 21406, 5527, -11939, -25978, -32558, -29792, -18473, -1851, 15303, 28063}, -{32767, 27270, 12624, -6257, -23039, -32092, -30378, -18473, -371, 17856, 30092, 32232, 23559, 6981, -11939, -26853, -32759, -27675, -13305, 5527, 22506, 31933, 30647, 19079, 1110, -17232, -29792, -32358, -24068, -7704, 11245, 26421, 32733, 28063, 13978, -4797, -21963, -31760, -30902, -19677, -1851, 16596, 29475, 32466, 24564, 8421, -10548, -25978, -32692, -28439, -14645, 4062, 21406, 31569, 31140, 20264, 2589, -15955, -29146, -32558, -25049, -9135, 9843, 25519, 32633, 28799, 15303, -3327, -20841, -31363, -31363, -20841, -3327, 15303, 28799, 32633, 25519, 9843, -9135, -25049, -32558, -29146, -15955, 2589, 20264, 31140, 31569, 21406, 4062, -14645, -28439, -32692, -25978, -10548, 8421, 24564, 32466, 29475, 16596, -1851, -19677, -30902, -31760, -21963, -4797, 13978, 28063, 32733, 26421, 11245, -7704, -24068, -32358, -29792, -17232, 1110, 19079, 30647, 31933, 22506, 5527, -13305, -27675, -32759, -26853, -11939, 6981, 23559, 32232, 30092, 17856, -371, -18473, -30378, -32092, -23039, -6257, 12624, 27270}, -{32767, 26421, 9843, -10548, -26853, -32759, -25978, -9135, 11245, 27270, 32733, 25519, 8421, -11939, -27675, -32692, -25049, -7704, 12624, 28063, 32633, 24564, 6981, -13305, -28439, -32558, -24068, -6257, 13978, 28799, 32466, 23559, 5527, -14645, -29146, -32358, -23039, -4797, 15303, 29475, 32232, 22506, 4062, -15955, -29792, -32092, -21963, -3327, 16596, 30092, 31933, 21406, 2589, -17232, -30378, -31760, -20841, -1851, 17856, 30647, 31569, 20264, 1110, -18473, -30902, -31363, -19677, -371, 19079, 31140, 31140, 19079, -371, -19677, -31363, -30902, -18473, 1110, 20264, 31569, 30647, 17856, -1851, -20841, -31760, -30378, -17232, 2589, 21406, 31933, 30092, 16596, -3327, -21963, -32092, -29792, -15955, 4062, 22506, 32232, 29475, 15303, -4797, -23039, -32358, -29146, -14645, 5527, 23559, 32466, 28799, 13978, -6257, -24068, -32558, -28439, -13305, 6981, 24564, 32633, 28063, 12624, -7704, -25049, -32692, -27675, -11939, 8421, 25519, 32733, 27270, 11245, -9135, -25978, -32759, -26853, -10548, 9843, 26421}, -{32767, 25519, 6981, -14645, -29792, -31760, -19677, 1110, 21406, 32232, 28799, 12624, -9135, -26853, -32692, -24068, -4797, 16596, 30647, 31140, 17856, -3327, -23039, -32558, -27675, -10548, 11245, 28063, 32466, 22506, 2589, -18473, -31363, -30378, -15955, 5527, 24564, 32733, 26421, 8421, -13305, -29146, -32092, -20841, -371, 20264, 31933, 29475, 13978, -7704, -25978, -32759, -25049, -6257, 15303, 30092, 31569, 19079, -1851, -21963, -32358, -28439, -11939, 9843, 27270, 32633, 23559, 4062, -17232, -30902, -30902, -17232, 4062, 23559, 32633, 27270, 9843, -11939, -28439, -32358, -21963, -1851, 19079, 31569, 30092, 15303, -6257, -25049, -32759, -25978, -7704, 13978, 29475, 31933, 20264, -371, -20841, -32092, -29146, -13305, 8421, 26421, 32733, 24564, 5527, -15955, -30378, -31363, -18473, 2589, 22506, 32466, 28063, 11245, -10548, -27675, -32558, -23039, -3327, 17856, 31140, 30647, 16596, -4797, -24068, -32692, -26853, -9135, 12624, 28799, 32232, 21406, 1110, -19677, -31760, -29792, -14645, 6981, 25519}, -{32767, 24564, 4062, -18473, -31760, -29146, -11939, 11245, 28799, 31933, 19079, -3327, -24068, -32759, -25049, -4797, 17856, 31569, 29475, 12624, -10548, -28439, -32092, -19677, 2589, 23559, 32733, 25519, 5527, -17232, -31363, -29792, -13305, 9843, 28063, 32232, 20264, -1851, -23039, -32692, -25978, -6257, 16596, 31140, 30092, 13978, -9135, -27675, -32358, -20841, 1110, 22506, 32633, 26421, 6981, -15955, -30902, -30378, -14645, 8421, 27270, 32466, 21406, -371, -21963, -32558, -26853, -7704, 15303, 30647, 30647, 15303, -7704, -26853, -32558, -21963, -371, 21406, 32466, 27270, 8421, -14645, -30378, -30902, -15955, 6981, 26421, 32633, 22506, 1110, -20841, -32358, -27675, -9135, 13978, 30092, 31140, 16596, -6257, -25978, -32692, -23039, -1851, 20264, 32232, 28063, 9843, -13305, -29792, -31363, -17232, 5527, 25519, 32733, 23559, 2589, -19677, -32092, -28439, -10548, 12624, 29475, 31569, 17856, -4797, -25049, -32759, -24068, -3327, 19079, 31933, 28799, 11245, -11939, -29146, -31760, -18473, 4062, 24564}, -{32767, 23559, 1110, -21963, -32692, -25049, -3327, 20264, 32466, 26421, 5527, -18473, -32092, -27675, -7704, 16596, 31569, 28799, 9843, -14645, -30902, -29792, -11939, 12624, 30092, 30647, 13978, -10548, -29146, -31363, -15955, 8421, 28063, 31933, 17856, -6257, -26853, -32358, -19677, 4062, 25519, 32633, 21406, -1851, -24068, -32759, -23039, -371, 22506, 32733, 24564, 2589, -20841, -32558, -25978, -4797, 19079, 32232, 27270, 6981, -17232, -31760, -28439, -9135, 15303, 31140, 29475, 11245, -13305, -30378, -30378, -13305, 11245, 29475, 31140, 15303, -9135, -28439, -31760, -17232, 6981, 27270, 32232, 19079, -4797, -25978, -32558, -20841, 2589, 24564, 32733, 22506, -371, -23039, -32759, -24068, -1851, 21406, 32633, 25519, 4062, -19677, -32358, -26853, -6257, 17856, 31933, 28063, 8421, -15955, -31363, -29146, -10548, 13978, 30647, 30092, 12624, -11939, -29792, -30902, -14645, 9843, 28799, 31569, 16596, -7704, -27675, -32092, -18473, 5527, 26421, 32466, 20264, -3327, -25049, -32692, -21963, 1110, 23559}, -{32767, 22506, -1851, -25049, -32558, -19677, 5527, 27270, 31933, 16596, -9135, -29146, -30902, -13305, 12624, 30647, 29475, 9843, -15955, -31760, -27675, -6257, 19079, 32466, 25519, 2589, -21963, -32759, -23039, 1110, 24564, 32633, 20264, -4797, -26853, -32092, -17232, 8421, 28799, 31140, 13978, -11939, -30378, -29792, -10548, 15303, 31569, 28063, 6981, -18473, -32358, -25978, -3327, 21406, 32733, 23559, -371, -24068, -32692, -20841, 4062, 26421, 32232, 17856, -7704, -28439, -31363, -14645, 11245, 30092, 30092, 11245, -14645, -31363, -28439, -7704, 17856, 32232, 26421, 4062, -20841, -32692, -24068, -371, 23559, 32733, 21406, -3327, -25978, -32358, -18473, 6981, 28063, 31569, 15303, -10548, -29792, -30378, -11939, 13978, 31140, 28799, 8421, -17232, -32092, -26853, -4797, 20264, 32633, 24564, 1110, -23039, -32759, -21963, 2589, 25519, 32466, 19079, -6257, -27675, -31760, -15955, 9843, 29475, 30647, 12624, -13305, -30902, -29146, -9135, 16596, 31933, 27270, 5527, -19677, -32558, -25049, -1851, 22506}, -{32767, 21406, -4797, -27675, -31363, -13305, 13978, 31569, 27270, 4062, -21963, -32759, -20841, 5527, 28063, 31140, 12624, -14645, -31760, -26853, -3327, 22506, 32733, 20264, -6257, -28439, -30902, -11939, 15303, 31933, 26421, 2589, -23039, -32692, -19677, 6981, 28799, 30647, 11245, -15955, -32092, -25978, -1851, 23559, 32633, 19079, -7704, -29146, -30378, -10548, 16596, 32232, 25519, 1110, -24068, -32558, -18473, 8421, 29475, 30092, 9843, -17232, -32358, -25049, -371, 24564, 32466, 17856, -9135, -29792, -29792, -9135, 17856, 32466, 24564, -371, -25049, -32358, -17232, 9843, 30092, 29475, 8421, -18473, -32558, -24068, 1110, 25519, 32232, 16596, -10548, -30378, -29146, -7704, 19079, 32633, 23559, -1851, -25978, -32092, -15955, 11245, 30647, 28799, 6981, -19677, -32692, -23039, 2589, 26421, 31933, 15303, -11939, -30902, -28439, -6257, 20264, 32733, 22506, -3327, -26853, -31760, -14645, 12624, 31140, 28063, 5527, -20841, -32759, -21963, 4062, 27270, 31569, 13978, -13305, -31363, -27675, -4797, 21406}, -{32767, 20264, -7704, -29792, -29146, -6257, 21406, 32733, 19079, -9135, -30378, -28439, -4797, 22506, 32633, 17856, -10548, -30902, -27675, -3327, 23559, 32466, 16596, -11939, -31363, -26853, -1851, 24564, 32232, 15303, -13305, -31760, -25978, -371, 25519, 31933, 13978, -14645, -32092, -25049, 1110, 26421, 31569, 12624, -15955, -32358, -24068, 2589, 27270, 31140, 11245, -17232, -32558, -23039, 4062, 28063, 30647, 9843, -18473, -32692, -21963, 5527, 28799, 30092, 8421, -19677, -32759, -20841, 6981, 29475, 29475, 6981, -20841, -32759, -19677, 8421, 30092, 28799, 5527, -21963, -32692, -18473, 9843, 30647, 28063, 4062, -23039, -32558, -17232, 11245, 31140, 27270, 2589, -24068, -32358, -15955, 12624, 31569, 26421, 1110, -25049, -32092, -14645, 13978, 31933, 25519, -371, -25978, -31760, -13305, 15303, 32232, 24564, -1851, -26853, -31363, -11939, 16596, 32466, 23559, -3327, -27675, -30902, -10548, 17856, 32633, 22506, -4797, -28439, -30378, -9135, 19079, 32733, 21406, -6257, -29146, -29792, -7704, 20264}, -{32767, 19079, -10548, -31363, -25978, 1110, 27270, 30647, 8421, -20841, -32692, -17232, 12624, 31933, 24564, -3327, -28439, -29792, -6257, 22506, 32466, 15303, -14645, -32358, -23039, 5527, 29475, 28799, 4062, -24068, -32092, -13305, 16596, 32633, 21406, -7704, -30378, -27675, -1851, 25519, 31569, 11245, -18473, -32759, -19677, 9843, 31140, 26421, -371, -26853, -30902, -9135, 20264, 32733, 17856, -11939, -31760, -25049, 2589, 28063, 30092, 6981, -21963, -32558, -15955, 13978, 32232, 23559, -4797, -29146, -29146, -4797, 23559, 32232, 13978, -15955, -32558, -21963, 6981, 30092, 28063, 2589, -25049, -31760, -11939, 17856, 32733, 20264, -9135, -30902, -26853, -371, 26421, 31140, 9843, -19677, -32759, -18473, 11245, 31569, 25519, -1851, -27675, -30378, -7704, 21406, 32633, 16596, -13305, -32092, -24068, 4062, 28799, 29475, 5527, -23039, -32358, -14645, 15303, 32466, 22506, -6257, -29792, -28439, -3327, 24564, 31933, 12624, -17232, -32692, -20841, 8421, 30647, 27270, 1110, -25978, -31363, -10548, 19079}, -{32767, 17856, -13305, -32358, -21963, 8421, 31140, 25519, -3327, -29146, -28439, -1851, 26421, 30647, 6981, -23039, -32092, -11939, 19079, 32733, 16596, -14645, -32558, -20841, 9843, 31569, 24564, -4797, -29792, -27675, -371, 27270, 30092, 5527, -24068, -31760, -10548, 20264, 32633, 15303, -15955, -32692, -19677, 11245, 31933, 23559, -6257, -30378, -26853, 1110, 28063, 29475, 4062, -25049, -31363, -9135, 21406, 32466, 13978, -17232, -32759, -18473, 12624, 32232, 22506, -7704, -30902, -25978, 2589, 28799, 28799, 2589, -25978, -30902, -7704, 22506, 32232, 12624, -18473, -32759, -17232, 13978, 32466, 21406, -9135, -31363, -25049, 4062, 29475, 28063, 1110, -26853, -30378, -6257, 23559, 31933, 11245, -19677, -32692, -15955, 15303, 32633, 20264, -10548, -31760, -24068, 5527, 30092, 27270, -371, -27675, -29792, -4797, 24564, 31569, 9843, -20841, -32558, -14645, 16596, 32733, 19079, -11939, -32092, -23039, 6981, 30647, 26421, -1851, -28439, -29146, -3327, 25519, 31140, 8421, -21963, -32358, -13305, 17856}, -{32767, 16596, -15955, -32759, -17232, 15303, 32733, 17856, -14645, -32692, -18473, 13978, 32633, 19079, -13305, -32558, -19677, 12624, 32466, 20264, -11939, -32358, -20841, 11245, 32232, 21406, -10548, -32092, -21963, 9843, 31933, 22506, -9135, -31760, -23039, 8421, 31569, 23559, -7704, -31363, -24068, 6981, 31140, 24564, -6257, -30902, -25049, 5527, 30647, 25519, -4797, -30378, -25978, 4062, 30092, 26421, -3327, -29792, -26853, 2589, 29475, 27270, -1851, -29146, -27675, 1110, 28799, 28063, -371, -28439, -28439, -371, 28063, 28799, 1110, -27675, -29146, -1851, 27270, 29475, 2589, -26853, -29792, -3327, 26421, 30092, 4062, -25978, -30378, -4797, 25519, 30647, 5527, -25049, -30902, -6257, 24564, 31140, 6981, -24068, -31363, -7704, 23559, 31569, 8421, -23039, -31760, -9135, 22506, 31933, 9843, -21963, -32092, -10548, 21406, 32232, 11245, -20841, -32358, -11939, 20264, 32466, 12624, -19677, -32558, -13305, 19079, 32633, 13978, -18473, -32692, -14645, 17856, 32733, 15303, -17232, -32759, -15955, 16596}, -{32767, 15303, -18473, -32558, -11939, 21406, 31933, 8421, -24068, -30902, -4797, 26421, 29475, 1110, -28439, -27675, 2589, 30092, 25519, -6257, -31363, -23039, 9843, 32232, 20264, -13305, -32692, -17232, 16596, 32733, 13978, -19677, -32358, -10548, 22506, 31569, 6981, -25049, -30378, -3327, 27270, 28799, -371, -29146, -26853, 4062, 30647, 24564, -7704, -31760, -21963, 11245, 32466, 19079, -14645, -32759, -15955, 17856, 32633, 12624, -20841, -32092, -9135, 23559, 31140, 5527, -25978, -29792, -1851, 28063, 28063, -1851, -29792, -25978, 5527, 31140, 23559, -9135, -32092, -20841, 12624, 32633, 17856, -15955, -32759, -14645, 19079, 32466, 11245, -21963, -31760, -7704, 24564, 30647, 4062, -26853, -29146, -371, 28799, 27270, -3327, -30378, -25049, 6981, 31569, 22506, -10548, -32358, -19677, 13978, 32733, 16596, -17232, -32692, -13305, 20264, 32232, 9843, -23039, -31363, -6257, 25519, 30092, 2589, -27675, -28439, 1110, 29475, 26421, -4797, -30902, -24068, 8421, 31933, 21406, -11939, -32558, -18473, 15303}, -{32767, 13978, -20841, -31760, -6257, 26421, 28799, -1851, -30378, -24068, 9843, 32466, 17856, -17232, -32558, -10548, 23559, 30647, 2589, -28439, -26853, 5527, 31569, 21406, -13305, -32759, -14645, 20264, 31933, 6981, -25978, -29146, 1110, 30092, 24564, -9135, -32358, -18473, 16596, 32633, 11245, -23039, -30902, -3327, 28063, 27270, -4797, -31363, -21963, 12624, 32733, 15303, -19677, -32092, -7704, 25519, 29475, -371, -29792, -25049, 8421, 32232, 19079, -15955, -32692, -11939, 22506, 31140, 4062, -27675, -27675, 4062, 31140, 22506, -11939, -32692, -15955, 19079, 32232, 8421, -25049, -29792, -371, 29475, 25519, -7704, -32092, -19677, 15303, 32733, 12624, -21963, -31363, -4797, 27270, 28063, -3327, -30902, -23039, 11245, 32633, 16596, -18473, -32358, -9135, 24564, 30092, 1110, -29146, -25978, 6981, 31933, 20264, -14645, -32759, -13305, 21406, 31569, 5527, -26853, -28439, 2589, 30647, 23559, -10548, -32558, -17232, 17856, 32466, 9843, -24068, -30378, -1851, 28799, 26421, -6257, -31760, -20841, 13978}, -{32767, 12624, -23039, -30378, -371, 30092, 23559, -11939, -32759, -13305, 22506, 30647, 1110, -29792, -24068, 11245, 32733, 13978, -21963, -30902, -1851, 29475, 24564, -10548, -32692, -14645, 21406, 31140, 2589, -29146, -25049, 9843, 32633, 15303, -20841, -31363, -3327, 28799, 25519, -9135, -32558, -15955, 20264, 31569, 4062, -28439, -25978, 8421, 32466, 16596, -19677, -31760, -4797, 28063, 26421, -7704, -32358, -17232, 19079, 31933, 5527, -27675, -26853, 6981, 32232, 17856, -18473, -32092, -6257, 27270, 27270, -6257, -32092, -18473, 17856, 32232, 6981, -26853, -27675, 5527, 31933, 19079, -17232, -32358, -7704, 26421, 28063, -4797, -31760, -19677, 16596, 32466, 8421, -25978, -28439, 4062, 31569, 20264, -15955, -32558, -9135, 25519, 28799, -3327, -31363, -20841, 15303, 32633, 9843, -25049, -29146, 2589, 31140, 21406, -14645, -32692, -10548, 24564, 29475, -1851, -30902, -21963, 13978, 32733, 11245, -24068, -29792, 1110, 30647, 22506, -13305, -32759, -11939, 23559, 30092, -371, -30378, -23039, 12624}, -{32767, 11245, -25049, -28439, 5527, 32232, 16596, -20841, -30902, -371, 30647, 21406, -15955, -32358, -6257, 28063, 25519, -10548, -32759, -11939, 24564, 28799, -4797, -32092, -17232, 20264, 31140, 1110, -30378, -21963, 15303, 32466, 6981, -27675, -25978, 9843, 32733, 12624, -24068, -29146, 4062, 31933, 17856, -19677, -31363, -1851, 30092, 22506, -14645, -32558, -7704, 27270, 26421, -9135, -32692, -13305, 23559, 29475, -3327, -31760, -18473, 19079, 31569, 2589, -29792, -23039, 13978, 32633, 8421, -26853, -26853, 8421, 32633, 13978, -23039, -29792, 2589, 31569, 19079, -18473, -31760, -3327, 29475, 23559, -13305, -32692, -9135, 26421, 27270, -7704, -32558, -14645, 22506, 30092, -1851, -31363, -19677, 17856, 31933, 4062, -29146, -24068, 12624, 32733, 9843, -25978, -27675, 6981, 32466, 15303, -21963, -30378, 1110, 31140, 20264, -17232, -32092, -4797, 28799, 24564, -11939, -32759, -10548, 25519, 28063, -6257, -32358, -15955, 21406, 30647, -371, -30902, -20841, 16596, 32232, 5527, -28439, -25049, 11245}, -{32767, 9843, -26853, -25978, 11245, 32733, 8421, -27675, -25049, 12624, 32633, 6981, -28439, -24068, 13978, 32466, 5527, -29146, -23039, 15303, 32232, 4062, -29792, -21963, 16596, 31933, 2589, -30378, -20841, 17856, 31569, 1110, -30902, -19677, 19079, 31140, -371, -31363, -18473, 20264, 30647, -1851, -31760, -17232, 21406, 30092, -3327, -32092, -15955, 22506, 29475, -4797, -32358, -14645, 23559, 28799, -6257, -32558, -13305, 24564, 28063, -7704, -32692, -11939, 25519, 27270, -9135, -32759, -10548, 26421, 26421, -10548, -32759, -9135, 27270, 25519, -11939, -32692, -7704, 28063, 24564, -13305, -32558, -6257, 28799, 23559, -14645, -32358, -4797, 29475, 22506, -15955, -32092, -3327, 30092, 21406, -17232, -31760, -1851, 30647, 20264, -18473, -31363, -371, 31140, 19079, -19677, -30902, 1110, 31569, 17856, -20841, -30378, 2589, 31933, 16596, -21963, -29792, 4062, 32232, 15303, -23039, -29146, 5527, 32466, 13978, -24068, -28439, 6981, 32633, 12624, -25049, -27675, 8421, 32733, 11245, -25978, -26853, 9843}, -{32767, 8421, -28439, -23039, 16596, 31569, -371, -31760, -15955, 23559, 28063, -9135, -32759, -7704, 28799, 22506, -17232, -31363, 1110, 31933, 15303, -24068, -27675, 9843, 32733, 6981, -29146, -21963, 17856, 31140, -1851, -32092, -14645, 24564, 27270, -10548, -32692, -6257, 29475, 21406, -18473, -30902, 2589, 32232, 13978, -25049, -26853, 11245, 32633, 5527, -29792, -20841, 19079, 30647, -3327, -32358, -13305, 25519, 26421, -11939, -32558, -4797, 30092, 20264, -19677, -30378, 4062, 32466, 12624, -25978, -25978, 12624, 32466, 4062, -30378, -19677, 20264, 30092, -4797, -32558, -11939, 26421, 25519, -13305, -32358, -3327, 30647, 19079, -20841, -29792, 5527, 32633, 11245, -26853, -25049, 13978, 32232, 2589, -30902, -18473, 21406, 29475, -6257, -32692, -10548, 27270, 24564, -14645, -32092, -1851, 31140, 17856, -21963, -29146, 6981, 32733, 9843, -27675, -24068, 15303, 31933, 1110, -31363, -17232, 22506, 28799, -7704, -32759, -9135, 28063, 23559, -15955, -31760, -371, 31569, 16596, -23039, -28439, 8421}, -{32767, 6981, -29792, -19677, 21406, 28799, -9135, -32692, -4797, 30647, 17856, -23039, -27675, 11245, 32466, 2589, -31363, -15955, 24564, 26421, -13305, -32092, -371, 31933, 13978, -25978, -25049, 15303, 31569, -1851, -32358, -11939, 27270, 23559, -17232, -30902, 4062, 32633, 9843, -28439, -21963, 19079, 30092, -6257, -32759, -7704, 29475, 20264, -20841, -29146, 8421, 32733, 5527, -30378, -18473, 22506, 28063, -10548, -32558, -3327, 31140, 16596, -24068, -26853, 12624, 32232, 1110, -31760, -14645, 25519, 25519, -14645, -31760, 1110, 32232, 12624, -26853, -24068, 16596, 31140, -3327, -32558, -10548, 28063, 22506, -18473, -30378, 5527, 32733, 8421, -29146, -20841, 20264, 29475, -7704, -32759, -6257, 30092, 19079, -21963, -28439, 9843, 32633, 4062, -30902, -17232, 23559, 27270, -11939, -32358, -1851, 31569, 15303, -25049, -25978, 13978, 31933, -371, -32092, -13305, 26421, 24564, -15955, -31363, 2589, 32466, 11245, -27675, -23039, 17856, 30647, -4797, -32692, -9135, 28799, 21406, -19677, -29792, 6981}, -{32767, 5527, -30902, -15955, 25519, 24564, -17232, -30378, 6981, 32733, 4062, -31363, -14645, 26421, 23559, -18473, -29792, 8421, 32633, 2589, -31760, -13305, 27270, 22506, -19677, -29146, 9843, 32466, 1110, -32092, -11939, 28063, 21406, -20841, -28439, 11245, 32232, -371, -32358, -10548, 28799, 20264, -21963, -27675, 12624, 31933, -1851, -32558, -9135, 29475, 19079, -23039, -26853, 13978, 31569, -3327, -32692, -7704, 30092, 17856, -24068, -25978, 15303, 31140, -4797, -32759, -6257, 30647, 16596, -25049, -25049, 16596, 30647, -6257, -32759, -4797, 31140, 15303, -25978, -24068, 17856, 30092, -7704, -32692, -3327, 31569, 13978, -26853, -23039, 19079, 29475, -9135, -32558, -1851, 31933, 12624, -27675, -21963, 20264, 28799, -10548, -32358, -371, 32232, 11245, -28439, -20841, 21406, 28063, -11939, -32092, 1110, 32466, 9843, -29146, -19677, 22506, 27270, -13305, -31760, 2589, 32633, 8421, -29792, -18473, 23559, 26421, -14645, -31363, 4062, 32733, 6981, -30378, -17232, 24564, 25519, -15955, -30902, 5527}, -{32767, 4062, -31760, -11939, 28799, 19079, -24068, -25049, 17856, 29475, -10548, -32092, 2589, 32733, 5527, -31363, -13305, 28063, 20264, -23039, -25978, 16596, 30092, -9135, -32358, 1110, 32633, 6981, -30902, -14645, 27270, 21406, -21963, -26853, 15303, 30647, -7704, -32558, -371, 32466, 8421, -30378, -15955, 26421, 22506, -20841, -27675, 13978, 31140, -6257, -32692, -1851, 32232, 9843, -29792, -17232, 25519, 23559, -19677, -28439, 12624, 31569, -4797, -32759, -3327, 31933, 11245, -29146, -18473, 24564, 24564, -18473, -29146, 11245, 31933, -3327, -32759, -4797, 31569, 12624, -28439, -19677, 23559, 25519, -17232, -29792, 9843, 32232, -1851, -32692, -6257, 31140, 13978, -27675, -20841, 22506, 26421, -15955, -30378, 8421, 32466, -371, -32558, -7704, 30647, 15303, -26853, -21963, 21406, 27270, -14645, -30902, 6981, 32633, 1110, -32358, -9135, 30092, 16596, -25978, -23039, 20264, 28063, -13305, -31363, 5527, 32733, 2589, -32092, -10548, 29475, 17856, -25049, -24068, 19079, 28799, -11939, -31760, 4062}, -{32767, 2589, -32358, -7704, 31140, 12624, -29146, -17232, 26421, 21406, -23039, -25049, 19079, 28063, -14645, -30378, 9843, 31933, -4797, -32692, -371, 32633, 5527, -31760, -10548, 30092, 15303, -27675, -19677, 24564, 23559, -20841, -26853, 16596, 29475, -11939, -31363, 6981, 32466, -1851, -32759, -3327, 32232, 8421, -30902, -13305, 28799, 17856, -25978, -21963, 22506, 25519, -18473, -28439, 13978, 30647, -9135, -32092, 4062, 32733, 1110, -32558, -6257, 31569, 11245, -29792, -15955, 27270, 20264, -24068, -24068, 20264, 27270, -15955, -29792, 11245, 31569, -6257, -32558, 1110, 32733, 4062, -32092, -9135, 30647, 13978, -28439, -18473, 25519, 22506, -21963, -25978, 17856, 28799, -13305, -30902, 8421, 32232, -3327, -32759, -1851, 32466, 6981, -31363, -11939, 29475, 16596, -26853, -20841, 23559, 24564, -19677, -27675, 15303, 30092, -10548, -31760, 5527, 32633, -371, -32692, -4797, 31933, 9843, -30378, -14645, 28063, 19079, -25049, -23039, 21406, 26421, -17232, -29146, 12624, 31140, -7704, -32358, 2589}, -{32767, 1110, -32692, -3327, 32466, 5527, -32092, -7704, 31569, 9843, -30902, -11939, 30092, 13978, -29146, -15955, 28063, 17856, -26853, -19677, 25519, 21406, -24068, -23039, 22506, 24564, -20841, -25978, 19079, 27270, -17232, -28439, 15303, 29475, -13305, -30378, 11245, 31140, -9135, -31760, 6981, 32232, -4797, -32558, 2589, 32733, -371, -32759, -1851, 32633, 4062, -32358, -6257, 31933, 8421, -31363, -10548, 30647, 12624, -29792, -14645, 28799, 16596, -27675, -18473, 26421, 20264, -25049, -21963, 23559, 23559, -21963, -25049, 20264, 26421, -18473, -27675, 16596, 28799, -14645, -29792, 12624, 30647, -10548, -31363, 8421, 31933, -6257, -32358, 4062, 32633, -1851, -32759, -371, 32733, 2589, -32558, -4797, 32232, 6981, -31760, -9135, 31140, 11245, -30378, -13305, 29475, 15303, -28439, -17232, 27270, 19079, -25978, -20841, 24564, 22506, -23039, -24068, 21406, 25519, -19677, -26853, 17856, 28063, -15955, -29146, 13978, 30092, -11939, -30902, 9843, 31569, -7704, -32092, 5527, 32466, -3327, -32692, 1110}, -{32767, -371, -32759, 1110, 32733, -1851, -32692, 2589, 32633, -3327, -32558, 4062, 32466, -4797, -32358, 5527, 32232, -6257, -32092, 6981, 31933, -7704, -31760, 8421, 31569, -9135, -31363, 9843, 31140, -10548, -30902, 11245, 30647, -11939, -30378, 12624, 30092, -13305, -29792, 13978, 29475, -14645, -29146, 15303, 28799, -15955, -28439, 16596, 28063, -17232, -27675, 17856, 27270, -18473, -26853, 19079, 26421, -19677, -25978, 20264, 25519, -20841, -25049, 21406, 24564, -21963, -24068, 22506, 23559, -23039, -23039, 23559, 22506, -24068, -21963, 24564, 21406, -25049, -20841, 25519, 20264, -25978, -19677, 26421, 19079, -26853, -18473, 27270, 17856, -27675, -17232, 28063, 16596, -28439, -15955, 28799, 15303, -29146, -14645, 29475, 13978, -29792, -13305, 30092, 12624, -30378, -11939, 30647, 11245, -30902, -10548, 31140, 9843, -31363, -9135, 31569, 8421, -31760, -7704, 31933, 6981, -32092, -6257, 32232, 5527, -32358, -4797, 32466, 4062, -32558, -3327, 32633, 2589, -32692, -1851, 32733, 1110, -32759, -371}, -{32767, -1851, -32558, 5527, 31933, -9135, -30902, 12624, 29475, -15955, -27675, 19079, 25519, -21963, -23039, 24564, 20264, -26853, -17232, 28799, 13978, -30378, -10548, 31569, 6981, -32358, -3327, 32733, -371, -32692, 4062, 32232, -7704, -31363, 11245, 30092, -14645, -28439, 17856, 26421, -20841, -24068, 23559, 21406, -25978, -18473, 28063, 15303, -29792, -11939, 31140, 8421, -32092, -4797, 32633, 1110, -32759, 2589, 32466, -6257, -31760, 9843, 30647, -13305, -29146, 16596, 27270, -19677, -25049, 22506, 22506, -25049, -19677, 27270, 16596, -29146, -13305, 30647, 9843, -31760, -6257, 32466, 2589, -32759, 1110, 32633, -4797, -32092, 8421, 31140, -11939, -29792, 15303, 28063, -18473, -25978, 21406, 23559, -24068, -20841, 26421, 17856, -28439, -14645, 30092, 11245, -31363, -7704, 32232, 4062, -32692, -371, 32733, -3327, -32358, 6981, 31569, -10548, -30378, 13978, 28799, -17232, -26853, 20264, 24564, -23039, -21963, 25519, 19079, -27675, -15955, 29475, 12624, -30902, -9135, 31933, 5527, -32558, -1851}, -{32767, -3327, -32092, 9843, 30092, -15955, -26853, 21406, 22506, -25978, -17232, 29475, 11245, -31760, -4797, 32733, -1851, -32358, 8421, 30647, -14645, -27675, 20264, 23559, -25049, -18473, 28799, 12624, -31363, -6257, 32633, -371, -32558, 6981, 31140, -13305, -28439, 19079, 24564, -24068, -19677, 28063, 13978, -30902, -7704, 32466, 1110, -32692, 5527, 31569, -11939, -29146, 17856, 25519, -23039, -20841, 27270, 15303, -30378, -9135, 32232, 2589, -32759, 4062, 31933, -10548, -29792, 16596, 26421, -21963, -21963, 26421, 16596, -29792, -10548, 31933, 4062, -32759, 2589, 32232, -9135, -30378, 15303, 27270, -20841, -23039, 25519, 17856, -29146, -11939, 31569, 5527, -32692, 1110, 32466, -7704, -30902, 13978, 28063, -19677, -24068, 24564, 19079, -28439, -13305, 31140, 6981, -32558, -371, 32633, -6257, -31363, 12624, 28799, -18473, -25049, 23559, 20264, -27675, -14645, 30647, 8421, -32358, -1851, 32733, -4797, -31760, 11245, 29475, -17232, -25978, 22506, 21406, -26853, -15955, 30092, 9843, -32092, -3327}, -{32767, -4797, -31363, 13978, 27270, -21963, -20841, 28063, 12624, -31760, -3327, 32733, -6257, -30902, 15303, 26421, -23039, -19677, 28799, 11245, -32092, -1851, 32633, -7704, -30378, 16596, 25519, -24068, -18473, 29475, 9843, -32358, -371, 32466, -9135, -29792, 17856, 24564, -25049, -17232, 30092, 8421, -32558, 1110, 32232, -10548, -29146, 19079, 23559, -25978, -15955, 30647, 6981, -32692, 2589, 31933, -11939, -28439, 20264, 22506, -26853, -14645, 31140, 5527, -32759, 4062, 31569, -13305, -27675, 21406, 21406, -27675, -13305, 31569, 4062, -32759, 5527, 31140, -14645, -26853, 22506, 20264, -28439, -11939, 31933, 2589, -32692, 6981, 30647, -15955, -25978, 23559, 19079, -29146, -10548, 32232, 1110, -32558, 8421, 30092, -17232, -25049, 24564, 17856, -29792, -9135, 32466, -371, -32358, 9843, 29475, -18473, -24068, 25519, 16596, -30378, -7704, 32633, -1851, -32092, 11245, 28799, -19677, -23039, 26421, 15303, -30902, -6257, 32733, -3327, -31760, 12624, 28063, -20841, -21963, 27270, 13978, -31363, -4797}, -{32767, -6257, -30378, 17856, 23559, -26853, -13305, 31933, 1110, -32358, 11245, 28063, -21963, -19677, 29475, 8421, -32692, 4062, 31140, -15955, -25049, 25519, 15303, -31363, -3327, 32633, -9135, -29146, 20264, 21406, -28439, -10548, 32466, -1851, -31760, 13978, 26421, -24068, -17232, 30647, 5527, -32759, 6981, 30092, -18473, -23039, 27270, 12624, -32092, -371, 32232, -11939, -27675, 22506, 19079, -29792, -7704, 32733, -4797, -30902, 16596, 24564, -25978, -14645, 31569, 2589, -32558, 9843, 28799, -20841, -20841, 28799, 9843, -32558, 2589, 31569, -14645, -25978, 24564, 16596, -30902, -4797, 32733, -7704, -29792, 19079, 22506, -27675, -11939, 32232, -371, -32092, 12624, 27270, -23039, -18473, 30092, 6981, -32759, 5527, 30647, -17232, -24068, 26421, 13978, -31760, -1851, 32466, -10548, -28439, 21406, 20264, -29146, -9135, 32633, -3327, -31363, 15303, 25519, -25049, -15955, 31140, 4062, -32692, 8421, 29475, -19677, -21963, 28063, 11245, -32358, 1110, 31933, -13305, -26853, 23559, 17856, -30378, -6257}, -{32767, -7704, -29146, 21406, 19079, -30378, -4797, 32633, -10548, -27675, 23559, 16596, -31363, -1851, 32232, -13305, -25978, 25519, 13978, -32092, 1110, 31569, -15955, -24068, 27270, 11245, -32558, 4062, 30647, -18473, -21963, 28799, 8421, -32759, 6981, 29475, -20841, -19677, 30092, 5527, -32692, 9843, 28063, -23039, -17232, 31140, 2589, -32358, 12624, 26421, -25049, -14645, 31933, -371, -31760, 15303, 24564, -26853, -11939, 32466, -3327, -30902, 17856, 22506, -28439, -9135, 32733, -6257, -29792, 20264, 20264, -29792, -6257, 32733, -9135, -28439, 22506, 17856, -30902, -3327, 32466, -11939, -26853, 24564, 15303, -31760, -371, 31933, -14645, -25049, 26421, 12624, -32358, 2589, 31140, -17232, -23039, 28063, 9843, -32692, 5527, 30092, -19677, -20841, 29475, 6981, -32759, 8421, 28799, -21963, -18473, 30647, 4062, -32558, 11245, 27270, -24068, -15955, 31569, 1110, -32092, 13978, 25519, -25978, -13305, 32232, -1851, -31363, 16596, 23559, -27675, -10548, 32633, -4797, -30378, 19079, 21406, -29146, -7704}, -{32767, -9135, -27675, 24564, 13978, -32358, 4062, 30092, -20841, -18473, 31140, 1110, -31760, 16596, 22506, -29146, -6257, 32633, -11939, -25978, 26421, 11245, -32692, 6981, 28799, -23039, -15955, 31933, -1851, -30902, 19079, 20264, -30378, -3327, 32232, -14645, -24068, 28063, 8421, -32759, 9843, 27270, -25049, -13305, 32466, -4797, -29792, 21406, 17856, -31363, -371, 31569, -17232, -21963, 29475, 5527, -32558, 12624, 25519, -26853, -10548, 32733, -7704, -28439, 23559, 15303, -32092, 2589, 30647, -19677, -19677, 30647, 2589, -32092, 15303, 23559, -28439, -7704, 32733, -10548, -26853, 25519, 12624, -32558, 5527, 29475, -21963, -17232, 31569, -371, -31363, 17856, 21406, -29792, -4797, 32466, -13305, -25049, 27270, 9843, -32759, 8421, 28063, -24068, -14645, 32232, -3327, -30378, 20264, 19079, -30902, -1851, 31933, -15955, -23039, 28799, 6981, -32692, 11245, 26421, -25978, -11939, 32633, -6257, -29146, 22506, 16596, -31760, 1110, 31140, -18473, -20841, 30092, 4062, -32358, 13978, 24564, -27675, -9135}, -{32767, -10548, -25978, 27270, 8421, -32692, 12624, 24564, -28439, -6257, 32466, -14645, -23039, 29475, 4062, -32092, 16596, 21406, -30378, -1851, 31569, -18473, -19677, 31140, -371, -30902, 20264, 17856, -31760, 2589, 30092, -21963, -15955, 32232, -4797, -29146, 23559, 13978, -32558, 6981, 28063, -25049, -11939, 32733, -9135, -26853, 26421, 9843, -32759, 11245, 25519, -27675, -7704, 32633, -13305, -24068, 28799, 5527, -32358, 15303, 22506, -29792, -3327, 31933, -17232, -20841, 30647, 1110, -31363, 19079, 19079, -31363, 1110, 30647, -20841, -17232, 31933, -3327, -29792, 22506, 15303, -32358, 5527, 28799, -24068, -13305, 32633, -7704, -27675, 25519, 11245, -32759, 9843, 26421, -26853, -9135, 32733, -11939, -25049, 28063, 6981, -32558, 13978, 23559, -29146, -4797, 32232, -15955, -21963, 30092, 2589, -31760, 17856, 20264, -30902, -371, 31140, -19677, -18473, 31569, -1851, -30378, 21406, 16596, -32092, 4062, 29475, -23039, -14645, 32466, -6257, -28439, 24564, 12624, -32692, 8421, 27270, -25978, -10548}, -{32767, -11939, -24068, 29475, 2589, -31363, 20264, 16596, -32358, 6981, 27270, -26853, -7704, 32466, -15955, -20841, 31140, -1851, -29792, 23559, 12624, -32759, 11245, 24564, -29146, -3327, 31569, -19677, -17232, 32232, -6257, -27675, 26421, 8421, -32558, 15303, 21406, -30902, 1110, 30092, -23039, -13305, 32733, -10548, -25049, 28799, 4062, -31760, 19079, 17856, -32092, 5527, 28063, -25978, -9135, 32633, -14645, -21963, 30647, -371, -30378, 22506, 13978, -32692, 9843, 25519, -28439, -4797, 31933, -18473, -18473, 31933, -4797, -28439, 25519, 9843, -32692, 13978, 22506, -30378, -371, 30647, -21963, -14645, 32633, -9135, -25978, 28063, 5527, -32092, 17856, 19079, -31760, 4062, 28799, -25049, -10548, 32733, -13305, -23039, 30092, 1110, -30902, 21406, 15303, -32558, 8421, 26421, -27675, -6257, 32232, -17232, -19677, 31569, -3327, -29146, 24564, 11245, -32759, 12624, 23559, -29792, -1851, 31140, -20841, -15955, 32466, -7704, -26853, 27270, 6981, -32358, 16596, 20264, -31363, 2589, 29475, -24068, -11939}, -{32767, -13305, -21963, 31140, -3327, -28439, 26421, 6981, -32092, 19079, 16596, -32558, 9843, 24564, -29792, -371, 30092, -24068, -10548, 32633, -15955, -19677, 31933, -6257, -26853, 28063, 4062, -31363, 21406, 13978, -32759, 12624, 22506, -30902, 2589, 28799, -25978, -7704, 32232, -18473, -17232, 32466, -9135, -25049, 29475, 1110, -30378, 23559, 11245, -32692, 15303, 20264, -31760, 5527, 27270, -27675, -4797, 31569, -20841, -14645, 32733, -11939, -23039, 30647, -1851, -29146, 25519, 8421, -32358, 17856, 17856, -32358, 8421, 25519, -29146, -1851, 30647, -23039, -11939, 32733, -14645, -20841, 31569, -4797, -27675, 27270, 5527, -31760, 20264, 15303, -32692, 11245, 23559, -30378, 1110, 29475, -25049, -9135, 32466, -17232, -18473, 32232, -7704, -25978, 28799, 2589, -30902, 22506, 12624, -32759, 13978, 21406, -31363, 4062, 28063, -26853, -6257, 31933, -19677, -15955, 32633, -10548, -24068, 30092, -371, -29792, 24564, 9843, -32558, 16596, 19079, -32092, 6981, 26421, -28439, -3327, 31140, -21963, -13305}, -{32767, -14645, -19677, 32232, -9135, -24068, 30647, -3327, -27675, 28063, 2589, -30378, 24564, 8421, -32092, 20264, 13978, -32759, 15303, 19079, -32358, 9843, 23559, -30902, 4062, 27270, -28439, -1851, 30092, -25049, -7704, 31933, -20841, -13305, 32733, -15955, -18473, 32466, -10548, -23039, 31140, -4797, -26853, 28799, 1110, -29792, 25519, 6981, -31760, 21406, 12624, -32692, 16596, 17856, -32558, 11245, 22506, -31363, 5527, 26421, -29146, -371, 29475, -25978, -6257, 31569, -21963, -11939, 32633, -17232, -17232, 32633, -11939, -21963, 31569, -6257, -25978, 29475, -371, -29146, 26421, 5527, -31363, 22506, 11245, -32558, 17856, 16596, -32692, 12624, 21406, -31760, 6981, 25519, -29792, 1110, 28799, -26853, -4797, 31140, -23039, -10548, 32466, -18473, -15955, 32733, -13305, -20841, 31933, -7704, -25049, 30092, -1851, -28439, 27270, 4062, -30902, 23559, 9843, -32358, 19079, 15303, -32759, 13978, 20264, -32092, 8421, 24564, -30378, 2589, 28063, -27675, -3327, 30647, -24068, -9135, 32232, -19677, -14645}, -{32767, -15955, -17232, 32733, -14645, -18473, 32633, -13305, -19677, 32466, -11939, -20841, 32232, -10548, -21963, 31933, -9135, -23039, 31569, -7704, -24068, 31140, -6257, -25049, 30647, -4797, -25978, 30092, -3327, -26853, 29475, -1851, -27675, 28799, -371, -28439, 28063, 1110, -29146, 27270, 2589, -29792, 26421, 4062, -30378, 25519, 5527, -30902, 24564, 6981, -31363, 23559, 8421, -31760, 22506, 9843, -32092, 21406, 11245, -32358, 20264, 12624, -32558, 19079, 13978, -32692, 17856, 15303, -32759, 16596, 16596, -32759, 15303, 17856, -32692, 13978, 19079, -32558, 12624, 20264, -32358, 11245, 21406, -32092, 9843, 22506, -31760, 8421, 23559, -31363, 6981, 24564, -30902, 5527, 25519, -30378, 4062, 26421, -29792, 2589, 27270, -29146, 1110, 28063, -28439, -371, 28799, -27675, -1851, 29475, -26853, -3327, 30092, -25978, -4797, 30647, -25049, -6257, 31140, -24068, -7704, 31569, -23039, -9135, 31933, -21963, -10548, 32232, -20841, -11939, 32466, -19677, -13305, 32633, -18473, -14645, 32733, -17232, -15955}, -{32767, -17232, -14645, 32633, -19677, -11939, 32232, -21963, -9135, 31569, -24068, -6257, 30647, -25978, -3327, 29475, -27675, -371, 28063, -29146, 2589, 26421, -30378, 5527, 24564, -31363, 8421, 22506, -32092, 11245, 20264, -32558, 13978, 17856, -32759, 16596, 15303, -32692, 19079, 12624, -32358, 21406, 9843, -31760, 23559, 6981, -30902, 25519, 4062, -29792, 27270, 1110, -28439, 28799, -1851, -26853, 30092, -4797, -25049, 31140, -7704, -23039, 31933, -10548, -20841, 32466, -13305, -18473, 32733, -15955, -15955, 32733, -18473, -13305, 32466, -20841, -10548, 31933, -23039, -7704, 31140, -25049, -4797, 30092, -26853, -1851, 28799, -28439, 1110, 27270, -29792, 4062, 25519, -30902, 6981, 23559, -31760, 9843, 21406, -32358, 12624, 19079, -32692, 15303, 16596, -32759, 17856, 13978, -32558, 20264, 11245, -32092, 22506, 8421, -31363, 24564, 5527, -30378, 26421, 2589, -29146, 28063, -371, -27675, 29475, -3327, -25978, 30647, -6257, -24068, 31569, -9135, -21963, 32232, -11939, -19677, 32633, -14645, -17232}, -{32767, -18473, -11939, 31933, -24068, -4797, 29475, -28439, 2589, 25519, -31363, 9843, 20264, -32692, 16596, 13978, -32358, 22506, 6981, -30378, 27270, -371, -26853, 30647, -7704, -21963, 32466, -14645, -15955, 32633, -20841, -9135, 31140, -25978, -1851, 28063, -29792, 5527, 23559, -32092, 12624, 17856, -32759, 19079, 11245, -31760, 24564, 4062, -29146, 28799, -3327, -25049, 31569, -10548, -19677, 32733, -17232, -13305, 32232, -23039, -6257, 30092, -27675, 1110, 26421, -30902, 8421, 21406, -32558, 15303, 15303, -32558, 21406, 8421, -30902, 26421, 1110, -27675, 30092, -6257, -23039, 32232, -13305, -17232, 32733, -19677, -10548, 31569, -25049, -3327, 28799, -29146, 4062, 24564, -31760, 11245, 19079, -32759, 17856, 12624, -32092, 23559, 5527, -29792, 28063, -1851, -25978, 31140, -9135, -20841, 32633, -15955, -14645, 32466, -21963, -7704, 30647, -26853, -371, 27270, -30378, 6981, 22506, -32358, 13978, 16596, -32692, 20264, 9843, -31363, 25519, 2589, -28439, 29475, -4797, -24068, 31933, -11939, -18473}, -{32767, -19677, -9135, 30647, -27675, 2589, 24564, -32092, 13978, 15303, -32358, 23559, 4062, -28439, 30092, -7704, -20841, 32733, -18473, -10548, 31140, -26853, 1110, 25519, -31760, 12624, 16596, -32558, 22506, 5527, -29146, 29475, -6257, -21963, 32633, -17232, -11939, 31569, -25978, -371, 26421, -31363, 11245, 17856, -32692, 21406, 6981, -29792, 28799, -4797, -23039, 32466, -15955, -13305, 31933, -25049, -1851, 27270, -30902, 9843, 19079, -32759, 20264, 8421, -30378, 28063, -3327, -24068, 32232, -14645, -14645, 32232, -24068, -3327, 28063, -30378, 8421, 20264, -32759, 19079, 9843, -30902, 27270, -1851, -25049, 31933, -13305, -15955, 32466, -23039, -4797, 28799, -29792, 6981, 21406, -32692, 17856, 11245, -31363, 26421, -371, -25978, 31569, -11939, -17232, 32633, -21963, -6257, 29475, -29146, 5527, 22506, -32558, 16596, 12624, -31760, 25519, 1110, -26853, 31140, -10548, -18473, 32733, -20841, -7704, 30092, -28439, 4062, 23559, -32358, 15303, 13978, -32092, 24564, 2589, -27675, 30647, -9135, -19677}, -{32767, -20841, -6257, 28799, -30378, 9843, 17856, -32558, 23559, 2589, -26853, 31569, -13305, -14645, 31933, -25978, 1110, 24564, -32358, 16596, 11245, -30902, 28063, -4797, -21963, 32733, -19677, -7704, 29475, -29792, 8421, 19079, -32692, 22506, 4062, -27675, 31140, -11939, -15955, 32232, -25049, -371, 25519, -32092, 15303, 12624, -31363, 27270, -3327, -23039, 32633, -18473, -9135, 30092, -29146, 6981, 20264, -32759, 21406, 5527, -28439, 30647, -10548, -17232, 32466, -24068, -1851, 26421, -31760, 13978, 13978, -31760, 26421, -1851, -24068, 32466, -17232, -10548, 30647, -28439, 5527, 21406, -32759, 20264, 6981, -29146, 30092, -9135, -18473, 32633, -23039, -3327, 27270, -31363, 12624, 15303, -32092, 25519, -371, -25049, 32232, -15955, -11939, 31140, -27675, 4062, 22506, -32692, 19079, 8421, -29792, 29475, -7704, -19677, 32733, -21963, -4797, 28063, -30902, 11245, 16596, -32358, 24564, 1110, -25978, 31933, -14645, -13305, 31569, -26853, 2589, 23559, -32558, 17856, 9843, -30378, 28799, -6257, -20841}, -{32767, -21963, -3327, 26421, -32092, 16596, 9843, -29792, 30092, -10548, -15955, 31933, -26853, 4062, 21406, -32759, 22506, 2589, -25978, 32232, -17232, -9135, 29475, -30378, 11245, 15303, -31760, 27270, -4797, -20841, 32733, -23039, -1851, 25519, -32358, 17856, 8421, -29146, 30647, -11939, -14645, 31569, -27675, 5527, 20264, -32692, 23559, 1110, -25049, 32466, -18473, -7704, 28799, -30902, 12624, 13978, -31363, 28063, -6257, -19677, 32633, -24068, -371, 24564, -32558, 19079, 6981, -28439, 31140, -13305, -13305, 31140, -28439, 6981, 19079, -32558, 24564, -371, -24068, 32633, -19677, -6257, 28063, -31363, 13978, 12624, -30902, 28799, -7704, -18473, 32466, -25049, 1110, 23559, -32692, 20264, 5527, -27675, 31569, -14645, -11939, 30647, -29146, 8421, 17856, -32358, 25519, -1851, -23039, 32733, -20841, -4797, 27270, -31760, 15303, 11245, -30378, 29475, -9135, -17232, 32232, -25978, 2589, 22506, -32759, 21406, 4062, -26853, 31933, -15955, -10548, 30092, -29792, 9843, 16596, -32092, 26421, -3327, -21963}, -{32767, -23039, -371, 23559, -32759, 22506, 1110, -24068, 32733, -21963, -1851, 24564, -32692, 21406, 2589, -25049, 32633, -20841, -3327, 25519, -32558, 20264, 4062, -25978, 32466, -19677, -4797, 26421, -32358, 19079, 5527, -26853, 32232, -18473, -6257, 27270, -32092, 17856, 6981, -27675, 31933, -17232, -7704, 28063, -31760, 16596, 8421, -28439, 31569, -15955, -9135, 28799, -31363, 15303, 9843, -29146, 31140, -14645, -10548, 29475, -30902, 13978, 11245, -29792, 30647, -13305, -11939, 30092, -30378, 12624, 12624, -30378, 30092, -11939, -13305, 30647, -29792, 11245, 13978, -30902, 29475, -10548, -14645, 31140, -29146, 9843, 15303, -31363, 28799, -9135, -15955, 31569, -28439, 8421, 16596, -31760, 28063, -7704, -17232, 31933, -27675, 6981, 17856, -32092, 27270, -6257, -18473, 32232, -26853, 5527, 19079, -32358, 26421, -4797, -19677, 32466, -25978, 4062, 20264, -32558, 25519, -3327, -20841, 32633, -25049, 2589, 21406, -32692, 24564, -1851, -21963, 32733, -24068, 1110, 22506, -32759, 23559, -371, -23039}, -{32767, -24068, 2589, 20264, -32358, 27270, -7704, -15955, 31140, -29792, 12624, 11245, -29146, 31569, -17232, -6257, 26421, -32558, 21406, 1110, -23039, 32733, -25049, 4062, 19079, -32092, 28063, -9135, -14645, 30647, -30378, 13978, 9843, -28439, 31933, -18473, -4797, 25519, -32692, 22506, -371, -21963, 32633, -25978, 5527, 17856, -31760, 28799, -10548, -13305, 30092, -30902, 15303, 8421, -27675, 32232, -19677, -3327, 24564, -32759, 23559, -1851, -20841, 32466, -26853, 6981, 16596, -31363, 29475, -11939, -11939, 29475, -31363, 16596, 6981, -26853, 32466, -20841, -1851, 23559, -32759, 24564, -3327, -19677, 32232, -27675, 8421, 15303, -30902, 30092, -13305, -10548, 28799, -31760, 17856, 5527, -25978, 32633, -21963, -371, 22506, -32692, 25519, -4797, -18473, 31933, -28439, 9843, 13978, -30378, 30647, -14645, -9135, 28063, -32092, 19079, 4062, -25049, 32733, -23039, 1110, 21406, -32558, 26421, -6257, -17232, 31569, -29146, 11245, 12624, -29792, 31140, -15955, -7704, 27270, -32358, 20264, 2589, -24068}, -{32767, -25049, 5527, 16596, -30902, 30647, -15955, -6257, 25519, -32759, 24564, -4797, -17232, 31140, -30378, 15303, 6981, -25978, 32733, -24068, 4062, 17856, -31363, 30092, -14645, -7704, 26421, -32692, 23559, -3327, -18473, 31569, -29792, 13978, 8421, -26853, 32633, -23039, 2589, 19079, -31760, 29475, -13305, -9135, 27270, -32558, 22506, -1851, -19677, 31933, -29146, 12624, 9843, -27675, 32466, -21963, 1110, 20264, -32092, 28799, -11939, -10548, 28063, -32358, 21406, -371, -20841, 32232, -28439, 11245, 11245, -28439, 32232, -20841, -371, 21406, -32358, 28063, -10548, -11939, 28799, -32092, 20264, 1110, -21963, 32466, -27675, 9843, 12624, -29146, 31933, -19677, -1851, 22506, -32558, 27270, -9135, -13305, 29475, -31760, 19079, 2589, -23039, 32633, -26853, 8421, 13978, -29792, 31569, -18473, -3327, 23559, -32692, 26421, -7704, -14645, 30092, -31363, 17856, 4062, -24068, 32733, -25978, 6981, 15303, -30378, 31140, -17232, -4797, 24564, -32759, 25519, -6257, -15955, 30647, -30902, 16596, 5527, -25049}, -{32767, -25978, 8421, 12624, -28439, 32466, -23039, 4062, 16596, -30378, 31569, -19677, -371, 20264, -31760, 30092, -15955, -4797, 23559, -32558, 28063, -11939, -9135, 26421, -32759, 25519, -7704, -13305, 28799, -32358, 22506, -3327, -17232, 30647, -31363, 19079, 1110, -20841, 31933, -29792, 15303, 5527, -24068, 32633, -27675, 11245, 9843, -26853, 32733, -25049, 6981, 13978, -29146, 32232, -21963, 2589, 17856, -30902, 31140, -18473, -1851, 21406, -32092, 29475, -14645, -6257, 24564, -32692, 27270, -10548, -10548, 27270, -32692, 24564, -6257, -14645, 29475, -32092, 21406, -1851, -18473, 31140, -30902, 17856, 2589, -21963, 32232, -29146, 13978, 6981, -25049, 32733, -26853, 9843, 11245, -27675, 32633, -24068, 5527, 15303, -29792, 31933, -20841, 1110, 19079, -31363, 30647, -17232, -3327, 22506, -32358, 28799, -13305, -7704, 25519, -32759, 26421, -9135, -11939, 28063, -32558, 23559, -4797, -15955, 30092, -31760, 20264, -371, -19677, 31569, -30378, 16596, 4062, -23039, 32466, -28439, 12624, 8421, -25978}, -{32767, -26853, 11245, 8421, -25049, 32633, -28439, 13978, 5527, -23039, 32232, -29792, 16596, 2589, -20841, 31569, -30902, 19079, -371, -18473, 30647, -31760, 21406, -3327, -15955, 29475, -32358, 23559, -6257, -13305, 28063, -32692, 25519, -9135, -10548, 26421, -32759, 27270, -11939, -7704, 24564, -32558, 28799, -14645, -4797, 22506, -32092, 30092, -17232, -1851, 20264, -31363, 31140, -19677, 1110, 17856, -30378, 31933, -21963, 4062, 15303, -29146, 32466, -24068, 6981, 12624, -27675, 32733, -25978, 9843, 9843, -25978, 32733, -27675, 12624, 6981, -24068, 32466, -29146, 15303, 4062, -21963, 31933, -30378, 17856, 1110, -19677, 31140, -31363, 20264, -1851, -17232, 30092, -32092, 22506, -4797, -14645, 28799, -32558, 24564, -7704, -11939, 27270, -32759, 26421, -10548, -9135, 25519, -32692, 28063, -13305, -6257, 23559, -32358, 29475, -15955, -3327, 21406, -31760, 30647, -18473, -371, 19079, -30902, 31569, -20841, 2589, 16596, -29792, 32232, -23039, 5527, 13978, -28439, 32633, -25049, 8421, 11245, -26853}, -{32767, -27675, 13978, 4062, -20841, 31140, -31760, 22506, -6257, -11939, 26421, -32692, 28799, -15955, -1851, 19079, -30378, 32232, -24068, 8421, 9843, -25049, 32466, -29792, 17856, -371, -17232, 29475, -32558, 25519, -10548, -7704, 23559, -32092, 30647, -19677, 2589, 15303, -28439, 32733, -26853, 12624, 5527, -21963, 31569, -31363, 21406, -4797, -13305, 27270, -32759, 28063, -14645, -3327, 20264, -30902, 31933, -23039, 6981, 11245, -25978, 32633, -29146, 16596, 1110, -18473, 30092, -32358, 24564, -9135, -9135, 24564, -32358, 30092, -18473, 1110, 16596, -29146, 32633, -25978, 11245, 6981, -23039, 31933, -30902, 20264, -3327, -14645, 28063, -32759, 27270, -13305, -4797, 21406, -31363, 31569, -21963, 5527, 12624, -26853, 32733, -28439, 15303, 2589, -19677, 30647, -32092, 23559, -7704, -10548, 25519, -32558, 29475, -17232, -371, 17856, -29792, 32466, -25049, 9843, 8421, -24068, 32232, -30378, 19079, -1851, -15955, 28799, -32692, 26421, -11939, -6257, 22506, -31760, 31140, -20841, 4062, 13978, -27675}, -{32767, -28439, 16596, -371, -15955, 28063, -32759, 28799, -17232, 1110, 15303, -27675, 32733, -29146, 17856, -1851, -14645, 27270, -32692, 29475, -18473, 2589, 13978, -26853, 32633, -29792, 19079, -3327, -13305, 26421, -32558, 30092, -19677, 4062, 12624, -25978, 32466, -30378, 20264, -4797, -11939, 25519, -32358, 30647, -20841, 5527, 11245, -25049, 32232, -30902, 21406, -6257, -10548, 24564, -32092, 31140, -21963, 6981, 9843, -24068, 31933, -31363, 22506, -7704, -9135, 23559, -31760, 31569, -23039, 8421, 8421, -23039, 31569, -31760, 23559, -9135, -7704, 22506, -31363, 31933, -24068, 9843, 6981, -21963, 31140, -32092, 24564, -10548, -6257, 21406, -30902, 32232, -25049, 11245, 5527, -20841, 30647, -32358, 25519, -11939, -4797, 20264, -30378, 32466, -25978, 12624, 4062, -19677, 30092, -32558, 26421, -13305, -3327, 19079, -29792, 32633, -26853, 13978, 2589, -18473, 29475, -32692, 27270, -14645, -1851, 17856, -29146, 32733, -27675, 15303, 1110, -17232, 28799, -32759, 28063, -15955, -371, 16596, -28439}, -{32767, -29146, 19079, -4797, -10548, 23559, -31363, 32232, -25978, 13978, 1110, -15955, 27270, -32558, 30647, -21963, 8421, 6981, -20841, 30092, -32692, 28063, -17232, 2589, 12624, -25049, 31933, -31760, 24564, -11939, -3327, 17856, -28439, 32733, -29792, 20264, -6257, -9135, 22506, -30902, 32466, -26853, 15303, -371, -14645, 26421, -32358, 31140, -23039, 9843, 5527, -19677, 29475, -32759, 28799, -18473, 4062, 11245, -24068, 31569, -32092, 25519, -13305, -1851, 16596, -27675, 32633, -30378, 21406, -7704, -7704, 21406, -30378, 32633, -27675, 16596, -1851, -13305, 25519, -32092, 31569, -24068, 11245, 4062, -18473, 28799, -32759, 29475, -19677, 5527, 9843, -23039, 31140, -32358, 26421, -14645, -371, 15303, -26853, 32466, -30902, 22506, -9135, -6257, 20264, -29792, 32733, -28439, 17856, -3327, -11939, 24564, -31760, 31933, -25049, 12624, 2589, -17232, 28063, -32692, 30092, -20841, 6981, 8421, -21963, 30647, -32558, 27270, -15955, 1110, 13978, -25978, 32232, -31363, 23559, -10548, -4797, 19079, -29146}, -{32767, -29792, 21406, -9135, -4797, 17856, -27675, 32466, -31363, 24564, -13305, -371, 13978, -25049, 31569, -32358, 27270, -17232, 4062, 9843, -21963, 30092, -32759, 29475, -20841, 8421, 5527, -18473, 28063, -32558, 31140, -24068, 12624, 1110, -14645, 25519, -31760, 32232, -26853, 16596, -3327, -10548, 22506, -30378, 32733, -29146, 20264, -7704, -6257, 19079, -28439, 32633, -30902, 23559, -11939, -1851, 15303, -25978, 31933, -32092, 26421, -15955, 2589, 11245, -23039, 30647, -32692, 28799, -19677, 6981, 6981, -19677, 28799, -32692, 30647, -23039, 11245, 2589, -15955, 26421, -32092, 31933, -25978, 15303, -1851, -11939, 23559, -30902, 32633, -28439, 19079, -6257, -7704, 20264, -29146, 32733, -30378, 22506, -10548, -3327, 16596, -26853, 32232, -31760, 25519, -14645, 1110, 12624, -24068, 31140, -32558, 28063, -18473, 5527, 8421, -20841, 29475, -32759, 30092, -21963, 9843, 4062, -17232, 27270, -32358, 31569, -25049, 13978, -371, -13305, 24564, -31363, 32466, -27675, 17856, -4797, -9135, 21406, -29792}, -{32767, -30378, 23559, -13305, 1110, 11245, -21963, 29475, -32692, 31140, -25049, 15303, -3327, -9135, 20264, -28439, 32466, -31760, 26421, -17232, 5527, 6981, -18473, 27270, -32092, 32232, -27675, 19079, -7704, -4797, 16596, -25978, 31569, -32558, 28799, -20841, 9843, 2589, -14645, 24564, -30902, 32733, -29792, 22506, -11939, -371, 12624, -23039, 30092, -32759, 30647, -24068, 13978, -1851, -10548, 21406, -29146, 32633, -31363, 25519, -15955, 4062, 8421, -19677, 28063, -32358, 31933, -26853, 17856, -6257, -6257, 17856, -26853, 31933, -32358, 28063, -19677, 8421, 4062, -15955, 25519, -31363, 32633, -29146, 21406, -10548, -1851, 13978, -24068, 30647, -32759, 30092, -23039, 12624, -371, -11939, 22506, -29792, 32733, -30902, 24564, -14645, 2589, 9843, -20841, 28799, -32558, 31569, -25978, 16596, -4797, -7704, 19079, -27675, 32232, -32092, 27270, -18473, 6981, 5527, -17232, 26421, -31760, 32466, -28439, 20264, -9135, -3327, 15303, -25049, 31140, -32692, 29475, -21963, 11245, 1110, -13305, 23559, -30378}, -{32767, -30902, 25519, -17232, 6981, 4062, -14645, 23559, -29792, 32633, -31760, 27270, -19677, 9843, 1110, -11939, 21406, -28439, 32232, -32358, 28799, -21963, 12624, -1851, -9135, 19079, -26853, 31569, -32692, 30092, -24068, 15303, -4797, -6257, 16596, -25049, 30647, -32759, 31140, -25978, 17856, -7704, -3327, 13978, -23039, 29475, -32558, 31933, -27675, 20264, -10548, -371, 11245, -20841, 28063, -32092, 32466, -29146, 22506, -13305, 2589, 8421, -18473, 26421, -31363, 32733, -30378, 24564, -15955, 5527, 5527, -15955, 24564, -30378, 32733, -31363, 26421, -18473, 8421, 2589, -13305, 22506, -29146, 32466, -32092, 28063, -20841, 11245, -371, -10548, 20264, -27675, 31933, -32558, 29475, -23039, 13978, -3327, -7704, 17856, -25978, 31140, -32759, 30647, -25049, 16596, -6257, -4797, 15303, -24068, 30092, -32692, 31569, -26853, 19079, -9135, -1851, 12624, -21963, 28799, -32358, 32232, -28439, 21406, -11939, 1110, 9843, -19677, 27270, -31760, 32633, -29792, 23559, -14645, 4062, 6981, -17232, 25519, -30902}, -{32767, -31363, 27270, -20841, 12624, -3327, -6257, 15303, -23039, 28799, -32092, 32633, -30378, 25519, -18473, 9843, -371, -9135, 17856, -25049, 30092, -32558, 32232, -29146, 23559, -15955, 6981, 2589, -11939, 20264, -26853, 31140, -32759, 31569, -27675, 21406, -13305, 4062, 5527, -14645, 22506, -28439, 31933, -32692, 30647, -25978, 19079, -10548, 1110, 8421, -17232, 24564, -29792, 32466, -32358, 29475, -24068, 16596, -7704, -1851, 11245, -19677, 26421, -30902, 32733, -31760, 28063, -21963, 13978, -4797, -4797, 13978, -21963, 28063, -31760, 32733, -30902, 26421, -19677, 11245, -1851, -7704, 16596, -24068, 29475, -32358, 32466, -29792, 24564, -17232, 8421, 1110, -10548, 19079, -25978, 30647, -32692, 31933, -28439, 22506, -14645, 5527, 4062, -13305, 21406, -27675, 31569, -32759, 31140, -26853, 20264, -11939, 2589, 6981, -15955, 23559, -29146, 32232, -32558, 30092, -25049, 17856, -9135, -371, 9843, -18473, 25519, -30378, 32633, -32092, 28799, -23039, 15303, -6257, -3327, 12624, -20841, 27270, -31363}, -{32767, -31760, 28799, -24068, 17856, -10548, 2589, 5527, -13305, 20264, -25978, 30092, -32358, 32633, -30902, 27270, -21963, 15303, -7704, -371, 8421, -15955, 22506, -27675, 31140, -32692, 32232, -29792, 25519, -19677, 12624, -4797, -3327, 11245, -18473, 24564, -29146, 31933, -32759, 31569, -28439, 23559, -17232, 9843, -1851, -6257, 13978, -20841, 26421, -30378, 32466, -32558, 30647, -26853, 21406, -14645, 6981, 1110, -9135, 16596, -23039, 28063, -31363, 32733, -32092, 29475, -25049, 19079, -11939, 4062, 4062, -11939, 19079, -25049, 29475, -32092, 32733, -31363, 28063, -23039, 16596, -9135, 1110, 6981, -14645, 21406, -26853, 30647, -32558, 32466, -30378, 26421, -20841, 13978, -6257, -1851, 9843, -17232, 23559, -28439, 31569, -32759, 31933, -29146, 24564, -18473, 11245, -3327, -4797, 12624, -19677, 25519, -29792, 32232, -32692, 31140, -27675, 22506, -15955, 8421, -371, -7704, 15303, -21963, 27270, -30902, 32633, -32358, 30092, -25978, 20264, -13305, 5527, 2589, -10548, 17856, -24068, 28799, -31760}, -{32767, -32092, 30092, -26853, 22506, -17232, 11245, -4797, -1851, 8421, -14645, 20264, -25049, 28799, -31363, 32633, -32558, 31140, -28439, 24564, -19677, 13978, -7704, 1110, 5527, -11939, 17856, -23039, 27270, -30378, 32232, -32759, 31933, -29792, 26421, -21963, 16596, -10548, 4062, 2589, -9135, 15303, -20841, 25519, -29146, 31569, -32692, 32466, -30902, 28063, -24068, 19079, -13305, 6981, -371, -6257, 12624, -18473, 23559, -27675, 30647, -32358, 32733, -31760, 29475, -25978, 21406, -15955, 9843, -3327, -3327, 9843, -15955, 21406, -25978, 29475, -31760, 32733, -32358, 30647, -27675, 23559, -18473, 12624, -6257, -371, 6981, -13305, 19079, -24068, 28063, -30902, 32466, -32692, 31569, -29146, 25519, -20841, 15303, -9135, 2589, 4062, -10548, 16596, -21963, 26421, -29792, 31933, -32759, 32232, -30378, 27270, -23039, 17856, -11939, 5527, 1110, -7704, 13978, -19677, 24564, -28439, 31140, -32558, 32633, -31363, 28799, -25049, 20264, -14645, 8421, -1851, -4797, 11245, -17232, 22506, -26853, 30092, -32092}, -{32767, -32358, 31140, -29146, 26421, -23039, 19079, -14645, 9843, -4797, -371, 5527, -10548, 15303, -19677, 23559, -26853, 29475, -31363, 32466, -32759, 32232, -30902, 28799, -25978, 22506, -18473, 13978, -9135, 4062, 1110, -6257, 11245, -15955, 20264, -24068, 27270, -29792, 31569, -32558, 32733, -32092, 30647, -28439, 25519, -21963, 17856, -13305, 8421, -3327, -1851, 6981, -11939, 16596, -20841, 24564, -27675, 30092, -31760, 32633, -32692, 31933, -30378, 28063, -25049, 21406, -17232, 12624, -7704, 2589, 2589, -7704, 12624, -17232, 21406, -25049, 28063, -30378, 31933, -32692, 32633, -31760, 30092, -27675, 24564, -20841, 16596, -11939, 6981, -1851, -3327, 8421, -13305, 17856, -21963, 25519, -28439, 30647, -32092, 32733, -32558, 31569, -29792, 27270, -24068, 20264, -15955, 11245, -6257, 1110, 4062, -9135, 13978, -18473, 22506, -25978, 28799, -30902, 32232, -32759, 32466, -31363, 29475, -26853, 23559, -19677, 15303, -10548, 5527, -371, -4797, 9843, -14645, 19079, -23039, 26421, -29146, 31140, -32358}, -{32767, -32558, 31933, -30902, 29475, -27675, 25519, -23039, 20264, -17232, 13978, -10548, 6981, -3327, -371, 4062, -7704, 11245, -14645, 17856, -20841, 23559, -25978, 28063, -29792, 31140, -32092, 32633, -32759, 32466, -31760, 30647, -29146, 27270, -25049, 22506, -19677, 16596, -13305, 9843, -6257, 2589, 1110, -4797, 8421, -11939, 15303, -18473, 21406, -24068, 26421, -28439, 30092, -31363, 32232, -32692, 32733, -32358, 31569, -30378, 28799, -26853, 24564, -21963, 19079, -15955, 12624, -9135, 5527, -1851, -1851, 5527, -9135, 12624, -15955, 19079, -21963, 24564, -26853, 28799, -30378, 31569, -32358, 32733, -32692, 32232, -31363, 30092, -28439, 26421, -24068, 21406, -18473, 15303, -11939, 8421, -4797, 1110, 2589, -6257, 9843, -13305, 16596, -19677, 22506, -25049, 27270, -29146, 30647, -31760, 32466, -32759, 32633, -32092, 31140, -29792, 28063, -25978, 23559, -20841, 17856, -14645, 11245, -7704, 4062, -371, -3327, 6981, -10548, 13978, -17232, 20264, -23039, 25519, -27675, 29475, -30902, 31933, -32558}, -{32767, -32692, 32466, -32092, 31569, -30902, 30092, -29146, 28063, -26853, 25519, -24068, 22506, -20841, 19079, -17232, 15303, -13305, 11245, -9135, 6981, -4797, 2589, -371, -1851, 4062, -6257, 8421, -10548, 12624, -14645, 16596, -18473, 20264, -21963, 23559, -25049, 26421, -27675, 28799, -29792, 30647, -31363, 31933, -32358, 32633, -32759, 32733, -32558, 32232, -31760, 31140, -30378, 29475, -28439, 27270, -25978, 24564, -23039, 21406, -19677, 17856, -15955, 13978, -11939, 9843, -7704, 5527, -3327, 1110, 1110, -3327, 5527, -7704, 9843, -11939, 13978, -15955, 17856, -19677, 21406, -23039, 24564, -25978, 27270, -28439, 29475, -30378, 31140, -31760, 32232, -32558, 32733, -32759, 32633, -32358, 31933, -31363, 30647, -29792, 28799, -27675, 26421, -25049, 23559, -21963, 20264, -18473, 16596, -14645, 12624, -10548, 8421, -6257, 4062, -1851, -371, 2589, -4797, 6981, -9135, 11245, -13305, 15303, -17232, 19079, -20841, 22506, -24068, 25519, -26853, 28063, -29146, 30092, -30902, 31569, -32092, 32466, -32692}, -{32767, -32759, 32733, -32692, 32633, -32558, 32466, -32358, 32232, -32092, 31933, -31760, 31569, -31363, 31140, -30902, 30647, -30378, 30092, -29792, 29475, -29146, 28799, -28439, 28063, -27675, 27270, -26853, 26421, -25978, 25519, -25049, 24564, -24068, 23559, -23039, 22506, -21963, 21406, -20841, 20264, -19677, 19079, -18473, 17856, -17232, 16596, -15955, 15303, -14645, 13978, -13305, 12624, -11939, 11245, -10548, 9843, -9135, 8421, -7704, 6981, -6257, 5527, -4797, 4062, -3327, 2589, -1851, 1110, -371, -371, 1110, -1851, 2589, -3327, 4062, -4797, 5527, -6257, 6981, -7704, 8421, -9135, 9843, -10548, 11245, -11939, 12624, -13305, 13978, -14645, 15303, -15955, 16596, -17232, 17856, -18473, 19079, -19677, 20264, -20841, 21406, -21963, 22506, -23039, 23559, -24068, 24564, -25049, 25519, -25978, 26421, -26853, 27270, -27675, 28063, -28439, 28799, -29146, 29475, -29792, 30092, -30378, 30647, -30902, 31140, -31363, 31569, -31760, 31933, -32092, 32232, -32358, 32466, -32558, 32633, -32692, 32733, -32759}, -{32767, -32759, 32733, -32692, 32633, -32558, 32466, -32358, 32232, -32092, 31933, -31760, 31569, -31363, 31140, -30902, 30647, -30378, 30092, -29792, 29475, -29146, 28799, -28439, 28063, -27675, 27270, -26853, 26421, -25978, 25519, -25049, 24564, -24068, 23559, -23039, 22506, -21963, 21406, -20841, 20264, -19677, 19079, -18473, 17856, -17232, 16596, -15955, 15303, -14645, 13978, -13305, 12624, -11939, 11245, -10548, 9843, -9135, 8421, -7704, 6981, -6257, 5527, -4797, 4062, -3327, 2589, -1851, 1110, -371, -371, 1110, -1851, 2589, -3327, 4062, -4797, 5527, -6257, 6981, -7704, 8421, -9135, 9843, -10548, 11245, -11939, 12624, -13305, 13978, -14645, 15303, -15955, 16596, -17232, 17856, -18473, 19079, -19677, 20264, -20841, 21406, -21963, 22506, -23039, 23559, -24068, 24564, -25049, 25519, -25978, 26421, -26853, 27270, -27675, 28063, -28439, 28799, -29146, 29475, -29792, 30092, -30378, 30647, -30902, 31140, -31363, 31569, -31760, 31933, -32092, 32232, -32358, 32466, -32558, 32633, -32692, 32733, -32759}, -{32767, -32692, 32466, -32092, 31569, -30902, 30092, -29146, 28063, -26853, 25519, -24068, 22506, -20841, 19079, -17232, 15303, -13305, 11245, -9135, 6981, -4797, 2589, -371, -1851, 4062, -6257, 8421, -10548, 12624, -14645, 16596, -18473, 20264, -21963, 23559, -25049, 26421, -27675, 28799, -29792, 30647, -31363, 31933, -32358, 32633, -32759, 32733, -32558, 32232, -31760, 31140, -30378, 29475, -28439, 27270, -25978, 24564, -23039, 21406, -19677, 17856, -15955, 13978, -11939, 9843, -7704, 5527, -3327, 1110, 1110, -3327, 5527, -7704, 9843, -11939, 13978, -15955, 17856, -19677, 21406, -23039, 24564, -25978, 27270, -28439, 29475, -30378, 31140, -31760, 32232, -32558, 32733, -32759, 32633, -32358, 31933, -31363, 30647, -29792, 28799, -27675, 26421, -25049, 23559, -21963, 20264, -18473, 16596, -14645, 12624, -10548, 8421, -6257, 4062, -1851, -371, 2589, -4797, 6981, -9135, 11245, -13305, 15303, -17232, 19079, -20841, 22506, -24068, 25519, -26853, 28063, -29146, 30092, -30902, 31569, -32092, 32466, -32692}, -{32767, -32558, 31933, -30902, 29475, -27675, 25519, -23039, 20264, -17232, 13978, -10548, 6981, -3327, -371, 4062, -7704, 11245, -14645, 17856, -20841, 23559, -25978, 28063, -29792, 31140, -32092, 32633, -32759, 32466, -31760, 30647, -29146, 27270, -25049, 22506, -19677, 16596, -13305, 9843, -6257, 2589, 1110, -4797, 8421, -11939, 15303, -18473, 21406, -24068, 26421, -28439, 30092, -31363, 32232, -32692, 32733, -32358, 31569, -30378, 28799, -26853, 24564, -21963, 19079, -15955, 12624, -9135, 5527, -1851, -1851, 5527, -9135, 12624, -15955, 19079, -21963, 24564, -26853, 28799, -30378, 31569, -32358, 32733, -32692, 32232, -31363, 30092, -28439, 26421, -24068, 21406, -18473, 15303, -11939, 8421, -4797, 1110, 2589, -6257, 9843, -13305, 16596, -19677, 22506, -25049, 27270, -29146, 30647, -31760, 32466, -32759, 32633, -32092, 31140, -29792, 28063, -25978, 23559, -20841, 17856, -14645, 11245, -7704, 4062, -371, -3327, 6981, -10548, 13978, -17232, 20264, -23039, 25519, -27675, 29475, -30902, 31933, -32558}, -{32767, -32358, 31140, -29146, 26421, -23039, 19079, -14645, 9843, -4797, -371, 5527, -10548, 15303, -19677, 23559, -26853, 29475, -31363, 32466, -32759, 32232, -30902, 28799, -25978, 22506, -18473, 13978, -9135, 4062, 1110, -6257, 11245, -15955, 20264, -24068, 27270, -29792, 31569, -32558, 32733, -32092, 30647, -28439, 25519, -21963, 17856, -13305, 8421, -3327, -1851, 6981, -11939, 16596, -20841, 24564, -27675, 30092, -31760, 32633, -32692, 31933, -30378, 28063, -25049, 21406, -17232, 12624, -7704, 2589, 2589, -7704, 12624, -17232, 21406, -25049, 28063, -30378, 31933, -32692, 32633, -31760, 30092, -27675, 24564, -20841, 16596, -11939, 6981, -1851, -3327, 8421, -13305, 17856, -21963, 25519, -28439, 30647, -32092, 32733, -32558, 31569, -29792, 27270, -24068, 20264, -15955, 11245, -6257, 1110, 4062, -9135, 13978, -18473, 22506, -25978, 28799, -30902, 32232, -32759, 32466, -31363, 29475, -26853, 23559, -19677, 15303, -10548, 5527, -371, -4797, 9843, -14645, 19079, -23039, 26421, -29146, 31140, -32358}, -{32767, -32092, 30092, -26853, 22506, -17232, 11245, -4797, -1851, 8421, -14645, 20264, -25049, 28799, -31363, 32633, -32558, 31140, -28439, 24564, -19677, 13978, -7704, 1110, 5527, -11939, 17856, -23039, 27270, -30378, 32232, -32759, 31933, -29792, 26421, -21963, 16596, -10548, 4062, 2589, -9135, 15303, -20841, 25519, -29146, 31569, -32692, 32466, -30902, 28063, -24068, 19079, -13305, 6981, -371, -6257, 12624, -18473, 23559, -27675, 30647, -32358, 32733, -31760, 29475, -25978, 21406, -15955, 9843, -3327, -3327, 9843, -15955, 21406, -25978, 29475, -31760, 32733, -32358, 30647, -27675, 23559, -18473, 12624, -6257, -371, 6981, -13305, 19079, -24068, 28063, -30902, 32466, -32692, 31569, -29146, 25519, -20841, 15303, -9135, 2589, 4062, -10548, 16596, -21963, 26421, -29792, 31933, -32759, 32232, -30378, 27270, -23039, 17856, -11939, 5527, 1110, -7704, 13978, -19677, 24564, -28439, 31140, -32558, 32633, -31363, 28799, -25049, 20264, -14645, 8421, -1851, -4797, 11245, -17232, 22506, -26853, 30092, -32092}, -{32767, -31760, 28799, -24068, 17856, -10548, 2589, 5527, -13305, 20264, -25978, 30092, -32358, 32633, -30902, 27270, -21963, 15303, -7704, -371, 8421, -15955, 22506, -27675, 31140, -32692, 32232, -29792, 25519, -19677, 12624, -4797, -3327, 11245, -18473, 24564, -29146, 31933, -32759, 31569, -28439, 23559, -17232, 9843, -1851, -6257, 13978, -20841, 26421, -30378, 32466, -32558, 30647, -26853, 21406, -14645, 6981, 1110, -9135, 16596, -23039, 28063, -31363, 32733, -32092, 29475, -25049, 19079, -11939, 4062, 4062, -11939, 19079, -25049, 29475, -32092, 32733, -31363, 28063, -23039, 16596, -9135, 1110, 6981, -14645, 21406, -26853, 30647, -32558, 32466, -30378, 26421, -20841, 13978, -6257, -1851, 9843, -17232, 23559, -28439, 31569, -32759, 31933, -29146, 24564, -18473, 11245, -3327, -4797, 12624, -19677, 25519, -29792, 32232, -32692, 31140, -27675, 22506, -15955, 8421, -371, -7704, 15303, -21963, 27270, -30902, 32633, -32358, 30092, -25978, 20264, -13305, 5527, 2589, -10548, 17856, -24068, 28799, -31760}, -{32767, -31363, 27270, -20841, 12624, -3327, -6257, 15303, -23039, 28799, -32092, 32633, -30378, 25519, -18473, 9843, -371, -9135, 17856, -25049, 30092, -32558, 32232, -29146, 23559, -15955, 6981, 2589, -11939, 20264, -26853, 31140, -32759, 31569, -27675, 21406, -13305, 4062, 5527, -14645, 22506, -28439, 31933, -32692, 30647, -25978, 19079, -10548, 1110, 8421, -17232, 24564, -29792, 32466, -32358, 29475, -24068, 16596, -7704, -1851, 11245, -19677, 26421, -30902, 32733, -31760, 28063, -21963, 13978, -4797, -4797, 13978, -21963, 28063, -31760, 32733, -30902, 26421, -19677, 11245, -1851, -7704, 16596, -24068, 29475, -32358, 32466, -29792, 24564, -17232, 8421, 1110, -10548, 19079, -25978, 30647, -32692, 31933, -28439, 22506, -14645, 5527, 4062, -13305, 21406, -27675, 31569, -32759, 31140, -26853, 20264, -11939, 2589, 6981, -15955, 23559, -29146, 32232, -32558, 30092, -25049, 17856, -9135, -371, 9843, -18473, 25519, -30378, 32633, -32092, 28799, -23039, 15303, -6257, -3327, 12624, -20841, 27270, -31363}, -{32767, -30902, 25519, -17232, 6981, 4062, -14645, 23559, -29792, 32633, -31760, 27270, -19677, 9843, 1110, -11939, 21406, -28439, 32232, -32358, 28799, -21963, 12624, -1851, -9135, 19079, -26853, 31569, -32692, 30092, -24068, 15303, -4797, -6257, 16596, -25049, 30647, -32759, 31140, -25978, 17856, -7704, -3327, 13978, -23039, 29475, -32558, 31933, -27675, 20264, -10548, -371, 11245, -20841, 28063, -32092, 32466, -29146, 22506, -13305, 2589, 8421, -18473, 26421, -31363, 32733, -30378, 24564, -15955, 5527, 5527, -15955, 24564, -30378, 32733, -31363, 26421, -18473, 8421, 2589, -13305, 22506, -29146, 32466, -32092, 28063, -20841, 11245, -371, -10548, 20264, -27675, 31933, -32558, 29475, -23039, 13978, -3327, -7704, 17856, -25978, 31140, -32759, 30647, -25049, 16596, -6257, -4797, 15303, -24068, 30092, -32692, 31569, -26853, 19079, -9135, -1851, 12624, -21963, 28799, -32358, 32232, -28439, 21406, -11939, 1110, 9843, -19677, 27270, -31760, 32633, -29792, 23559, -14645, 4062, 6981, -17232, 25519, -30902}, -{32767, -30378, 23559, -13305, 1110, 11245, -21963, 29475, -32692, 31140, -25049, 15303, -3327, -9135, 20264, -28439, 32466, -31760, 26421, -17232, 5527, 6981, -18473, 27270, -32092, 32232, -27675, 19079, -7704, -4797, 16596, -25978, 31569, -32558, 28799, -20841, 9843, 2589, -14645, 24564, -30902, 32733, -29792, 22506, -11939, -371, 12624, -23039, 30092, -32759, 30647, -24068, 13978, -1851, -10548, 21406, -29146, 32633, -31363, 25519, -15955, 4062, 8421, -19677, 28063, -32358, 31933, -26853, 17856, -6257, -6257, 17856, -26853, 31933, -32358, 28063, -19677, 8421, 4062, -15955, 25519, -31363, 32633, -29146, 21406, -10548, -1851, 13978, -24068, 30647, -32759, 30092, -23039, 12624, -371, -11939, 22506, -29792, 32733, -30902, 24564, -14645, 2589, 9843, -20841, 28799, -32558, 31569, -25978, 16596, -4797, -7704, 19079, -27675, 32232, -32092, 27270, -18473, 6981, 5527, -17232, 26421, -31760, 32466, -28439, 20264, -9135, -3327, 15303, -25049, 31140, -32692, 29475, -21963, 11245, 1110, -13305, 23559, -30378}, -{32767, -29792, 21406, -9135, -4797, 17856, -27675, 32466, -31363, 24564, -13305, -371, 13978, -25049, 31569, -32358, 27270, -17232, 4062, 9843, -21963, 30092, -32759, 29475, -20841, 8421, 5527, -18473, 28063, -32558, 31140, -24068, 12624, 1110, -14645, 25519, -31760, 32232, -26853, 16596, -3327, -10548, 22506, -30378, 32733, -29146, 20264, -7704, -6257, 19079, -28439, 32633, -30902, 23559, -11939, -1851, 15303, -25978, 31933, -32092, 26421, -15955, 2589, 11245, -23039, 30647, -32692, 28799, -19677, 6981, 6981, -19677, 28799, -32692, 30647, -23039, 11245, 2589, -15955, 26421, -32092, 31933, -25978, 15303, -1851, -11939, 23559, -30902, 32633, -28439, 19079, -6257, -7704, 20264, -29146, 32733, -30378, 22506, -10548, -3327, 16596, -26853, 32232, -31760, 25519, -14645, 1110, 12624, -24068, 31140, -32558, 28063, -18473, 5527, 8421, -20841, 29475, -32759, 30092, -21963, 9843, 4062, -17232, 27270, -32358, 31569, -25049, 13978, -371, -13305, 24564, -31363, 32466, -27675, 17856, -4797, -9135, 21406, -29792}, -{32767, -29146, 19079, -4797, -10548, 23559, -31363, 32232, -25978, 13978, 1110, -15955, 27270, -32558, 30647, -21963, 8421, 6981, -20841, 30092, -32692, 28063, -17232, 2589, 12624, -25049, 31933, -31760, 24564, -11939, -3327, 17856, -28439, 32733, -29792, 20264, -6257, -9135, 22506, -30902, 32466, -26853, 15303, -371, -14645, 26421, -32358, 31140, -23039, 9843, 5527, -19677, 29475, -32759, 28799, -18473, 4062, 11245, -24068, 31569, -32092, 25519, -13305, -1851, 16596, -27675, 32633, -30378, 21406, -7704, -7704, 21406, -30378, 32633, -27675, 16596, -1851, -13305, 25519, -32092, 31569, -24068, 11245, 4062, -18473, 28799, -32759, 29475, -19677, 5527, 9843, -23039, 31140, -32358, 26421, -14645, -371, 15303, -26853, 32466, -30902, 22506, -9135, -6257, 20264, -29792, 32733, -28439, 17856, -3327, -11939, 24564, -31760, 31933, -25049, 12624, 2589, -17232, 28063, -32692, 30092, -20841, 6981, 8421, -21963, 30647, -32558, 27270, -15955, 1110, 13978, -25978, 32232, -31363, 23559, -10548, -4797, 19079, -29146}, -{32767, -28439, 16596, -371, -15955, 28063, -32759, 28799, -17232, 1110, 15303, -27675, 32733, -29146, 17856, -1851, -14645, 27270, -32692, 29475, -18473, 2589, 13978, -26853, 32633, -29792, 19079, -3327, -13305, 26421, -32558, 30092, -19677, 4062, 12624, -25978, 32466, -30378, 20264, -4797, -11939, 25519, -32358, 30647, -20841, 5527, 11245, -25049, 32232, -30902, 21406, -6257, -10548, 24564, -32092, 31140, -21963, 6981, 9843, -24068, 31933, -31363, 22506, -7704, -9135, 23559, -31760, 31569, -23039, 8421, 8421, -23039, 31569, -31760, 23559, -9135, -7704, 22506, -31363, 31933, -24068, 9843, 6981, -21963, 31140, -32092, 24564, -10548, -6257, 21406, -30902, 32232, -25049, 11245, 5527, -20841, 30647, -32358, 25519, -11939, -4797, 20264, -30378, 32466, -25978, 12624, 4062, -19677, 30092, -32558, 26421, -13305, -3327, 19079, -29792, 32633, -26853, 13978, 2589, -18473, 29475, -32692, 27270, -14645, -1851, 17856, -29146, 32733, -27675, 15303, 1110, -17232, 28799, -32759, 28063, -15955, -371, 16596, -28439}, -{32767, -27675, 13978, 4062, -20841, 31140, -31760, 22506, -6257, -11939, 26421, -32692, 28799, -15955, -1851, 19079, -30378, 32232, -24068, 8421, 9843, -25049, 32466, -29792, 17856, -371, -17232, 29475, -32558, 25519, -10548, -7704, 23559, -32092, 30647, -19677, 2589, 15303, -28439, 32733, -26853, 12624, 5527, -21963, 31569, -31363, 21406, -4797, -13305, 27270, -32759, 28063, -14645, -3327, 20264, -30902, 31933, -23039, 6981, 11245, -25978, 32633, -29146, 16596, 1110, -18473, 30092, -32358, 24564, -9135, -9135, 24564, -32358, 30092, -18473, 1110, 16596, -29146, 32633, -25978, 11245, 6981, -23039, 31933, -30902, 20264, -3327, -14645, 28063, -32759, 27270, -13305, -4797, 21406, -31363, 31569, -21963, 5527, 12624, -26853, 32733, -28439, 15303, 2589, -19677, 30647, -32092, 23559, -7704, -10548, 25519, -32558, 29475, -17232, -371, 17856, -29792, 32466, -25049, 9843, 8421, -24068, 32232, -30378, 19079, -1851, -15955, 28799, -32692, 26421, -11939, -6257, 22506, -31760, 31140, -20841, 4062, 13978, -27675}, -{32767, -26853, 11245, 8421, -25049, 32633, -28439, 13978, 5527, -23039, 32232, -29792, 16596, 2589, -20841, 31569, -30902, 19079, -371, -18473, 30647, -31760, 21406, -3327, -15955, 29475, -32358, 23559, -6257, -13305, 28063, -32692, 25519, -9135, -10548, 26421, -32759, 27270, -11939, -7704, 24564, -32558, 28799, -14645, -4797, 22506, -32092, 30092, -17232, -1851, 20264, -31363, 31140, -19677, 1110, 17856, -30378, 31933, -21963, 4062, 15303, -29146, 32466, -24068, 6981, 12624, -27675, 32733, -25978, 9843, 9843, -25978, 32733, -27675, 12624, 6981, -24068, 32466, -29146, 15303, 4062, -21963, 31933, -30378, 17856, 1110, -19677, 31140, -31363, 20264, -1851, -17232, 30092, -32092, 22506, -4797, -14645, 28799, -32558, 24564, -7704, -11939, 27270, -32759, 26421, -10548, -9135, 25519, -32692, 28063, -13305, -6257, 23559, -32358, 29475, -15955, -3327, 21406, -31760, 30647, -18473, -371, 19079, -30902, 31569, -20841, 2589, 16596, -29792, 32232, -23039, 5527, 13978, -28439, 32633, -25049, 8421, 11245, -26853}, -{32767, -25978, 8421, 12624, -28439, 32466, -23039, 4062, 16596, -30378, 31569, -19677, -371, 20264, -31760, 30092, -15955, -4797, 23559, -32558, 28063, -11939, -9135, 26421, -32759, 25519, -7704, -13305, 28799, -32358, 22506, -3327, -17232, 30647, -31363, 19079, 1110, -20841, 31933, -29792, 15303, 5527, -24068, 32633, -27675, 11245, 9843, -26853, 32733, -25049, 6981, 13978, -29146, 32232, -21963, 2589, 17856, -30902, 31140, -18473, -1851, 21406, -32092, 29475, -14645, -6257, 24564, -32692, 27270, -10548, -10548, 27270, -32692, 24564, -6257, -14645, 29475, -32092, 21406, -1851, -18473, 31140, -30902, 17856, 2589, -21963, 32232, -29146, 13978, 6981, -25049, 32733, -26853, 9843, 11245, -27675, 32633, -24068, 5527, 15303, -29792, 31933, -20841, 1110, 19079, -31363, 30647, -17232, -3327, 22506, -32358, 28799, -13305, -7704, 25519, -32759, 26421, -9135, -11939, 28063, -32558, 23559, -4797, -15955, 30092, -31760, 20264, -371, -19677, 31569, -30378, 16596, 4062, -23039, 32466, -28439, 12624, 8421, -25978}, -{32767, -25049, 5527, 16596, -30902, 30647, -15955, -6257, 25519, -32759, 24564, -4797, -17232, 31140, -30378, 15303, 6981, -25978, 32733, -24068, 4062, 17856, -31363, 30092, -14645, -7704, 26421, -32692, 23559, -3327, -18473, 31569, -29792, 13978, 8421, -26853, 32633, -23039, 2589, 19079, -31760, 29475, -13305, -9135, 27270, -32558, 22506, -1851, -19677, 31933, -29146, 12624, 9843, -27675, 32466, -21963, 1110, 20264, -32092, 28799, -11939, -10548, 28063, -32358, 21406, -371, -20841, 32232, -28439, 11245, 11245, -28439, 32232, -20841, -371, 21406, -32358, 28063, -10548, -11939, 28799, -32092, 20264, 1110, -21963, 32466, -27675, 9843, 12624, -29146, 31933, -19677, -1851, 22506, -32558, 27270, -9135, -13305, 29475, -31760, 19079, 2589, -23039, 32633, -26853, 8421, 13978, -29792, 31569, -18473, -3327, 23559, -32692, 26421, -7704, -14645, 30092, -31363, 17856, 4062, -24068, 32733, -25978, 6981, 15303, -30378, 31140, -17232, -4797, 24564, -32759, 25519, -6257, -15955, 30647, -30902, 16596, 5527, -25049}, -{32767, -24068, 2589, 20264, -32358, 27270, -7704, -15955, 31140, -29792, 12624, 11245, -29146, 31569, -17232, -6257, 26421, -32558, 21406, 1110, -23039, 32733, -25049, 4062, 19079, -32092, 28063, -9135, -14645, 30647, -30378, 13978, 9843, -28439, 31933, -18473, -4797, 25519, -32692, 22506, -371, -21963, 32633, -25978, 5527, 17856, -31760, 28799, -10548, -13305, 30092, -30902, 15303, 8421, -27675, 32232, -19677, -3327, 24564, -32759, 23559, -1851, -20841, 32466, -26853, 6981, 16596, -31363, 29475, -11939, -11939, 29475, -31363, 16596, 6981, -26853, 32466, -20841, -1851, 23559, -32759, 24564, -3327, -19677, 32232, -27675, 8421, 15303, -30902, 30092, -13305, -10548, 28799, -31760, 17856, 5527, -25978, 32633, -21963, -371, 22506, -32692, 25519, -4797, -18473, 31933, -28439, 9843, 13978, -30378, 30647, -14645, -9135, 28063, -32092, 19079, 4062, -25049, 32733, -23039, 1110, 21406, -32558, 26421, -6257, -17232, 31569, -29146, 11245, 12624, -29792, 31140, -15955, -7704, 27270, -32358, 20264, 2589, -24068}, -{32767, -23039, -371, 23559, -32759, 22506, 1110, -24068, 32733, -21963, -1851, 24564, -32692, 21406, 2589, -25049, 32633, -20841, -3327, 25519, -32558, 20264, 4062, -25978, 32466, -19677, -4797, 26421, -32358, 19079, 5527, -26853, 32232, -18473, -6257, 27270, -32092, 17856, 6981, -27675, 31933, -17232, -7704, 28063, -31760, 16596, 8421, -28439, 31569, -15955, -9135, 28799, -31363, 15303, 9843, -29146, 31140, -14645, -10548, 29475, -30902, 13978, 11245, -29792, 30647, -13305, -11939, 30092, -30378, 12624, 12624, -30378, 30092, -11939, -13305, 30647, -29792, 11245, 13978, -30902, 29475, -10548, -14645, 31140, -29146, 9843, 15303, -31363, 28799, -9135, -15955, 31569, -28439, 8421, 16596, -31760, 28063, -7704, -17232, 31933, -27675, 6981, 17856, -32092, 27270, -6257, -18473, 32232, -26853, 5527, 19079, -32358, 26421, -4797, -19677, 32466, -25978, 4062, 20264, -32558, 25519, -3327, -20841, 32633, -25049, 2589, 21406, -32692, 24564, -1851, -21963, 32733, -24068, 1110, 22506, -32759, 23559, -371, -23039}, -{32767, -21963, -3327, 26421, -32092, 16596, 9843, -29792, 30092, -10548, -15955, 31933, -26853, 4062, 21406, -32759, 22506, 2589, -25978, 32232, -17232, -9135, 29475, -30378, 11245, 15303, -31760, 27270, -4797, -20841, 32733, -23039, -1851, 25519, -32358, 17856, 8421, -29146, 30647, -11939, -14645, 31569, -27675, 5527, 20264, -32692, 23559, 1110, -25049, 32466, -18473, -7704, 28799, -30902, 12624, 13978, -31363, 28063, -6257, -19677, 32633, -24068, -371, 24564, -32558, 19079, 6981, -28439, 31140, -13305, -13305, 31140, -28439, 6981, 19079, -32558, 24564, -371, -24068, 32633, -19677, -6257, 28063, -31363, 13978, 12624, -30902, 28799, -7704, -18473, 32466, -25049, 1110, 23559, -32692, 20264, 5527, -27675, 31569, -14645, -11939, 30647, -29146, 8421, 17856, -32358, 25519, -1851, -23039, 32733, -20841, -4797, 27270, -31760, 15303, 11245, -30378, 29475, -9135, -17232, 32232, -25978, 2589, 22506, -32759, 21406, 4062, -26853, 31933, -15955, -10548, 30092, -29792, 9843, 16596, -32092, 26421, -3327, -21963}, -{32767, -20841, -6257, 28799, -30378, 9843, 17856, -32558, 23559, 2589, -26853, 31569, -13305, -14645, 31933, -25978, 1110, 24564, -32358, 16596, 11245, -30902, 28063, -4797, -21963, 32733, -19677, -7704, 29475, -29792, 8421, 19079, -32692, 22506, 4062, -27675, 31140, -11939, -15955, 32232, -25049, -371, 25519, -32092, 15303, 12624, -31363, 27270, -3327, -23039, 32633, -18473, -9135, 30092, -29146, 6981, 20264, -32759, 21406, 5527, -28439, 30647, -10548, -17232, 32466, -24068, -1851, 26421, -31760, 13978, 13978, -31760, 26421, -1851, -24068, 32466, -17232, -10548, 30647, -28439, 5527, 21406, -32759, 20264, 6981, -29146, 30092, -9135, -18473, 32633, -23039, -3327, 27270, -31363, 12624, 15303, -32092, 25519, -371, -25049, 32232, -15955, -11939, 31140, -27675, 4062, 22506, -32692, 19079, 8421, -29792, 29475, -7704, -19677, 32733, -21963, -4797, 28063, -30902, 11245, 16596, -32358, 24564, 1110, -25978, 31933, -14645, -13305, 31569, -26853, 2589, 23559, -32558, 17856, 9843, -30378, 28799, -6257, -20841}, -{32767, -19677, -9135, 30647, -27675, 2589, 24564, -32092, 13978, 15303, -32358, 23559, 4062, -28439, 30092, -7704, -20841, 32733, -18473, -10548, 31140, -26853, 1110, 25519, -31760, 12624, 16596, -32558, 22506, 5527, -29146, 29475, -6257, -21963, 32633, -17232, -11939, 31569, -25978, -371, 26421, -31363, 11245, 17856, -32692, 21406, 6981, -29792, 28799, -4797, -23039, 32466, -15955, -13305, 31933, -25049, -1851, 27270, -30902, 9843, 19079, -32759, 20264, 8421, -30378, 28063, -3327, -24068, 32232, -14645, -14645, 32232, -24068, -3327, 28063, -30378, 8421, 20264, -32759, 19079, 9843, -30902, 27270, -1851, -25049, 31933, -13305, -15955, 32466, -23039, -4797, 28799, -29792, 6981, 21406, -32692, 17856, 11245, -31363, 26421, -371, -25978, 31569, -11939, -17232, 32633, -21963, -6257, 29475, -29146, 5527, 22506, -32558, 16596, 12624, -31760, 25519, 1110, -26853, 31140, -10548, -18473, 32733, -20841, -7704, 30092, -28439, 4062, 23559, -32358, 15303, 13978, -32092, 24564, 2589, -27675, 30647, -9135, -19677}, -{32767, -18473, -11939, 31933, -24068, -4797, 29475, -28439, 2589, 25519, -31363, 9843, 20264, -32692, 16596, 13978, -32358, 22506, 6981, -30378, 27270, -371, -26853, 30647, -7704, -21963, 32466, -14645, -15955, 32633, -20841, -9135, 31140, -25978, -1851, 28063, -29792, 5527, 23559, -32092, 12624, 17856, -32759, 19079, 11245, -31760, 24564, 4062, -29146, 28799, -3327, -25049, 31569, -10548, -19677, 32733, -17232, -13305, 32232, -23039, -6257, 30092, -27675, 1110, 26421, -30902, 8421, 21406, -32558, 15303, 15303, -32558, 21406, 8421, -30902, 26421, 1110, -27675, 30092, -6257, -23039, 32232, -13305, -17232, 32733, -19677, -10548, 31569, -25049, -3327, 28799, -29146, 4062, 24564, -31760, 11245, 19079, -32759, 17856, 12624, -32092, 23559, 5527, -29792, 28063, -1851, -25978, 31140, -9135, -20841, 32633, -15955, -14645, 32466, -21963, -7704, 30647, -26853, -371, 27270, -30378, 6981, 22506, -32358, 13978, 16596, -32692, 20264, 9843, -31363, 25519, 2589, -28439, 29475, -4797, -24068, 31933, -11939, -18473}, -{32767, -17232, -14645, 32633, -19677, -11939, 32232, -21963, -9135, 31569, -24068, -6257, 30647, -25978, -3327, 29475, -27675, -371, 28063, -29146, 2589, 26421, -30378, 5527, 24564, -31363, 8421, 22506, -32092, 11245, 20264, -32558, 13978, 17856, -32759, 16596, 15303, -32692, 19079, 12624, -32358, 21406, 9843, -31760, 23559, 6981, -30902, 25519, 4062, -29792, 27270, 1110, -28439, 28799, -1851, -26853, 30092, -4797, -25049, 31140, -7704, -23039, 31933, -10548, -20841, 32466, -13305, -18473, 32733, -15955, -15955, 32733, -18473, -13305, 32466, -20841, -10548, 31933, -23039, -7704, 31140, -25049, -4797, 30092, -26853, -1851, 28799, -28439, 1110, 27270, -29792, 4062, 25519, -30902, 6981, 23559, -31760, 9843, 21406, -32358, 12624, 19079, -32692, 15303, 16596, -32759, 17856, 13978, -32558, 20264, 11245, -32092, 22506, 8421, -31363, 24564, 5527, -30378, 26421, 2589, -29146, 28063, -371, -27675, 29475, -3327, -25978, 30647, -6257, -24068, 31569, -9135, -21963, 32232, -11939, -19677, 32633, -14645, -17232}, -{32767, -15955, -17232, 32733, -14645, -18473, 32633, -13305, -19677, 32466, -11939, -20841, 32232, -10548, -21963, 31933, -9135, -23039, 31569, -7704, -24068, 31140, -6257, -25049, 30647, -4797, -25978, 30092, -3327, -26853, 29475, -1851, -27675, 28799, -371, -28439, 28063, 1110, -29146, 27270, 2589, -29792, 26421, 4062, -30378, 25519, 5527, -30902, 24564, 6981, -31363, 23559, 8421, -31760, 22506, 9843, -32092, 21406, 11245, -32358, 20264, 12624, -32558, 19079, 13978, -32692, 17856, 15303, -32759, 16596, 16596, -32759, 15303, 17856, -32692, 13978, 19079, -32558, 12624, 20264, -32358, 11245, 21406, -32092, 9843, 22506, -31760, 8421, 23559, -31363, 6981, 24564, -30902, 5527, 25519, -30378, 4062, 26421, -29792, 2589, 27270, -29146, 1110, 28063, -28439, -371, 28799, -27675, -1851, 29475, -26853, -3327, 30092, -25978, -4797, 30647, -25049, -6257, 31140, -24068, -7704, 31569, -23039, -9135, 31933, -21963, -10548, 32232, -20841, -11939, 32466, -19677, -13305, 32633, -18473, -14645, 32733, -17232, -15955}, -{32767, -14645, -19677, 32232, -9135, -24068, 30647, -3327, -27675, 28063, 2589, -30378, 24564, 8421, -32092, 20264, 13978, -32759, 15303, 19079, -32358, 9843, 23559, -30902, 4062, 27270, -28439, -1851, 30092, -25049, -7704, 31933, -20841, -13305, 32733, -15955, -18473, 32466, -10548, -23039, 31140, -4797, -26853, 28799, 1110, -29792, 25519, 6981, -31760, 21406, 12624, -32692, 16596, 17856, -32558, 11245, 22506, -31363, 5527, 26421, -29146, -371, 29475, -25978, -6257, 31569, -21963, -11939, 32633, -17232, -17232, 32633, -11939, -21963, 31569, -6257, -25978, 29475, -371, -29146, 26421, 5527, -31363, 22506, 11245, -32558, 17856, 16596, -32692, 12624, 21406, -31760, 6981, 25519, -29792, 1110, 28799, -26853, -4797, 31140, -23039, -10548, 32466, -18473, -15955, 32733, -13305, -20841, 31933, -7704, -25049, 30092, -1851, -28439, 27270, 4062, -30902, 23559, 9843, -32358, 19079, 15303, -32759, 13978, 20264, -32092, 8421, 24564, -30378, 2589, 28063, -27675, -3327, 30647, -24068, -9135, 32232, -19677, -14645}, -{32767, -13305, -21963, 31140, -3327, -28439, 26421, 6981, -32092, 19079, 16596, -32558, 9843, 24564, -29792, -371, 30092, -24068, -10548, 32633, -15955, -19677, 31933, -6257, -26853, 28063, 4062, -31363, 21406, 13978, -32759, 12624, 22506, -30902, 2589, 28799, -25978, -7704, 32232, -18473, -17232, 32466, -9135, -25049, 29475, 1110, -30378, 23559, 11245, -32692, 15303, 20264, -31760, 5527, 27270, -27675, -4797, 31569, -20841, -14645, 32733, -11939, -23039, 30647, -1851, -29146, 25519, 8421, -32358, 17856, 17856, -32358, 8421, 25519, -29146, -1851, 30647, -23039, -11939, 32733, -14645, -20841, 31569, -4797, -27675, 27270, 5527, -31760, 20264, 15303, -32692, 11245, 23559, -30378, 1110, 29475, -25049, -9135, 32466, -17232, -18473, 32232, -7704, -25978, 28799, 2589, -30902, 22506, 12624, -32759, 13978, 21406, -31363, 4062, 28063, -26853, -6257, 31933, -19677, -15955, 32633, -10548, -24068, 30092, -371, -29792, 24564, 9843, -32558, 16596, 19079, -32092, 6981, 26421, -28439, -3327, 31140, -21963, -13305}, -{32767, -11939, -24068, 29475, 2589, -31363, 20264, 16596, -32358, 6981, 27270, -26853, -7704, 32466, -15955, -20841, 31140, -1851, -29792, 23559, 12624, -32759, 11245, 24564, -29146, -3327, 31569, -19677, -17232, 32232, -6257, -27675, 26421, 8421, -32558, 15303, 21406, -30902, 1110, 30092, -23039, -13305, 32733, -10548, -25049, 28799, 4062, -31760, 19079, 17856, -32092, 5527, 28063, -25978, -9135, 32633, -14645, -21963, 30647, -371, -30378, 22506, 13978, -32692, 9843, 25519, -28439, -4797, 31933, -18473, -18473, 31933, -4797, -28439, 25519, 9843, -32692, 13978, 22506, -30378, -371, 30647, -21963, -14645, 32633, -9135, -25978, 28063, 5527, -32092, 17856, 19079, -31760, 4062, 28799, -25049, -10548, 32733, -13305, -23039, 30092, 1110, -30902, 21406, 15303, -32558, 8421, 26421, -27675, -6257, 32232, -17232, -19677, 31569, -3327, -29146, 24564, 11245, -32759, 12624, 23559, -29792, -1851, 31140, -20841, -15955, 32466, -7704, -26853, 27270, 6981, -32358, 16596, 20264, -31363, 2589, 29475, -24068, -11939}, -{32767, -10548, -25978, 27270, 8421, -32692, 12624, 24564, -28439, -6257, 32466, -14645, -23039, 29475, 4062, -32092, 16596, 21406, -30378, -1851, 31569, -18473, -19677, 31140, -371, -30902, 20264, 17856, -31760, 2589, 30092, -21963, -15955, 32232, -4797, -29146, 23559, 13978, -32558, 6981, 28063, -25049, -11939, 32733, -9135, -26853, 26421, 9843, -32759, 11245, 25519, -27675, -7704, 32633, -13305, -24068, 28799, 5527, -32358, 15303, 22506, -29792, -3327, 31933, -17232, -20841, 30647, 1110, -31363, 19079, 19079, -31363, 1110, 30647, -20841, -17232, 31933, -3327, -29792, 22506, 15303, -32358, 5527, 28799, -24068, -13305, 32633, -7704, -27675, 25519, 11245, -32759, 9843, 26421, -26853, -9135, 32733, -11939, -25049, 28063, 6981, -32558, 13978, 23559, -29146, -4797, 32232, -15955, -21963, 30092, 2589, -31760, 17856, 20264, -30902, -371, 31140, -19677, -18473, 31569, -1851, -30378, 21406, 16596, -32092, 4062, 29475, -23039, -14645, 32466, -6257, -28439, 24564, 12624, -32692, 8421, 27270, -25978, -10548}, -{32767, -9135, -27675, 24564, 13978, -32358, 4062, 30092, -20841, -18473, 31140, 1110, -31760, 16596, 22506, -29146, -6257, 32633, -11939, -25978, 26421, 11245, -32692, 6981, 28799, -23039, -15955, 31933, -1851, -30902, 19079, 20264, -30378, -3327, 32232, -14645, -24068, 28063, 8421, -32759, 9843, 27270, -25049, -13305, 32466, -4797, -29792, 21406, 17856, -31363, -371, 31569, -17232, -21963, 29475, 5527, -32558, 12624, 25519, -26853, -10548, 32733, -7704, -28439, 23559, 15303, -32092, 2589, 30647, -19677, -19677, 30647, 2589, -32092, 15303, 23559, -28439, -7704, 32733, -10548, -26853, 25519, 12624, -32558, 5527, 29475, -21963, -17232, 31569, -371, -31363, 17856, 21406, -29792, -4797, 32466, -13305, -25049, 27270, 9843, -32759, 8421, 28063, -24068, -14645, 32232, -3327, -30378, 20264, 19079, -30902, -1851, 31933, -15955, -23039, 28799, 6981, -32692, 11245, 26421, -25978, -11939, 32633, -6257, -29146, 22506, 16596, -31760, 1110, 31140, -18473, -20841, 30092, 4062, -32358, 13978, 24564, -27675, -9135}, -{32767, -7704, -29146, 21406, 19079, -30378, -4797, 32633, -10548, -27675, 23559, 16596, -31363, -1851, 32232, -13305, -25978, 25519, 13978, -32092, 1110, 31569, -15955, -24068, 27270, 11245, -32558, 4062, 30647, -18473, -21963, 28799, 8421, -32759, 6981, 29475, -20841, -19677, 30092, 5527, -32692, 9843, 28063, -23039, -17232, 31140, 2589, -32358, 12624, 26421, -25049, -14645, 31933, -371, -31760, 15303, 24564, -26853, -11939, 32466, -3327, -30902, 17856, 22506, -28439, -9135, 32733, -6257, -29792, 20264, 20264, -29792, -6257, 32733, -9135, -28439, 22506, 17856, -30902, -3327, 32466, -11939, -26853, 24564, 15303, -31760, -371, 31933, -14645, -25049, 26421, 12624, -32358, 2589, 31140, -17232, -23039, 28063, 9843, -32692, 5527, 30092, -19677, -20841, 29475, 6981, -32759, 8421, 28799, -21963, -18473, 30647, 4062, -32558, 11245, 27270, -24068, -15955, 31569, 1110, -32092, 13978, 25519, -25978, -13305, 32232, -1851, -31363, 16596, 23559, -27675, -10548, 32633, -4797, -30378, 19079, 21406, -29146, -7704}, -{32767, -6257, -30378, 17856, 23559, -26853, -13305, 31933, 1110, -32358, 11245, 28063, -21963, -19677, 29475, 8421, -32692, 4062, 31140, -15955, -25049, 25519, 15303, -31363, -3327, 32633, -9135, -29146, 20264, 21406, -28439, -10548, 32466, -1851, -31760, 13978, 26421, -24068, -17232, 30647, 5527, -32759, 6981, 30092, -18473, -23039, 27270, 12624, -32092, -371, 32232, -11939, -27675, 22506, 19079, -29792, -7704, 32733, -4797, -30902, 16596, 24564, -25978, -14645, 31569, 2589, -32558, 9843, 28799, -20841, -20841, 28799, 9843, -32558, 2589, 31569, -14645, -25978, 24564, 16596, -30902, -4797, 32733, -7704, -29792, 19079, 22506, -27675, -11939, 32232, -371, -32092, 12624, 27270, -23039, -18473, 30092, 6981, -32759, 5527, 30647, -17232, -24068, 26421, 13978, -31760, -1851, 32466, -10548, -28439, 21406, 20264, -29146, -9135, 32633, -3327, -31363, 15303, 25519, -25049, -15955, 31140, 4062, -32692, 8421, 29475, -19677, -21963, 28063, 11245, -32358, 1110, 31933, -13305, -26853, 23559, 17856, -30378, -6257}, -{32767, -4797, -31363, 13978, 27270, -21963, -20841, 28063, 12624, -31760, -3327, 32733, -6257, -30902, 15303, 26421, -23039, -19677, 28799, 11245, -32092, -1851, 32633, -7704, -30378, 16596, 25519, -24068, -18473, 29475, 9843, -32358, -371, 32466, -9135, -29792, 17856, 24564, -25049, -17232, 30092, 8421, -32558, 1110, 32232, -10548, -29146, 19079, 23559, -25978, -15955, 30647, 6981, -32692, 2589, 31933, -11939, -28439, 20264, 22506, -26853, -14645, 31140, 5527, -32759, 4062, 31569, -13305, -27675, 21406, 21406, -27675, -13305, 31569, 4062, -32759, 5527, 31140, -14645, -26853, 22506, 20264, -28439, -11939, 31933, 2589, -32692, 6981, 30647, -15955, -25978, 23559, 19079, -29146, -10548, 32232, 1110, -32558, 8421, 30092, -17232, -25049, 24564, 17856, -29792, -9135, 32466, -371, -32358, 9843, 29475, -18473, -24068, 25519, 16596, -30378, -7704, 32633, -1851, -32092, 11245, 28799, -19677, -23039, 26421, 15303, -30902, -6257, 32733, -3327, -31760, 12624, 28063, -20841, -21963, 27270, 13978, -31363, -4797}, -{32767, -3327, -32092, 9843, 30092, -15955, -26853, 21406, 22506, -25978, -17232, 29475, 11245, -31760, -4797, 32733, -1851, -32358, 8421, 30647, -14645, -27675, 20264, 23559, -25049, -18473, 28799, 12624, -31363, -6257, 32633, -371, -32558, 6981, 31140, -13305, -28439, 19079, 24564, -24068, -19677, 28063, 13978, -30902, -7704, 32466, 1110, -32692, 5527, 31569, -11939, -29146, 17856, 25519, -23039, -20841, 27270, 15303, -30378, -9135, 32232, 2589, -32759, 4062, 31933, -10548, -29792, 16596, 26421, -21963, -21963, 26421, 16596, -29792, -10548, 31933, 4062, -32759, 2589, 32232, -9135, -30378, 15303, 27270, -20841, -23039, 25519, 17856, -29146, -11939, 31569, 5527, -32692, 1110, 32466, -7704, -30902, 13978, 28063, -19677, -24068, 24564, 19079, -28439, -13305, 31140, 6981, -32558, -371, 32633, -6257, -31363, 12624, 28799, -18473, -25049, 23559, 20264, -27675, -14645, 30647, 8421, -32358, -1851, 32733, -4797, -31760, 11245, 29475, -17232, -25978, 22506, 21406, -26853, -15955, 30092, 9843, -32092, -3327}, -{32767, -1851, -32558, 5527, 31933, -9135, -30902, 12624, 29475, -15955, -27675, 19079, 25519, -21963, -23039, 24564, 20264, -26853, -17232, 28799, 13978, -30378, -10548, 31569, 6981, -32358, -3327, 32733, -371, -32692, 4062, 32232, -7704, -31363, 11245, 30092, -14645, -28439, 17856, 26421, -20841, -24068, 23559, 21406, -25978, -18473, 28063, 15303, -29792, -11939, 31140, 8421, -32092, -4797, 32633, 1110, -32759, 2589, 32466, -6257, -31760, 9843, 30647, -13305, -29146, 16596, 27270, -19677, -25049, 22506, 22506, -25049, -19677, 27270, 16596, -29146, -13305, 30647, 9843, -31760, -6257, 32466, 2589, -32759, 1110, 32633, -4797, -32092, 8421, 31140, -11939, -29792, 15303, 28063, -18473, -25978, 21406, 23559, -24068, -20841, 26421, 17856, -28439, -14645, 30092, 11245, -31363, -7704, 32232, 4062, -32692, -371, 32733, -3327, -32358, 6981, 31569, -10548, -30378, 13978, 28799, -17232, -26853, 20264, 24564, -23039, -21963, 25519, 19079, -27675, -15955, 29475, 12624, -30902, -9135, 31933, 5527, -32558, -1851}, -{32767, -371, -32759, 1110, 32733, -1851, -32692, 2589, 32633, -3327, -32558, 4062, 32466, -4797, -32358, 5527, 32232, -6257, -32092, 6981, 31933, -7704, -31760, 8421, 31569, -9135, -31363, 9843, 31140, -10548, -30902, 11245, 30647, -11939, -30378, 12624, 30092, -13305, -29792, 13978, 29475, -14645, -29146, 15303, 28799, -15955, -28439, 16596, 28063, -17232, -27675, 17856, 27270, -18473, -26853, 19079, 26421, -19677, -25978, 20264, 25519, -20841, -25049, 21406, 24564, -21963, -24068, 22506, 23559, -23039, -23039, 23559, 22506, -24068, -21963, 24564, 21406, -25049, -20841, 25519, 20264, -25978, -19677, 26421, 19079, -26853, -18473, 27270, 17856, -27675, -17232, 28063, 16596, -28439, -15955, 28799, 15303, -29146, -14645, 29475, 13978, -29792, -13305, 30092, 12624, -30378, -11939, 30647, 11245, -30902, -10548, 31140, 9843, -31363, -9135, 31569, 8421, -31760, -7704, 31933, 6981, -32092, -6257, 32232, 5527, -32358, -4797, 32466, 4062, -32558, -3327, 32633, 2589, -32692, -1851, 32733, 1110, -32759, -371}, -{32767, 1110, -32692, -3327, 32466, 5527, -32092, -7704, 31569, 9843, -30902, -11939, 30092, 13978, -29146, -15955, 28063, 17856, -26853, -19677, 25519, 21406, -24068, -23039, 22506, 24564, -20841, -25978, 19079, 27270, -17232, -28439, 15303, 29475, -13305, -30378, 11245, 31140, -9135, -31760, 6981, 32232, -4797, -32558, 2589, 32733, -371, -32759, -1851, 32633, 4062, -32358, -6257, 31933, 8421, -31363, -10548, 30647, 12624, -29792, -14645, 28799, 16596, -27675, -18473, 26421, 20264, -25049, -21963, 23559, 23559, -21963, -25049, 20264, 26421, -18473, -27675, 16596, 28799, -14645, -29792, 12624, 30647, -10548, -31363, 8421, 31933, -6257, -32358, 4062, 32633, -1851, -32759, -371, 32733, 2589, -32558, -4797, 32232, 6981, -31760, -9135, 31140, 11245, -30378, -13305, 29475, 15303, -28439, -17232, 27270, 19079, -25978, -20841, 24564, 22506, -23039, -24068, 21406, 25519, -19677, -26853, 17856, 28063, -15955, -29146, 13978, 30092, -11939, -30902, 9843, 31569, -7704, -32092, 5527, 32466, -3327, -32692, 1110}, -{32767, 2589, -32358, -7704, 31140, 12624, -29146, -17232, 26421, 21406, -23039, -25049, 19079, 28063, -14645, -30378, 9843, 31933, -4797, -32692, -371, 32633, 5527, -31760, -10548, 30092, 15303, -27675, -19677, 24564, 23559, -20841, -26853, 16596, 29475, -11939, -31363, 6981, 32466, -1851, -32759, -3327, 32232, 8421, -30902, -13305, 28799, 17856, -25978, -21963, 22506, 25519, -18473, -28439, 13978, 30647, -9135, -32092, 4062, 32733, 1110, -32558, -6257, 31569, 11245, -29792, -15955, 27270, 20264, -24068, -24068, 20264, 27270, -15955, -29792, 11245, 31569, -6257, -32558, 1110, 32733, 4062, -32092, -9135, 30647, 13978, -28439, -18473, 25519, 22506, -21963, -25978, 17856, 28799, -13305, -30902, 8421, 32232, -3327, -32759, -1851, 32466, 6981, -31363, -11939, 29475, 16596, -26853, -20841, 23559, 24564, -19677, -27675, 15303, 30092, -10548, -31760, 5527, 32633, -371, -32692, -4797, 31933, 9843, -30378, -14645, 28063, 19079, -25049, -23039, 21406, 26421, -17232, -29146, 12624, 31140, -7704, -32358, 2589}, -{32767, 4062, -31760, -11939, 28799, 19079, -24068, -25049, 17856, 29475, -10548, -32092, 2589, 32733, 5527, -31363, -13305, 28063, 20264, -23039, -25978, 16596, 30092, -9135, -32358, 1110, 32633, 6981, -30902, -14645, 27270, 21406, -21963, -26853, 15303, 30647, -7704, -32558, -371, 32466, 8421, -30378, -15955, 26421, 22506, -20841, -27675, 13978, 31140, -6257, -32692, -1851, 32232, 9843, -29792, -17232, 25519, 23559, -19677, -28439, 12624, 31569, -4797, -32759, -3327, 31933, 11245, -29146, -18473, 24564, 24564, -18473, -29146, 11245, 31933, -3327, -32759, -4797, 31569, 12624, -28439, -19677, 23559, 25519, -17232, -29792, 9843, 32232, -1851, -32692, -6257, 31140, 13978, -27675, -20841, 22506, 26421, -15955, -30378, 8421, 32466, -371, -32558, -7704, 30647, 15303, -26853, -21963, 21406, 27270, -14645, -30902, 6981, 32633, 1110, -32358, -9135, 30092, 16596, -25978, -23039, 20264, 28063, -13305, -31363, 5527, 32733, 2589, -32092, -10548, 29475, 17856, -25049, -24068, 19079, 28799, -11939, -31760, 4062}, -{32767, 5527, -30902, -15955, 25519, 24564, -17232, -30378, 6981, 32733, 4062, -31363, -14645, 26421, 23559, -18473, -29792, 8421, 32633, 2589, -31760, -13305, 27270, 22506, -19677, -29146, 9843, 32466, 1110, -32092, -11939, 28063, 21406, -20841, -28439, 11245, 32232, -371, -32358, -10548, 28799, 20264, -21963, -27675, 12624, 31933, -1851, -32558, -9135, 29475, 19079, -23039, -26853, 13978, 31569, -3327, -32692, -7704, 30092, 17856, -24068, -25978, 15303, 31140, -4797, -32759, -6257, 30647, 16596, -25049, -25049, 16596, 30647, -6257, -32759, -4797, 31140, 15303, -25978, -24068, 17856, 30092, -7704, -32692, -3327, 31569, 13978, -26853, -23039, 19079, 29475, -9135, -32558, -1851, 31933, 12624, -27675, -21963, 20264, 28799, -10548, -32358, -371, 32232, 11245, -28439, -20841, 21406, 28063, -11939, -32092, 1110, 32466, 9843, -29146, -19677, 22506, 27270, -13305, -31760, 2589, 32633, 8421, -29792, -18473, 23559, 26421, -14645, -31363, 4062, 32733, 6981, -30378, -17232, 24564, 25519, -15955, -30902, 5527}, -{32767, 6981, -29792, -19677, 21406, 28799, -9135, -32692, -4797, 30647, 17856, -23039, -27675, 11245, 32466, 2589, -31363, -15955, 24564, 26421, -13305, -32092, -371, 31933, 13978, -25978, -25049, 15303, 31569, -1851, -32358, -11939, 27270, 23559, -17232, -30902, 4062, 32633, 9843, -28439, -21963, 19079, 30092, -6257, -32759, -7704, 29475, 20264, -20841, -29146, 8421, 32733, 5527, -30378, -18473, 22506, 28063, -10548, -32558, -3327, 31140, 16596, -24068, -26853, 12624, 32232, 1110, -31760, -14645, 25519, 25519, -14645, -31760, 1110, 32232, 12624, -26853, -24068, 16596, 31140, -3327, -32558, -10548, 28063, 22506, -18473, -30378, 5527, 32733, 8421, -29146, -20841, 20264, 29475, -7704, -32759, -6257, 30092, 19079, -21963, -28439, 9843, 32633, 4062, -30902, -17232, 23559, 27270, -11939, -32358, -1851, 31569, 15303, -25049, -25978, 13978, 31933, -371, -32092, -13305, 26421, 24564, -15955, -31363, 2589, 32466, 11245, -27675, -23039, 17856, 30647, -4797, -32692, -9135, 28799, 21406, -19677, -29792, 6981}, -{32767, 8421, -28439, -23039, 16596, 31569, -371, -31760, -15955, 23559, 28063, -9135, -32759, -7704, 28799, 22506, -17232, -31363, 1110, 31933, 15303, -24068, -27675, 9843, 32733, 6981, -29146, -21963, 17856, 31140, -1851, -32092, -14645, 24564, 27270, -10548, -32692, -6257, 29475, 21406, -18473, -30902, 2589, 32232, 13978, -25049, -26853, 11245, 32633, 5527, -29792, -20841, 19079, 30647, -3327, -32358, -13305, 25519, 26421, -11939, -32558, -4797, 30092, 20264, -19677, -30378, 4062, 32466, 12624, -25978, -25978, 12624, 32466, 4062, -30378, -19677, 20264, 30092, -4797, -32558, -11939, 26421, 25519, -13305, -32358, -3327, 30647, 19079, -20841, -29792, 5527, 32633, 11245, -26853, -25049, 13978, 32232, 2589, -30902, -18473, 21406, 29475, -6257, -32692, -10548, 27270, 24564, -14645, -32092, -1851, 31140, 17856, -21963, -29146, 6981, 32733, 9843, -27675, -24068, 15303, 31933, 1110, -31363, -17232, 22506, 28799, -7704, -32759, -9135, 28063, 23559, -15955, -31760, -371, 31569, 16596, -23039, -28439, 8421}, -{32767, 9843, -26853, -25978, 11245, 32733, 8421, -27675, -25049, 12624, 32633, 6981, -28439, -24068, 13978, 32466, 5527, -29146, -23039, 15303, 32232, 4062, -29792, -21963, 16596, 31933, 2589, -30378, -20841, 17856, 31569, 1110, -30902, -19677, 19079, 31140, -371, -31363, -18473, 20264, 30647, -1851, -31760, -17232, 21406, 30092, -3327, -32092, -15955, 22506, 29475, -4797, -32358, -14645, 23559, 28799, -6257, -32558, -13305, 24564, 28063, -7704, -32692, -11939, 25519, 27270, -9135, -32759, -10548, 26421, 26421, -10548, -32759, -9135, 27270, 25519, -11939, -32692, -7704, 28063, 24564, -13305, -32558, -6257, 28799, 23559, -14645, -32358, -4797, 29475, 22506, -15955, -32092, -3327, 30092, 21406, -17232, -31760, -1851, 30647, 20264, -18473, -31363, -371, 31140, 19079, -19677, -30902, 1110, 31569, 17856, -20841, -30378, 2589, 31933, 16596, -21963, -29792, 4062, 32232, 15303, -23039, -29146, 5527, 32466, 13978, -24068, -28439, 6981, 32633, 12624, -25049, -27675, 8421, 32733, 11245, -25978, -26853, 9843}, -{32767, 11245, -25049, -28439, 5527, 32232, 16596, -20841, -30902, -371, 30647, 21406, -15955, -32358, -6257, 28063, 25519, -10548, -32759, -11939, 24564, 28799, -4797, -32092, -17232, 20264, 31140, 1110, -30378, -21963, 15303, 32466, 6981, -27675, -25978, 9843, 32733, 12624, -24068, -29146, 4062, 31933, 17856, -19677, -31363, -1851, 30092, 22506, -14645, -32558, -7704, 27270, 26421, -9135, -32692, -13305, 23559, 29475, -3327, -31760, -18473, 19079, 31569, 2589, -29792, -23039, 13978, 32633, 8421, -26853, -26853, 8421, 32633, 13978, -23039, -29792, 2589, 31569, 19079, -18473, -31760, -3327, 29475, 23559, -13305, -32692, -9135, 26421, 27270, -7704, -32558, -14645, 22506, 30092, -1851, -31363, -19677, 17856, 31933, 4062, -29146, -24068, 12624, 32733, 9843, -25978, -27675, 6981, 32466, 15303, -21963, -30378, 1110, 31140, 20264, -17232, -32092, -4797, 28799, 24564, -11939, -32759, -10548, 25519, 28063, -6257, -32358, -15955, 21406, 30647, -371, -30902, -20841, 16596, 32232, 5527, -28439, -25049, 11245}, -{32767, 12624, -23039, -30378, -371, 30092, 23559, -11939, -32759, -13305, 22506, 30647, 1110, -29792, -24068, 11245, 32733, 13978, -21963, -30902, -1851, 29475, 24564, -10548, -32692, -14645, 21406, 31140, 2589, -29146, -25049, 9843, 32633, 15303, -20841, -31363, -3327, 28799, 25519, -9135, -32558, -15955, 20264, 31569, 4062, -28439, -25978, 8421, 32466, 16596, -19677, -31760, -4797, 28063, 26421, -7704, -32358, -17232, 19079, 31933, 5527, -27675, -26853, 6981, 32232, 17856, -18473, -32092, -6257, 27270, 27270, -6257, -32092, -18473, 17856, 32232, 6981, -26853, -27675, 5527, 31933, 19079, -17232, -32358, -7704, 26421, 28063, -4797, -31760, -19677, 16596, 32466, 8421, -25978, -28439, 4062, 31569, 20264, -15955, -32558, -9135, 25519, 28799, -3327, -31363, -20841, 15303, 32633, 9843, -25049, -29146, 2589, 31140, 21406, -14645, -32692, -10548, 24564, 29475, -1851, -30902, -21963, 13978, 32733, 11245, -24068, -29792, 1110, 30647, 22506, -13305, -32759, -11939, 23559, 30092, -371, -30378, -23039, 12624}, -{32767, 13978, -20841, -31760, -6257, 26421, 28799, -1851, -30378, -24068, 9843, 32466, 17856, -17232, -32558, -10548, 23559, 30647, 2589, -28439, -26853, 5527, 31569, 21406, -13305, -32759, -14645, 20264, 31933, 6981, -25978, -29146, 1110, 30092, 24564, -9135, -32358, -18473, 16596, 32633, 11245, -23039, -30902, -3327, 28063, 27270, -4797, -31363, -21963, 12624, 32733, 15303, -19677, -32092, -7704, 25519, 29475, -371, -29792, -25049, 8421, 32232, 19079, -15955, -32692, -11939, 22506, 31140, 4062, -27675, -27675, 4062, 31140, 22506, -11939, -32692, -15955, 19079, 32232, 8421, -25049, -29792, -371, 29475, 25519, -7704, -32092, -19677, 15303, 32733, 12624, -21963, -31363, -4797, 27270, 28063, -3327, -30902, -23039, 11245, 32633, 16596, -18473, -32358, -9135, 24564, 30092, 1110, -29146, -25978, 6981, 31933, 20264, -14645, -32759, -13305, 21406, 31569, 5527, -26853, -28439, 2589, 30647, 23559, -10548, -32558, -17232, 17856, 32466, 9843, -24068, -30378, -1851, 28799, 26421, -6257, -31760, -20841, 13978}, -{32767, 15303, -18473, -32558, -11939, 21406, 31933, 8421, -24068, -30902, -4797, 26421, 29475, 1110, -28439, -27675, 2589, 30092, 25519, -6257, -31363, -23039, 9843, 32232, 20264, -13305, -32692, -17232, 16596, 32733, 13978, -19677, -32358, -10548, 22506, 31569, 6981, -25049, -30378, -3327, 27270, 28799, -371, -29146, -26853, 4062, 30647, 24564, -7704, -31760, -21963, 11245, 32466, 19079, -14645, -32759, -15955, 17856, 32633, 12624, -20841, -32092, -9135, 23559, 31140, 5527, -25978, -29792, -1851, 28063, 28063, -1851, -29792, -25978, 5527, 31140, 23559, -9135, -32092, -20841, 12624, 32633, 17856, -15955, -32759, -14645, 19079, 32466, 11245, -21963, -31760, -7704, 24564, 30647, 4062, -26853, -29146, -371, 28799, 27270, -3327, -30378, -25049, 6981, 31569, 22506, -10548, -32358, -19677, 13978, 32733, 16596, -17232, -32692, -13305, 20264, 32232, 9843, -23039, -31363, -6257, 25519, 30092, 2589, -27675, -28439, 1110, 29475, 26421, -4797, -30902, -24068, 8421, 31933, 21406, -11939, -32558, -18473, 15303}, -{32767, 16596, -15955, -32759, -17232, 15303, 32733, 17856, -14645, -32692, -18473, 13978, 32633, 19079, -13305, -32558, -19677, 12624, 32466, 20264, -11939, -32358, -20841, 11245, 32232, 21406, -10548, -32092, -21963, 9843, 31933, 22506, -9135, -31760, -23039, 8421, 31569, 23559, -7704, -31363, -24068, 6981, 31140, 24564, -6257, -30902, -25049, 5527, 30647, 25519, -4797, -30378, -25978, 4062, 30092, 26421, -3327, -29792, -26853, 2589, 29475, 27270, -1851, -29146, -27675, 1110, 28799, 28063, -371, -28439, -28439, -371, 28063, 28799, 1110, -27675, -29146, -1851, 27270, 29475, 2589, -26853, -29792, -3327, 26421, 30092, 4062, -25978, -30378, -4797, 25519, 30647, 5527, -25049, -30902, -6257, 24564, 31140, 6981, -24068, -31363, -7704, 23559, 31569, 8421, -23039, -31760, -9135, 22506, 31933, 9843, -21963, -32092, -10548, 21406, 32232, 11245, -20841, -32358, -11939, 20264, 32466, 12624, -19677, -32558, -13305, 19079, 32633, 13978, -18473, -32692, -14645, 17856, 32733, 15303, -17232, -32759, -15955, 16596}, -{32767, 17856, -13305, -32358, -21963, 8421, 31140, 25519, -3327, -29146, -28439, -1851, 26421, 30647, 6981, -23039, -32092, -11939, 19079, 32733, 16596, -14645, -32558, -20841, 9843, 31569, 24564, -4797, -29792, -27675, -371, 27270, 30092, 5527, -24068, -31760, -10548, 20264, 32633, 15303, -15955, -32692, -19677, 11245, 31933, 23559, -6257, -30378, -26853, 1110, 28063, 29475, 4062, -25049, -31363, -9135, 21406, 32466, 13978, -17232, -32759, -18473, 12624, 32232, 22506, -7704, -30902, -25978, 2589, 28799, 28799, 2589, -25978, -30902, -7704, 22506, 32232, 12624, -18473, -32759, -17232, 13978, 32466, 21406, -9135, -31363, -25049, 4062, 29475, 28063, 1110, -26853, -30378, -6257, 23559, 31933, 11245, -19677, -32692, -15955, 15303, 32633, 20264, -10548, -31760, -24068, 5527, 30092, 27270, -371, -27675, -29792, -4797, 24564, 31569, 9843, -20841, -32558, -14645, 16596, 32733, 19079, -11939, -32092, -23039, 6981, 30647, 26421, -1851, -28439, -29146, -3327, 25519, 31140, 8421, -21963, -32358, -13305, 17856}, -{32767, 19079, -10548, -31363, -25978, 1110, 27270, 30647, 8421, -20841, -32692, -17232, 12624, 31933, 24564, -3327, -28439, -29792, -6257, 22506, 32466, 15303, -14645, -32358, -23039, 5527, 29475, 28799, 4062, -24068, -32092, -13305, 16596, 32633, 21406, -7704, -30378, -27675, -1851, 25519, 31569, 11245, -18473, -32759, -19677, 9843, 31140, 26421, -371, -26853, -30902, -9135, 20264, 32733, 17856, -11939, -31760, -25049, 2589, 28063, 30092, 6981, -21963, -32558, -15955, 13978, 32232, 23559, -4797, -29146, -29146, -4797, 23559, 32232, 13978, -15955, -32558, -21963, 6981, 30092, 28063, 2589, -25049, -31760, -11939, 17856, 32733, 20264, -9135, -30902, -26853, -371, 26421, 31140, 9843, -19677, -32759, -18473, 11245, 31569, 25519, -1851, -27675, -30378, -7704, 21406, 32633, 16596, -13305, -32092, -24068, 4062, 28799, 29475, 5527, -23039, -32358, -14645, 15303, 32466, 22506, -6257, -29792, -28439, -3327, 24564, 31933, 12624, -17232, -32692, -20841, 8421, 30647, 27270, 1110, -25978, -31363, -10548, 19079}, -{32767, 20264, -7704, -29792, -29146, -6257, 21406, 32733, 19079, -9135, -30378, -28439, -4797, 22506, 32633, 17856, -10548, -30902, -27675, -3327, 23559, 32466, 16596, -11939, -31363, -26853, -1851, 24564, 32232, 15303, -13305, -31760, -25978, -371, 25519, 31933, 13978, -14645, -32092, -25049, 1110, 26421, 31569, 12624, -15955, -32358, -24068, 2589, 27270, 31140, 11245, -17232, -32558, -23039, 4062, 28063, 30647, 9843, -18473, -32692, -21963, 5527, 28799, 30092, 8421, -19677, -32759, -20841, 6981, 29475, 29475, 6981, -20841, -32759, -19677, 8421, 30092, 28799, 5527, -21963, -32692, -18473, 9843, 30647, 28063, 4062, -23039, -32558, -17232, 11245, 31140, 27270, 2589, -24068, -32358, -15955, 12624, 31569, 26421, 1110, -25049, -32092, -14645, 13978, 31933, 25519, -371, -25978, -31760, -13305, 15303, 32232, 24564, -1851, -26853, -31363, -11939, 16596, 32466, 23559, -3327, -27675, -30902, -10548, 17856, 32633, 22506, -4797, -28439, -30378, -9135, 19079, 32733, 21406, -6257, -29146, -29792, -7704, 20264}, -{32767, 21406, -4797, -27675, -31363, -13305, 13978, 31569, 27270, 4062, -21963, -32759, -20841, 5527, 28063, 31140, 12624, -14645, -31760, -26853, -3327, 22506, 32733, 20264, -6257, -28439, -30902, -11939, 15303, 31933, 26421, 2589, -23039, -32692, -19677, 6981, 28799, 30647, 11245, -15955, -32092, -25978, -1851, 23559, 32633, 19079, -7704, -29146, -30378, -10548, 16596, 32232, 25519, 1110, -24068, -32558, -18473, 8421, 29475, 30092, 9843, -17232, -32358, -25049, -371, 24564, 32466, 17856, -9135, -29792, -29792, -9135, 17856, 32466, 24564, -371, -25049, -32358, -17232, 9843, 30092, 29475, 8421, -18473, -32558, -24068, 1110, 25519, 32232, 16596, -10548, -30378, -29146, -7704, 19079, 32633, 23559, -1851, -25978, -32092, -15955, 11245, 30647, 28799, 6981, -19677, -32692, -23039, 2589, 26421, 31933, 15303, -11939, -30902, -28439, -6257, 20264, 32733, 22506, -3327, -26853, -31760, -14645, 12624, 31140, 28063, 5527, -20841, -32759, -21963, 4062, 27270, 31569, 13978, -13305, -31363, -27675, -4797, 21406}, -{32767, 22506, -1851, -25049, -32558, -19677, 5527, 27270, 31933, 16596, -9135, -29146, -30902, -13305, 12624, 30647, 29475, 9843, -15955, -31760, -27675, -6257, 19079, 32466, 25519, 2589, -21963, -32759, -23039, 1110, 24564, 32633, 20264, -4797, -26853, -32092, -17232, 8421, 28799, 31140, 13978, -11939, -30378, -29792, -10548, 15303, 31569, 28063, 6981, -18473, -32358, -25978, -3327, 21406, 32733, 23559, -371, -24068, -32692, -20841, 4062, 26421, 32232, 17856, -7704, -28439, -31363, -14645, 11245, 30092, 30092, 11245, -14645, -31363, -28439, -7704, 17856, 32232, 26421, 4062, -20841, -32692, -24068, -371, 23559, 32733, 21406, -3327, -25978, -32358, -18473, 6981, 28063, 31569, 15303, -10548, -29792, -30378, -11939, 13978, 31140, 28799, 8421, -17232, -32092, -26853, -4797, 20264, 32633, 24564, 1110, -23039, -32759, -21963, 2589, 25519, 32466, 19079, -6257, -27675, -31760, -15955, 9843, 29475, 30647, 12624, -13305, -30902, -29146, -9135, 16596, 31933, 27270, 5527, -19677, -32558, -25049, -1851, 22506}, -{32767, 23559, 1110, -21963, -32692, -25049, -3327, 20264, 32466, 26421, 5527, -18473, -32092, -27675, -7704, 16596, 31569, 28799, 9843, -14645, -30902, -29792, -11939, 12624, 30092, 30647, 13978, -10548, -29146, -31363, -15955, 8421, 28063, 31933, 17856, -6257, -26853, -32358, -19677, 4062, 25519, 32633, 21406, -1851, -24068, -32759, -23039, -371, 22506, 32733, 24564, 2589, -20841, -32558, -25978, -4797, 19079, 32232, 27270, 6981, -17232, -31760, -28439, -9135, 15303, 31140, 29475, 11245, -13305, -30378, -30378, -13305, 11245, 29475, 31140, 15303, -9135, -28439, -31760, -17232, 6981, 27270, 32232, 19079, -4797, -25978, -32558, -20841, 2589, 24564, 32733, 22506, -371, -23039, -32759, -24068, -1851, 21406, 32633, 25519, 4062, -19677, -32358, -26853, -6257, 17856, 31933, 28063, 8421, -15955, -31363, -29146, -10548, 13978, 30647, 30092, 12624, -11939, -29792, -30902, -14645, 9843, 28799, 31569, 16596, -7704, -27675, -32092, -18473, 5527, 26421, 32466, 20264, -3327, -25049, -32692, -21963, 1110, 23559}, -{32767, 24564, 4062, -18473, -31760, -29146, -11939, 11245, 28799, 31933, 19079, -3327, -24068, -32759, -25049, -4797, 17856, 31569, 29475, 12624, -10548, -28439, -32092, -19677, 2589, 23559, 32733, 25519, 5527, -17232, -31363, -29792, -13305, 9843, 28063, 32232, 20264, -1851, -23039, -32692, -25978, -6257, 16596, 31140, 30092, 13978, -9135, -27675, -32358, -20841, 1110, 22506, 32633, 26421, 6981, -15955, -30902, -30378, -14645, 8421, 27270, 32466, 21406, -371, -21963, -32558, -26853, -7704, 15303, 30647, 30647, 15303, -7704, -26853, -32558, -21963, -371, 21406, 32466, 27270, 8421, -14645, -30378, -30902, -15955, 6981, 26421, 32633, 22506, 1110, -20841, -32358, -27675, -9135, 13978, 30092, 31140, 16596, -6257, -25978, -32692, -23039, -1851, 20264, 32232, 28063, 9843, -13305, -29792, -31363, -17232, 5527, 25519, 32733, 23559, 2589, -19677, -32092, -28439, -10548, 12624, 29475, 31569, 17856, -4797, -25049, -32759, -24068, -3327, 19079, 31933, 28799, 11245, -11939, -29146, -31760, -18473, 4062, 24564}, -{32767, 25519, 6981, -14645, -29792, -31760, -19677, 1110, 21406, 32232, 28799, 12624, -9135, -26853, -32692, -24068, -4797, 16596, 30647, 31140, 17856, -3327, -23039, -32558, -27675, -10548, 11245, 28063, 32466, 22506, 2589, -18473, -31363, -30378, -15955, 5527, 24564, 32733, 26421, 8421, -13305, -29146, -32092, -20841, -371, 20264, 31933, 29475, 13978, -7704, -25978, -32759, -25049, -6257, 15303, 30092, 31569, 19079, -1851, -21963, -32358, -28439, -11939, 9843, 27270, 32633, 23559, 4062, -17232, -30902, -30902, -17232, 4062, 23559, 32633, 27270, 9843, -11939, -28439, -32358, -21963, -1851, 19079, 31569, 30092, 15303, -6257, -25049, -32759, -25978, -7704, 13978, 29475, 31933, 20264, -371, -20841, -32092, -29146, -13305, 8421, 26421, 32733, 24564, 5527, -15955, -30378, -31363, -18473, 2589, 22506, 32466, 28063, 11245, -10548, -27675, -32558, -23039, -3327, 17856, 31140, 30647, 16596, -4797, -24068, -32692, -26853, -9135, 12624, 28799, 32232, 21406, 1110, -19677, -31760, -29792, -14645, 6981, 25519}, -{32767, 26421, 9843, -10548, -26853, -32759, -25978, -9135, 11245, 27270, 32733, 25519, 8421, -11939, -27675, -32692, -25049, -7704, 12624, 28063, 32633, 24564, 6981, -13305, -28439, -32558, -24068, -6257, 13978, 28799, 32466, 23559, 5527, -14645, -29146, -32358, -23039, -4797, 15303, 29475, 32232, 22506, 4062, -15955, -29792, -32092, -21963, -3327, 16596, 30092, 31933, 21406, 2589, -17232, -30378, -31760, -20841, -1851, 17856, 30647, 31569, 20264, 1110, -18473, -30902, -31363, -19677, -371, 19079, 31140, 31140, 19079, -371, -19677, -31363, -30902, -18473, 1110, 20264, 31569, 30647, 17856, -1851, -20841, -31760, -30378, -17232, 2589, 21406, 31933, 30092, 16596, -3327, -21963, -32092, -29792, -15955, 4062, 22506, 32232, 29475, 15303, -4797, -23039, -32358, -29146, -14645, 5527, 23559, 32466, 28799, 13978, -6257, -24068, -32558, -28439, -13305, 6981, 24564, 32633, 28063, 12624, -7704, -25049, -32692, -27675, -11939, 8421, 25519, 32733, 27270, 11245, -9135, -25978, -32759, -26853, -10548, 9843, 26421}, -{32767, 27270, 12624, -6257, -23039, -32092, -30378, -18473, -371, 17856, 30092, 32232, 23559, 6981, -11939, -26853, -32759, -27675, -13305, 5527, 22506, 31933, 30647, 19079, 1110, -17232, -29792, -32358, -24068, -7704, 11245, 26421, 32733, 28063, 13978, -4797, -21963, -31760, -30902, -19677, -1851, 16596, 29475, 32466, 24564, 8421, -10548, -25978, -32692, -28439, -14645, 4062, 21406, 31569, 31140, 20264, 2589, -15955, -29146, -32558, -25049, -9135, 9843, 25519, 32633, 28799, 15303, -3327, -20841, -31363, -31363, -20841, -3327, 15303, 28799, 32633, 25519, 9843, -9135, -25049, -32558, -29146, -15955, 2589, 20264, 31140, 31569, 21406, 4062, -14645, -28439, -32692, -25978, -10548, 8421, 24564, 32466, 29475, 16596, -1851, -19677, -30902, -31760, -21963, -4797, 13978, 28063, 32733, 26421, 11245, -7704, -24068, -32358, -29792, -17232, 1110, 19079, 30647, 31933, 22506, 5527, -13305, -27675, -32759, -26853, -11939, 6981, 23559, 32232, 30092, 17856, -371, -18473, -30378, -32092, -23039, -6257, 12624, 27270}, -{32767, 28063, 15303, -1851, -18473, -29792, -32558, -25978, -11939, 5527, 21406, 31140, 31933, 23559, 8421, -9135, -24068, -32092, -30902, -20841, -4797, 12624, 26421, 32633, 29475, 17856, 1110, -15955, -28439, -32759, -27675, -14645, 2589, 19079, 30092, 32466, 25519, 11245, -6257, -21963, -31363, -31760, -23039, -7704, 9843, 24564, 32232, 30647, 20264, 4062, -13305, -26853, -32692, -29146, -17232, -371, 16596, 28799, 32733, 27270, 13978, -3327, -19677, -30378, -32358, -25049, -10548, 6981, 22506, 31569, 31569, 22506, 6981, -10548, -25049, -32358, -30378, -19677, -3327, 13978, 27270, 32733, 28799, 16596, -371, -17232, -29146, -32692, -26853, -13305, 4062, 20264, 30647, 32232, 24564, 9843, -7704, -23039, -31760, -31363, -21963, -6257, 11245, 25519, 32466, 30092, 19079, 2589, -14645, -27675, -32759, -28439, -15955, 1110, 17856, 29475, 32633, 26421, 12624, -4797, -20841, -30902, -32092, -24068, -9135, 8421, 23559, 31933, 31140, 21406, 5527, -11939, -25978, -32558, -29792, -18473, -1851, 15303, 28063}, -{32767, 28799, 17856, 2589, -13305, -25978, -32358, -30902, -21963, -7704, 8421, 22506, 31140, 32232, 25519, 12624, -3327, -18473, -29146, -32759, -28439, -17232, -1851, 13978, 26421, 32466, 30647, 21406, 6981, -9135, -23039, -31363, -32092, -25049, -11939, 4062, 19079, 29475, 32733, 28063, 16596, 1110, -14645, -26853, -32558, -30378, -20841, -6257, 9843, 23559, 31569, 31933, 24564, 11245, -4797, -19677, -29792, -32692, -27675, -15955, -371, 15303, 27270, 32633, 30092, 20264, 5527, -10548, -24068, -31760, -31760, -24068, -10548, 5527, 20264, 30092, 32633, 27270, 15303, -371, -15955, -27675, -32692, -29792, -19677, -4797, 11245, 24564, 31933, 31569, 23559, 9843, -6257, -20841, -30378, -32558, -26853, -14645, 1110, 16596, 28063, 32733, 29475, 19079, 4062, -11939, -25049, -32092, -31363, -23039, -9135, 6981, 21406, 30647, 32466, 26421, 13978, -1851, -17232, -28439, -32759, -29146, -18473, -3327, 12624, 25519, 32232, 31140, 22506, 8421, -7704, -21963, -30902, -32358, -25978, -13305, 2589, 17856, 28799}, -{32767, 29475, 20264, 6981, -7704, -20841, -29792, -32759, -29146, -19677, -6257, 8421, 21406, 30092, 32733, 28799, 19079, 5527, -9135, -21963, -30378, -32692, -28439, -18473, -4797, 9843, 22506, 30647, 32633, 28063, 17856, 4062, -10548, -23039, -30902, -32558, -27675, -17232, -3327, 11245, 23559, 31140, 32466, 27270, 16596, 2589, -11939, -24068, -31363, -32358, -26853, -15955, -1851, 12624, 24564, 31569, 32232, 26421, 15303, 1110, -13305, -25049, -31760, -32092, -25978, -14645, -371, 13978, 25519, 31933, 31933, 25519, 13978, -371, -14645, -25978, -32092, -31760, -25049, -13305, 1110, 15303, 26421, 32232, 31569, 24564, 12624, -1851, -15955, -26853, -32358, -31363, -24068, -11939, 2589, 16596, 27270, 32466, 31140, 23559, 11245, -3327, -17232, -27675, -32558, -30902, -23039, -10548, 4062, 17856, 28063, 32633, 30647, 22506, 9843, -4797, -18473, -28439, -32692, -30378, -21963, -9135, 5527, 19079, 28799, 32733, 30092, 21406, 8421, -6257, -19677, -29146, -32759, -29792, -20841, -7704, 6981, 20264, 29475}, -{32767, 30092, 22506, 11245, -1851, -14645, -25049, -31363, -32558, -28439, -19677, -7704, 5527, 17856, 27270, 32232, 31933, 26421, 16596, 4062, -9135, -20841, -29146, -32692, -30902, -24068, -13305, -371, 12624, 23559, 30647, 32733, 29475, 21406, 9843, -3327, -15955, -25978, -31760, -32358, -27675, -18473, -6257, 6981, 19079, 28063, 32466, 31569, 25519, 15303, 2589, -10548, -21963, -29792, -32759, -30378, -23039, -11939, 1110, 13978, 24564, 31140, 32633, 28799, 20264, 8421, -4797, -17232, -26853, -32092, -32092, -26853, -17232, -4797, 8421, 20264, 28799, 32633, 31140, 24564, 13978, 1110, -11939, -23039, -30378, -32759, -29792, -21963, -10548, 2589, 15303, 25519, 31569, 32466, 28063, 19079, 6981, -6257, -18473, -27675, -32358, -31760, -25978, -15955, -3327, 9843, 21406, 29475, 32733, 30647, 23559, 12624, -371, -13305, -24068, -30902, -32692, -29146, -20841, -9135, 4062, 16596, 26421, 31933, 32232, 27270, 17856, 5527, -7704, -19677, -28439, -32558, -31363, -25049, -14645, -1851, 11245, 22506, 30092}, -{32767, 30647, 24564, 15303, 4062, -7704, -18473, -26853, -31760, -32558, -29146, -21963, -11939, -371, 11245, 21406, 28799, 32466, 31933, 27270, 19079, 8421, -3327, -14645, -24068, -30378, -32759, -30902, -25049, -15955, -4797, 6981, 17856, 26421, 31569, 32633, 29475, 22506, 12624, 1110, -10548, -20841, -28439, -32358, -32092, -27675, -19677, -9135, 2589, 13978, 23559, 30092, 32733, 31140, 25519, 16596, 5527, -6257, -17232, -25978, -31363, -32692, -29792, -23039, -13305, -1851, 9843, 20264, 28063, 32232, 32232, 28063, 20264, 9843, -1851, -13305, -23039, -29792, -32692, -31363, -25978, -17232, -6257, 5527, 16596, 25519, 31140, 32733, 30092, 23559, 13978, 2589, -9135, -19677, -27675, -32092, -32358, -28439, -20841, -10548, 1110, 12624, 22506, 29475, 32633, 31569, 26421, 17856, 6981, -4797, -15955, -25049, -30902, -32759, -30378, -24068, -14645, -3327, 8421, 19079, 27270, 31933, 32466, 28799, 21406, 11245, -371, -11939, -21963, -29146, -32558, -31760, -26853, -18473, -7704, 4062, 15303, 24564, 30647}, -{32767, 31140, 26421, 19079, 9843, -371, -10548, -19677, -26853, -31363, -32759, -30902, -25978, -18473, -9135, 1110, 11245, 20264, 27270, 31569, 32733, 30647, 25519, 17856, 8421, -1851, -11939, -20841, -27675, -31760, -32692, -30378, -25049, -17232, -7704, 2589, 12624, 21406, 28063, 31933, 32633, 30092, 24564, 16596, 6981, -3327, -13305, -21963, -28439, -32092, -32558, -29792, -24068, -15955, -6257, 4062, 13978, 22506, 28799, 32232, 32466, 29475, 23559, 15303, 5527, -4797, -14645, -23039, -29146, -32358, -32358, -29146, -23039, -14645, -4797, 5527, 15303, 23559, 29475, 32466, 32232, 28799, 22506, 13978, 4062, -6257, -15955, -24068, -29792, -32558, -32092, -28439, -21963, -13305, -3327, 6981, 16596, 24564, 30092, 32633, 31933, 28063, 21406, 12624, 2589, -7704, -17232, -25049, -30378, -32692, -31760, -27675, -20841, -11939, -1851, 8421, 17856, 25519, 30647, 32733, 31569, 27270, 20264, 11245, 1110, -9135, -18473, -25978, -30902, -32759, -31363, -26853, -19677, -10548, -371, 9843, 19079, 26421, 31140}, -{32767, 31569, 28063, 22506, 15303, 6981, -1851, -10548, -18473, -25049, -29792, -32358, -32558, -30378, -25978, -19677, -11939, -3327, 5527, 13978, 21406, 27270, 31140, 32733, 31933, 28799, 23559, 16596, 8421, -371, -9135, -17232, -24068, -29146, -32092, -32692, -30902, -26853, -20841, -13305, -4797, 4062, 12624, 20264, 26421, 30647, 32633, 32232, 29475, 24564, 17856, 9843, 1110, -7704, -15955, -23039, -28439, -31760, -32759, -31363, -27675, -21963, -14645, -6257, 2589, 11245, 19079, 25519, 30092, 32466, 32466, 30092, 25519, 19079, 11245, 2589, -6257, -14645, -21963, -27675, -31363, -32759, -31760, -28439, -23039, -15955, -7704, 1110, 9843, 17856, 24564, 29475, 32232, 32633, 30647, 26421, 20264, 12624, 4062, -4797, -13305, -20841, -26853, -30902, -32692, -32092, -29146, -24068, -17232, -9135, -371, 8421, 16596, 23559, 28799, 31933, 32733, 31140, 27270, 21406, 13978, 5527, -3327, -11939, -19677, -25978, -30378, -32558, -32358, -29792, -25049, -18473, -10548, -1851, 6981, 15303, 22506, 28063, 31569}, -{32767, 31933, 29475, 25519, 20264, 13978, 6981, -371, -7704, -14645, -20841, -25978, -29792, -32092, -32759, -31760, -29146, -25049, -19677, -13305, -6257, 1110, 8421, 15303, 21406, 26421, 30092, 32232, 32733, 31569, 28799, 24564, 19079, 12624, 5527, -1851, -9135, -15955, -21963, -26853, -30378, -32358, -32692, -31363, -28439, -24068, -18473, -11939, -4797, 2589, 9843, 16596, 22506, 27270, 30647, 32466, 32633, 31140, 28063, 23559, 17856, 11245, 4062, -3327, -10548, -17232, -23039, -27675, -30902, -32558, -32558, -30902, -27675, -23039, -17232, -10548, -3327, 4062, 11245, 17856, 23559, 28063, 31140, 32633, 32466, 30647, 27270, 22506, 16596, 9843, 2589, -4797, -11939, -18473, -24068, -28439, -31363, -32692, -32358, -30378, -26853, -21963, -15955, -9135, -1851, 5527, 12624, 19079, 24564, 28799, 31569, 32733, 32232, 30092, 26421, 21406, 15303, 8421, 1110, -6257, -13305, -19677, -25049, -29146, -31760, -32759, -32092, -29792, -25978, -20841, -14645, -7704, -371, 6981, 13978, 20264, 25519, 29475, 31933}, -{32767, 32232, 30647, 28063, 24564, 20264, 15303, 9843, 4062, -1851, -7704, -13305, -18473, -23039, -26853, -29792, -31760, -32692, -32558, -31363, -29146, -25978, -21963, -17232, -11939, -6257, -371, 5527, 11245, 16596, 21406, 25519, 28799, 31140, 32466, 32733, 31933, 30092, 27270, 23559, 19079, 13978, 8421, 2589, -3327, -9135, -14645, -19677, -24068, -27675, -30378, -32092, -32759, -32358, -30902, -28439, -25049, -20841, -15955, -10548, -4797, 1110, 6981, 12624, 17856, 22506, 26421, 29475, 31569, 32633, 32633, 31569, 29475, 26421, 22506, 17856, 12624, 6981, 1110, -4797, -10548, -15955, -20841, -25049, -28439, -30902, -32358, -32759, -32092, -30378, -27675, -24068, -19677, -14645, -9135, -3327, 2589, 8421, 13978, 19079, 23559, 27270, 30092, 31933, 32733, 32466, 31140, 28799, 25519, 21406, 16596, 11245, 5527, -371, -6257, -11939, -17232, -21963, -25978, -29146, -31363, -32558, -32692, -31760, -29792, -26853, -23039, -18473, -13305, -7704, -1851, 4062, 9843, 15303, 20264, 24564, 28063, 30647, 32232}, -{32767, 32466, 31569, 30092, 28063, 25519, 22506, 19079, 15303, 11245, 6981, 2589, -1851, -6257, -10548, -14645, -18473, -21963, -25049, -27675, -29792, -31363, -32358, -32759, -32558, -31760, -30378, -28439, -25978, -23039, -19677, -15955, -11939, -7704, -3327, 1110, 5527, 9843, 13978, 17856, 21406, 24564, 27270, 29475, 31140, 32232, 32733, 32633, 31933, 30647, 28799, 26421, 23559, 20264, 16596, 12624, 8421, 4062, -371, -4797, -9135, -13305, -17232, -20841, -24068, -26853, -29146, -30902, -32092, -32692, -32692, -32092, -30902, -29146, -26853, -24068, -20841, -17232, -13305, -9135, -4797, -371, 4062, 8421, 12624, 16596, 20264, 23559, 26421, 28799, 30647, 31933, 32633, 32733, 32232, 31140, 29475, 27270, 24564, 21406, 17856, 13978, 9843, 5527, 1110, -3327, -7704, -11939, -15955, -19677, -23039, -25978, -28439, -30378, -31760, -32558, -32759, -32358, -31363, -29792, -27675, -25049, -21963, -18473, -14645, -10548, -6257, -1851, 2589, 6981, 11245, 15303, 19079, 22506, 25519, 28063, 30092, 31569, 32466}, -{32767, 32633, 32232, 31569, 30647, 29475, 28063, 26421, 24564, 22506, 20264, 17856, 15303, 12624, 9843, 6981, 4062, 1110, -1851, -4797, -7704, -10548, -13305, -15955, -18473, -20841, -23039, -25049, -26853, -28439, -29792, -30902, -31760, -32358, -32692, -32759, -32558, -32092, -31363, -30378, -29146, -27675, -25978, -24068, -21963, -19677, -17232, -14645, -11939, -9135, -6257, -3327, -371, 2589, 5527, 8421, 11245, 13978, 16596, 19079, 21406, 23559, 25519, 27270, 28799, 30092, 31140, 31933, 32466, 32733, 32733, 32466, 31933, 31140, 30092, 28799, 27270, 25519, 23559, 21406, 19079, 16596, 13978, 11245, 8421, 5527, 2589, -371, -3327, -6257, -9135, -11939, -14645, -17232, -19677, -21963, -24068, -25978, -27675, -29146, -30378, -31363, -32092, -32558, -32759, -32692, -32358, -31760, -30902, -29792, -28439, -26853, -25049, -23039, -20841, -18473, -15955, -13305, -10548, -7704, -4797, -1851, 1110, 4062, 6981, 9843, 12624, 15303, 17856, 20264, 22506, 24564, 26421, 28063, 29475, 30647, 31569, 32232, 32633}, -{32767, 32733, 32633, 32466, 32232, 31933, 31569, 31140, 30647, 30092, 29475, 28799, 28063, 27270, 26421, 25519, 24564, 23559, 22506, 21406, 20264, 19079, 17856, 16596, 15303, 13978, 12624, 11245, 9843, 8421, 6981, 5527, 4062, 2589, 1110, -371, -1851, -3327, -4797, -6257, -7704, -9135, -10548, -11939, -13305, -14645, -15955, -17232, -18473, -19677, -20841, -21963, -23039, -24068, -25049, -25978, -26853, -27675, -28439, -29146, -29792, -30378, -30902, -31363, -31760, -32092, -32358, -32558, -32692, -32759, -32759, -32692, -32558, -32358, -32092, -31760, -31363, -30902, -30378, -29792, -29146, -28439, -27675, -26853, -25978, -25049, -24068, -23039, -21963, -20841, -19677, -18473, -17232, -15955, -14645, -13305, -11939, -10548, -9135, -7704, -6257, -4797, -3327, -1851, -371, 1110, 2589, 4062, 5527, 6981, 8421, 9843, 11245, 12624, 13978, 15303, 16596, 17856, 19079, 20264, 21406, 22506, 23559, 24564, 25519, 26421, 27270, 28063, 28799, 29475, 30092, 30647, 31140, 31569, 31933, 32232, 32466, 32633, 32733} -}; - - -int16_t prach_fft139_im[139][139] = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, -1481, -2959, -4430, -5893, -7343, -8779, -10196, -11593, -12966, -14313, -15630, -16916, -18166, -19380, -20554, -21686, -22774, -23816, -24808, -25750, -26640, -27474, -28253, -28974, -29636, -30238, -30777, -31254, -31667, -32015, -32298, -32515, -32665, -32749, -32765, -32715, -32598, -32415, -32165, -31849, -31469, -31024, -30515, -29945, -29313, -28621, -27871, -27064, -26202, -25286, -24318, -23301, -22236, -21126, -19972, -18778, -17545, -16277, -14975, -13643, -12283, -10898, -9490, -8063, -6620, -5163, -3696, -2221, -741, 740, 2220, 3695, 5162, 6619, 8062, 9489, 10897, 12282, 13642, 14974, 16276, 17544, 18777, 19971, 21125, 22235, 23300, 24317, 25285, 26201, 27063, 27870, 28620, 29312, 29944, 30514, 31023, 31468, 31848, 32164, 32414, 32597, 32714, 32764, 32748, 32664, 32514, 32297, 32014, 31666, 31253, 30776, 30237, 29635, 28973, 28252, 27473, 26639, 25749, 24807, 23815, 22773, 21685, 20553, 19379, 18165, 16915, 15629, 14312, 12965, 11592, 10195, 8778, 7342, 5892, 4429, 2958, 1480}, -{0, -2959, -5893, -8779, -11593, -14313, -16916, -19380, -21686, -23816, -25750, -27474, -28974, -30238, -31254, -32015, -32515, -32749, -32715, -32415, -31849, -31024, -29945, -28621, -27064, -25286, -23301, -21126, -18778, -16277, -13643, -10898, -8063, -5163, -2221, 740, 3695, 6619, 9489, 12282, 14974, 17544, 19971, 22235, 24317, 26201, 27870, 29312, 30514, 31468, 32164, 32597, 32764, 32664, 32297, 31666, 30776, 29635, 28252, 26639, 24807, 22773, 20553, 18165, 15629, 12965, 10195, 7342, 4429, 1480, -1481, -4430, -7343, -10196, -12966, -15630, -18166, -20554, -22774, -24808, -26640, -28253, -29636, -30777, -31667, -32298, -32665, -32765, -32598, -32165, -31469, -30515, -29313, -27871, -26202, -24318, -22236, -19972, -17545, -14975, -12283, -9490, -6620, -3696, -741, 2220, 5162, 8062, 10897, 13642, 16276, 18777, 21125, 23300, 25285, 27063, 28620, 29944, 31023, 31848, 32414, 32714, 32748, 32514, 32014, 31253, 30237, 28973, 27473, 25749, 23815, 21685, 19379, 16915, 14312, 11592, 8778, 5892, 2958}, -{0, -4430, -8779, -12966, -16916, -20554, -23816, -26640, -28974, -30777, -32015, -32665, -32715, -32165, -31024, -29313, -27064, -24318, -21126, -17545, -13643, -9490, -5163, -741, 3695, 8062, 12282, 16276, 19971, 23300, 26201, 28620, 30514, 31848, 32597, 32748, 32297, 31253, 29635, 27473, 24807, 21685, 18165, 14312, 10195, 5892, 1480, -2959, -7343, -11593, -15630, -19380, -22774, -25750, -28253, -30238, -31667, -32515, -32765, -32415, -31469, -29945, -27871, -25286, -22236, -18778, -14975, -10898, -6620, -2221, 2220, 6619, 10897, 14974, 18777, 22235, 25285, 27870, 29944, 31468, 32414, 32764, 32514, 31666, 30237, 28252, 25749, 22773, 19379, 15629, 11592, 7342, 2958, -1481, -5893, -10196, -14313, -18166, -21686, -24808, -27474, -29636, -31254, -32298, -32749, -32598, -31849, -30515, -28621, -26202, -23301, -19972, -16277, -12283, -8063, -3696, 740, 5162, 9489, 13642, 17544, 21125, 24317, 27063, 29312, 31023, 32164, 32714, 32664, 32014, 30776, 28973, 26639, 23815, 20553, 16915, 12965, 8778, 4429}, -{0, -5893, -11593, -16916, -21686, -25750, -28974, -31254, -32515, -32715, -31849, -29945, -27064, -23301, -18778, -13643, -8063, -2221, 3695, 9489, 14974, 19971, 24317, 27870, 30514, 32164, 32764, 32297, 30776, 28252, 24807, 20553, 15629, 10195, 4429, -1481, -7343, -12966, -18166, -22774, -26640, -29636, -31667, -32665, -32598, -31469, -29313, -26202, -22236, -17545, -12283, -6620, -741, 5162, 10897, 16276, 21125, 25285, 28620, 31023, 32414, 32748, 32014, 30237, 27473, 23815, 19379, 14312, 8778, 2958, -2959, -8779, -14313, -19380, -23816, -27474, -30238, -32015, -32749, -32415, -31024, -28621, -25286, -21126, -16277, -10898, -5163, 740, 6619, 12282, 17544, 22235, 26201, 29312, 31468, 32597, 32664, 31666, 29635, 26639, 22773, 18165, 12965, 7342, 1480, -4430, -10196, -15630, -20554, -24808, -28253, -30777, -32298, -32765, -32165, -30515, -27871, -24318, -19972, -14975, -9490, -3696, 2220, 8062, 13642, 18777, 23300, 27063, 29944, 31848, 32714, 32514, 31253, 28973, 25749, 21685, 16915, 11592, 5892}, -{0, -7343, -14313, -20554, -25750, -29636, -32015, -32765, -31849, -29313, -25286, -19972, -13643, -6620, 740, 8062, 14974, 21125, 26201, 29944, 32164, 32748, 31666, 28973, 24807, 19379, 12965, 5892, -1481, -8779, -15630, -21686, -26640, -30238, -32298, -32715, -31469, -28621, -24318, -18778, -12283, -5163, 2220, 9489, 16276, 22235, 27063, 30514, 32414, 32664, 31253, 28252, 23815, 18165, 11592, 4429, -2959, -10196, -16916, -22774, -27474, -30777, -32515, -32598, -31024, -27871, -23301, -17545, -10898, -3696, 3695, 10897, 17544, 23300, 27870, 31023, 32597, 32514, 30776, 27473, 22773, 16915, 10195, 2958, -4430, -11593, -18166, -23816, -28253, -31254, -32665, -32415, -30515, -27064, -22236, -16277, -9490, -2221, 5162, 12282, 18777, 24317, 28620, 31468, 32714, 32297, 30237, 26639, 21685, 15629, 8778, 1480, -5893, -12966, -19380, -24808, -28974, -31667, -32749, -32165, -29945, -26202, -21126, -14975, -8063, -741, 6619, 13642, 19971, 25285, 29312, 31848, 32764, 32014, 29635, 25749, 20553, 14312, 7342}, -{0, -8779, -16916, -23816, -28974, -32015, -32715, -31024, -27064, -21126, -13643, -5163, 3695, 12282, 19971, 26201, 30514, 32597, 32297, 29635, 24807, 18165, 10195, 1480, -7343, -15630, -22774, -28253, -31667, -32765, -31469, -27871, -22236, -14975, -6620, 2220, 10897, 18777, 25285, 29944, 32414, 32514, 30237, 25749, 19379, 11592, 2958, -5893, -14313, -21686, -27474, -31254, -32749, -31849, -28621, -23301, -16277, -8063, 740, 9489, 17544, 24317, 29312, 32164, 32664, 30776, 26639, 20553, 12965, 4429, -4430, -12966, -20554, -26640, -30777, -32665, -32165, -29313, -24318, -17545, -9490, -741, 8062, 16276, 23300, 28620, 31848, 32748, 31253, 27473, 21685, 14312, 5892, -2959, -11593, -19380, -25750, -30238, -32515, -32415, -29945, -25286, -18778, -10898, -2221, 6619, 14974, 22235, 27870, 31468, 32764, 31666, 28252, 22773, 15629, 7342, -1481, -10196, -18166, -24808, -29636, -32298, -32598, -30515, -26202, -19972, -12283, -3696, 5162, 13642, 21125, 27063, 31023, 32714, 32014, 28973, 23815, 16915, 8778}, -{0, -10196, -19380, -26640, -31254, -32765, -31024, -26202, -18778, -9490, 740, 10897, 19971, 27063, 31468, 32748, 30776, 25749, 18165, 8778, -1481, -11593, -20554, -27474, -31667, -32715, -30515, -25286, -17545, -8063, 2220, 12282, 21125, 27870, 31848, 32664, 30237, 24807, 16915, 7342, -2959, -12966, -21686, -28253, -32015, -32598, -29945, -24318, -16277, -6620, 3695, 13642, 22235, 28620, 32164, 32514, 29635, 23815, 15629, 5892, -4430, -14313, -22774, -28974, -32298, -32415, -29313, -23301, -14975, -5163, 5162, 14974, 23300, 29312, 32414, 32297, 28973, 22773, 14312, 4429, -5893, -15630, -23816, -29636, -32515, -32165, -28621, -22236, -13643, -3696, 6619, 16276, 24317, 29944, 32597, 32014, 28252, 21685, 12965, 2958, -7343, -16916, -24808, -30238, -32665, -31849, -27871, -21126, -12283, -2221, 8062, 17544, 25285, 30514, 32714, 31666, 27473, 20553, 11592, 1480, -8779, -18166, -25750, -30777, -32749, -31469, -27064, -19972, -10898, -741, 9489, 18777, 26201, 31023, 32764, 31253, 26639, 19379, 10195}, -{0, -11593, -21686, -28974, -32515, -31849, -27064, -18778, -8063, 3695, 14974, 24317, 30514, 32764, 30776, 24807, 15629, 4429, -7343, -18166, -26640, -31667, -32598, -29313, -22236, -12283, -741, 10897, 21125, 28620, 32414, 32014, 27473, 19379, 8778, -2959, -14313, -23816, -30238, -32749, -31024, -25286, -16277, -5163, 6619, 17544, 26201, 31468, 32664, 29635, 22773, 12965, 1480, -10196, -20554, -28253, -32298, -32165, -27871, -19972, -9490, 2220, 13642, 23300, 29944, 32714, 31253, 25749, 16915, 5892, -5893, -16916, -25750, -31254, -32715, -29945, -23301, -13643, -2221, 9489, 19971, 27870, 32164, 32297, 28252, 20553, 10195, -1481, -12966, -22774, -29636, -32665, -31469, -26202, -17545, -6620, 5162, 16276, 25285, 31023, 32748, 30237, 23815, 14312, 2958, -8779, -19380, -27474, -32015, -32415, -28621, -21126, -10898, 740, 12282, 22235, 29312, 32597, 31666, 26639, 18165, 7342, -4430, -15630, -24808, -30777, -32765, -30515, -24318, -14975, -3696, 8062, 18777, 27063, 31848, 32514, 28973, 21685, 11592}, -{0, -12966, -23816, -30777, -32715, -29313, -21126, -9490, 3695, 16276, 26201, 31848, 32297, 27473, 18165, 5892, -7343, -19380, -28253, -32515, -31469, -25286, -14975, -2221, 10897, 22235, 29944, 32764, 30237, 22773, 11592, -1481, -14313, -24808, -31254, -32598, -28621, -19972, -8063, 5162, 17544, 27063, 32164, 32014, 26639, 16915, 4429, -8779, -20554, -28974, -32665, -31024, -24318, -13643, -741, 12282, 23300, 30514, 32748, 29635, 21685, 10195, -2959, -15630, -25750, -31667, -32415, -27871, -18778, -6620, 6619, 18777, 27870, 32414, 31666, 25749, 15629, 2958, -10196, -21686, -29636, -32749, -30515, -23301, -12283, 740, 13642, 24317, 31023, 32664, 28973, 20553, 8778, -4430, -16916, -26640, -32015, -32165, -27064, -17545, -5163, 8062, 19971, 28620, 32597, 31253, 24807, 14312, 1480, -11593, -22774, -30238, -32765, -29945, -22236, -10898, 2220, 14974, 25285, 31468, 32514, 28252, 19379, 7342, -5893, -18166, -27474, -32298, -31849, -26202, -16277, -3696, 9489, 21125, 29312, 32714, 30776, 23815, 12965}, -{0, -14313, -25750, -32015, -31849, -25286, -13643, 740, 14974, 26201, 32164, 31666, 24807, 12965, -1481, -15630, -26640, -32298, -31469, -24318, -12283, 2220, 16276, 27063, 32414, 31253, 23815, 11592, -2959, -16916, -27474, -32515, -31024, -23301, -10898, 3695, 17544, 27870, 32597, 30776, 22773, 10195, -4430, -18166, -28253, -32665, -30515, -22236, -9490, 5162, 18777, 28620, 32714, 30237, 21685, 8778, -5893, -19380, -28974, -32749, -29945, -21126, -8063, 6619, 19971, 29312, 32764, 29635, 20553, 7342, -7343, -20554, -29636, -32765, -29313, -19972, -6620, 8062, 21125, 29944, 32748, 28973, 19379, 5892, -8779, -21686, -30238, -32715, -28621, -18778, -5163, 9489, 22235, 30514, 32664, 28252, 18165, 4429, -10196, -22774, -30777, -32598, -27871, -17545, -3696, 10897, 23300, 31023, 32514, 27473, 16915, 2958, -11593, -23816, -31254, -32415, -27064, -16277, -2221, 12282, 24317, 31468, 32297, 26639, 15629, 1480, -12966, -24808, -31667, -32165, -26202, -14975, -741, 13642, 25285, 31848, 32014, 25749, 14312}, -{0, -15630, -27474, -32665, -29945, -19972, -5163, 10897, 24317, 31848, 31666, 23815, 10195, -5893, -20554, -30238, -32598, -27064, -14975, 740, 16276, 27870, 32714, 29635, 19379, 4429, -11593, -24808, -32015, -31469, -23301, -9490, 6619, 21125, 30514, 32514, 26639, 14312, -1481, -16916, -28253, -32749, -29313, -18778, -3696, 12282, 25285, 32164, 31253, 22773, 8778, -7343, -21686, -30777, -32415, -26202, -13643, 2220, 17544, 28620, 32764, 28973, 18165, 2958, -12966, -25750, -32298, -31024, -22236, -8063, 8062, 22235, 31023, 32297, 25749, 12965, -2959, -18166, -28974, -32765, -28621, -17545, -2221, 13642, 26201, 32414, 30776, 21685, 7342, -8779, -22774, -31254, -32165, -25286, -12283, 3695, 18777, 29312, 32748, 28252, 16915, 1480, -14313, -26640, -32515, -30515, -21126, -6620, 9489, 23300, 31468, 32014, 24807, 11592, -4430, -19380, -29636, -32715, -27871, -16277, -741, 14974, 27063, 32597, 30237, 20553, 5892, -10196, -23816, -31667, -31849, -24318, -10898, 5162, 19971, 29944, 32664, 27473, 15629}, -{0, -16916, -28974, -32715, -27064, -13643, 3695, 19971, 30514, 32297, 24807, 10195, -7343, -22774, -31667, -31469, -22236, -6620, 10897, 25285, 32414, 30237, 19379, 2958, -14313, -27474, -32749, -28621, -16277, 740, 17544, 29312, 32664, 26639, 12965, -4430, -20554, -30777, -32165, -24318, -9490, 8062, 23300, 31848, 31253, 21685, 5892, -11593, -25750, -32515, -29945, -18778, -2221, 14974, 27870, 32764, 28252, 15629, -1481, -18166, -29636, -32598, -26202, -12283, 5162, 21125, 31023, 32014, 23815, 8778, -8779, -23816, -32015, -31024, -21126, -5163, 12282, 26201, 32597, 29635, 18165, 1480, -15630, -28253, -32765, -27871, -14975, 2220, 18777, 29944, 32514, 25749, 11592, -5893, -21686, -31254, -31849, -23301, -8063, 9489, 24317, 32164, 30776, 20553, 4429, -12966, -26640, -32665, -29313, -17545, -741, 16276, 28620, 32748, 27473, 14312, -2959, -19380, -30238, -32415, -25286, -10898, 6619, 22235, 31468, 31666, 22773, 7342, -10196, -24808, -32298, -30515, -19972, -3696, 13642, 27063, 32714, 28973, 16915}, -{0, -18166, -30238, -32165, -23301, -6620, 12282, 27063, 32764, 27473, 12965, -5893, -22774, -32015, -30515, -18778, -741, 17544, 29944, 32297, 23815, 7342, -11593, -26640, -32749, -27871, -13643, 5162, 22235, 31848, 30776, 19379, 1480, -16916, -29636, -32415, -24318, -8063, 10897, 26201, 32714, 28252, 14312, -4430, -21686, -31667, -31024, -19972, -2221, 16276, 29312, 32514, 24807, 8778, -10196, -25750, -32665, -28621, -14975, 3695, 21125, 31468, 31253, 20553, 2958, -15630, -28974, -32598, -25286, -9490, 9489, 25285, 32597, 28973, 15629, -2959, -20554, -31254, -31469, -21126, -3696, 14974, 28620, 32664, 25749, 10195, -8779, -24808, -32515, -29313, -16277, 2220, 19971, 31023, 31666, 21685, 4429, -14313, -28253, -32715, -26202, -10898, 8062, 24317, 32414, 29635, 16915, -1481, -19380, -30777, -31849, -22236, -5163, 13642, 27870, 32748, 26639, 11592, -7343, -23816, -32298, -29945, -17545, 740, 18777, 30514, 32014, 22773, 5892, -12966, -27474, -32765, -27064, -12283, 6619, 23300, 32164, 30237, 18165}, -{0, -19380, -31254, -31024, -18778, 740, 19971, 31468, 30776, 18165, -1481, -20554, -31667, -30515, -17545, 2220, 21125, 31848, 30237, 16915, -2959, -21686, -32015, -29945, -16277, 3695, 22235, 32164, 29635, 15629, -4430, -22774, -32298, -29313, -14975, 5162, 23300, 32414, 28973, 14312, -5893, -23816, -32515, -28621, -13643, 6619, 24317, 32597, 28252, 12965, -7343, -24808, -32665, -27871, -12283, 8062, 25285, 32714, 27473, 11592, -8779, -25750, -32749, -27064, -10898, 9489, 26201, 32764, 26639, 10195, -10196, -26640, -32765, -26202, -9490, 10897, 27063, 32748, 25749, 8778, -11593, -27474, -32715, -25286, -8063, 12282, 27870, 32664, 24807, 7342, -12966, -28253, -32598, -24318, -6620, 13642, 28620, 32514, 23815, 5892, -14313, -28974, -32415, -23301, -5163, 14974, 29312, 32297, 22773, 4429, -15630, -29636, -32165, -22236, -3696, 16276, 29944, 32014, 21685, 2958, -16916, -30238, -31849, -21126, -2221, 17544, 30514, 31666, 20553, 1480, -18166, -30777, -31469, -19972, -741, 18777, 31023, 31253, 19379}, -{0, -20554, -32015, -29313, -13643, 8062, 26201, 32748, 24807, 5892, -15630, -30238, -31469, -18778, 2220, 22235, 32414, 28252, 11592, -10196, -27474, -32598, -23301, -3696, 17544, 31023, 30776, 16915, -4430, -23816, -32665, -27064, -9490, 12282, 28620, 32297, 21685, 1480, -19380, -31667, -29945, -14975, 6619, 25285, 32764, 25749, 7342, -14313, -29636, -31849, -19972, 740, 21125, 32164, 28973, 12965, -8779, -26640, -32715, -24318, -5163, 16276, 30514, 31253, 18165, -2959, -22774, -32515, -27871, -10898, 10897, 27870, 32514, 22773, 2958, -18166, -31254, -30515, -16277, 5162, 24317, 32714, 26639, 8778, -12966, -28974, -32165, -21126, -741, 19971, 31848, 29635, 14312, -7343, -25750, -32765, -25286, -6620, 14974, 29944, 31666, 19379, -1481, -21686, -32298, -28621, -12283, 9489, 27063, 32664, 23815, 4429, -16916, -30777, -31024, -17545, 3695, 23300, 32597, 27473, 10195, -11593, -28253, -32415, -22236, -2221, 18777, 31468, 30237, 15629, -5893, -24808, -32749, -26202, -8063, 13642, 29312, 32014, 20553}, -{0, -21686, -32515, -27064, -8063, 14974, 30514, 30776, 15629, -7343, -26640, -32598, -22236, -741, 21125, 32414, 27473, 8778, -14313, -30238, -31024, -16277, 6619, 26201, 32664, 22773, 1480, -20554, -32298, -27871, -9490, 13642, 29944, 31253, 16915, -5893, -25750, -32715, -23301, -2221, 19971, 32164, 28252, 10195, -12966, -29636, -31469, -17545, 5162, 25285, 32748, 23815, 2958, -19380, -32015, -28621, -10898, 12282, 29312, 31666, 18165, -4430, -24808, -32765, -24318, -3696, 18777, 31848, 28973, 11592, -11593, -28974, -31849, -18778, 3695, 24317, 32764, 24807, 4429, -18166, -31667, -29313, -12283, 10897, 28620, 32014, 19379, -2959, -23816, -32749, -25286, -5163, 17544, 31468, 29635, 12965, -10196, -28253, -32165, -19972, 2220, 23300, 32714, 25749, 5892, -16916, -31254, -29945, -13643, 9489, 27870, 32297, 20553, -1481, -22774, -32665, -26202, -6620, 16276, 31023, 30237, 14312, -8779, -27474, -32415, -21126, 740, 22235, 32597, 26639, 7342, -15630, -30777, -30515, -14975, 8062, 27063, 32514, 21685}, -{0, -22774, -32749, -24318, -2221, 21125, 32597, 25749, 4429, -19380, -32298, -27064, -6620, 17544, 31848, 28252, 8778, -15630, -31254, -29313, -10898, 13642, 30514, 30237, 12965, -11593, -29636, -31024, -14975, 9489, 28620, 31666, 16915, -7343, -27474, -32165, -18778, 5162, 26201, 32514, 20553, -2959, -24808, -32715, -22236, 740, 23300, 32764, 23815, 1480, -21686, -32665, -25286, -3696, 19971, 32414, 26639, 5892, -18166, -32015, -27871, -8063, 16276, 31468, 28973, 10195, -14313, -30777, -29945, -12283, 12282, 29944, 30776, 14312, -10196, -28974, -31469, -16277, 8062, 27870, 32014, 18165, -5893, -26640, -32415, -19972, 3695, 25285, 32664, 21685, -1481, -23816, -32765, -23301, -741, 22235, 32714, 24807, 2958, -20554, -32515, -26202, -5163, 18777, 32164, 27473, 7342, -16916, -31667, -28621, -9490, 14974, 31023, 29635, 11592, -12966, -30238, -30515, -13643, 10897, 29312, 31253, 15629, -8779, -28253, -31849, -17545, 6619, 27063, 32297, 19379, -4430, -25750, -32598, -21126, 2220, 24317, 32748, 22773}, -{0, -23816, -32715, -21126, 3695, 26201, 32297, 18165, -7343, -28253, -31469, -14975, 10897, 29944, 30237, 11592, -14313, -31254, -28621, -8063, 17544, 32164, 26639, 4429, -20554, -32665, -24318, -741, 23300, 32748, 21685, -2959, -25750, -32415, -18778, 6619, 27870, 31666, 15629, -10196, -29636, -30515, -12283, 13642, 31023, 28973, 8778, -16916, -32015, -27064, -5163, 19971, 32597, 24807, 1480, -22774, -32765, -22236, 2220, 25285, 32514, 19379, -5893, -27474, -31849, -16277, 9489, 29312, 30776, 12965, -12966, -30777, -29313, -9490, 16276, 31848, 27473, 5892, -19380, -32515, -25286, -2221, 22235, 32764, 22773, -1481, -24808, -32598, -19972, 5162, 27063, 32014, 16915, -8779, -28974, -31024, -13643, 12282, 30514, 29635, 10195, -15630, -31667, -27871, -6620, 18777, 32414, 25749, 2958, -21686, -32749, -23301, 740, 24317, 32664, 20553, -4430, -26640, -32165, -17545, 8062, 28620, 31253, 14312, -11593, -30238, -29945, -10898, 14974, 31468, 28252, 7342, -18166, -32298, -26202, -3696, 21125, 32714, 23815}, -{0, -24808, -32415, -17545, 9489, 29944, 29635, 8778, -18166, -32515, -24318, 740, 25285, 32297, 16915, -10196, -30238, -29313, -8063, 18777, 32597, 23815, -1481, -25750, -32165, -16277, 10897, 30514, 28973, 7342, -19380, -32665, -23301, 2220, 26201, 32014, 15629, -11593, -30777, -28621, -6620, 19971, 32714, 22773, -2959, -26640, -31849, -14975, 12282, 31023, 28252, 5892, -20554, -32749, -22236, 3695, 27063, 31666, 14312, -12966, -31254, -27871, -5163, 21125, 32764, 21685, -4430, -27474, -31469, -13643, 13642, 31468, 27473, 4429, -21686, -32765, -21126, 5162, 27870, 31253, 12965, -14313, -31667, -27064, -3696, 22235, 32748, 20553, -5893, -28253, -31024, -12283, 14974, 31848, 26639, 2958, -22774, -32715, -19972, 6619, 28620, 30776, 11592, -15630, -32015, -26202, -2221, 23300, 32664, 19379, -7343, -28974, -30515, -10898, 16276, 32164, 25749, 1480, -23816, -32598, -18778, 8062, 29312, 30237, 10195, -16916, -32298, -25286, -741, 24317, 32514, 18165, -8779, -29636, -29945, -9490, 17544, 32414, 24807}, -{0, -25750, -31849, -13643, 14974, 32164, 24807, -1481, -26640, -31469, -12283, 16276, 32414, 23815, -2959, -27474, -31024, -10898, 17544, 32597, 22773, -4430, -28253, -30515, -9490, 18777, 32714, 21685, -5893, -28974, -29945, -8063, 19971, 32764, 20553, -7343, -29636, -29313, -6620, 21125, 32748, 19379, -8779, -30238, -28621, -5163, 22235, 32664, 18165, -10196, -30777, -27871, -3696, 23300, 32514, 16915, -11593, -31254, -27064, -2221, 24317, 32297, 15629, -12966, -31667, -26202, -741, 25285, 32014, 14312, -14313, -32015, -25286, 740, 26201, 31666, 12965, -15630, -32298, -24318, 2220, 27063, 31253, 11592, -16916, -32515, -23301, 3695, 27870, 30776, 10195, -18166, -32665, -22236, 5162, 28620, 30237, 8778, -19380, -32749, -21126, 6619, 29312, 29635, 7342, -20554, -32765, -19972, 8062, 29944, 28973, 5892, -21686, -32715, -18778, 9489, 30514, 28252, 4429, -22774, -32598, -17545, 10897, 31023, 27473, 2958, -23816, -32415, -16277, 12282, 31468, 26639, 1480, -24808, -32165, -14975, 13642, 31848, 25749}, -{0, -26640, -31024, -9490, 19971, 32748, 18165, -11593, -31667, -25286, 2220, 27870, 30237, 7342, -21686, -32598, -16277, 13642, 32164, 23815, -4430, -28974, -29313, -5163, 23300, 32297, 14312, -15630, -32515, -22236, 6619, 29944, 28252, 2958, -24808, -31849, -12283, 17544, 32714, 20553, -8779, -30777, -27064, -741, 26201, 31253, 10195, -19380, -32765, -18778, 10897, 31468, 25749, -1481, -27474, -30515, -8063, 21125, 32664, 16915, -12966, -32015, -24318, 3695, 28620, 29635, 5892, -22774, -32415, -14975, 14974, 32414, 22773, -5893, -29636, -28621, -3696, 24317, 32014, 12965, -16916, -32665, -21126, 8062, 30514, 27473, 1480, -25750, -31469, -10898, 18777, 32764, 19379, -10196, -31254, -26202, 740, 27063, 30776, 8778, -20554, -32715, -17545, 12282, 31848, 24807, -2959, -28253, -29945, -6620, 22235, 32514, 15629, -14313, -32298, -23301, 5162, 29312, 28973, 4429, -23816, -32165, -13643, 16276, 32597, 21685, -7343, -30238, -27871, -2221, 25285, 31666, 11592, -18166, -32749, -19972, 9489, 31023, 26639}, -{0, -27474, -29945, -5163, 24317, 31666, 10195, -20554, -32598, -14975, 16276, 32714, 19379, -11593, -32015, -23301, 6619, 30514, 26639, -1481, -28253, -29313, -3696, 25285, 31253, 8778, -21686, -32415, -13643, 17544, 32764, 18165, -12966, -32298, -22236, 8062, 31023, 25749, -2959, -28974, -28621, -2221, 26201, 30776, 7342, -22774, -32165, -12283, 18777, 32748, 16915, -14313, -32515, -21126, 9489, 31468, 24807, -4430, -29636, -27871, -741, 27063, 30237, 5892, -23816, -31849, -10898, 19971, 32664, 15629, -15630, -32665, -19972, 10897, 31848, 23815, -5893, -30238, -27064, 740, 27870, 29635, 4429, -24808, -31469, -9490, 21125, 32514, 14312, -16916, -32749, -18778, 12282, 32164, 22773, -7343, -30777, -26202, 2220, 28620, 28973, 2958, -25750, -31024, -8063, 22235, 32297, 12965, -18166, -32765, -17545, 13642, 32414, 21685, -8779, -31254, -25286, 3695, 29312, 28252, 1480, -26640, -30515, -6620, 23300, 32014, 11592, -19380, -32715, -16277, 14974, 32597, 20553, -10196, -31667, -24318, 5162, 29944, 27473}, -{0, -28253, -28621, -741, 27870, 28973, 1480, -27474, -29313, -2221, 27063, 29635, 2958, -26640, -29945, -3696, 26201, 30237, 4429, -25750, -30515, -5163, 25285, 30776, 5892, -24808, -31024, -6620, 24317, 31253, 7342, -23816, -31469, -8063, 23300, 31666, 8778, -22774, -31849, -9490, 22235, 32014, 10195, -21686, -32165, -10898, 21125, 32297, 11592, -20554, -32415, -12283, 19971, 32514, 12965, -19380, -32598, -13643, 18777, 32664, 14312, -18166, -32715, -14975, 17544, 32748, 15629, -16916, -32765, -16277, 16276, 32764, 16915, -15630, -32749, -17545, 14974, 32714, 18165, -14313, -32665, -18778, 13642, 32597, 19379, -12966, -32515, -19972, 12282, 32414, 20553, -11593, -32298, -21126, 10897, 32164, 21685, -10196, -32015, -22236, 9489, 31848, 22773, -8779, -31667, -23301, 8062, 31468, 23815, -7343, -31254, -24318, 6619, 31023, 24807, -5893, -30777, -25286, 5162, 30514, 25749, -4430, -30238, -26202, 3695, 29944, 26639, -2959, -29636, -27064, 2220, 29312, 27473, -1481, -28974, -27871, 740, 28620, 28252}, -{0, -28974, -27064, 3695, 30514, 24807, -7343, -31667, -22236, 10897, 32414, 19379, -14313, -32749, -16277, 17544, 32664, 12965, -20554, -32165, -9490, 23300, 31253, 5892, -25750, -29945, -2221, 27870, 28252, -1481, -29636, -26202, 5162, 31023, 23815, -8779, -32015, -21126, 12282, 32597, 18165, -15630, -32765, -14975, 18777, 32514, 11592, -21686, -31849, -8063, 24317, 30776, 4429, -26640, -29313, -741, 28620, 27473, -2959, -30238, -25286, 6619, 31468, 22773, -10196, -32298, -19972, 13642, 32714, 16915, -16916, -32715, -13643, 19971, 32297, 10195, -22774, -31469, -6620, 25285, 30237, 2958, -27474, -28621, 740, 29312, 26639, -4430, -30777, -24318, 8062, 31848, 21685, -11593, -32515, -18778, 14974, 32764, 15629, -18166, -32598, -12283, 21125, 32014, 8778, -23816, -31024, -5163, 26201, 29635, 1480, -28253, -27871, 2220, 29944, 25749, -5893, -31254, -23301, 9489, 32164, 20553, -12966, -32665, -17545, 16276, 32748, 14312, -19380, -32415, -10898, 22235, 31666, 7342, -24808, -30515, -3696, 27063, 28973}, -{0, -29636, -25286, 8062, 32164, 19379, -15630, -32715, -12283, 22235, 31253, 4429, -27474, -27871, 3695, 31023, 22773, -11593, -32665, -16277, 18777, 32297, 8778, -24808, -29945, -741, 29312, 25749, -7343, -32015, -19972, 14974, 32748, 12965, -21686, -31469, -5163, 27063, 28252, -2959, -30777, -23301, 10897, 32597, 16915, -18166, -32415, -9490, 24317, 30237, 1480, -28974, -26202, 6619, 31848, 20553, -14313, -32765, -13643, 21125, 31666, 5892, -26640, -28621, 2220, 30514, 23815, -10196, -32515, -17545, 17544, 32514, 10195, -23816, -30515, -2221, 28620, 26639, -5893, -31667, -21126, 13642, 32764, 14312, -20554, -31849, -6620, 26201, 28973, -1481, -30238, -24318, 9489, 32414, 18165, -16916, -32598, -10898, 23300, 30776, 2958, -28253, -27064, 5162, 31468, 21685, -12966, -32749, -14975, 19971, 32014, 7342, -25750, -29313, 740, 29944, 24807, -8779, -32298, -18778, 16276, 32664, 11592, -22774, -31024, -3696, 27870, 27473, -4430, -31254, -22236, 12282, 32714, 15629, -19380, -32165, -8063, 25285, 29635}, -{0, -30238, -23301, 12282, 32764, 12965, -22774, -30515, -741, 29944, 23815, -11593, -32749, -13643, 22235, 30776, 1480, -29636, -24318, 10897, 32714, 14312, -21686, -31024, -2221, 29312, 24807, -10196, -32665, -14975, 21125, 31253, 2958, -28974, -25286, 9489, 32597, 15629, -20554, -31469, -3696, 28620, 25749, -8779, -32515, -16277, 19971, 31666, 4429, -28253, -26202, 8062, 32414, 16915, -19380, -31849, -5163, 27870, 26639, -7343, -32298, -17545, 18777, 32014, 5892, -27474, -27064, 6619, 32164, 18165, -18166, -32165, -6620, 27063, 27473, -5893, -32015, -18778, 17544, 32297, 7342, -26640, -27871, 5162, 31848, 19379, -16916, -32415, -8063, 26201, 28252, -4430, -31667, -19972, 16276, 32514, 8778, -25750, -28621, 3695, 31468, 20553, -15630, -32598, -9490, 25285, 28973, -2959, -31254, -21126, 14974, 32664, 10195, -24808, -29313, 2220, 31023, 21685, -14313, -32715, -10898, 24317, 29635, -1481, -30777, -22236, 13642, 32748, 11592, -23816, -29945, 740, 30514, 22773, -12966, -32765, -12283, 23300, 30237}, -{0, -30777, -21126, 16276, 32297, 5892, -28253, -25286, 10897, 32764, 11592, -24808, -28621, 5162, 32164, 16915, -20554, -31024, -741, 30514, 21685, -15630, -32415, -6620, 27870, 25749, -10196, -32749, -12283, 24317, 28973, -4430, -32015, -17545, 19971, 31253, 1480, -30238, -22236, 14974, 32514, 7342, -27474, -26202, 9489, 32714, 12965, -23816, -29313, 3695, 31848, 18165, -19380, -31469, -2221, 29944, 22773, -14313, -32598, -8063, 27063, 26639, -8779, -32665, -13643, 23300, 29635, -2959, -31667, -18778, 18777, 31666, 2958, -29636, -23301, 13642, 32664, 8778, -26640, -27064, 8062, 32597, 14312, -22774, -29945, 2220, 31468, 19379, -18166, -31849, -3696, 29312, 23815, -12966, -32715, -9490, 26201, 27473, -7343, -32515, -14975, 22235, 30237, -1481, -31254, -19972, 17544, 32014, 4429, -28974, -24318, 12282, 32748, 10195, -25750, -27871, 6619, 32414, 15629, -21686, -30515, 740, 31023, 20553, -16916, -32165, -5163, 28620, 24807, -11593, -32765, -10898, 25285, 28252, -5893, -32298, -16277, 21125, 30776}, -{0, -31254, -18778, 19971, 30776, -1481, -31667, -17545, 21125, 30237, -2959, -32015, -16277, 22235, 29635, -4430, -32298, -14975, 23300, 28973, -5893, -32515, -13643, 24317, 28252, -7343, -32665, -12283, 25285, 27473, -8779, -32749, -10898, 26201, 26639, -10196, -32765, -9490, 27063, 25749, -11593, -32715, -8063, 27870, 24807, -12966, -32598, -6620, 28620, 23815, -14313, -32415, -5163, 29312, 22773, -15630, -32165, -3696, 29944, 21685, -16916, -31849, -2221, 30514, 20553, -18166, -31469, -741, 31023, 19379, -19380, -31024, 740, 31468, 18165, -20554, -30515, 2220, 31848, 16915, -21686, -29945, 3695, 32164, 15629, -22774, -29313, 5162, 32414, 14312, -23816, -28621, 6619, 32597, 12965, -24808, -27871, 8062, 32714, 11592, -25750, -27064, 9489, 32764, 10195, -26640, -26202, 10897, 32748, 8778, -27474, -25286, 12282, 32664, 7342, -28253, -24318, 13642, 32514, 5892, -28974, -23301, 14974, 32297, 4429, -29636, -22236, 16276, 32014, 2958, -30238, -21126, 17544, 31666, 1480, -30777, -19972, 18777, 31253}, -{0, -31667, -16277, 23300, 28252, -8779, -32765, -8063, 28620, 22773, -16916, -31469, 740, 31848, 15629, -23816, -27871, 9489, 32748, 7342, -28974, -22236, 17544, 31253, -1481, -32015, -14975, 24317, 27473, -10196, -32715, -6620, 29312, 21685, -18166, -31024, 2220, 32164, 14312, -24808, -27064, 10897, 32664, 5892, -29636, -21126, 18777, 30776, -2959, -32298, -13643, 25285, 26639, -11593, -32598, -5163, 29944, 20553, -19380, -30515, 3695, 32414, 12965, -25750, -26202, 12282, 32514, 4429, -30238, -19972, 19971, 30237, -4430, -32515, -12283, 26201, 25749, -12966, -32415, -3696, 30514, 19379, -20554, -29945, 5162, 32597, 11592, -26640, -25286, 13642, 32297, 2958, -30777, -18778, 21125, 29635, -5893, -32665, -10898, 27063, 24807, -14313, -32165, -2221, 31023, 18165, -21686, -29313, 6619, 32714, 10195, -27474, -24318, 14974, 32014, 1480, -31254, -17545, 22235, 28973, -7343, -32749, -9490, 27870, 23815, -15630, -31849, -741, 31468, 16915, -22774, -28621, 8062, 32764, 8778, -28253, -23301, 16276, 31666}, -{0, -32015, -13643, 26201, 24807, -15630, -31469, 2220, 32414, 11592, -27474, -23301, 17544, 30776, -4430, -32665, -9490, 28620, 21685, -19380, -29945, 6619, 32764, 7342, -29636, -19972, 21125, 28973, -8779, -32715, -5163, 30514, 18165, -22774, -27871, 10897, 32514, 2958, -31254, -16277, 24317, 26639, -12966, -32165, -741, 31848, 14312, -25750, -25286, 14974, 31666, -1481, -32298, -12283, 27063, 23815, -16916, -31024, 3695, 32597, 10195, -28253, -22236, 18777, 30237, -5893, -32749, -8063, 29312, 20553, -20554, -29313, 8062, 32748, 5892, -30238, -18778, 22235, 28252, -10196, -32598, -3696, 31023, 16915, -23816, -27064, 12282, 32297, 1480, -31667, -14975, 25285, 25749, -14313, -31849, 740, 32164, 12965, -26640, -24318, 16276, 31253, -2959, -32515, -10898, 27870, 22773, -18166, -30515, 5162, 32714, 8778, -28974, -21126, 19971, 29635, -7343, -32765, -6620, 29944, 19379, -21686, -28621, 9489, 32664, 4429, -30777, -17545, 23300, 27473, -11593, -32415, -2221, 31468, 15629, -24808, -26202, 13642, 32014}, -{0, -32298, -10898, 28620, 20553, -21686, -27871, 12282, 32014, -1481, -32515, -9490, 29312, 19379, -22774, -27064, 13642, 31666, -2959, -32665, -8063, 29944, 18165, -23816, -26202, 14974, 31253, -4430, -32749, -6620, 30514, 16915, -24808, -25286, 16276, 30776, -5893, -32765, -5163, 31023, 15629, -25750, -24318, 17544, 30237, -7343, -32715, -3696, 31468, 14312, -26640, -23301, 18777, 29635, -8779, -32598, -2221, 31848, 12965, -27474, -22236, 19971, 28973, -10196, -32415, -741, 32164, 11592, -28253, -21126, 21125, 28252, -11593, -32165, 740, 32414, 10195, -28974, -19972, 22235, 27473, -12966, -31849, 2220, 32597, 8778, -29636, -18778, 23300, 26639, -14313, -31469, 3695, 32714, 7342, -30238, -17545, 24317, 25749, -15630, -31024, 5162, 32764, 5892, -30777, -16277, 25285, 24807, -16916, -30515, 6619, 32748, 4429, -31254, -14975, 26201, 23815, -18166, -29945, 8062, 32664, 2958, -31667, -13643, 27063, 22773, -19380, -29313, 9489, 32514, 1480, -32015, -12283, 27870, 21685, -20554, -28621, 10897, 32297}, -{0, -32515, -8063, 30514, 15629, -26640, -22236, 21125, 27473, -14313, -31024, 6619, 32664, 1480, -32298, -9490, 29944, 16915, -25750, -23301, 19971, 28252, -12966, -31469, 5162, 32748, 2958, -32015, -10898, 29312, 18165, -24808, -24318, 18777, 28973, -11593, -31849, 3695, 32764, 4429, -31667, -12283, 28620, 19379, -23816, -25286, 17544, 29635, -10196, -32165, 2220, 32714, 5892, -31254, -13643, 27870, 20553, -22774, -26202, 16276, 30237, -8779, -32415, 740, 32597, 7342, -30777, -14975, 27063, 21685, -21686, -27064, 14974, 30776, -7343, -32598, -741, 32414, 8778, -30238, -16277, 26201, 22773, -20554, -27871, 13642, 31253, -5893, -32715, -2221, 32164, 10195, -29636, -17545, 25285, 23815, -19380, -28621, 12282, 31666, -4430, -32765, -3696, 31848, 11592, -28974, -18778, 24317, 24807, -18166, -29313, 10897, 32014, -2959, -32749, -5163, 31468, 12965, -28253, -19972, 23300, 25749, -16916, -29945, 9489, 32297, -1481, -32665, -6620, 31023, 14312, -27474, -21126, 22235, 26639, -15630, -30515, 8062, 32514}, -{0, -32665, -5163, 31848, 10195, -30238, -14975, 27870, 19379, -24808, -23301, 21125, 26639, -16916, -29313, 12282, 31253, -7343, -32415, 2220, 32764, 2958, -32298, -8063, 31023, 12965, -28974, -17545, 26201, 21685, -22774, -25286, 18777, 28252, -14313, -30515, 9489, 32014, -4430, -32715, -741, 32597, 5892, -31667, -10898, 29944, 15629, -27474, -19972, 24317, 23815, -20554, -27064, 16276, 29635, -11593, -31469, 6619, 32514, -1481, -32749, -3696, 32164, 8778, -30777, -13643, 28620, 18165, -25750, -22236, 22235, 25749, -18166, -28621, 13642, 30776, -8779, -32165, 3695, 32748, 1480, -32515, -6620, 31468, 11592, -29636, -16277, 27063, 20553, -23816, -24318, 19971, 27473, -15630, -29945, 10897, 31666, -5893, -32598, 740, 32714, 4429, -32015, -9490, 30514, 14312, -28253, -18778, 25285, 22773, -21686, -26202, 17544, 28973, -12966, -31024, 8062, 32297, -2959, -32765, -2221, 32414, 7342, -31254, -12283, 29312, 16915, -26640, -21126, 23300, 24807, -19380, -27871, 14974, 30237, -10196, -31849, 5162, 32664}, -{0, -32749, -2221, 32597, 4429, -32298, -6620, 31848, 8778, -31254, -10898, 30514, 12965, -29636, -14975, 28620, 16915, -27474, -18778, 26201, 20553, -24808, -22236, 23300, 23815, -21686, -25286, 19971, 26639, -18166, -27871, 16276, 28973, -14313, -29945, 12282, 30776, -10196, -31469, 8062, 32014, -5893, -32415, 3695, 32664, -1481, -32765, -741, 32714, 2958, -32515, -5163, 32164, 7342, -31667, -9490, 31023, 11592, -30238, -13643, 29312, 15629, -28253, -17545, 27063, 19379, -25750, -21126, 24317, 22773, -22774, -24318, 21125, 25749, -19380, -27064, 17544, 28252, -15630, -29313, 13642, 30237, -11593, -31024, 9489, 31666, -7343, -32165, 5162, 32514, -2959, -32715, 740, 32764, 1480, -32665, -3696, 32414, 5892, -32015, -8063, 31468, 10195, -30777, -12283, 29944, 14312, -28974, -16277, 27870, 18165, -26640, -19972, 25285, 21685, -23816, -23301, 22235, 24807, -20554, -26202, 18777, 27473, -16916, -28621, 14974, 29635, -12966, -30515, 10897, 31253, -8779, -31849, 6619, 32297, -4430, -32598, 2220, 32748}, -{0, -32765, 740, 32748, -1481, -32715, 2220, 32664, -2959, -32598, 3695, 32514, -4430, -32415, 5162, 32297, -5893, -32165, 6619, 32014, -7343, -31849, 8062, 31666, -8779, -31469, 9489, 31253, -10196, -31024, 10897, 30776, -11593, -30515, 12282, 30237, -12966, -29945, 13642, 29635, -14313, -29313, 14974, 28973, -15630, -28621, 16276, 28252, -16916, -27871, 17544, 27473, -18166, -27064, 18777, 26639, -19380, -26202, 19971, 25749, -20554, -25286, 21125, 24807, -21686, -24318, 22235, 23815, -22774, -23301, 23300, 22773, -23816, -22236, 24317, 21685, -24808, -21126, 25285, 20553, -25750, -19972, 26201, 19379, -26640, -18778, 27063, 18165, -27474, -17545, 27870, 16915, -28253, -16277, 28620, 15629, -28974, -14975, 29312, 14312, -29636, -13643, 29944, 12965, -30238, -12283, 30514, 11592, -30777, -10898, 31023, 10195, -31254, -9490, 31468, 8778, -31667, -8063, 31848, 7342, -32015, -6620, 32164, 5892, -32298, -5163, 32414, 4429, -32515, -3696, 32597, 2958, -32665, -2221, 32714, 1480, -32749, -741, 32764}, -{0, -32715, 3695, 32297, -7343, -31469, 10897, 30237, -14313, -28621, 17544, 26639, -20554, -24318, 23300, 21685, -25750, -18778, 27870, 15629, -29636, -12283, 31023, 8778, -32015, -5163, 32597, 1480, -32765, 2220, 32514, -5893, -31849, 9489, 30776, -12966, -29313, 16276, 27473, -19380, -25286, 22235, 22773, -24808, -19972, 27063, 16915, -28974, -13643, 30514, 10195, -31667, -6620, 32414, 2958, -32749, 740, 32664, -4430, -32165, 8062, 31253, -11593, -29945, 14974, 28252, -18166, -26202, 21125, 23815, -23816, -21126, 26201, 18165, -28253, -14975, 29944, 11592, -31254, -8063, 32164, 4429, -32665, -741, 32748, -2959, -32415, 6619, 31666, -10196, -30515, 13642, 28973, -16916, -27064, 19971, 24807, -22774, -22236, 25285, 19379, -27474, -16277, 29312, 12965, -30777, -9490, 31848, 5892, -32515, -2221, 32764, -1481, -32598, 5162, 32014, -8779, -31024, 12282, 29635, -15630, -27871, 18777, 25749, -21686, -23301, 24317, 20553, -26640, -17545, 28620, 14312, -30238, -10898, 31468, 7342, -32298, -3696, 32714}, -{0, -32598, 6619, 31253, -12966, -28621, 18777, 24807, -23816, -19972, 27870, 14312, -30777, -8063, 32414, 1480, -32715, 5162, 31666, -11593, -29313, 17544, 25749, -22774, -21126, 27063, 15629, -30238, -9490, 32164, 2958, -32765, 3695, 32014, -10196, -29945, 16276, 26639, -21686, -22236, 26201, 16915, -29636, -10898, 31848, 4429, -32749, 2220, 32297, -8779, -30515, 14974, 27473, -20554, -23301, 25285, 18165, -28974, -12283, 31468, 5892, -32665, 740, 32514, -7343, -31024, 13642, 28252, -19380, -24318, 24317, 19379, -28253, -13643, 31023, 7342, -32515, -741, 32664, -5893, -31469, 12282, 28973, -18166, -25286, 23300, 20553, -27474, -14975, 30514, 8778, -32298, -2221, 32748, -4430, -31849, 10897, 29635, -16916, -26202, 22235, 21685, -26640, -16277, 29944, 10195, -32015, -3696, 32764, -2959, -32165, 9489, 30237, -15630, -27064, 21125, 22773, -25750, -17545, 29312, 11592, -31667, -5163, 32714, -1481, -32415, 8062, 30776, -14313, -27871, 19971, 23815, -24808, -18778, 28620, 12965, -31254, -6620, 32597}, -{0, -32415, 9489, 29635, -18166, -24318, 25285, 16915, -30238, -8063, 32597, -1481, -32165, 10897, 28973, -19380, -23301, 26201, 15629, -30777, -6620, 32714, -2959, -31849, 12282, 28252, -20554, -22236, 27063, 14312, -31254, -5163, 32764, -4430, -31469, 13642, 27473, -21686, -21126, 27870, 12965, -31667, -3696, 32748, -5893, -31024, 14974, 26639, -22774, -19972, 28620, 11592, -32015, -2221, 32664, -7343, -30515, 16276, 25749, -23816, -18778, 29312, 10195, -32298, -741, 32514, -8779, -29945, 17544, 24807, -24808, -17545, 29944, 8778, -32515, 740, 32297, -10196, -29313, 18777, 23815, -25750, -16277, 30514, 7342, -32665, 2220, 32014, -11593, -28621, 19971, 22773, -26640, -14975, 31023, 5892, -32749, 3695, 31666, -12966, -27871, 21125, 21685, -27474, -13643, 31468, 4429, -32765, 5162, 31253, -14313, -27064, 22235, 20553, -28253, -12283, 31848, 2958, -32715, 6619, 30776, -15630, -26202, 23300, 19379, -28974, -10898, 32164, 1480, -32598, 8062, 30237, -16916, -25286, 24317, 18165, -29636, -9490, 32414}, -{0, -32165, 12282, 27473, -22774, -18778, 29944, 7342, -32749, 5162, 30776, -16916, -24318, 26201, 14312, -31667, -2221, 32514, -10196, -28621, 21125, 20553, -28974, -9490, 32597, -2959, -31469, 14974, 25749, -24808, -16277, 31023, 4429, -32715, 8062, 29635, -19380, -22236, 27870, 11592, -32298, 740, 32014, -12966, -27064, 23300, 18165, -30238, -6620, 32764, -5893, -30515, 17544, 23815, -26640, -13643, 31848, 1480, -32415, 10897, 28252, -21686, -19972, 29312, 8778, -32665, 3695, 31253, -15630, -25286, 25285, 15629, -31254, -3696, 32664, -8779, -29313, 19971, 21685, -28253, -10898, 32414, -1481, -31849, 13642, 26639, -23816, -17545, 30514, 5892, -32765, 6619, 30237, -18166, -23301, 27063, 12965, -32015, -741, 32297, -11593, -27871, 22235, 19379, -29636, -8063, 32714, -4430, -31024, 16276, 24807, -25750, -14975, 31468, 2958, -32598, 9489, 28973, -20554, -21126, 28620, 10195, -32515, 2220, 31666, -14313, -26202, 24317, 16915, -30777, -5163, 32748, -7343, -29945, 18777, 22773, -27474, -12283, 32164}, -{0, -31849, 14974, 24807, -26640, -12283, 32414, -2959, -31024, 17544, 22773, -28253, -9490, 32714, -5893, -29945, 19971, 20553, -29636, -6620, 32748, -8779, -28621, 22235, 18165, -30777, -3696, 32514, -11593, -27064, 24317, 15629, -31667, -741, 32014, -14313, -25286, 26201, 12965, -32298, 2220, 31253, -16916, -23301, 27870, 10195, -32665, 5162, 30237, -19380, -21126, 29312, 7342, -32765, 8062, 28973, -21686, -18778, 30514, 4429, -32598, 10897, 27473, -23816, -16277, 31468, 1480, -32165, 13642, 25749, -25750, -13643, 32164, -1481, -31469, 16276, 23815, -27474, -10898, 32597, -4430, -30515, 18777, 21685, -28974, -8063, 32764, -7343, -29313, 21125, 19379, -30238, -5163, 32664, -10196, -27871, 23300, 16915, -31254, -2221, 32297, -12966, -26202, 25285, 14312, -32015, 740, 31666, -15630, -24318, 27063, 11592, -32515, 3695, 30776, -18166, -22236, 28620, 8778, -32749, 6619, 29635, -20554, -19972, 29944, 5892, -32715, 9489, 28252, -22774, -17545, 31023, 2958, -32415, 12282, 26639, -24808, -14975, 31848}, -{0, -31469, 17544, 21685, -29636, -5163, 32514, -12966, -25286, 27063, 10195, -32749, 8062, 28252, -23816, -14975, 32164, -2959, -30515, 19971, 19379, -30777, -2221, 32014, -15630, -23301, 28620, 7342, -32715, 10897, 26639, -25750, -12283, 32597, -5893, -29313, 22235, 16915, -31667, 740, 31253, -18166, -21126, 29944, 4429, -32415, 13642, 24807, -27474, -9490, 32764, -8779, -27871, 24317, 14312, -32298, 3695, 30237, -20554, -18778, 31023, 1480, -31849, 16276, 22773, -28974, -6620, 32664, -11593, -26202, 26201, 11592, -32665, 6619, 28973, -22774, -16277, 31848, -1481, -31024, 18777, 20553, -30238, -3696, 32297, -14313, -24318, 27870, 8778, -32765, 9489, 27473, -24808, -13643, 32414, -4430, -29945, 21125, 18165, -31254, -741, 31666, -16916, -22236, 29312, 5892, -32598, 12282, 25749, -26640, -10898, 32714, -7343, -28621, 23300, 15629, -32015, 2220, 30776, -19380, -19972, 30514, 2958, -32165, 14974, 23815, -28253, -8063, 32748, -10196, -27064, 25285, 12965, -32515, 5162, 29635, -21686, -17545, 31468}, -{0, -31024, 19971, 18165, -31667, 2220, 30237, -21686, -16277, 32164, -4430, -29313, 23300, 14312, -32515, 6619, 28252, -24808, -12283, 32714, -8779, -27064, 26201, 10195, -32765, 10897, 25749, -27474, -8063, 32664, -12966, -24318, 28620, 5892, -32415, 14974, 22773, -29636, -3696, 32014, -16916, -21126, 30514, 1480, -31469, 18777, 19379, -31254, 740, 30776, -20554, -17545, 31848, -2959, -29945, 22235, 15629, -32298, 5162, 28973, -23816, -13643, 32597, -7343, -27871, 25285, 11592, -32749, 9489, 26639, -26640, -9490, 32748, -11593, -25286, 27870, 7342, -32598, 13642, 23815, -28974, -5163, 32297, -15630, -22236, 29944, 2958, -31849, 17544, 20553, -30777, -741, 31253, -19380, -18778, 31468, -1481, -30515, 21125, 16915, -32015, 3695, 29635, -22774, -14975, 32414, -5893, -28621, 24317, 12965, -32665, 8062, 27473, -25750, -10898, 32764, -10196, -26202, 27063, 8778, -32715, 12282, 24807, -28253, -6620, 32514, -14313, -23301, 29312, 4429, -32165, 16276, 21685, -30238, -2221, 31666, -18166, -19972, 31023}, -{0, -30515, 22235, 14312, -32665, 9489, 25749, -28253, -5163, 32014, -18166, -18778, 31848, -4430, -28621, 25285, 10195, -32715, 13642, 22773, -30238, -741, 30776, -21686, -14975, 32597, -8779, -26202, 27870, 5892, -32165, 17544, 19379, -31667, 3695, 28973, -24808, -10898, 32748, -12966, -23301, 29944, 1480, -31024, 21125, 15629, -32515, 8062, 26639, -27474, -6620, 32297, -16916, -19972, 31468, -2959, -29313, 24317, 11592, -32765, 12282, 23815, -29636, -2221, 31253, -20554, -16277, 32414, -7343, -27064, 27063, 7342, -32415, 16276, 20553, -31254, 2220, 29635, -23816, -12283, 32764, -11593, -24318, 29312, 2958, -31469, 19971, 16915, -32298, 6619, 27473, -26640, -8063, 32514, -15630, -21126, 31023, -1481, -29945, 23300, 12965, -32749, 10897, 24807, -28974, -3696, 31666, -19380, -17545, 32164, -5893, -27871, 26201, 8778, -32598, 14974, 21685, -30777, 740, 30237, -22774, -13643, 32714, -10196, -25286, 28620, 4429, -31849, 18777, 18165, -32015, 5162, 28252, -25750, -9490, 32664, -14313, -22236, 30514}, -{0, -29945, 24317, 10195, -32598, 16276, 19379, -32015, 6619, 26639, -28253, -3696, 31253, -21686, -13643, 32764, -12966, -22236, 31023, -2959, -28621, 26201, 7342, -32165, 18777, 16915, -32515, 9489, 24807, -29636, -741, 30237, -23816, -10898, 32664, -15630, -19972, 31848, -5893, -27064, 27870, 4429, -31469, 21125, 14312, -32749, 12282, 22773, -30777, 2220, 28973, -25750, -8063, 32297, -18166, -17545, 32414, -8779, -25286, 29312, 1480, -30515, 23300, 11592, -32715, 14974, 20553, -31667, 5162, 27473, -27474, -5163, 31666, -20554, -14975, 32714, -11593, -23301, 30514, -1481, -29313, 25285, 8778, -32415, 17544, 18165, -32298, 8062, 25749, -28974, -2221, 30776, -22774, -12283, 32748, -14313, -21126, 31468, -4430, -27871, 27063, 5892, -31849, 19971, 15629, -32665, 10897, 23815, -30238, 740, 29635, -24808, -9490, 32514, -16916, -18778, 32164, -7343, -26202, 28620, 2958, -31024, 22235, 12965, -32765, 13642, 21685, -31254, 3695, 28252, -26640, -6620, 32014, -19380, -16277, 32597, -10196, -24318, 29944}, -{0, -29313, 26201, 5892, -31469, 22235, 11592, -32598, 17544, 16915, -32665, 12282, 21685, -31667, 6619, 25749, -29636, 740, 28973, -26640, -5163, 31253, -22774, -10898, 32514, -18166, -16277, 32714, -12966, -21126, 31848, -7343, -25286, 29944, -1481, -28621, 27063, 4429, -31024, 23300, 10195, -32415, 18777, 15629, -32749, 13642, 20553, -32015, 8062, 24807, -30238, 2220, 28252, -27474, -3696, 30776, -23816, -9490, 32297, -19380, -14975, 32764, -14313, -19972, 32164, -8779, -24318, 30514, -2959, -27871, 27870, 2958, -30515, 24317, 8778, -32165, 19971, 14312, -32765, 14974, 19379, -32298, 9489, 23815, -30777, 3695, 27473, -28253, -2221, 30237, -24808, -8063, 32014, -20554, -13643, 32748, -15630, -18778, 32414, -10196, -23301, 31023, -4430, -27064, 28620, 1480, -29945, 25285, 7342, -31849, 21125, 12965, -32715, 16276, 18165, -32515, 10897, 22773, -31254, 5162, 26639, -28974, -741, 29635, -25750, -6620, 31666, -21686, -12283, 32664, -16916, -17545, 32597, -11593, -22236, 31468, -5893, -26202, 29312}, -{0, -28621, 27870, 1480, -29313, 27063, 2958, -29945, 26201, 4429, -30515, 25285, 5892, -31024, 24317, 7342, -31469, 23300, 8778, -31849, 22235, 10195, -32165, 21125, 11592, -32415, 19971, 12965, -32598, 18777, 14312, -32715, 17544, 15629, -32765, 16276, 16915, -32749, 14974, 18165, -32665, 13642, 19379, -32515, 12282, 20553, -32298, 10897, 21685, -32015, 9489, 22773, -31667, 8062, 23815, -31254, 6619, 24807, -30777, 5162, 25749, -30238, 3695, 26639, -29636, 2220, 27473, -28974, 740, 28252, -28253, -741, 28973, -27474, -2221, 29635, -26640, -3696, 30237, -25750, -5163, 30776, -24808, -6620, 31253, -23816, -8063, 31666, -22774, -9490, 32014, -21686, -10898, 32297, -20554, -12283, 32514, -19380, -13643, 32664, -18166, -14975, 32748, -16916, -16277, 32764, -15630, -17545, 32714, -14313, -18778, 32597, -12966, -19972, 32414, -11593, -21126, 32164, -10196, -22236, 31848, -8779, -23301, 31468, -7343, -24318, 31023, -5893, -25286, 30514, -4430, -26202, 29944, -2959, -27064, 29312, -1481, -27871, 28620}, -{0, -27871, 29312, -2959, -26202, 30514, -5893, -24318, 31468, -8779, -22236, 32164, -11593, -19972, 32597, -14313, -17545, 32764, -16916, -14975, 32664, -19380, -12283, 32297, -21686, -9490, 31666, -23816, -6620, 30776, -25750, -3696, 29635, -27474, -741, 28252, -28974, 2220, 26639, -30238, 5162, 24807, -31254, 8062, 22773, -32015, 10897, 20553, -32515, 13642, 18165, -32749, 16276, 15629, -32715, 18777, 12965, -32415, 21125, 10195, -31849, 23300, 7342, -31024, 25285, 4429, -29945, 27063, 1480, -28621, 28620, -1481, -27064, 29944, -4430, -25286, 31023, -7343, -23301, 31848, -10196, -21126, 32414, -12966, -18778, 32714, -15630, -16277, 32748, -18166, -13643, 32514, -20554, -10898, 32014, -22774, -8063, 31253, -24808, -5163, 30237, -26640, -2221, 28973, -28253, 740, 27473, -29636, 3695, 25749, -30777, 6619, 23815, -31667, 9489, 21685, -32298, 12282, 19379, -32665, 14974, 16915, -32765, 17544, 14312, -32598, 19971, 11592, -32165, 22235, 8778, -31469, 24317, 5892, -30515, 26201, 2958, -29313, 27870}, -{0, -27064, 30514, -7343, -22236, 32414, -14313, -16277, 32664, -20554, -9490, 31253, -25750, -2221, 28252, -29636, 5162, 23815, -32015, 12282, 18165, -32765, 18777, 11592, -31849, 24317, 4429, -29313, 28620, -2959, -25286, 31468, -10196, -19972, 32714, -16916, -13643, 32297, -22774, -6620, 30237, -27474, 740, 26639, -30777, 8062, 21685, -32515, 14974, 15629, -32598, 21125, 8778, -31024, 26201, 1480, -27871, 29944, -5893, -23301, 32164, -12966, -17545, 32748, -19380, -10898, 31666, -24808, -3696, 28973, -28974, 3695, 24807, -31667, 10897, 19379, -32749, 17544, 12965, -32165, 23300, 5892, -29945, 27870, -1481, -26202, 31023, -8779, -21126, 32597, -15630, -14975, 32514, -21686, -8063, 30776, -26640, -741, 27473, -30238, 6619, 22773, -32298, 13642, 16915, -32715, 19971, 10195, -31469, 25285, 2958, -28621, 29312, -4430, -24318, 31848, -11593, -18778, 32764, -18166, -12283, 32014, -23816, -5163, 29635, -28253, 2220, 25749, -31254, 9489, 20553, -32665, 16276, 14312, -32415, 22235, 7342, -30515, 27063}, -{0, -26202, 31468, -11593, -17545, 32664, -21686, -6620, 29635, -28974, 5162, 22773, -32515, 16276, 12965, -31849, 25285, 1480, -27064, 31023, -10196, -18778, 32748, -20554, -8063, 30237, -28253, 3695, 23815, -32298, 14974, 14312, -32165, 24317, 2958, -27871, 30514, -8779, -19972, 32764, -19380, -9490, 30776, -27474, 2220, 24807, -32015, 13642, 15629, -32415, 23300, 4429, -28621, 29944, -7343, -21126, 32714, -18166, -10898, 31253, -26640, 740, 25749, -31667, 12282, 16915, -32598, 22235, 5892, -29313, 29312, -5893, -22236, 32597, -16916, -12283, 31666, -25750, -741, 26639, -31254, 10897, 18165, -32715, 21125, 7342, -29945, 28620, -4430, -23301, 32414, -15630, -13643, 32014, -24808, -2221, 27473, -30777, 9489, 19379, -32765, 19971, 8778, -30515, 27870, -2959, -24318, 32164, -14313, -14975, 32297, -23816, -3696, 28252, -30238, 8062, 20553, -32749, 18777, 10195, -31024, 27063, -1481, -25286, 31848, -12966, -16277, 32514, -22774, -5163, 28973, -29636, 6619, 21685, -32665, 17544, 11592, -31469, 26201}, -{0, -25286, 32164, -15630, -12283, 31253, -27474, 3695, 22773, -32665, 18777, 8778, -29945, 29312, -7343, -19972, 32748, -21686, -5163, 28252, -30777, 10897, 16915, -32415, 24317, 1480, -26202, 31848, -14313, -13643, 31666, -26640, 2220, 23815, -32515, 17544, 10195, -30515, 28620, -5893, -21126, 32764, -20554, -6620, 28973, -30238, 9489, 18165, -32598, 23300, 2958, -27064, 31468, -12966, -14975, 32014, -25750, 740, 24807, -32298, 16276, 11592, -31024, 27870, -4430, -22236, 32714, -19380, -8063, 29635, -29636, 8062, 19379, -32715, 22235, 4429, -27871, 31023, -11593, -16277, 32297, -24808, -741, 25749, -32015, 14974, 12965, -31469, 27063, -2959, -23301, 32597, -18166, -9490, 30237, -28974, 6619, 20553, -32765, 21125, 5892, -28621, 30514, -10196, -17545, 32514, -23816, -2221, 26639, -31667, 13642, 14312, -31849, 26201, -1481, -24318, 32414, -16916, -10898, 30776, -28253, 5162, 21685, -32749, 19971, 7342, -29313, 29944, -8779, -18778, 32664, -22774, -3696, 27473, -31254, 12282, 15629, -32165, 25285}, -{0, -24318, 32597, -19380, -6620, 28252, -31254, 13642, 12965, -31024, 28620, -7343, -18778, 32514, -24808, 740, 23815, -32665, 19971, 5892, -27871, 31468, -14313, -12283, 30776, -28974, 8062, 18165, -32415, 25285, -1481, -23301, 32714, -20554, -5163, 27473, -31667, 14974, 11592, -30515, 29312, -8779, -17545, 32297, -25750, 2220, 22773, -32749, 21125, 4429, -27064, 31848, -15630, -10898, 30237, -29636, 9489, 16915, -32165, 26201, -2959, -22236, 32764, -21686, -3696, 26639, -32015, 16276, 10195, -29945, 29944, -10196, -16277, 32014, -26640, 3695, 21685, -32765, 22235, 2958, -26202, 32164, -16916, -9490, 29635, -30238, 10897, 15629, -31849, 27063, -4430, -21126, 32748, -22774, -2221, 25749, -32298, 17544, 8778, -29313, 30514, -11593, -14975, 31666, -27474, 5162, 20553, -32715, 23300, 1480, -25286, 32414, -18166, -8063, 28973, -30777, 12282, 14312, -31469, 27870, -5893, -19972, 32664, -23816, -741, 24807, -32515, 18777, 7342, -28621, 31023, -12966, -13643, 31253, -28253, 6619, 19379, -32598, 24317}, -{0, -23301, 32764, -22774, -741, 23815, -32749, 22235, 1480, -24318, 32714, -21686, -2221, 24807, -32665, 21125, 2958, -25286, 32597, -20554, -3696, 25749, -32515, 19971, 4429, -26202, 32414, -19380, -5163, 26639, -32298, 18777, 5892, -27064, 32164, -18166, -6620, 27473, -32015, 17544, 7342, -27871, 31848, -16916, -8063, 28252, -31667, 16276, 8778, -28621, 31468, -15630, -9490, 28973, -31254, 14974, 10195, -29313, 31023, -14313, -10898, 29635, -30777, 13642, 11592, -29945, 30514, -12966, -12283, 30237, -30238, 12282, 12965, -30515, 29944, -11593, -13643, 30776, -29636, 10897, 14312, -31024, 29312, -10196, -14975, 31253, -28974, 9489, 15629, -31469, 28620, -8779, -16277, 31666, -28253, 8062, 16915, -31849, 27870, -7343, -17545, 32014, -27474, 6619, 18165, -32165, 27063, -5893, -18778, 32297, -26640, 5162, 19379, -32415, 26201, -4430, -19972, 32514, -25750, 3695, 20553, -32598, 25285, -2959, -21126, 32664, -24808, 2220, 21685, -32715, 24317, -1481, -22236, 32748, -23816, 740, 22773, -32765, 23300}, -{0, -22236, 32664, -25750, 5162, 18165, -31849, 28620, -10196, -13643, 30237, -30777, 14974, 8778, -27871, 32164, -19380, -3696, 24807, -32749, 23300, -1481, -21126, 32514, -26640, 6619, 16915, -31469, 29312, -11593, -12283, 29635, -31254, 16276, 7342, -27064, 32414, -20554, -2221, 23815, -32765, 24317, -2959, -19972, 32297, -27474, 8062, 15629, -31024, 29944, -12966, -10898, 28973, -31667, 17544, 5892, -26202, 32597, -21686, -741, 22773, -32715, 25285, -4430, -18778, 32014, -28253, 9489, 14312, -30515, 30514, -14313, -9490, 28252, -32015, 18777, 4429, -25286, 32714, -22774, 740, 21685, -32598, 26201, -5893, -17545, 31666, -28974, 10897, 12965, -29945, 31023, -15630, -8063, 27473, -32298, 19971, 2958, -24318, 32764, -23816, 2220, 20553, -32415, 27063, -7343, -16277, 31253, -29636, 12282, 11592, -29313, 31468, -16916, -6620, 26639, -32515, 21125, 1480, -23301, 32748, -24808, 3695, 19379, -32165, 27870, -8779, -14975, 30776, -30238, 13642, 10195, -28621, 31848, -18166, -5163, 25749, -32665, 22235}, -{0, -21126, 32297, -28253, 10897, 11592, -28621, 32164, -20554, -741, 21685, -32415, 27870, -10196, -12283, 28973, -32015, 19971, 1480, -22236, 32514, -27474, 9489, 12965, -29313, 31848, -19380, -2221, 22773, -32598, 27063, -8779, -13643, 29635, -31667, 18777, 2958, -23301, 32664, -26640, 8062, 14312, -29945, 31468, -18166, -3696, 23815, -32715, 26201, -7343, -14975, 30237, -31254, 17544, 4429, -24318, 32748, -25750, 6619, 15629, -30515, 31023, -16916, -5163, 24807, -32765, 25285, -5893, -16277, 30776, -30777, 16276, 5892, -25286, 32764, -24808, 5162, 16915, -31024, 30514, -15630, -6620, 25749, -32749, 24317, -4430, -17545, 31253, -30238, 14974, 7342, -26202, 32714, -23816, 3695, 18165, -31469, 29944, -14313, -8063, 26639, -32665, 23300, -2959, -18778, 31666, -29636, 13642, 8778, -27064, 32597, -22774, 2220, 19379, -31849, 29312, -12966, -9490, 27473, -32515, 22235, -1481, -19972, 32014, -28974, 12282, 10195, -27871, 32414, -21686, 740, 20553, -32165, 28620, -11593, -10898, 28252, -32298, 21125}, -{0, -19972, 31666, -30238, 16276, 4429, -23301, 32514, -28253, 12282, 8778, -26202, 32764, -25750, 8062, 12965, -28621, 32414, -22774, 3695, 16915, -30515, 31468, -19380, -741, 20553, -31849, 29944, -15630, -5163, 23815, -32598, 27870, -11593, -9490, 26639, -32749, 25285, -7343, -13643, 28973, -32298, 22235, -2959, -17545, 30776, -31254, 18777, 1480, -21126, 32014, -29636, 14974, 5892, -24318, 32664, -27474, 10897, 10195, -27064, 32714, -24808, 6619, 14312, -29313, 32164, -21686, 2220, 18165, -31024, 31023, -18166, -2221, 21685, -32165, 29312, -14313, -6620, 24807, -32715, 27063, -10196, -10898, 27473, -32665, 24317, -5893, -14975, 29635, -32015, 21125, -1481, -18778, 31253, -30777, 17544, 2958, -22236, 32297, -28974, 13642, 7342, -25286, 32748, -26640, 9489, 11592, -27871, 32597, -23816, 5162, 15629, -29945, 31848, -20554, 740, 19379, -31469, 30514, -16916, -3696, 22773, -32415, 28620, -12966, -8063, 25749, -32765, 26201, -8779, -12283, 28252, -32515, 23300, -4430, -16277, 30237, -31667, 19971}, -{0, -18778, 30776, -31667, 21125, -2959, -16277, 29635, -32298, 23300, -5893, -13643, 28252, -32665, 25285, -8779, -10898, 26639, -32765, 27063, -11593, -8063, 24807, -32598, 28620, -14313, -5163, 22773, -32165, 29944, -16916, -2221, 20553, -31469, 31023, -19380, 740, 18165, -30515, 31848, -21686, 3695, 15629, -29313, 32414, -23816, 6619, 12965, -27871, 32714, -25750, 9489, 10195, -26202, 32748, -27474, 12282, 7342, -24318, 32514, -28974, 14974, 4429, -22236, 32014, -30238, 17544, 1480, -19972, 31253, -31254, 19971, -1481, -17545, 30237, -32015, 22235, -4430, -14975, 28973, -32515, 24317, -7343, -12283, 27473, -32749, 26201, -10196, -9490, 25749, -32715, 27870, -12966, -6620, 23815, -32415, 29312, -15630, -3696, 21685, -31849, 30514, -18166, -741, 19379, -31024, 31468, -20554, 2220, 16915, -29945, 32164, -22774, 5162, 14312, -28621, 32597, -24808, 8062, 11592, -27064, 32764, -26640, 10897, 8778, -25286, 32664, -28253, 13642, 5892, -23301, 32297, -29636, 16276, 2958, -21126, 31666, -30777, 18777}, -{0, -17545, 29635, -32515, 25285, -10196, -8063, 23815, -32165, 30514, -19380, 2220, 15629, -28621, 32714, -26640, 12282, 5892, -22236, 31666, -31254, 21125, -4430, -13643, 27473, -32765, 27870, -14313, -3696, 20553, -31024, 31848, -22774, 6619, 11592, -26202, 32664, -28974, 16276, 1480, -18778, 30237, -32298, 24317, -8779, -9490, 24807, -32415, 29944, -18166, 740, 16915, -29313, 32597, -25750, 10897, 7342, -23301, 32014, -30777, 19971, -2959, -14975, 28252, -32749, 27063, -12966, -5163, 21685, -31469, 31468, -21686, 5162, 12965, -27064, 32748, -28253, 14974, 2958, -19972, 30776, -32015, 23300, -7343, -10898, 25749, -32598, 29312, -16916, -741, 18165, -29945, 32414, -24808, 9489, 8778, -24318, 32297, -30238, 18777, -1481, -16277, 28973, -32665, 26201, -11593, -6620, 22773, -31849, 31023, -20554, 3695, 14312, -27871, 32764, -27474, 13642, 4429, -21126, 31253, -31667, 22235, -5893, -12283, 26639, -32715, 28620, -15630, -2221, 19379, -30515, 32164, -23816, 8062, 10195, -25286, 32514, -29636, 17544}, -{0, -16277, 28252, -32765, 28620, -16916, 740, 15629, -27871, 32748, -28974, 17544, -1481, -14975, 27473, -32715, 29312, -18166, 2220, 14312, -27064, 32664, -29636, 18777, -2959, -13643, 26639, -32598, 29944, -19380, 3695, 12965, -26202, 32514, -30238, 19971, -4430, -12283, 25749, -32415, 30514, -20554, 5162, 11592, -25286, 32297, -30777, 21125, -5893, -10898, 24807, -32165, 31023, -21686, 6619, 10195, -24318, 32014, -31254, 22235, -7343, -9490, 23815, -31849, 31468, -22774, 8062, 8778, -23301, 31666, -31667, 23300, -8779, -8063, 22773, -31469, 31848, -23816, 9489, 7342, -22236, 31253, -32015, 24317, -10196, -6620, 21685, -31024, 32164, -24808, 10897, 5892, -21126, 30776, -32298, 25285, -11593, -5163, 20553, -30515, 32414, -25750, 12282, 4429, -19972, 30237, -32515, 26201, -12966, -3696, 19379, -29945, 32597, -26640, 13642, 2958, -18778, 29635, -32665, 27063, -14313, -2221, 18165, -29313, 32714, -27474, 14974, 1480, -17545, 28973, -32749, 27870, -15630, -741, 16915, -28621, 32764, -28253, 16276}, -{0, -14975, 26639, -32415, 31023, -22774, 9489, 5892, -19972, 29635, -32749, 28620, -18166, 3695, 11592, -24318, 31666, -32015, 25285, -12966, -2221, 16915, -27871, 32664, -30238, 21125, -7343, -8063, 21685, -30515, 32597, -27474, 16276, -1481, -13643, 25749, -32165, 31468, -23816, 10897, 4429, -18778, 28973, -32765, 29312, -19380, 5162, 10195, -23301, 31253, -32298, 26201, -14313, -741, 15629, -27064, 32514, -30777, 22235, -8779, -6620, 20553, -29945, 32714, -28253, 17544, -2959, -12283, 24807, -31849, 31848, -24808, 12282, 2958, -17545, 28252, -32715, 29944, -20554, 6619, 8778, -22236, 30776, -32515, 27063, -15630, 740, 14312, -26202, 32297, -31254, 23300, -10196, -5163, 19379, -29313, 32764, -28974, 18777, -4430, -10898, 23815, -31469, 32164, -25750, 13642, 1480, -16277, 27473, -32598, 30514, -21686, 8062, 7342, -21126, 30237, -32665, 27870, -16916, 2220, 12965, -25286, 32014, -31667, 24317, -11593, -3696, 18165, -28621, 32748, -29636, 19971, -5893, -9490, 22773, -31024, 32414, -26640, 14974}, -{0, -13643, 24807, -31469, 32414, -27474, 17544, -4430, -9490, 21685, -29945, 32764, -29636, 21125, -8779, -5163, 18165, -27871, 32514, -31254, 24317, -12966, -741, 14312, -25286, 31666, -32298, 27063, -16916, 3695, 10195, -22236, 30237, -32749, 29312, -20554, 8062, 5892, -18778, 28252, -32598, 31023, -23816, 12282, 1480, -14975, 25749, -31849, 32164, -26640, 16276, -2959, -10898, 22773, -30515, 32714, -28974, 19971, -7343, -6620, 19379, -28621, 32664, -30777, 23300, -11593, -2221, 15629, -26202, 32014, -32015, 26201, -15630, 2220, 11592, -23301, 30776, -32665, 28620, -19380, 6619, 7342, -19972, 28973, -32715, 30514, -22774, 10897, 2958, -16277, 26639, -32165, 31848, -25750, 14974, -1481, -12283, 23815, -31024, 32597, -28253, 18777, -5893, -8063, 20553, -29313, 32748, -30238, 22235, -10196, -3696, 16915, -27064, 32297, -31667, 25285, -14313, 740, 12965, -24318, 31253, -32515, 27870, -18166, 5162, 8778, -21126, 29635, -32765, 29944, -21686, 9489, 4429, -17545, 27473, -32415, 31468, -24808, 13642}, -{0, -12283, 22773, -29945, 32748, -30777, 24317, -14313, 2220, 10195, -21126, 28973, -32598, 31468, -25750, 16276, -4430, -8063, 19379, -27871, 32297, -32015, 27063, -18166, 6619, 5892, -17545, 26639, -31849, 32414, -28253, 19971, -8779, -3696, 15629, -25286, 31253, -32665, 29312, -21686, 10897, 1480, -13643, 23815, -30515, 32764, -30238, 23300, -12966, 740, 11592, -22236, 29635, -32715, 31023, -24808, 14974, -2959, -9490, 20553, -28621, 32514, -31667, 26201, -16916, 5162, 7342, -18778, 27473, -32165, 32164, -27474, 18777, -7343, -5163, 16915, -26202, 31666, -32515, 28620, -20554, 9489, 2958, -14975, 24807, -31024, 32714, -29636, 22235, -11593, -741, 12965, -23301, 30237, -32765, 30514, -23816, 13642, -1481, -10898, 21685, -29313, 32664, -31254, 25285, -15630, 3695, 8778, -19972, 28252, -32415, 31848, -26640, 17544, -5893, -6620, 18165, -27064, 32014, -32298, 27870, -19380, 8062, 4429, -16277, 25749, -31469, 32597, -28974, 21125, -10196, -2221, 14312, -24318, 30776, -32749, 29944, -22774, 12282}, -{0, -10898, 20553, -27871, 32014, -32515, 29312, -22774, 13642, -2959, -8063, 18165, -26202, 31253, -32749, 30514, -24808, 16276, -5893, -5163, 15629, -24318, 30237, -32715, 31468, -26640, 18777, -8779, -2221, 12965, -22236, 28973, -32415, 32164, -28253, 21125, -11593, 740, 10195, -19972, 27473, -31849, 32597, -29636, 23300, -14313, 3695, 7342, -17545, 25749, -31024, 32764, -30777, 25285, -16916, 6619, 4429, -14975, 23815, -29945, 32664, -31667, 27063, -19380, 9489, 1480, -12283, 21685, -28621, 32297, -32298, 28620, -21686, 12282, -1481, -9490, 19379, -27064, 31666, -32665, 29944, -23816, 14974, -4430, -6620, 16915, -25286, 30776, -32765, 31023, -25750, 17544, -7343, -3696, 14312, -23301, 29635, -32598, 31848, -27474, 19971, -10196, -741, 11592, -21126, 28252, -32165, 32414, -28974, 22235, -12966, 2220, 8778, -18778, 26639, -31469, 32714, -30238, 24317, -15630, 5162, 5892, -16277, 24807, -30515, 32748, -31254, 26201, -18166, 8062, 2958, -13643, 22773, -29313, 32514, -32015, 27870, -20554, 10897}, -{0, -9490, 18165, -25286, 30237, -32598, 32164, -28974, 23300, -15630, 6619, 2958, -12283, 20553, -27064, 31253, -32765, 31468, -27474, 21125, -12966, 3695, 5892, -14975, 22773, -28621, 32014, -32665, 30514, -25750, 18777, -10196, 740, 8778, -17545, 24807, -29945, 32514, -32298, 29312, -23816, 16276, -7343, -2221, 11592, -19972, 26639, -31024, 32748, -31667, 27870, -21686, 13642, -4430, -5163, 14312, -22236, 28252, -31849, 32714, -30777, 26201, -19380, 10897, -1481, -8063, 16915, -24318, 29635, -32415, 32414, -29636, 24317, -16916, 8062, 1480, -10898, 19379, -26202, 30776, -32715, 31848, -28253, 22235, -14313, 5162, 4429, -13643, 21685, -27871, 31666, -32749, 31023, -26640, 19971, -11593, 2220, 7342, -16277, 23815, -29313, 32297, -32515, 29944, -24808, 17544, -8779, -741, 10195, -18778, 25749, -30515, 32664, -32015, 28620, -22774, 14974, -5893, -3696, 12965, -21126, 27473, -31469, 32764, -31254, 27063, -20554, 12282, -2959, -6620, 15629, -23301, 28973, -32165, 32597, -30238, 25285, -18166, 9489}, -{0, -8063, 15629, -22236, 27473, -31024, 32664, -32298, 29944, -25750, 19971, -12966, 5162, 2958, -10898, 18165, -24318, 28973, -31849, 32764, -31667, 28620, -23816, 17544, -10196, 2220, 5892, -13643, 20553, -26202, 30237, -32415, 32597, -30777, 27063, -21686, 14974, -7343, -741, 8778, -16277, 22773, -27871, 31253, -32715, 32164, -29636, 25285, -19380, 12282, -4430, -3696, 11592, -18778, 24807, -29313, 32014, -32749, 31468, -28253, 23300, -16916, 9489, -1481, -6620, 14312, -21126, 26639, -30515, 32514, -32515, 30514, -26640, 21125, -14313, 6619, 1480, -9490, 16915, -23301, 28252, -31469, 32748, -32015, 29312, -24808, 18777, -11593, 3695, 4429, -12283, 19379, -25286, 29635, -32165, 32714, -31254, 27870, -22774, 16276, -8779, 740, 7342, -14975, 21685, -27064, 30776, -32598, 32414, -30238, 26201, -20554, 13642, -5893, -2221, 10195, -17545, 23815, -28621, 31666, -32765, 31848, -28974, 24317, -18166, 10897, -2959, -5163, 12965, -19972, 25749, -29945, 32297, -32665, 31023, -27474, 22235, -15630, 8062}, -{0, -6620, 12965, -18778, 23815, -27871, 30776, -32415, 32714, -31667, 29312, -25750, 21125, -15630, 9489, -2959, -3696, 10195, -16277, 21685, -26202, 29635, -31849, 32748, -32298, 30514, -27474, 23300, -18166, 12282, -5893, -741, 7342, -13643, 19379, -24318, 28252, -31024, 32514, -32665, 31468, -28974, 25285, -20554, 14974, -8779, 2220, 4429, -10898, 16915, -22236, 26639, -29945, 32014, -32765, 32164, -30238, 27063, -22774, 17544, -11593, 5162, 1480, -8063, 14312, -19972, 24807, -28621, 31253, -32598, 32597, -31254, 28620, -24808, 19971, -14313, 8062, -1481, -5163, 11592, -17545, 22773, -27064, 30237, -32165, 32764, -32015, 29944, -26640, 22235, -16916, 10897, -4430, -2221, 8778, -14975, 20553, -25286, 28973, -31469, 32664, -32515, 31023, -28253, 24317, -19380, 13642, -7343, 740, 5892, -12283, 18165, -23301, 27473, -30515, 32297, -32749, 31848, -29636, 26201, -21686, 16276, -10196, 3695, 2958, -9490, 15629, -21126, 25749, -29313, 31666, -32715, 32414, -30777, 27870, -23816, 18777, -12966, 6619}, -{0, -5163, 10195, -14975, 19379, -23301, 26639, -29313, 31253, -32415, 32764, -32298, 31023, -28974, 26201, -22774, 18777, -14313, 9489, -4430, -741, 5892, -10898, 15629, -19972, 23815, -27064, 29635, -31469, 32514, -32749, 32164, -30777, 28620, -25750, 22235, -18166, 13642, -8779, 3695, 1480, -6620, 11592, -16277, 20553, -24318, 27473, -29945, 31666, -32598, 32714, -32015, 30514, -28253, 25285, -21686, 17544, -12966, 8062, -2959, -2221, 7342, -12283, 16915, -21126, 24807, -27871, 30237, -31849, 32664, -32665, 31848, -30238, 27870, -24808, 21125, -16916, 12282, -7343, 2220, 2958, -8063, 12965, -17545, 21685, -25286, 28252, -30515, 32014, -32715, 32597, -31667, 29944, -27474, 24317, -20554, 16276, -11593, 6619, -1481, -3696, 8778, -13643, 18165, -22236, 25749, -28621, 30776, -32165, 32748, -32515, 31468, -29636, 27063, -23816, 19971, -15630, 10897, -5893, 740, 4429, -9490, 14312, -18778, 22773, -26202, 28973, -31024, 32297, -32765, 32414, -31254, 29312, -26640, 23300, -19380, 14974, -10196, 5162}, -{0, -3696, 7342, -10898, 14312, -17545, 20553, -23301, 25749, -27871, 29635, -31024, 32014, -32598, 32764, -32515, 31848, -30777, 29312, -27474, 25285, -22774, 19971, -16916, 13642, -10196, 6619, -2959, -741, 4429, -8063, 11592, -14975, 18165, -21126, 23815, -26202, 28252, -29945, 31253, -32165, 32664, -32749, 32414, -31667, 30514, -28974, 27063, -24808, 22235, -19380, 16276, -12966, 9489, -5893, 2220, 1480, -5163, 8778, -12283, 15629, -18778, 21685, -24318, 26639, -28621, 30237, -31469, 32297, -32715, 32714, -32298, 31468, -30238, 28620, -26640, 24317, -21686, 18777, -15630, 12282, -8779, 5162, -1481, -2221, 5892, -9490, 12965, -16277, 19379, -22236, 24807, -27064, 28973, -30515, 31666, -32415, 32748, -32665, 32164, -31254, 29944, -28253, 26201, -23816, 21125, -18166, 14974, -11593, 8062, -4430, 740, 2958, -6620, 10195, -13643, 16915, -19972, 22773, -25286, 27473, -29313, 30776, -31849, 32514, -32765, 32597, -32015, 31023, -29636, 27870, -25750, 23300, -20554, 17544, -14313, 10897, -7343, 3695}, -{0, -2221, 4429, -6620, 8778, -10898, 12965, -14975, 16915, -18778, 20553, -22236, 23815, -25286, 26639, -27871, 28973, -29945, 30776, -31469, 32014, -32415, 32664, -32765, 32714, -32515, 32164, -31667, 31023, -30238, 29312, -28253, 27063, -25750, 24317, -22774, 21125, -19380, 17544, -15630, 13642, -11593, 9489, -7343, 5162, -2959, 740, 1480, -3696, 5892, -8063, 10195, -12283, 14312, -16277, 18165, -19972, 21685, -23301, 24807, -26202, 27473, -28621, 29635, -30515, 31253, -31849, 32297, -32598, 32748, -32749, 32597, -32298, 31848, -31254, 30514, -29636, 28620, -27474, 26201, -24808, 23300, -21686, 19971, -18166, 16276, -14313, 12282, -10196, 8062, -5893, 3695, -1481, -741, 2958, -5163, 7342, -9490, 11592, -13643, 15629, -17545, 19379, -21126, 22773, -24318, 25749, -27064, 28252, -29313, 30237, -31024, 31666, -32165, 32514, -32715, 32764, -32665, 32414, -32015, 31468, -30777, 29944, -28974, 27870, -26640, 25285, -23816, 22235, -20554, 18777, -16916, 14974, -12966, 10897, -8779, 6619, -4430, 2220}, -{0, -741, 1480, -2221, 2958, -3696, 4429, -5163, 5892, -6620, 7342, -8063, 8778, -9490, 10195, -10898, 11592, -12283, 12965, -13643, 14312, -14975, 15629, -16277, 16915, -17545, 18165, -18778, 19379, -19972, 20553, -21126, 21685, -22236, 22773, -23301, 23815, -24318, 24807, -25286, 25749, -26202, 26639, -27064, 27473, -27871, 28252, -28621, 28973, -29313, 29635, -29945, 30237, -30515, 30776, -31024, 31253, -31469, 31666, -31849, 32014, -32165, 32297, -32415, 32514, -32598, 32664, -32715, 32748, -32765, 32764, -32749, 32714, -32665, 32597, -32515, 32414, -32298, 32164, -32015, 31848, -31667, 31468, -31254, 31023, -30777, 30514, -30238, 29944, -29636, 29312, -28974, 28620, -28253, 27870, -27474, 27063, -26640, 26201, -25750, 25285, -24808, 24317, -23816, 23300, -22774, 22235, -21686, 21125, -20554, 19971, -19380, 18777, -18166, 17544, -16916, 16276, -15630, 14974, -14313, 13642, -12966, 12282, -11593, 10897, -10196, 9489, -8779, 8062, -7343, 6619, -5893, 5162, -4430, 3695, -2959, 2220, -1481, 740}, -{0, 740, -1481, 2220, -2959, 3695, -4430, 5162, -5893, 6619, -7343, 8062, -8779, 9489, -10196, 10897, -11593, 12282, -12966, 13642, -14313, 14974, -15630, 16276, -16916, 17544, -18166, 18777, -19380, 19971, -20554, 21125, -21686, 22235, -22774, 23300, -23816, 24317, -24808, 25285, -25750, 26201, -26640, 27063, -27474, 27870, -28253, 28620, -28974, 29312, -29636, 29944, -30238, 30514, -30777, 31023, -31254, 31468, -31667, 31848, -32015, 32164, -32298, 32414, -32515, 32597, -32665, 32714, -32749, 32764, -32765, 32748, -32715, 32664, -32598, 32514, -32415, 32297, -32165, 32014, -31849, 31666, -31469, 31253, -31024, 30776, -30515, 30237, -29945, 29635, -29313, 28973, -28621, 28252, -27871, 27473, -27064, 26639, -26202, 25749, -25286, 24807, -24318, 23815, -23301, 22773, -22236, 21685, -21126, 20553, -19972, 19379, -18778, 18165, -17545, 16915, -16277, 15629, -14975, 14312, -13643, 12965, -12283, 11592, -10898, 10195, -9490, 8778, -8063, 7342, -6620, 5892, -5163, 4429, -3696, 2958, -2221, 1480, -741}, -{0, 2220, -4430, 6619, -8779, 10897, -12966, 14974, -16916, 18777, -20554, 22235, -23816, 25285, -26640, 27870, -28974, 29944, -30777, 31468, -32015, 32414, -32665, 32764, -32715, 32514, -32165, 31666, -31024, 30237, -29313, 28252, -27064, 25749, -24318, 22773, -21126, 19379, -17545, 15629, -13643, 11592, -9490, 7342, -5163, 2958, -741, -1481, 3695, -5893, 8062, -10196, 12282, -14313, 16276, -18166, 19971, -21686, 23300, -24808, 26201, -27474, 28620, -29636, 30514, -31254, 31848, -32298, 32597, -32749, 32748, -32598, 32297, -31849, 31253, -30515, 29635, -28621, 27473, -26202, 24807, -23301, 21685, -19972, 18165, -16277, 14312, -12283, 10195, -8063, 5892, -3696, 1480, 740, -2959, 5162, -7343, 9489, -11593, 13642, -15630, 17544, -19380, 21125, -22774, 24317, -25750, 27063, -28253, 29312, -30238, 31023, -31667, 32164, -32515, 32714, -32765, 32664, -32415, 32014, -31469, 30776, -29945, 28973, -27871, 26639, -25286, 23815, -22236, 20553, -18778, 16915, -14975, 12965, -10898, 8778, -6620, 4429, -2221}, -{0, 3695, -7343, 10897, -14313, 17544, -20554, 23300, -25750, 27870, -29636, 31023, -32015, 32597, -32765, 32514, -31849, 30776, -29313, 27473, -25286, 22773, -19972, 16915, -13643, 10195, -6620, 2958, 740, -4430, 8062, -11593, 14974, -18166, 21125, -23816, 26201, -28253, 29944, -31254, 32164, -32665, 32748, -32415, 31666, -30515, 28973, -27064, 24807, -22236, 19379, -16277, 12965, -9490, 5892, -2221, -1481, 5162, -8779, 12282, -15630, 18777, -21686, 24317, -26640, 28620, -30238, 31468, -32298, 32714, -32715, 32297, -31469, 30237, -28621, 26639, -24318, 21685, -18778, 15629, -12283, 8778, -5163, 1480, 2220, -5893, 9489, -12966, 16276, -19380, 22235, -24808, 27063, -28974, 30514, -31667, 32414, -32749, 32664, -32165, 31253, -29945, 28252, -26202, 23815, -21126, 18165, -14975, 11592, -8063, 4429, -741, -2959, 6619, -10196, 13642, -16916, 19971, -22774, 25285, -27474, 29312, -30777, 31848, -32515, 32764, -32598, 32014, -31024, 29635, -27871, 25749, -23301, 20553, -17545, 14312, -10898, 7342, -3696}, -{0, 5162, -10196, 14974, -19380, 23300, -26640, 29312, -31254, 32414, -32765, 32297, -31024, 28973, -26202, 22773, -18778, 14312, -9490, 4429, 740, -5893, 10897, -15630, 19971, -23816, 27063, -29636, 31468, -32515, 32748, -32165, 30776, -28621, 25749, -22236, 18165, -13643, 8778, -3696, -1481, 6619, -11593, 16276, -20554, 24317, -27474, 29944, -31667, 32597, -32715, 32014, -30515, 28252, -25286, 21685, -17545, 12965, -8063, 2958, 2220, -7343, 12282, -16916, 21125, -24808, 27870, -30238, 31848, -32665, 32664, -31849, 30237, -27871, 24807, -21126, 16915, -12283, 7342, -2221, -2959, 8062, -12966, 17544, -21686, 25285, -28253, 30514, -32015, 32714, -32598, 31666, -29945, 27473, -24318, 20553, -16277, 11592, -6620, 1480, 3695, -8779, 13642, -18166, 22235, -25750, 28620, -30777, 32164, -32749, 32514, -31469, 29635, -27064, 23815, -19972, 15629, -10898, 5892, -741, -4430, 9489, -14313, 18777, -22774, 26201, -28974, 31023, -32298, 32764, -32415, 31253, -29313, 26639, -23301, 19379, -14975, 10195, -5163}, -{0, 6619, -12966, 18777, -23816, 27870, -30777, 32414, -32715, 31666, -29313, 25749, -21126, 15629, -9490, 2958, 3695, -10196, 16276, -21686, 26201, -29636, 31848, -32749, 32297, -30515, 27473, -23301, 18165, -12283, 5892, 740, -7343, 13642, -19380, 24317, -28253, 31023, -32515, 32664, -31469, 28973, -25286, 20553, -14975, 8778, -2221, -4430, 10897, -16916, 22235, -26640, 29944, -32015, 32764, -32165, 30237, -27064, 22773, -17545, 11592, -5163, -1481, 8062, -14313, 19971, -24808, 28620, -31254, 32597, -32598, 31253, -28621, 24807, -19972, 14312, -8063, 1480, 5162, -11593, 17544, -22774, 27063, -30238, 32164, -32765, 32014, -29945, 26639, -22236, 16915, -10898, 4429, 2220, -8779, 14974, -20554, 25285, -28974, 31468, -32665, 32514, -31024, 28252, -24318, 19379, -13643, 7342, -741, -5893, 12282, -18166, 23300, -27474, 30514, -32298, 32748, -31849, 29635, -26202, 21685, -16277, 10195, -3696, -2959, 9489, -15630, 21125, -25750, 29312, -31667, 32714, -32415, 30776, -27871, 23815, -18778, 12965, -6620}, -{0, 8062, -15630, 22235, -27474, 31023, -32665, 32297, -29945, 25749, -19972, 12965, -5163, -2959, 10897, -18166, 24317, -28974, 31848, -32765, 31666, -28621, 23815, -17545, 10195, -2221, -5893, 13642, -20554, 26201, -30238, 32414, -32598, 30776, -27064, 21685, -14975, 7342, 740, -8779, 16276, -22774, 27870, -31254, 32714, -32165, 29635, -25286, 19379, -12283, 4429, 3695, -11593, 18777, -24808, 29312, -32015, 32748, -31469, 28252, -23301, 16915, -9490, 1480, 6619, -14313, 21125, -26640, 30514, -32515, 32514, -30515, 26639, -21126, 14312, -6620, -1481, 9489, -16916, 23300, -28253, 31468, -32749, 32014, -29313, 24807, -18778, 11592, -3696, -4430, 12282, -19380, 25285, -29636, 32164, -32715, 31253, -27871, 22773, -16277, 8778, -741, -7343, 14974, -21686, 27063, -30777, 32597, -32415, 30237, -26202, 20553, -13643, 5892, 2220, -10196, 17544, -23816, 28620, -31667, 32764, -31849, 28973, -24318, 18165, -10898, 2958, 5162, -12966, 19971, -25750, 29944, -32298, 32664, -31024, 27473, -22236, 15629, -8063}, -{0, 9489, -18166, 25285, -30238, 32597, -32165, 28973, -23301, 15629, -6620, -2959, 12282, -20554, 27063, -31254, 32764, -31469, 27473, -21126, 12965, -3696, -5893, 14974, -22774, 28620, -32015, 32664, -30515, 25749, -18778, 10195, -741, -8779, 17544, -24808, 29944, -32515, 32297, -29313, 23815, -16277, 7342, 2220, -11593, 19971, -26640, 31023, -32749, 31666, -27871, 21685, -13643, 4429, 5162, -14313, 22235, -28253, 31848, -32715, 30776, -26202, 19379, -10898, 1480, 8062, -16916, 24317, -29636, 32414, -32415, 29635, -24318, 16915, -8063, -1481, 10897, -19380, 26201, -30777, 32714, -31849, 28252, -22236, 14312, -5163, -4430, 13642, -21686, 27870, -31667, 32748, -31024, 26639, -19972, 11592, -2221, -7343, 16276, -23816, 29312, -32298, 32514, -29945, 24807, -17545, 8778, 740, -10196, 18777, -25750, 30514, -32665, 32014, -28621, 22773, -14975, 5892, 3695, -12966, 21125, -27474, 31468, -32765, 31253, -27064, 20553, -12283, 2958, 6619, -15630, 23300, -28974, 32164, -32598, 30237, -25286, 18165, -9490}, -{0, 10897, -20554, 27870, -32015, 32514, -29313, 22773, -13643, 2958, 8062, -18166, 26201, -31254, 32748, -30515, 24807, -16277, 5892, 5162, -15630, 24317, -30238, 32714, -31469, 26639, -18778, 8778, 2220, -12966, 22235, -28974, 32414, -32165, 28252, -21126, 11592, -741, -10196, 19971, -27474, 31848, -32598, 29635, -23301, 14312, -3696, -7343, 17544, -25750, 31023, -32765, 30776, -25286, 16915, -6620, -4430, 14974, -23816, 29944, -32665, 31666, -27064, 19379, -9490, -1481, 12282, -21686, 28620, -32298, 32297, -28621, 21685, -12283, 1480, 9489, -19380, 27063, -31667, 32664, -29945, 23815, -14975, 4429, 6619, -16916, 25285, -30777, 32764, -31024, 25749, -17545, 7342, 3695, -14313, 23300, -29636, 32597, -31849, 27473, -19972, 10195, 740, -11593, 21125, -28253, 32164, -32415, 28973, -22236, 12965, -2221, -8779, 18777, -26640, 31468, -32715, 30237, -24318, 15629, -5163, -5893, 16276, -24808, 30514, -32749, 31253, -26202, 18165, -8063, -2959, 13642, -22774, 29312, -32515, 32014, -27871, 20553, -10898}, -{0, 12282, -22774, 29944, -32749, 30776, -24318, 14312, -2221, -10196, 21125, -28974, 32597, -31469, 25749, -16277, 4429, 8062, -19380, 27870, -32298, 32014, -27064, 18165, -6620, -5893, 17544, -26640, 31848, -32415, 28252, -19972, 8778, 3695, -15630, 25285, -31254, 32664, -29313, 21685, -10898, -1481, 13642, -23816, 30514, -32765, 30237, -23301, 12965, -741, -11593, 22235, -29636, 32714, -31024, 24807, -14975, 2958, 9489, -20554, 28620, -32515, 31666, -26202, 16915, -5163, -7343, 18777, -27474, 32164, -32165, 27473, -18778, 7342, 5162, -16916, 26201, -31667, 32514, -28621, 20553, -9490, -2959, 14974, -24808, 31023, -32715, 29635, -22236, 11592, 740, -12966, 23300, -30238, 32764, -30515, 23815, -13643, 1480, 10897, -21686, 29312, -32665, 31253, -25286, 15629, -3696, -8779, 19971, -28253, 32414, -31849, 26639, -17545, 5892, 6619, -18166, 27063, -32015, 32297, -27871, 19379, -8063, -4430, 16276, -25750, 31468, -32598, 28973, -21126, 10195, 2220, -14313, 24317, -30777, 32748, -29945, 22773, -12283}, -{0, 13642, -24808, 31468, -32415, 27473, -17545, 4429, 9489, -21686, 29944, -32765, 29635, -21126, 8778, 5162, -18166, 27870, -32515, 31253, -24318, 12965, 740, -14313, 25285, -31667, 32297, -27064, 16915, -3696, -10196, 22235, -30238, 32748, -29313, 20553, -8063, -5893, 18777, -28253, 32597, -31024, 23815, -12283, -1481, 14974, -25750, 31848, -32165, 26639, -16277, 2958, 10897, -22774, 30514, -32715, 28973, -19972, 7342, 6619, -19380, 28620, -32665, 30776, -23301, 11592, 2220, -15630, 26201, -32015, 32014, -26202, 15629, -2221, -11593, 23300, -30777, 32664, -28621, 19379, -6620, -7343, 19971, -28974, 32714, -30515, 22773, -10898, -2959, 16276, -26640, 32164, -31849, 25749, -14975, 1480, 12282, -23816, 31023, -32598, 28252, -18778, 5892, 8062, -20554, 29312, -32749, 30237, -22236, 10195, 3695, -16916, 27063, -32298, 31666, -25286, 14312, -741, -12966, 24317, -31254, 32514, -27871, 18165, -5163, -8779, 21125, -29636, 32764, -29945, 21685, -9490, -4430, 17544, -27474, 32414, -31469, 24807, -13643}, -{0, 14974, -26640, 32414, -31024, 22773, -9490, -5893, 19971, -29636, 32748, -28621, 18165, -3696, -11593, 24317, -31667, 32014, -25286, 12965, 2220, -16916, 27870, -32665, 30237, -21126, 7342, 8062, -21686, 30514, -32598, 27473, -16277, 1480, 13642, -25750, 32164, -31469, 23815, -10898, -4430, 18777, -28974, 32764, -29313, 19379, -5163, -10196, 23300, -31254, 32297, -26202, 14312, 740, -15630, 27063, -32515, 30776, -22236, 8778, 6619, -20554, 29944, -32715, 28252, -17545, 2958, 12282, -24808, 31848, -31849, 24807, -12283, -2959, 17544, -28253, 32714, -29945, 20553, -6620, -8779, 22235, -30777, 32514, -27064, 15629, -741, -14313, 26201, -32298, 31253, -23301, 10195, 5162, -19380, 29312, -32765, 28973, -18778, 4429, 10897, -23816, 31468, -32165, 25749, -13643, -1481, 16276, -27474, 32597, -30515, 21685, -8063, -7343, 21125, -30238, 32664, -27871, 16915, -2221, -12966, 25285, -32015, 31666, -24318, 11592, 3695, -18166, 28620, -32749, 29635, -19972, 5892, 9489, -22774, 31023, -32415, 26639, -14975}, -{0, 16276, -28253, 32764, -28621, 16915, -741, -15630, 27870, -32749, 28973, -17545, 1480, 14974, -27474, 32714, -29313, 18165, -2221, -14313, 27063, -32665, 29635, -18778, 2958, 13642, -26640, 32597, -29945, 19379, -3696, -12966, 26201, -32515, 30237, -19972, 4429, 12282, -25750, 32414, -30515, 20553, -5163, -11593, 25285, -32298, 30776, -21126, 5892, 10897, -24808, 32164, -31024, 21685, -6620, -10196, 24317, -32015, 31253, -22236, 7342, 9489, -23816, 31848, -31469, 22773, -8063, -8779, 23300, -31667, 31666, -23301, 8778, 8062, -22774, 31468, -31849, 23815, -9490, -7343, 22235, -31254, 32014, -24318, 10195, 6619, -21686, 31023, -32165, 24807, -10898, -5893, 21125, -30777, 32297, -25286, 11592, 5162, -20554, 30514, -32415, 25749, -12283, -4430, 19971, -30238, 32514, -26202, 12965, 3695, -19380, 29944, -32598, 26639, -13643, -2959, 18777, -29636, 32664, -27064, 14312, 2220, -18166, 29312, -32715, 27473, -14975, -1481, 17544, -28974, 32748, -27871, 15629, 740, -16916, 28620, -32765, 28252, -16277}, -{0, 17544, -29636, 32514, -25286, 10195, 8062, -23816, 32164, -30515, 19379, -2221, -15630, 28620, -32715, 26639, -12283, -5893, 22235, -31667, 31253, -21126, 4429, 13642, -27474, 32764, -27871, 14312, 3695, -20554, 31023, -31849, 22773, -6620, -11593, 26201, -32665, 28973, -16277, -1481, 18777, -30238, 32297, -24318, 8778, 9489, -24808, 32414, -29945, 18165, -741, -16916, 29312, -32598, 25749, -10898, -7343, 23300, -32015, 30776, -19972, 2958, 14974, -28253, 32748, -27064, 12965, 5162, -21686, 31468, -31469, 21685, -5163, -12966, 27063, -32749, 28252, -14975, -2959, 19971, -30777, 32014, -23301, 7342, 10897, -25750, 32597, -29313, 16915, 740, -18166, 29944, -32415, 24807, -9490, -8779, 24317, -32298, 30237, -18778, 1480, 16276, -28974, 32664, -26202, 11592, 6619, -22774, 31848, -31024, 20553, -3696, -14313, 27870, -32765, 27473, -13643, -4430, 21125, -31254, 31666, -22236, 5892, 12282, -26640, 32714, -28621, 15629, 2220, -19380, 30514, -32165, 23815, -8063, -10196, 25285, -32515, 29635, -17545}, -{0, 18777, -30777, 31666, -21126, 2958, 16276, -29636, 32297, -23301, 5892, 13642, -28253, 32664, -25286, 8778, 10897, -26640, 32764, -27064, 11592, 8062, -24808, 32597, -28621, 14312, 5162, -22774, 32164, -29945, 16915, 2220, -20554, 31468, -31024, 19379, -741, -18166, 30514, -31849, 21685, -3696, -15630, 29312, -32415, 23815, -6620, -12966, 27870, -32715, 25749, -9490, -10196, 26201, -32749, 27473, -12283, -7343, 24317, -32515, 28973, -14975, -4430, 22235, -32015, 30237, -17545, -1481, 19971, -31254, 31253, -19972, 1480, 17544, -30238, 32014, -22236, 4429, 14974, -28974, 32514, -24318, 7342, 12282, -27474, 32748, -26202, 10195, 9489, -25750, 32714, -27871, 12965, 6619, -23816, 32414, -29313, 15629, 3695, -21686, 31848, -30515, 18165, 740, -19380, 31023, -31469, 20553, -2221, -16916, 29944, -32165, 22773, -5163, -14313, 28620, -32598, 24807, -8063, -11593, 27063, -32765, 26639, -10898, -8779, 25285, -32665, 28252, -13643, -5893, 23300, -32298, 29635, -16277, -2959, 21125, -31667, 30776, -18778}, -{0, 19971, -31667, 30237, -16277, -4430, 23300, -32515, 28252, -12283, -8779, 26201, -32765, 25749, -8063, -12966, 28620, -32415, 22773, -3696, -16916, 30514, -31469, 19379, 740, -20554, 31848, -29945, 15629, 5162, -23816, 32597, -27871, 11592, 9489, -26640, 32748, -25286, 7342, 13642, -28974, 32297, -22236, 2958, 17544, -30777, 31253, -18778, -1481, 21125, -32015, 29635, -14975, -5893, 24317, -32665, 27473, -10898, -10196, 27063, -32715, 24807, -6620, -14313, 29312, -32165, 21685, -2221, -18166, 31023, -31024, 18165, 2220, -21686, 32164, -29313, 14312, 6619, -24808, 32714, -27064, 10195, 10897, -27474, 32664, -24318, 5892, 14974, -29636, 32014, -21126, 1480, 18777, -31254, 30776, -17545, -2959, 22235, -32298, 28973, -13643, -7343, 25285, -32749, 26639, -9490, -11593, 27870, -32598, 23815, -5163, -15630, 29944, -31849, 20553, -741, -19380, 31468, -30515, 16915, 3695, -22774, 32414, -28621, 12965, 8062, -25750, 32764, -26202, 8778, 12282, -28253, 32514, -23301, 4429, 16276, -30238, 31666, -19972}, -{0, 21125, -32298, 28252, -10898, -11593, 28620, -32165, 20553, 740, -21686, 32414, -27871, 10195, 12282, -28974, 32014, -19972, -1481, 22235, -32515, 27473, -9490, -12966, 29312, -31849, 19379, 2220, -22774, 32597, -27064, 8778, 13642, -29636, 31666, -18778, -2959, 23300, -32665, 26639, -8063, -14313, 29944, -31469, 18165, 3695, -23816, 32714, -26202, 7342, 14974, -30238, 31253, -17545, -4430, 24317, -32749, 25749, -6620, -15630, 30514, -31024, 16915, 5162, -24808, 32764, -25286, 5892, 16276, -30777, 30776, -16277, -5893, 25285, -32765, 24807, -5163, -16916, 31023, -30515, 15629, 6619, -25750, 32748, -24318, 4429, 17544, -31254, 30237, -14975, -7343, 26201, -32715, 23815, -3696, -18166, 31468, -29945, 14312, 8062, -26640, 32664, -23301, 2958, 18777, -31667, 29635, -13643, -8779, 27063, -32598, 22773, -2221, -19380, 31848, -29313, 12965, 9489, -27474, 32514, -22236, 1480, 19971, -32015, 28973, -12283, -10196, 27870, -32415, 21685, -741, -20554, 32164, -28621, 11592, 10897, -28253, 32297, -21126}, -{0, 22235, -32665, 25749, -5163, -18166, 31848, -28621, 10195, 13642, -30238, 30776, -14975, -8779, 27870, -32165, 19379, 3695, -24808, 32748, -23301, 1480, 21125, -32515, 26639, -6620, -16916, 31468, -29313, 11592, 12282, -29636, 31253, -16277, -7343, 27063, -32415, 20553, 2220, -23816, 32764, -24318, 2958, 19971, -32298, 27473, -8063, -15630, 31023, -29945, 12965, 10897, -28974, 31666, -17545, -5893, 26201, -32598, 21685, 740, -22774, 32714, -25286, 4429, 18777, -32015, 28252, -9490, -14313, 30514, -30515, 14312, 9489, -28253, 32014, -18778, -4430, 25285, -32715, 22773, -741, -21686, 32597, -26202, 5892, 17544, -31667, 28973, -10898, -12966, 29944, -31024, 15629, 8062, -27474, 32297, -19972, -2959, 24317, -32765, 23815, -2221, -20554, 32414, -27064, 7342, 16276, -31254, 29635, -12283, -11593, 29312, -31469, 16915, 6619, -26640, 32514, -21126, -1481, 23300, -32749, 24807, -3696, -19380, 32164, -27871, 8778, 14974, -30777, 30237, -13643, -10196, 28620, -31849, 18165, 5162, -25750, 32664, -22236}, -{0, 23300, -32765, 22773, 740, -23816, 32748, -22236, -1481, 24317, -32715, 21685, 2220, -24808, 32664, -21126, -2959, 25285, -32598, 20553, 3695, -25750, 32514, -19972, -4430, 26201, -32415, 19379, 5162, -26640, 32297, -18778, -5893, 27063, -32165, 18165, 6619, -27474, 32014, -17545, -7343, 27870, -31849, 16915, 8062, -28253, 31666, -16277, -8779, 28620, -31469, 15629, 9489, -28974, 31253, -14975, -10196, 29312, -31024, 14312, 10897, -29636, 30776, -13643, -11593, 29944, -30515, 12965, 12282, -30238, 30237, -12283, -12966, 30514, -29945, 11592, 13642, -30777, 29635, -10898, -14313, 31023, -29313, 10195, 14974, -31254, 28973, -9490, -15630, 31468, -28621, 8778, 16276, -31667, 28252, -8063, -16916, 31848, -27871, 7342, 17544, -32015, 27473, -6620, -18166, 32164, -27064, 5892, 18777, -32298, 26639, -5163, -19380, 32414, -26202, 4429, 19971, -32515, 25749, -3696, -20554, 32597, -25286, 2958, 21125, -32665, 24807, -2221, -21686, 32714, -24318, 1480, 22235, -32749, 23815, -741, -22774, 32764, -23301}, -{0, 24317, -32598, 19379, 6619, -28253, 31253, -13643, -12966, 31023, -28621, 7342, 18777, -32515, 24807, -741, -23816, 32664, -19972, -5893, 27870, -31469, 14312, 12282, -30777, 28973, -8063, -18166, 32414, -25286, 1480, 23300, -32715, 20553, 5162, -27474, 31666, -14975, -11593, 30514, -29313, 8778, 17544, -32298, 25749, -2221, -22774, 32748, -21126, -4430, 27063, -31849, 15629, 10897, -30238, 29635, -9490, -16916, 32164, -26202, 2958, 22235, -32765, 21685, 3695, -26640, 32014, -16277, -10196, 29944, -29945, 10195, 16276, -32015, 26639, -3696, -21686, 32764, -22236, -2959, 26201, -32165, 16915, 9489, -29636, 30237, -10898, -15630, 31848, -27064, 4429, 21125, -32749, 22773, 2220, -25750, 32297, -17545, -8779, 29312, -30515, 11592, 14974, -31667, 27473, -5163, -20554, 32714, -23301, -1481, 25285, -32415, 18165, 8062, -28974, 30776, -12283, -14313, 31468, -27871, 5892, 19971, -32665, 23815, 740, -24808, 32514, -18778, -7343, 28620, -31024, 12965, 13642, -31254, 28252, -6620, -19380, 32597, -24318}, -{0, 25285, -32165, 15629, 12282, -31254, 27473, -3696, -22774, 32664, -18778, -8779, 29944, -29313, 7342, 19971, -32749, 21685, 5162, -28253, 30776, -10898, -16916, 32414, -24318, -1481, 26201, -31849, 14312, 13642, -31667, 26639, -2221, -23816, 32514, -17545, -10196, 30514, -28621, 5892, 21125, -32765, 20553, 6619, -28974, 30237, -9490, -18166, 32597, -23301, -2959, 27063, -31469, 12965, 14974, -32015, 25749, -741, -24808, 32297, -16277, -11593, 31023, -27871, 4429, 22235, -32715, 19379, 8062, -29636, 29635, -8063, -19380, 32714, -22236, -4430, 27870, -31024, 11592, 16276, -32298, 24807, 740, -25750, 32014, -14975, -12966, 31468, -27064, 2958, 23300, -32598, 18165, 9489, -30238, 28973, -6620, -20554, 32764, -21126, -5893, 28620, -30515, 10195, 17544, -32515, 23815, 2220, -26640, 31666, -13643, -14313, 31848, -26202, 1480, 24317, -32415, 16915, 10897, -30777, 28252, -5163, -21686, 32748, -19972, -7343, 29312, -29945, 8778, 18777, -32665, 22773, 3695, -27474, 31253, -12283, -15630, 32164, -25286}, -{0, 26201, -31469, 11592, 17544, -32665, 21685, 6619, -29636, 28973, -5163, -22774, 32514, -16277, -12966, 31848, -25286, -1481, 27063, -31024, 10195, 18777, -32749, 20553, 8062, -30238, 28252, -3696, -23816, 32297, -14975, -14313, 32164, -24318, -2959, 27870, -30515, 8778, 19971, -32765, 19379, 9489, -30777, 27473, -2221, -24808, 32014, -13643, -15630, 32414, -23301, -4430, 28620, -29945, 7342, 21125, -32715, 18165, 10897, -31254, 26639, -741, -25750, 31666, -12283, -16916, 32597, -22236, -5893, 29312, -29313, 5892, 22235, -32598, 16915, 12282, -31667, 25749, 740, -26640, 31253, -10898, -18166, 32714, -21126, -7343, 29944, -28621, 4429, 23300, -32415, 15629, 13642, -32015, 24807, 2220, -27474, 30776, -9490, -19380, 32764, -19972, -8779, 30514, -27871, 2958, 24317, -32165, 14312, 14974, -32298, 23815, 3695, -28253, 30237, -8063, -20554, 32748, -18778, -10196, 31023, -27064, 1480, 25285, -31849, 12965, 16276, -32515, 22773, 5162, -28974, 29635, -6620, -21686, 32664, -17545, -11593, 31468, -26202}, -{0, 27063, -30515, 7342, 22235, -32415, 14312, 16276, -32665, 20553, 9489, -31254, 25749, 2220, -28253, 29635, -5163, -23816, 32014, -12283, -18166, 32764, -18778, -11593, 31848, -24318, -4430, 29312, -28621, 2958, 25285, -31469, 10195, 19971, -32715, 16915, 13642, -32298, 22773, 6619, -30238, 27473, -741, -26640, 30776, -8063, -21686, 32514, -14975, -15630, 32597, -21126, -8779, 31023, -26202, -1481, 27870, -29945, 5892, 23300, -32165, 12965, 17544, -32749, 19379, 10897, -31667, 24807, 3695, -28974, 28973, -3696, -24808, 31666, -10898, -19380, 32748, -17545, -12966, 32164, -23301, -5893, 29944, -27871, 1480, 26201, -31024, 8778, 21125, -32598, 15629, 14974, -32515, 21685, 8062, -30777, 26639, 740, -27474, 30237, -6620, -22774, 32297, -13643, -16916, 32714, -19972, -10196, 31468, -25286, -2959, 28620, -29313, 4429, 24317, -31849, 11592, 18777, -32765, 18165, 12282, -32015, 23815, 5162, -29636, 28252, -2221, -25750, 31253, -9490, -20554, 32664, -16277, -14313, 32414, -22236, -7343, 30514, -27064}, -{0, 27870, -29313, 2958, 26201, -30515, 5892, 24317, -31469, 8778, 22235, -32165, 11592, 19971, -32598, 14312, 17544, -32765, 16915, 14974, -32665, 19379, 12282, -32298, 21685, 9489, -31667, 23815, 6619, -30777, 25749, 3695, -29636, 27473, 740, -28253, 28973, -2221, -26640, 30237, -5163, -24808, 31253, -8063, -22774, 32014, -10898, -20554, 32514, -13643, -18166, 32748, -16277, -15630, 32714, -18778, -12966, 32414, -21126, -10196, 31848, -23301, -7343, 31023, -25286, -4430, 29944, -27064, -1481, 28620, -28621, 1480, 27063, -29945, 4429, 25285, -31024, 7342, 23300, -31849, 10195, 21125, -32415, 12965, 18777, -32715, 15629, 16276, -32749, 18165, 13642, -32515, 20553, 10897, -32015, 22773, 8062, -31254, 24807, 5162, -30238, 26639, 2220, -28974, 28252, -741, -27474, 29635, -3696, -25750, 30776, -6620, -23816, 31666, -9490, -21686, 32297, -12283, -19380, 32664, -14975, -16916, 32764, -17545, -14313, 32597, -19972, -11593, 32164, -22236, -8779, 31468, -24318, -5893, 30514, -26202, -2959, 29312, -27871}, -{0, 28620, -27871, -1481, 29312, -27064, -2959, 29944, -26202, -4430, 30514, -25286, -5893, 31023, -24318, -7343, 31468, -23301, -8779, 31848, -22236, -10196, 32164, -21126, -11593, 32414, -19972, -12966, 32597, -18778, -14313, 32714, -17545, -15630, 32764, -16277, -16916, 32748, -14975, -18166, 32664, -13643, -19380, 32514, -12283, -20554, 32297, -10898, -21686, 32014, -9490, -22774, 31666, -8063, -23816, 31253, -6620, -24808, 30776, -5163, -25750, 30237, -3696, -26640, 29635, -2221, -27474, 28973, -741, -28253, 28252, 740, -28974, 27473, 2220, -29636, 26639, 3695, -30238, 25749, 5162, -30777, 24807, 6619, -31254, 23815, 8062, -31667, 22773, 9489, -32015, 21685, 10897, -32298, 20553, 12282, -32515, 19379, 13642, -32665, 18165, 14974, -32749, 16915, 16276, -32765, 15629, 17544, -32715, 14312, 18777, -32598, 12965, 19971, -32415, 11592, 21125, -32165, 10195, 22235, -31849, 8778, 23300, -31469, 7342, 24317, -31024, 5892, 25285, -30515, 4429, 26201, -29945, 2958, 27063, -29313, 1480, 27870, -28621}, -{0, 29312, -26202, -5893, 31468, -22236, -11593, 32597, -17545, -16916, 32664, -12283, -21686, 31666, -6620, -25750, 29635, -741, -28974, 26639, 5162, -31254, 22773, 10897, -32515, 18165, 16276, -32715, 12965, 21125, -31849, 7342, 25285, -29945, 1480, 28620, -27064, -4430, 31023, -23301, -10196, 32414, -18778, -15630, 32748, -13643, -20554, 32014, -8063, -24808, 30237, -2221, -28253, 27473, 3695, -30777, 23815, 9489, -32298, 19379, 14974, -32765, 14312, 19971, -32165, 8778, 24317, -30515, 2958, 27870, -27871, -2959, 30514, -24318, -8779, 32164, -19972, -14313, 32764, -14975, -19380, 32297, -9490, -23816, 30776, -3696, -27474, 28252, 2220, -30238, 24807, 8062, -32015, 20553, 13642, -32749, 15629, 18777, -32415, 10195, 23300, -31024, 4429, 27063, -28621, -1481, 29944, -25286, -7343, 31848, -21126, -12966, 32714, -16277, -18166, 32514, -10898, -22774, 31253, -5163, -26640, 28973, 740, -29636, 25749, 6619, -31667, 21685, 12282, -32665, 16915, 17544, -32598, 11592, 22235, -31469, 5892, 26201, -29313}, -{0, 29944, -24318, -10196, 32597, -16277, -19380, 32014, -6620, -26640, 28252, 3695, -31254, 21685, 13642, -32765, 12965, 22235, -31024, 2958, 28620, -26202, -7343, 32164, -18778, -16916, 32514, -9490, -24808, 29635, 740, -30238, 23815, 10897, -32665, 15629, 19971, -31849, 5892, 27063, -27871, -4430, 31468, -21126, -14313, 32748, -12283, -22774, 30776, -2221, -28974, 25749, 8062, -32298, 18165, 17544, -32415, 8778, 25285, -29313, -1481, 30514, -23301, -11593, 32714, -14975, -20554, 31666, -5163, -27474, 27473, 5162, -31667, 20553, 14974, -32715, 11592, 23300, -30515, 1480, 29312, -25286, -8779, 32414, -17545, -18166, 32297, -8063, -25750, 28973, 2220, -30777, 22773, 12282, -32749, 14312, 21125, -31469, 4429, 27870, -27064, -5893, 31848, -19972, -15630, 32664, -10898, -23816, 30237, -741, -29636, 24807, 9489, -32515, 16915, 18777, -32165, 7342, 26201, -28621, -2959, 31023, -22236, -12966, 32764, -13643, -21686, 31253, -3696, -28253, 26639, 6619, -32015, 19379, 16276, -32598, 10195, 24317, -29945}, -{0, 30514, -22236, -14313, 32664, -9490, -25750, 28252, 5162, -32015, 18165, 18777, -31849, 4429, 28620, -25286, -10196, 32714, -13643, -22774, 30237, 740, -30777, 21685, 14974, -32598, 8778, 26201, -27871, -5893, 32164, -17545, -19380, 31666, -3696, -28974, 24807, 10897, -32749, 12965, 23300, -29945, -1481, 31023, -21126, -15630, 32514, -8063, -26640, 27473, 6619, -32298, 16915, 19971, -31469, 2958, 29312, -24318, -11593, 32764, -12283, -23816, 29635, 2220, -31254, 20553, 16276, -32415, 7342, 27063, -27064, -7343, 32414, -16277, -20554, 31253, -2221, -29636, 23815, 12282, -32765, 11592, 24317, -29313, -2959, 31468, -19972, -16916, 32297, -6620, -27474, 26639, 8062, -32515, 15629, 21125, -31024, 1480, 29944, -23301, -12966, 32748, -10898, -24808, 28973, 3695, -31667, 19379, 17544, -32165, 5892, 27870, -26202, -8779, 32597, -14975, -21686, 30776, -741, -30238, 22773, 13642, -32715, 10195, 25285, -28621, -4430, 31848, -18778, -18166, 32014, -5163, -28253, 25749, 9489, -32665, 14312, 22235, -30515}, -{0, 31023, -19972, -18166, 31666, -2221, -30238, 21685, 16276, -32165, 4429, 29312, -23301, -14313, 32514, -6620, -28253, 24807, 12282, -32715, 8778, 27063, -26202, -10196, 32764, -10898, -25750, 27473, 8062, -32665, 12965, 24317, -28621, -5893, 32414, -14975, -22774, 29635, 3695, -32015, 16915, 21125, -30515, -1481, 31468, -18778, -19380, 31253, -741, -30777, 20553, 17544, -31849, 2958, 29944, -22236, -15630, 32297, -5163, -28974, 23815, 13642, -32598, 7342, 27870, -25286, -11593, 32748, -9490, -26640, 26639, 9489, -32749, 11592, 25285, -27871, -7343, 32597, -13643, -23816, 28973, 5162, -32298, 15629, 22235, -29945, -2959, 31848, -17545, -20554, 30776, 740, -31254, 19379, 18777, -31469, 1480, 30514, -21126, -16916, 32014, -3696, -29636, 22773, 14974, -32415, 5892, 28620, -24318, -12966, 32664, -8063, -27474, 25749, 10897, -32765, 10195, 26201, -27064, -8779, 32714, -12283, -24808, 28252, 6619, -32515, 14312, 23300, -29313, -4430, 32164, -16277, -21686, 30237, 2220, -31667, 18165, 19971, -31024}, -{0, 31468, -17545, -21686, 29635, 5162, -32515, 12965, 25285, -27064, -10196, 32748, -8063, -28253, 23815, 14974, -32165, 2958, 30514, -19972, -19380, 30776, 2220, -32015, 15629, 23300, -28621, -7343, 32714, -10898, -26640, 25749, 12282, -32598, 5892, 29312, -22236, -16916, 31666, -741, -31254, 18165, 21125, -29945, -4430, 32414, -13643, -24808, 27473, 9489, -32765, 8778, 27870, -24318, -14313, 32297, -3696, -30238, 20553, 18777, -31024, -1481, 31848, -16277, -22774, 28973, 6619, -32665, 11592, 26201, -26202, -11593, 32664, -6620, -28974, 22773, 16276, -31849, 1480, 31023, -18778, -20554, 30237, 3695, -32298, 14312, 24317, -27871, -8779, 32764, -9490, -27474, 24807, 13642, -32415, 4429, 29944, -21126, -18166, 31253, 740, -31667, 16915, 22235, -29313, -5893, 32597, -12283, -25750, 26639, 10897, -32715, 7342, 28620, -23301, -15630, 32014, -2221, -30777, 19379, 19971, -30515, -2959, 32164, -14975, -23816, 28252, 8062, -32749, 10195, 27063, -25286, -12966, 32514, -5163, -29636, 21685, 17544, -31469}, -{0, 31848, -14975, -24808, 26639, 12282, -32415, 2958, 31023, -17545, -22774, 28252, 9489, -32715, 5892, 29944, -19972, -20554, 29635, 6619, -32749, 8778, 28620, -22236, -18166, 30776, 3695, -32515, 11592, 27063, -24318, -15630, 31666, 740, -32015, 14312, 25285, -26202, -12966, 32297, -2221, -31254, 16915, 23300, -27871, -10196, 32664, -5163, -30238, 19379, 21125, -29313, -7343, 32764, -8063, -28974, 21685, 18777, -30515, -4430, 32597, -10898, -27474, 23815, 16276, -31469, -1481, 32164, -13643, -25750, 25749, 13642, -32165, 1480, 31468, -16277, -23816, 27473, 10897, -32598, 4429, 30514, -18778, -21686, 28973, 8062, -32765, 7342, 29312, -21126, -19380, 30237, 5162, -32665, 10195, 27870, -23301, -16916, 31253, 2220, -32298, 12965, 26201, -25286, -14313, 32014, -741, -31667, 15629, 24317, -27064, -11593, 32514, -3696, -30777, 18165, 22235, -28621, -8779, 32748, -6620, -29636, 20553, 19971, -29945, -5893, 32714, -9490, -28253, 22773, 17544, -31024, -2959, 32414, -12283, -26640, 24807, 14974, -31849}, -{0, 32164, -12283, -27474, 22773, 18777, -29945, -7343, 32748, -5163, -30777, 16915, 24317, -26202, -14313, 31666, 2220, -32515, 10195, 28620, -21126, -20554, 28973, 9489, -32598, 2958, 31468, -14975, -25750, 24807, 16276, -31024, -4430, 32714, -8063, -29636, 19379, 22235, -27871, -11593, 32297, -741, -32015, 12965, 27063, -23301, -18166, 30237, 6619, -32765, 5892, 30514, -17545, -23816, 26639, 13642, -31849, -1481, 32414, -10898, -28253, 21685, 19971, -29313, -8779, 32664, -3696, -31254, 15629, 25285, -25286, -15630, 31253, 3695, -32665, 8778, 29312, -19972, -21686, 28252, 10897, -32415, 1480, 31848, -13643, -26640, 23815, 17544, -30515, -5893, 32764, -6620, -30238, 18165, 23300, -27064, -12966, 32014, 740, -32298, 11592, 27870, -22236, -19380, 29635, 8062, -32715, 4429, 31023, -16277, -24808, 25749, 14974, -31469, -2959, 32597, -9490, -28974, 20553, 21125, -28621, -10196, 32514, -2221, -31667, 14312, 26201, -24318, -16916, 30776, 5162, -32749, 7342, 29944, -18778, -22774, 27473, 12282, -32165}, -{0, 32414, -9490, -29636, 18165, 24317, -25286, -16916, 30237, 8062, -32598, 1480, 32164, -10898, -28974, 19379, 23300, -26202, -15630, 30776, 6619, -32715, 2958, 31848, -12283, -28253, 20553, 22235, -27064, -14313, 31253, 5162, -32765, 4429, 31468, -13643, -27474, 21685, 21125, -27871, -12966, 31666, 3695, -32749, 5892, 31023, -14975, -26640, 22773, 19971, -28621, -11593, 32014, 2220, -32665, 7342, 30514, -16277, -25750, 23815, 18777, -29313, -10196, 32297, 740, -32515, 8778, 29944, -17545, -24808, 24807, 17544, -29945, -8779, 32514, -741, -32298, 10195, 29312, -18778, -23816, 25749, 16276, -30515, -7343, 32664, -2221, -32015, 11592, 28620, -19972, -22774, 26639, 14974, -31024, -5893, 32748, -3696, -31667, 12965, 27870, -21126, -21686, 27473, 13642, -31469, -4430, 32764, -5163, -31254, 14312, 27063, -22236, -20554, 28252, 12282, -31849, -2959, 32714, -6620, -30777, 15629, 26201, -23301, -19380, 28973, 10897, -32165, -1481, 32597, -8063, -30238, 16915, 25285, -24318, -18166, 29635, 9489, -32415}, -{0, 32597, -6620, -31254, 12965, 28620, -18778, -24808, 23815, 19971, -27871, -14313, 30776, 8062, -32415, -1481, 32714, -5163, -31667, 11592, 29312, -17545, -25750, 22773, 21125, -27064, -15630, 30237, 9489, -32165, -2959, 32764, -3696, -32015, 10195, 29944, -16277, -26640, 21685, 22235, -26202, -16916, 29635, 10897, -31849, -4430, 32748, -2221, -32298, 8778, 30514, -14975, -27474, 20553, 23300, -25286, -18166, 28973, 12282, -31469, -5893, 32664, -741, -32515, 7342, 31023, -13643, -28253, 19379, 24317, -24318, -19380, 28252, 13642, -31024, -7343, 32514, 740, -32665, 5892, 31468, -12283, -28974, 18165, 25285, -23301, -20554, 27473, 14974, -30515, -8779, 32297, 2220, -32749, 4429, 31848, -10898, -29636, 16915, 26201, -22236, -21686, 26639, 16276, -29945, -10196, 32014, 3695, -32765, 2958, 32164, -9490, -30238, 15629, 27063, -21126, -22774, 25749, 17544, -29313, -11593, 31666, 5162, -32715, 1480, 32414, -8063, -30777, 14312, 27870, -19972, -23816, 24807, 18777, -28621, -12966, 31253, 6619, -32598}, -{0, 32714, -3696, -32298, 7342, 31468, -10898, -30238, 14312, 28620, -17545, -26640, 20553, 24317, -23301, -21686, 25749, 18777, -27871, -15630, 29635, 12282, -31024, -8779, 32014, 5162, -32598, -1481, 32764, -2221, -32515, 5892, 31848, -9490, -30777, 12965, 29312, -16277, -27474, 19379, 25285, -22236, -22774, 24807, 19971, -27064, -16916, 28973, 13642, -30515, -10196, 31666, 6619, -32415, -2959, 32748, -741, -32665, 4429, 32164, -8063, -31254, 11592, 29944, -14975, -28253, 18165, 26201, -21126, -23816, 23815, 21125, -26202, -18166, 28252, 14974, -29945, -11593, 31253, 8062, -32165, -4430, 32664, 740, -32749, 2958, 32414, -6620, -31667, 10195, 30514, -13643, -28974, 16915, 27063, -19972, -24808, 22773, 22235, -25286, -19380, 27473, 16276, -29313, -12966, 30776, 9489, -31849, -5893, 32514, 2220, -32765, 1480, 32597, -5163, -32015, 8778, 31023, -12283, -29636, 15629, 27870, -18778, -25750, 21685, 23300, -24318, -20554, 26639, 17544, -28621, -14313, 30237, 10897, -31469, -7343, 32297, 3695, -32715}, -{0, 32764, -741, -32749, 1480, 32714, -2221, -32665, 2958, 32597, -3696, -32515, 4429, 32414, -5163, -32298, 5892, 32164, -6620, -32015, 7342, 31848, -8063, -31667, 8778, 31468, -9490, -31254, 10195, 31023, -10898, -30777, 11592, 30514, -12283, -30238, 12965, 29944, -13643, -29636, 14312, 29312, -14975, -28974, 15629, 28620, -16277, -28253, 16915, 27870, -17545, -27474, 18165, 27063, -18778, -26640, 19379, 26201, -19972, -25750, 20553, 25285, -21126, -24808, 21685, 24317, -22236, -23816, 22773, 23300, -23301, -22774, 23815, 22235, -24318, -21686, 24807, 21125, -25286, -20554, 25749, 19971, -26202, -19380, 26639, 18777, -27064, -18166, 27473, 17544, -27871, -16916, 28252, 16276, -28621, -15630, 28973, 14974, -29313, -14313, 29635, 13642, -29945, -12966, 30237, 12282, -30515, -11593, 30776, 10897, -31024, -10196, 31253, 9489, -31469, -8779, 31666, 8062, -31849, -7343, 32014, 6619, -32165, -5893, 32297, 5162, -32415, -4430, 32514, 3695, -32598, -2959, 32664, 2220, -32715, -1481, 32748, 740, -32765}, -{0, 32748, 2220, -32598, -4430, 32297, 6619, -31849, -8779, 31253, 10897, -30515, -12966, 29635, 14974, -28621, -16916, 27473, 18777, -26202, -20554, 24807, 22235, -23301, -23816, 21685, 25285, -19972, -26640, 18165, 27870, -16277, -28974, 14312, 29944, -12283, -30777, 10195, 31468, -8063, -32015, 5892, 32414, -3696, -32665, 1480, 32764, 740, -32715, -2959, 32514, 5162, -32165, -7343, 31666, 9489, -31024, -11593, 30237, 13642, -29313, -15630, 28252, 17544, -27064, -19380, 25749, 21125, -24318, -22774, 22773, 24317, -21126, -25750, 19379, 27063, -17545, -28253, 15629, 29312, -13643, -30238, 11592, 31023, -9490, -31667, 7342, 32164, -5163, -32515, 2958, 32714, -741, -32765, -1481, 32664, 3695, -32415, -5893, 32014, 8062, -31469, -10196, 30776, 12282, -29945, -14313, 28973, 16276, -27871, -18166, 26639, 19971, -25286, -21686, 23815, 23300, -22236, -24808, 20553, 26201, -18778, -27474, 16915, 28620, -14975, -29636, 12965, 30514, -10898, -31254, 8778, 31848, -6620, -32298, 4429, 32597, -2221, -32749}, -{0, 32664, 5162, -31849, -10196, 30237, 14974, -27871, -19380, 24807, 23300, -21126, -26640, 16915, 29312, -12283, -31254, 7342, 32414, -2221, -32765, -2959, 32297, 8062, -31024, -12966, 28973, 17544, -26202, -21686, 22773, 25285, -18778, -28253, 14312, 30514, -9490, -32015, 4429, 32714, 740, -32598, -5893, 31666, 10897, -29945, -15630, 27473, 19971, -24318, -23816, 20553, 27063, -16277, -29636, 11592, 31468, -6620, -32515, 1480, 32748, 3695, -32165, -8779, 30776, 13642, -28621, -18166, 25749, 22235, -22236, -25750, 18165, 28620, -13643, -30777, 8778, 32164, -3696, -32749, -1481, 32514, 6619, -31469, -11593, 29635, 16276, -27064, -20554, 23815, 24317, -19972, -27474, 15629, 29944, -10898, -31667, 5892, 32597, -741, -32715, -4430, 32014, 9489, -30515, -14313, 28252, 18777, -25286, -22774, 21685, 26201, -17545, -28974, 12965, 31023, -8063, -32298, 2958, 32764, 2220, -32415, -7343, 31253, 12282, -29313, -16916, 26639, 21125, -23301, -24808, 19379, 27870, -14975, -30238, 10195, 31848, -5163, -32665}, -{0, 32514, 8062, -30515, -15630, 26639, 22235, -21126, -27474, 14312, 31023, -6620, -32665, -1481, 32297, 9489, -29945, -16916, 25749, 23300, -19972, -28253, 12965, 31468, -5163, -32749, -2959, 32014, 10897, -29313, -18166, 24807, 24317, -18778, -28974, 11592, 31848, -3696, -32765, -4430, 31666, 12282, -28621, -19380, 23815, 25285, -17545, -29636, 10195, 32164, -2221, -32715, -5893, 31253, 13642, -27871, -20554, 22773, 26201, -16277, -30238, 8778, 32414, -741, -32598, -7343, 30776, 14974, -27064, -21686, 21685, 27063, -14975, -30777, 7342, 32597, 740, -32415, -8779, 30237, 16276, -26202, -22774, 20553, 27870, -13643, -31254, 5892, 32714, 2220, -32165, -10196, 29635, 17544, -25286, -23816, 19379, 28620, -12283, -31667, 4429, 32764, 3695, -31849, -11593, 28973, 18777, -24318, -24808, 18165, 29312, -10898, -32015, 2958, 32748, 5162, -31469, -12966, 28252, 19971, -23301, -25750, 16915, 29944, -9490, -32298, 1480, 32664, 6619, -31024, -14313, 27473, 21125, -22236, -26640, 15629, 30514, -8063, -32515}, -{0, 32297, 10897, -28621, -20554, 21685, 27870, -12283, -32015, 1480, 32514, 9489, -29313, -19380, 22773, 27063, -13643, -31667, 2958, 32664, 8062, -29945, -18166, 23815, 26201, -14975, -31254, 4429, 32748, 6619, -30515, -16916, 24807, 25285, -16277, -30777, 5892, 32764, 5162, -31024, -15630, 25749, 24317, -17545, -30238, 7342, 32714, 3695, -31469, -14313, 26639, 23300, -18778, -29636, 8778, 32597, 2220, -31849, -12966, 27473, 22235, -19972, -28974, 10195, 32414, 740, -32165, -11593, 28252, 21125, -21126, -28253, 11592, 32164, -741, -32415, -10196, 28973, 19971, -22236, -27474, 12965, 31848, -2221, -32598, -8779, 29635, 18777, -23301, -26640, 14312, 31468, -3696, -32715, -7343, 30237, 17544, -24318, -25750, 15629, 31023, -5163, -32765, -5893, 30776, 16276, -25286, -24808, 16915, 30514, -6620, -32749, -4430, 31253, 14974, -26202, -23816, 18165, 29944, -8063, -32665, -2959, 31666, 13642, -27064, -22774, 19379, 29312, -9490, -32515, -1481, 32014, 12282, -27871, -21686, 20553, 28620, -10898, -32298}, -{0, 32014, 13642, -26202, -24808, 15629, 31468, -2221, -32415, -11593, 27473, 23300, -17545, -30777, 4429, 32664, 9489, -28621, -21686, 19379, 29944, -6620, -32765, -7343, 29635, 19971, -21126, -28974, 8778, 32714, 5162, -30515, -18166, 22773, 27870, -10898, -32515, -2959, 31253, 16276, -24318, -26640, 12965, 32164, 740, -31849, -14313, 25749, 25285, -14975, -31667, 1480, 32297, 12282, -27064, -23816, 16915, 31023, -3696, -32598, -10196, 28252, 22235, -18778, -30238, 5892, 32748, 8062, -29313, -20554, 20553, 29312, -8063, -32749, -5893, 30237, 18777, -22236, -28253, 10195, 32597, 3695, -31024, -16916, 23815, 27063, -12283, -32298, -1481, 31666, 14974, -25286, -25750, 14312, 31848, -741, -32165, -12966, 26639, 24317, -16277, -31254, 2958, 32514, 10897, -27871, -22774, 18165, 30514, -5163, -32715, -8779, 28973, 21125, -19972, -29636, 7342, 32764, 6619, -29945, -19380, 21685, 28620, -9490, -32665, -4430, 30776, 17544, -23301, -27474, 11592, 32414, 2220, -31469, -15630, 24807, 26201, -13643, -32015}, -{0, 31666, 16276, -23301, -28253, 8778, 32764, 8062, -28621, -22774, 16915, 31468, -741, -31849, -15630, 23815, 27870, -9490, -32749, -7343, 28973, 22235, -17545, -31254, 1480, 32014, 14974, -24318, -27474, 10195, 32714, 6619, -29313, -21686, 18165, 31023, -2221, -32165, -14313, 24807, 27063, -10898, -32665, -5893, 29635, 21125, -18778, -30777, 2958, 32297, 13642, -25286, -26640, 11592, 32597, 5162, -29945, -20554, 19379, 30514, -3696, -32415, -12966, 25749, 26201, -12283, -32515, -4430, 30237, 19971, -19972, -30238, 4429, 32514, 12282, -26202, -25750, 12965, 32414, 3695, -30515, -19380, 20553, 29944, -5163, -32598, -11593, 26639, 25285, -13643, -32298, -2959, 30776, 18777, -21126, -29636, 5892, 32664, 10897, -27064, -24808, 14312, 32164, 2220, -31024, -18166, 21685, 29312, -6620, -32715, -10196, 27473, 24317, -14975, -32015, -1481, 31253, 17544, -22236, -28974, 7342, 32748, 9489, -27871, -23816, 15629, 31848, 740, -31469, -16916, 22773, 28620, -8063, -32765, -8779, 28252, 23300, -16277, -31667}, -{0, 31253, 18777, -19972, -30777, 1480, 31666, 17544, -21126, -30238, 2958, 32014, 16276, -22236, -29636, 4429, 32297, 14974, -23301, -28974, 5892, 32514, 13642, -24318, -28253, 7342, 32664, 12282, -25286, -27474, 8778, 32748, 10897, -26202, -26640, 10195, 32764, 9489, -27064, -25750, 11592, 32714, 8062, -27871, -24808, 12965, 32597, 6619, -28621, -23816, 14312, 32414, 5162, -29313, -22774, 15629, 32164, 3695, -29945, -21686, 16915, 31848, 2220, -30515, -20554, 18165, 31468, 740, -31024, -19380, 19379, 31023, -741, -31469, -18166, 20553, 30514, -2221, -31849, -16916, 21685, 29944, -3696, -32165, -15630, 22773, 29312, -5163, -32415, -14313, 23815, 28620, -6620, -32598, -12966, 24807, 27870, -8063, -32715, -11593, 25749, 27063, -9490, -32765, -10196, 26639, 26201, -10898, -32749, -8779, 27473, 25285, -12283, -32665, -7343, 28252, 24317, -13643, -32515, -5893, 28973, 23300, -14975, -32298, -4430, 29635, 22235, -16277, -32015, -2959, 30237, 21125, -17545, -31667, -1481, 30776, 19971, -18778, -31254}, -{0, 30776, 21125, -16277, -32298, -5893, 28252, 25285, -10898, -32765, -11593, 24807, 28620, -5163, -32165, -16916, 20553, 31023, 740, -30515, -21686, 15629, 32414, 6619, -27871, -25750, 10195, 32748, 12282, -24318, -28974, 4429, 32014, 17544, -19972, -31254, -1481, 30237, 22235, -14975, -32515, -7343, 27473, 26201, -9490, -32715, -12966, 23815, 29312, -3696, -31849, -18166, 19379, 31468, 2220, -29945, -22774, 14312, 32597, 8062, -27064, -26640, 8778, 32664, 13642, -23301, -29636, 2958, 31666, 18777, -18778, -31667, -2959, 29635, 23300, -13643, -32665, -8779, 26639, 27063, -8063, -32598, -14313, 22773, 29944, -2221, -31469, -19380, 18165, 31848, 3695, -29313, -23816, 12965, 32714, 9489, -26202, -27474, 7342, 32514, 14974, -22236, -30238, 1480, 31253, 19971, -17545, -32015, -4430, 28973, 24317, -12283, -32749, -10196, 25749, 27870, -6620, -32415, -15630, 21685, 30514, -741, -31024, -20554, 16915, 32164, 5162, -28621, -24808, 11592, 32764, 10897, -25286, -28253, 5892, 32297, 16276, -21126, -30777}, -{0, 30237, 23300, -12283, -32765, -12966, 22773, 30514, 740, -29945, -23816, 11592, 32748, 13642, -22236, -30777, -1481, 29635, 24317, -10898, -32715, -14313, 21685, 31023, 2220, -29313, -24808, 10195, 32664, 14974, -21126, -31254, -2959, 28973, 25285, -9490, -32598, -15630, 20553, 31468, 3695, -28621, -25750, 8778, 32514, 16276, -19972, -31667, -4430, 28252, 26201, -8063, -32415, -16916, 19379, 31848, 5162, -27871, -26640, 7342, 32297, 17544, -18778, -32015, -5893, 27473, 27063, -6620, -32165, -18166, 18165, 32164, 6619, -27064, -27474, 5892, 32014, 18777, -17545, -32298, -7343, 26639, 27870, -5163, -31849, -19380, 16915, 32414, 8062, -26202, -28253, 4429, 31666, 19971, -16277, -32515, -8779, 25749, 28620, -3696, -31469, -20554, 15629, 32597, 9489, -25286, -28974, 2958, 31253, 21125, -14975, -32665, -10196, 24807, 29312, -2221, -31024, -21686, 14312, 32714, 10897, -24318, -29636, 1480, 30776, 22235, -13643, -32749, -11593, 23815, 29944, -741, -30515, -22774, 12965, 32764, 12282, -23301, -30238}, -{0, 29635, 25285, -8063, -32165, -19380, 15629, 32714, 12282, -22236, -31254, -4430, 27473, 27870, -3696, -31024, -22774, 11592, 32664, 16276, -18778, -32298, -8779, 24807, 29944, 740, -29313, -25750, 7342, 32014, 19971, -14975, -32749, -12966, 21685, 31468, 5162, -27064, -28253, 2958, 30776, 23300, -10898, -32598, -16916, 18165, 32414, 9489, -24318, -30238, -1481, 28973, 26201, -6620, -31849, -20554, 14312, 32764, 13642, -21126, -31667, -5893, 26639, 28620, -2221, -30515, -23816, 10195, 32514, 17544, -17545, -32515, -10196, 23815, 30514, 2220, -28621, -26640, 5892, 31666, 21125, -13643, -32765, -14313, 20553, 31848, 6619, -26202, -28974, 1480, 30237, 24317, -9490, -32415, -18166, 16915, 32597, 10897, -23301, -30777, -2959, 28252, 27063, -5163, -31469, -21686, 12965, 32748, 14974, -19972, -32015, -7343, 25749, 29312, -741, -29945, -24808, 8778, 32297, 18777, -16277, -32665, -11593, 22773, 31023, 3695, -27871, -27474, 4429, 31253, 22235, -12283, -32715, -15630, 19379, 32164, 8062, -25286, -29636}, -{0, 28973, 27063, -3696, -30515, -24808, 7342, 31666, 22235, -10898, -32415, -19380, 14312, 32748, 16276, -17545, -32665, -12966, 20553, 32164, 9489, -23301, -31254, -5893, 25749, 29944, 2220, -27871, -28253, 1480, 29635, 26201, -5163, -31024, -23816, 8778, 32014, 21125, -12283, -32598, -18166, 15629, 32764, 14974, -18778, -32515, -11593, 21685, 31848, 8062, -24318, -30777, -4430, 26639, 29312, 740, -28621, -27474, 2958, 30237, 25285, -6620, -31469, -22774, 10195, 32297, 19971, -13643, -32715, -16916, 16915, 32714, 13642, -19972, -32298, -10196, 22773, 31468, 6619, -25286, -30238, -2959, 27473, 28620, -741, -29313, -26640, 4429, 30776, 24317, -8063, -31849, -21686, 11592, 32514, 18777, -14975, -32765, -15630, 18165, 32597, 12282, -21126, -32015, -8779, 23815, 31023, 5162, -26202, -29636, -1481, 28252, 27870, -2221, -29945, -25750, 5892, 31253, 23300, -9490, -32165, -20554, 12965, 32664, 17544, -16277, -32749, -14313, 19379, 32414, 10897, -22236, -31667, -7343, 24807, 30514, 3695, -27064, -28974}, -{0, 28252, 28620, 740, -27871, -28974, -1481, 27473, 29312, 2220, -27064, -29636, -2959, 26639, 29944, 3695, -26202, -30238, -4430, 25749, 30514, 5162, -25286, -30777, -5893, 24807, 31023, 6619, -24318, -31254, -7343, 23815, 31468, 8062, -23301, -31667, -8779, 22773, 31848, 9489, -22236, -32015, -10196, 21685, 32164, 10897, -21126, -32298, -11593, 20553, 32414, 12282, -19972, -32515, -12966, 19379, 32597, 13642, -18778, -32665, -14313, 18165, 32714, 14974, -17545, -32749, -15630, 16915, 32764, 16276, -16277, -32765, -16916, 15629, 32748, 17544, -14975, -32715, -18166, 14312, 32664, 18777, -13643, -32598, -19380, 12965, 32514, 19971, -12283, -32415, -20554, 11592, 32297, 21125, -10898, -32165, -21686, 10195, 32014, 22235, -9490, -31849, -22774, 8778, 31666, 23300, -8063, -31469, -23816, 7342, 31253, 24317, -6620, -31024, -24808, 5892, 30776, 25285, -5163, -30515, -25750, 4429, 30237, 26201, -3696, -29945, -26640, 2958, 29635, 27063, -2221, -29313, -27474, 1480, 28973, 27870, -741, -28621, -28253}, -{0, 27473, 29944, 5162, -24318, -31667, -10196, 20553, 32597, 14974, -16277, -32715, -19380, 11592, 32014, 23300, -6620, -30515, -26640, 1480, 28252, 29312, 3695, -25286, -31254, -8779, 21685, 32414, 13642, -17545, -32765, -18166, 12965, 32297, 22235, -8063, -31024, -25750, 2958, 28973, 28620, 2220, -26202, -30777, -7343, 22773, 32164, 12282, -18778, -32749, -16916, 14312, 32514, 21125, -9490, -31469, -24808, 4429, 29635, 27870, 740, -27064, -30238, -5893, 23815, 31848, 10897, -19972, -32665, -15630, 15629, 32664, 19971, -10898, -31849, -23816, 5892, 30237, 27063, -741, -27871, -29636, -4430, 24807, 31468, 9489, -21126, -32515, -14313, 16915, 32748, 18777, -12283, -32165, -22774, 7342, 30776, 26201, -2221, -28621, -28974, -2959, 25749, 31023, 8062, -22236, -32298, -12966, 18165, 32764, 17544, -13643, -32415, -21686, 8778, 31253, 25285, -3696, -29313, -28253, -1481, 26639, 30514, 6619, -23301, -32015, -11593, 19379, 32714, 16276, -14975, -32598, -20554, 10195, 31666, 24317, -5163, -29945, -27474}, -{0, 26639, 31023, 9489, -19972, -32749, -18166, 11592, 31666, 25285, -2221, -27871, -30238, -7343, 21685, 32597, 16276, -13643, -32165, -23816, 4429, 28973, 29312, 5162, -23301, -32298, -14313, 15629, 32514, 22235, -6620, -29945, -28253, -2959, 24807, 31848, 12282, -17545, -32715, -20554, 8778, 30776, 27063, 740, -26202, -31254, -10196, 19379, 32764, 18777, -10898, -31469, -25750, 1480, 27473, 30514, 8062, -21126, -32665, -16916, 12965, 32014, 24317, -3696, -28621, -29636, -5893, 22773, 32414, 14974, -14975, -32415, -22774, 5892, 29635, 28620, 3695, -24318, -32015, -12966, 16915, 32664, 21125, -8063, -30515, -27474, -1481, 25749, 31468, 10897, -18778, -32765, -19380, 10195, 31253, 26201, -741, -27064, -30777, -8779, 20553, 32714, 17544, -12283, -31849, -24808, 2958, 28252, 29944, 6619, -22236, -32515, -15630, 14312, 32297, 23300, -5163, -29313, -28974, -4430, 23815, 32164, 13642, -16277, -32598, -21686, 7342, 30237, 27870, 2220, -25286, -31667, -11593, 18165, 32748, 19971, -9490, -31024, -26640}, -{0, 25749, 31848, 13642, -14975, -32165, -24808, 1480, 26639, 31468, 12282, -16277, -32415, -23816, 2958, 27473, 31023, 10897, -17545, -32598, -22774, 4429, 28252, 30514, 9489, -18778, -32715, -21686, 5892, 28973, 29944, 8062, -19972, -32765, -20554, 7342, 29635, 29312, 6619, -21126, -32749, -19380, 8778, 30237, 28620, 5162, -22236, -32665, -18166, 10195, 30776, 27870, 3695, -23301, -32515, -16916, 11592, 31253, 27063, 2220, -24318, -32298, -15630, 12965, 31666, 26201, 740, -25286, -32015, -14313, 14312, 32014, 25285, -741, -26202, -31667, -12966, 15629, 32297, 24317, -2221, -27064, -31254, -11593, 16915, 32514, 23300, -3696, -27871, -30777, -10196, 18165, 32664, 22235, -5163, -28621, -30238, -8779, 19379, 32748, 21125, -6620, -29313, -29636, -7343, 20553, 32764, 19971, -8063, -29945, -28974, -5893, 21685, 32714, 18777, -9490, -30515, -28253, -4430, 22773, 32597, 17544, -10898, -31024, -27474, -2959, 23815, 32414, 16276, -12283, -31469, -26640, -1481, 24807, 32164, 14974, -13643, -31849, -25750}, -{0, 24807, 32414, 17544, -9490, -29945, -29636, -8779, 18165, 32514, 24317, -741, -25286, -32298, -16916, 10195, 30237, 29312, 8062, -18778, -32598, -23816, 1480, 25749, 32164, 16276, -10898, -30515, -28974, -7343, 19379, 32664, 23300, -2221, -26202, -32015, -15630, 11592, 30776, 28620, 6619, -19972, -32715, -22774, 2958, 26639, 31848, 14974, -12283, -31024, -28253, -5893, 20553, 32748, 22235, -3696, -27064, -31667, -14313, 12965, 31253, 27870, 5162, -21126, -32765, -21686, 4429, 27473, 31468, 13642, -13643, -31469, -27474, -4430, 21685, 32764, 21125, -5163, -27871, -31254, -12966, 14312, 31666, 27063, 3695, -22236, -32749, -20554, 5892, 28252, 31023, 12282, -14975, -31849, -26640, -2959, 22773, 32714, 19971, -6620, -28621, -30777, -11593, 15629, 32014, 26201, 2220, -23301, -32665, -19380, 7342, 28973, 30514, 10897, -16277, -32165, -25750, -1481, 23815, 32597, 18777, -8063, -29313, -30238, -10196, 16915, 32297, 25285, 740, -24318, -32515, -18166, 8778, 29635, 29944, 9489, -17545, -32415, -24808}, -{0, 23815, 32714, 21125, -3696, -26202, -32298, -18166, 7342, 28252, 31468, 14974, -10898, -29945, -30238, -11593, 14312, 31253, 28620, 8062, -17545, -32165, -26640, -4430, 20553, 32664, 24317, 740, -23301, -32749, -21686, 2958, 25749, 32414, 18777, -6620, -27871, -31667, -15630, 10195, 29635, 30514, 12282, -13643, -31024, -28974, -8779, 16915, 32014, 27063, 5162, -19972, -32598, -24808, -1481, 22773, 32764, 22235, -2221, -25286, -32515, -19380, 5892, 27473, 31848, 16276, -9490, -29313, -30777, -12966, 12965, 30776, 29312, 9489, -16277, -31849, -27474, -5893, 19379, 32514, 25285, 2220, -22236, -32765, -22774, 1480, 24807, 32597, 19971, -5163, -27064, -32015, -16916, 8778, 28973, 31023, 13642, -12283, -30515, -29636, -10196, 15629, 31666, 27870, 6619, -18778, -32415, -25750, -2959, 21685, 32748, 23300, -741, -24318, -32665, -20554, 4429, 26639, 32164, 17544, -8063, -28621, -31254, -14313, 11592, 30237, 29944, 10897, -14975, -31469, -28253, -7343, 18165, 32297, 26201, 3695, -21126, -32715, -23816}, -{0, 22773, 32748, 24317, 2220, -21126, -32598, -25750, -4430, 19379, 32297, 27063, 6619, -17545, -31849, -28253, -8779, 15629, 31253, 29312, 10897, -13643, -30515, -30238, -12966, 11592, 29635, 31023, 14974, -9490, -28621, -31667, -16916, 7342, 27473, 32164, 18777, -5163, -26202, -32515, -20554, 2958, 24807, 32714, 22235, -741, -23301, -32765, -23816, -1481, 21685, 32664, 25285, 3695, -19972, -32415, -26640, -5893, 18165, 32014, 27870, 8062, -16277, -31469, -28974, -10196, 14312, 30776, 29944, 12282, -12283, -29945, -30777, -14313, 10195, 28973, 31468, 16276, -8063, -27871, -32015, -18166, 5892, 26639, 32414, 19971, -3696, -25286, -32665, -21686, 1480, 23815, 32764, 23300, 740, -22236, -32715, -24808, -2959, 20553, 32514, 26201, 5162, -18778, -32165, -27474, -7343, 16915, 31666, 28620, 9489, -14975, -31024, -29636, -11593, 12965, 30237, 30514, 13642, -10898, -29313, -31254, -15630, 8778, 28252, 31848, 17544, -6620, -27064, -32298, -19380, 4429, 25749, 32597, 21125, -2221, -24318, -32749, -22774}, -{0, 21685, 32514, 27063, 8062, -14975, -30515, -30777, -15630, 7342, 26639, 32597, 22235, 740, -21126, -32415, -27474, -8779, 14312, 30237, 31023, 16276, -6620, -26202, -32665, -22774, -1481, 20553, 32297, 27870, 9489, -13643, -29945, -31254, -16916, 5892, 25749, 32714, 23300, 2220, -19972, -32165, -28253, -10196, 12965, 29635, 31468, 17544, -5163, -25286, -32749, -23816, -2959, 19379, 32014, 28620, 10897, -12283, -29313, -31667, -18166, 4429, 24807, 32764, 24317, 3695, -18778, -31849, -28974, -11593, 11592, 28973, 31848, 18777, -3696, -24318, -32765, -24808, -4430, 18165, 31666, 29312, 12282, -10898, -28621, -32015, -19380, 2958, 23815, 32748, 25285, 5162, -17545, -31469, -29636, -12966, 10195, 28252, 32164, 19971, -2221, -23301, -32715, -25750, -5893, 16915, 31253, 29944, 13642, -9490, -27871, -32298, -20554, 1480, 22773, 32664, 26201, 6619, -16277, -31024, -30238, -14313, 8778, 27473, 32414, 21125, -741, -22236, -32598, -26640, -7343, 15629, 30776, 30514, 14974, -8063, -27064, -32515, -21686}, -{0, 20553, 32014, 29312, 13642, -8063, -26202, -32749, -24808, -5893, 15629, 30237, 31468, 18777, -2221, -22236, -32415, -28253, -11593, 10195, 27473, 32597, 23300, 3695, -17545, -31024, -30777, -16916, 4429, 23815, 32664, 27063, 9489, -12283, -28621, -32298, -21686, -1481, 19379, 31666, 29944, 14974, -6620, -25286, -32765, -25750, -7343, 14312, 29635, 31848, 19971, -741, -21126, -32165, -28974, -12966, 8778, 26639, 32714, 24317, 5162, -16277, -30515, -31254, -18166, 2958, 22773, 32514, 27870, 10897, -10898, -27871, -32515, -22774, -2959, 18165, 31253, 30514, 16276, -5163, -24318, -32715, -26640, -8779, 12965, 28973, 32164, 21125, 740, -19972, -31849, -29636, -14313, 7342, 25749, 32764, 25285, 6619, -14975, -29945, -31667, -19380, 1480, 21685, 32297, 28620, 12282, -9490, -27064, -32665, -23816, -4430, 16915, 30776, 31023, 17544, -3696, -23301, -32598, -27474, -10196, 11592, 28252, 32414, 22235, 2220, -18778, -31469, -30238, -15630, 5892, 24807, 32748, 26201, 8062, -13643, -29313, -32015, -20554}, -{0, 19379, 31253, 31023, 18777, -741, -19972, -31469, -30777, -18166, 1480, 20553, 31666, 30514, 17544, -2221, -21126, -31849, -30238, -16916, 2958, 21685, 32014, 29944, 16276, -3696, -22236, -32165, -29636, -15630, 4429, 22773, 32297, 29312, 14974, -5163, -23301, -32415, -28974, -14313, 5892, 23815, 32514, 28620, 13642, -6620, -24318, -32598, -28253, -12966, 7342, 24807, 32664, 27870, 12282, -8063, -25286, -32715, -27474, -11593, 8778, 25749, 32748, 27063, 10897, -9490, -26202, -32765, -26640, -10196, 10195, 26639, 32764, 26201, 9489, -10898, -27064, -32749, -25750, -8779, 11592, 27473, 32714, 25285, 8062, -12283, -27871, -32665, -24808, -7343, 12965, 28252, 32597, 24317, 6619, -13643, -28621, -32515, -23816, -5893, 14312, 28973, 32414, 23300, 5162, -14975, -29313, -32298, -22774, -4430, 15629, 29635, 32164, 22235, 3695, -16277, -29945, -32015, -21686, -2959, 16915, 30237, 31848, 21125, 2220, -17545, -30515, -31667, -20554, -1481, 18165, 30776, 31468, 19971, 740, -18778, -31024, -31254, -19380}, -{0, 18165, 30237, 32164, 23300, 6619, -12283, -27064, -32765, -27474, -12966, 5892, 22773, 32014, 30514, 18777, 740, -17545, -29945, -32298, -23816, -7343, 11592, 26639, 32748, 27870, 13642, -5163, -22236, -31849, -30777, -19380, -1481, 16915, 29635, 32414, 24317, 8062, -10898, -26202, -32715, -28253, -14313, 4429, 21685, 31666, 31023, 19971, 2220, -16277, -29313, -32515, -24808, -8779, 10195, 25749, 32664, 28620, 14974, -3696, -21126, -31469, -31254, -20554, -2959, 15629, 28973, 32597, 25285, 9489, -9490, -25286, -32598, -28974, -15630, 2958, 20553, 31253, 31468, 21125, 3695, -14975, -28621, -32665, -25750, -10196, 8778, 24807, 32514, 29312, 16276, -2221, -19972, -31024, -31667, -21686, -4430, 14312, 28252, 32714, 26201, 10897, -8063, -24318, -32415, -29636, -16916, 1480, 19379, 30776, 31848, 22235, 5162, -13643, -27871, -32749, -26640, -11593, 7342, 23815, 32297, 29944, 17544, -741, -18778, -30515, -32015, -22774, -5893, 12965, 27473, 32764, 27063, 12282, -6620, -23301, -32165, -30238, -18166}, -{0, 16915, 28973, 32714, 27063, 13642, -3696, -19972, -30515, -32298, -24808, -10196, 7342, 22773, 31666, 31468, 22235, 6619, -10898, -25286, -32415, -30238, -19380, -2959, 14312, 27473, 32748, 28620, 16276, -741, -17545, -29313, -32665, -26640, -12966, 4429, 20553, 30776, 32164, 24317, 9489, -8063, -23301, -31849, -31254, -21686, -5893, 11592, 25749, 32514, 29944, 18777, 2220, -14975, -27871, -32765, -28253, -15630, 1480, 18165, 29635, 32597, 26201, 12282, -5163, -21126, -31024, -32015, -23816, -8779, 8778, 23815, 32014, 31023, 21125, 5162, -12283, -26202, -32598, -29636, -18166, -1481, 15629, 28252, 32764, 27870, 14974, -2221, -18778, -29945, -32515, -25750, -11593, 5892, 21685, 31253, 31848, 23300, 8062, -9490, -24318, -32165, -30777, -20554, -4430, 12965, 26639, 32664, 29312, 17544, 740, -16277, -28621, -32749, -27474, -14313, 2958, 19379, 30237, 32414, 25285, 10897, -6620, -22236, -31469, -31667, -22774, -7343, 10195, 24807, 32297, 30514, 19971, 3695, -13643, -27064, -32715, -28974, -16916}, -{0, 15629, 27473, 32664, 29944, 19971, 5162, -10898, -24318, -31849, -31667, -23816, -10196, 5892, 20553, 30237, 32597, 27063, 14974, -741, -16277, -27871, -32715, -29636, -19380, -4430, 11592, 24807, 32014, 31468, 23300, 9489, -6620, -21126, -30515, -32515, -26640, -14313, 1480, 16915, 28252, 32748, 29312, 18777, 3695, -12283, -25286, -32165, -31254, -22774, -8779, 7342, 21685, 30776, 32414, 26201, 13642, -2221, -17545, -28621, -32765, -28974, -18166, -2959, 12965, 25749, 32297, 31023, 22235, 8062, -8063, -22236, -31024, -32298, -25750, -12966, 2958, 18165, 28973, 32764, 28620, 17544, 2220, -13643, -26202, -32415, -30777, -21686, -7343, 8778, 22773, 31253, 32164, 25285, 12282, -3696, -18778, -29313, -32749, -28253, -16916, -1481, 14312, 26639, 32514, 30514, 21125, 6619, -9490, -23301, -31469, -32015, -24808, -11593, 4429, 19379, 29635, 32714, 27870, 16276, 740, -14975, -27064, -32598, -30238, -20554, -5893, 10195, 23815, 31666, 31848, 24317, 10897, -5163, -19972, -29945, -32665, -27474, -15630}, -{0, 14312, 25749, 32014, 31848, 25285, 13642, -741, -14975, -26202, -32165, -31667, -24808, -12966, 1480, 15629, 26639, 32297, 31468, 24317, 12282, -2221, -16277, -27064, -32415, -31254, -23816, -11593, 2958, 16915, 27473, 32514, 31023, 23300, 10897, -3696, -17545, -27871, -32598, -30777, -22774, -10196, 4429, 18165, 28252, 32664, 30514, 22235, 9489, -5163, -18778, -28621, -32715, -30238, -21686, -8779, 5892, 19379, 28973, 32748, 29944, 21125, 8062, -6620, -19972, -29313, -32765, -29636, -20554, -7343, 7342, 20553, 29635, 32764, 29312, 19971, 6619, -8063, -21126, -29945, -32749, -28974, -19380, -5893, 8778, 21685, 30237, 32714, 28620, 18777, 5162, -9490, -22236, -30515, -32665, -28253, -18166, -4430, 10195, 22773, 30776, 32597, 27870, 17544, 3695, -10898, -23301, -31024, -32515, -27474, -16916, -2959, 11592, 23815, 31253, 32414, 27063, 16276, 2220, -12283, -24318, -31469, -32298, -26640, -15630, -1481, 12965, 24807, 31666, 32164, 26201, 14974, 740, -13643, -25286, -31849, -32015, -25750, -14313}, -{0, 12965, 23815, 30776, 32714, 29312, 21125, 9489, -3696, -16277, -26202, -31849, -32298, -27474, -18166, -5893, 7342, 19379, 28252, 32514, 31468, 25285, 14974, 2220, -10898, -22236, -29945, -32765, -30238, -22774, -11593, 1480, 14312, 24807, 31253, 32597, 28620, 19971, 8062, -5163, -17545, -27064, -32165, -32015, -26640, -16916, -4430, 8778, 20553, 28973, 32664, 31023, 24317, 13642, 740, -12283, -23301, -30515, -32749, -29636, -21686, -10196, 2958, 15629, 25749, 31666, 32414, 27870, 18777, 6619, -6620, -18778, -27871, -32415, -31667, -25750, -15630, -2959, 10195, 21685, 29635, 32748, 30514, 23300, 12282, -741, -13643, -24318, -31024, -32665, -28974, -20554, -8779, 4429, 16915, 26639, 32014, 32164, 27063, 17544, 5162, -8063, -19972, -28621, -32598, -31254, -24808, -14313, -1481, 11592, 22773, 30237, 32764, 29944, 22235, 10897, -2221, -14975, -25286, -31469, -32515, -28253, -19380, -7343, 5892, 18165, 27473, 32297, 31848, 26201, 16276, 3695, -9490, -21126, -29313, -32715, -30777, -23816, -12966}, -{0, 11592, 21685, 28973, 32514, 31848, 27063, 18777, 8062, -3696, -14975, -24318, -30515, -32765, -30777, -24808, -15630, -4430, 7342, 18165, 26639, 31666, 32597, 29312, 22235, 12282, 740, -10898, -21126, -28621, -32415, -32015, -27474, -19380, -8779, 2958, 14312, 23815, 30237, 32748, 31023, 25285, 16276, 5162, -6620, -17545, -26202, -31469, -32665, -29636, -22774, -12966, -1481, 10195, 20553, 28252, 32297, 32164, 27870, 19971, 9489, -2221, -13643, -23301, -29945, -32715, -31254, -25750, -16916, -5893, 5892, 16915, 25749, 31253, 32714, 29944, 23300, 13642, 2220, -9490, -19972, -27871, -32165, -32298, -28253, -20554, -10196, 1480, 12965, 22773, 29635, 32664, 31468, 26201, 17544, 6619, -5163, -16277, -25286, -31024, -32749, -30238, -23816, -14313, -2959, 8778, 19379, 27473, 32014, 32414, 28620, 21125, 10897, -741, -12283, -22236, -29313, -32598, -31667, -26640, -18166, -7343, 4429, 15629, 24807, 30776, 32764, 30514, 24317, 14974, 3695, -8063, -18778, -27064, -31849, -32515, -28974, -21686, -11593}, -{0, 10195, 19379, 26639, 31253, 32764, 31023, 26201, 18777, 9489, -741, -10898, -19972, -27064, -31469, -32749, -30777, -25750, -18166, -8779, 1480, 11592, 20553, 27473, 31666, 32714, 30514, 25285, 17544, 8062, -2221, -12283, -21126, -27871, -31849, -32665, -30238, -24808, -16916, -7343, 2958, 12965, 21685, 28252, 32014, 32597, 29944, 24317, 16276, 6619, -3696, -13643, -22236, -28621, -32165, -32515, -29636, -23816, -15630, -5893, 4429, 14312, 22773, 28973, 32297, 32414, 29312, 23300, 14974, 5162, -5163, -14975, -23301, -29313, -32415, -32298, -28974, -22774, -14313, -4430, 5892, 15629, 23815, 29635, 32514, 32164, 28620, 22235, 13642, 3695, -6620, -16277, -24318, -29945, -32598, -32015, -28253, -21686, -12966, -2959, 7342, 16915, 24807, 30237, 32664, 31848, 27870, 21125, 12282, 2220, -8063, -17545, -25286, -30515, -32715, -31667, -27474, -20554, -11593, -1481, 8778, 18165, 25749, 30776, 32748, 31468, 27063, 19971, 10897, 740, -9490, -18778, -26202, -31024, -32765, -31254, -26640, -19380, -10196}, -{0, 8778, 16915, 23815, 28973, 32014, 32714, 31023, 27063, 21125, 13642, 5162, -3696, -12283, -19972, -26202, -30515, -32598, -32298, -29636, -24808, -18166, -10196, -1481, 7342, 15629, 22773, 28252, 31666, 32764, 31468, 27870, 22235, 14974, 6619, -2221, -10898, -18778, -25286, -29945, -32415, -32515, -30238, -25750, -19380, -11593, -2959, 5892, 14312, 21685, 27473, 31253, 32748, 31848, 28620, 23300, 16276, 8062, -741, -9490, -17545, -24318, -29313, -32165, -32665, -30777, -26640, -20554, -12966, -4430, 4429, 12965, 20553, 26639, 30776, 32664, 32164, 29312, 24317, 17544, 9489, 740, -8063, -16277, -23301, -28621, -31849, -32749, -31254, -27474, -21686, -14313, -5893, 2958, 11592, 19379, 25749, 30237, 32514, 32414, 29944, 25285, 18777, 10897, 2220, -6620, -14975, -22236, -27871, -31469, -32765, -31667, -28253, -22774, -15630, -7343, 1480, 10195, 18165, 24807, 29635, 32297, 32597, 30514, 26201, 19971, 12282, 3695, -5163, -13643, -21126, -27064, -31024, -32715, -32015, -28974, -23816, -16916, -8779}, -{0, 7342, 14312, 20553, 25749, 29635, 32014, 32764, 31848, 29312, 25285, 19971, 13642, 6619, -741, -8063, -14975, -21126, -26202, -29945, -32165, -32749, -31667, -28974, -24808, -19380, -12966, -5893, 1480, 8778, 15629, 21685, 26639, 30237, 32297, 32714, 31468, 28620, 24317, 18777, 12282, 5162, -2221, -9490, -16277, -22236, -27064, -30515, -32415, -32665, -31254, -28253, -23816, -18166, -11593, -4430, 2958, 10195, 16915, 22773, 27473, 30776, 32514, 32597, 31023, 27870, 23300, 17544, 10897, 3695, -3696, -10898, -17545, -23301, -27871, -31024, -32598, -32515, -30777, -27474, -22774, -16916, -10196, -2959, 4429, 11592, 18165, 23815, 28252, 31253, 32664, 32414, 30514, 27063, 22235, 16276, 9489, 2220, -5163, -12283, -18778, -24318, -28621, -31469, -32715, -32298, -30238, -26640, -21686, -15630, -8779, -1481, 5892, 12965, 19379, 24807, 28973, 31666, 32748, 32164, 29944, 26201, 21125, 14974, 8062, 740, -6620, -13643, -19972, -25286, -29313, -31849, -32765, -32015, -29636, -25750, -20554, -14313, -7343}, -{0, 5892, 11592, 16915, 21685, 25749, 28973, 31253, 32514, 32714, 31848, 29944, 27063, 23300, 18777, 13642, 8062, 2220, -3696, -9490, -14975, -19972, -24318, -27871, -30515, -32165, -32765, -32298, -30777, -28253, -24808, -20554, -15630, -10196, -4430, 1480, 7342, 12965, 18165, 22773, 26639, 29635, 31666, 32664, 32597, 31468, 29312, 26201, 22235, 17544, 12282, 6619, 740, -5163, -10898, -16277, -21126, -25286, -28621, -31024, -32415, -32749, -32015, -30238, -27474, -23816, -19380, -14313, -8779, -2959, 2958, 8778, 14312, 19379, 23815, 27473, 30237, 32014, 32748, 32414, 31023, 28620, 25285, 21125, 16276, 10897, 5162, -741, -6620, -12283, -17545, -22236, -26202, -29313, -31469, -32598, -32665, -31667, -29636, -26640, -22774, -18166, -12966, -7343, -1481, 4429, 10195, 15629, 20553, 24807, 28252, 30776, 32297, 32764, 32164, 30514, 27870, 24317, 19971, 14974, 9489, 3695, -2221, -8063, -13643, -18778, -23301, -27064, -29945, -31849, -32715, -32515, -31254, -28974, -25750, -21686, -16916, -11593, -5893}, -{0, 4429, 8778, 12965, 16915, 20553, 23815, 26639, 28973, 30776, 32014, 32664, 32714, 32164, 31023, 29312, 27063, 24317, 21125, 17544, 13642, 9489, 5162, 740, -3696, -8063, -12283, -16277, -19972, -23301, -26202, -28621, -30515, -31849, -32598, -32749, -32298, -31254, -29636, -27474, -24808, -21686, -18166, -14313, -10196, -5893, -1481, 2958, 7342, 11592, 15629, 19379, 22773, 25749, 28252, 30237, 31666, 32514, 32764, 32414, 31468, 29944, 27870, 25285, 22235, 18777, 14974, 10897, 6619, 2220, -2221, -6620, -10898, -14975, -18778, -22236, -25286, -27871, -29945, -31469, -32415, -32765, -32515, -31667, -30238, -28253, -25750, -22774, -19380, -15630, -11593, -7343, -2959, 1480, 5892, 10195, 14312, 18165, 21685, 24807, 27473, 29635, 31253, 32297, 32748, 32597, 31848, 30514, 28620, 26201, 23300, 19971, 16276, 12282, 8062, 3695, -741, -5163, -9490, -13643, -17545, -21126, -24318, -27064, -29313, -31024, -32165, -32715, -32665, -32015, -30777, -28974, -26640, -23816, -20554, -16916, -12966, -8779, -4430}, -{0, 2958, 5892, 8778, 11592, 14312, 16915, 19379, 21685, 23815, 25749, 27473, 28973, 30237, 31253, 32014, 32514, 32748, 32714, 32414, 31848, 31023, 29944, 28620, 27063, 25285, 23300, 21125, 18777, 16276, 13642, 10897, 8062, 5162, 2220, -741, -3696, -6620, -9490, -12283, -14975, -17545, -19972, -22236, -24318, -26202, -27871, -29313, -30515, -31469, -32165, -32598, -32765, -32665, -32298, -31667, -30777, -29636, -28253, -26640, -24808, -22774, -20554, -18166, -15630, -12966, -10196, -7343, -4430, -1481, 1480, 4429, 7342, 10195, 12965, 15629, 18165, 20553, 22773, 24807, 26639, 28252, 29635, 30776, 31666, 32297, 32664, 32764, 32597, 32164, 31468, 30514, 29312, 27870, 26201, 24317, 22235, 19971, 17544, 14974, 12282, 9489, 6619, 3695, 740, -2221, -5163, -8063, -10898, -13643, -16277, -18778, -21126, -23301, -25286, -27064, -28621, -29945, -31024, -31849, -32415, -32715, -32749, -32515, -32015, -31254, -30238, -28974, -27474, -25750, -23816, -21686, -19380, -16916, -14313, -11593, -8779, -5893, -2959}, -{0, 1480, 2958, 4429, 5892, 7342, 8778, 10195, 11592, 12965, 14312, 15629, 16915, 18165, 19379, 20553, 21685, 22773, 23815, 24807, 25749, 26639, 27473, 28252, 28973, 29635, 30237, 30776, 31253, 31666, 32014, 32297, 32514, 32664, 32748, 32764, 32714, 32597, 32414, 32164, 31848, 31468, 31023, 30514, 29944, 29312, 28620, 27870, 27063, 26201, 25285, 24317, 23300, 22235, 21125, 19971, 18777, 17544, 16276, 14974, 13642, 12282, 10897, 9489, 8062, 6619, 5162, 3695, 2220, 740, -741, -2221, -3696, -5163, -6620, -8063, -9490, -10898, -12283, -13643, -14975, -16277, -17545, -18778, -19972, -21126, -22236, -23301, -24318, -25286, -26202, -27064, -27871, -28621, -29313, -29945, -30515, -31024, -31469, -31849, -32165, -32415, -32598, -32715, -32765, -32749, -32665, -32515, -32298, -32015, -31667, -31254, -30777, -30238, -29636, -28974, -28253, -27474, -26640, -25750, -24808, -23816, -22774, -21686, -20554, -19380, -18166, -16916, -15630, -14313, -12966, -11593, -10196, -8779, -7343, -5893, -4430, -2959, -1481} -}; \ No newline at end of file diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach_common.c b/openair1/PHY/NR_TRANSPORT/nr_prach_common.c index 8cc5951b19..a95c519d43 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach_common.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach_common.c @@ -127,8 +127,6 @@ void compute_nr_prach_seq(uint8_t short_sequence, LOG_D( PHY, "compute_prach_seq: done init prach_tables\n" ); - int16_t *x_u_time = calloc(1, sizeof(int32_t)*N_ZC); - for (i=0; i>1); - x_u_time[k<<1] = (int16_t)nr_ru[nr_ru_index<<1]; - x_u_time[1+(k<<1)] = (int16_t)nr_ru[1+(nr_ru_index<<1)]; + // multiply by inverse of 2 (required since ru is exp[j 2\pi n]) + X_u[i][k] = ((uint32_t*)nr_ru)[(((k*(1+(inv_u*k)))%N_ZC)*nr_ZC_inv[2])%N_ZC]; } - - int16_t *x_u_freq = (int16_t*)X_u[i]; - bzero(x_u_freq,sizeof(int32_t)*N_ZC); - for (int line=0; line>19); - x_u_freq[1+(line<<1)] = x_u_freq[1+(line<<1)] + (im>>19); - } - } - -#ifdef PRACH_DEBUG - for (k=0; k>16)); - } -#endif } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_OUT); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 1d8f3a9caf..1a330da02c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -523,9 +523,9 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, } else { LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); - LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); + LOG_I(NR_MAC,"[RAPROC] Received Msg3:\n"); for (int k = 0; k < sdu_lenP; k++) { - LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); + LOG_I(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); } // UE Contention Resolution Identity From 1ee7d7e5514e363a9b7edd7e45b8e980a1b13c6e Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 18 Mar 2021 17:39:01 +0000 Subject: [PATCH 56/94] Remove some hard code values --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 26 ++++++++++++++++--- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 1 + .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 +-- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 1d971a8831..0c1fde07a2 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -681,7 +681,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, preamble_shift -= NCS; if (preamble_shift < 0) - preamble_shift+=N_ZC; + preamble_shift+=((N_ZC/NCS)*NCS); } } else { // This is the high-speed case new_dft = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 0b96a287b7..2bf5ab437f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -837,6 +837,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int rbSize = 8; if (nr_mac->sched_ctrlCommon == NULL){ + LOG_D(NR_MAC,"generate_Msg2: Filling nr_mac->sched_ctrlCommon\n"); nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); nr_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->coreset)); @@ -890,6 +891,12 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); + if (nrOfSymbols == 2) { + nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 1; + } else { + nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 2; + } + // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them const int bwpid = bwp->bwp_Id; @@ -939,6 +946,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra mcsTableIdx = 2; } + AssertFatal(nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 1 || nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 2, + "nr_mac->schedCtrlCommon->numDmrsCdmGrpsNoData %d is not possible", + nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData); + pdsch_pdu_rel15->pduBitmap = 0; pdsch_pdu_rel15->rnti = ra->RA_rnti; pdsch_pdu_rel15->pduIndex = pduindex; @@ -959,7 +970,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; - pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2; + pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData; pdsch_pdu_rel15->dmrsPorts = 1; pdsch_pdu_rel15->resourceAlloc = 1; pdsch_pdu_rel15->rbStart = rbStart; @@ -1108,12 +1119,15 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // Bytes to be transmitted uint8_t *buf = (uint8_t *) harq->tb; uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, buf, 255, ra->cont_res_id); + LOG_D(NR_MAC,"Encoded contention resolution mac_pdu_length %d\n",mac_pdu_length); uint16_t mac_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, CCCH, ra->rnti, 1, &buf[mac_pdu_length+2]); ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->R = 0; ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->F = 0; ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->LCID = DL_SCH_LCID_CCCH; - ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->L = mac_sdu_length * 8; - mac_pdu_length = mac_pdu_length + mac_sdu_length + 2; + ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->L = mac_sdu_length; + mac_pdu_length = mac_pdu_length + mac_sdu_length + sizeof(NR_MAC_SUBHEADER_SHORT); + + LOG_D(NR_MAC,"Encoded RRCSetup Piggyback (%d + 2 bytes), mac_pdu_length %d\n",mac_sdu_length,mac_pdu_length); // Calculate number of symbols int startSymbolIndex, nrOfSymbols; @@ -1130,6 +1144,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra long dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; uint8_t N_PRB_DMRS = 0; + + AssertFatal(nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 1 || nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 2, + "nr_mac->schedCtrlCommon->numDmrsCdmGrpsNoData %d is not possible", + nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData); + if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) { N_PRB_DMRS = nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; } @@ -1153,6 +1172,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint16_t *vrb_map = cc[CC_id].vrb_map; do { rbSize++; + LOG_D(NR_MAC,"Calling nr_compute_tbs with N_PRB_DMRS %d, N_DMRS_SLOT %d\n",N_PRB_DMRS,N_DMRS_SLOT); harq->tb_size = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIdx), nr_get_code_rate_dl(mcsIndex, mcsTableIdx), rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index a60685c586..1b2f60625b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -243,6 +243,7 @@ void schedule_control_sib1(module_id_t module_id, uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map; if (gNB_mac->sched_ctrlCommon == NULL){ + LOG_D(NR_MAC,"schedule_control_common: Filling nr_mac->sched_ctrlCommon\n"); gNB_mac->sched_ctrlCommon = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon)); gNB_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->search_space)); gNB_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->coreset)); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 1a330da02c..db7735af7f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -522,8 +522,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, } else { - LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received\n"); - LOG_I(NR_MAC,"[RAPROC] Received Msg3:\n"); + LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received (sdu_lenP %d)\n",sdu_lenP); + LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); for (int k = 0; k < sdu_lenP; k++) { LOG_I(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); } From b067406097781d543f260e42479d5d317532bdd7 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 18 Mar 2021 18:49:16 +0000 Subject: [PATCH 57/94] Fix msg1-FrequencyStart in config files for SA --- .../GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 2 +- .../GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index dd18cf624e..0bd9861ad9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -104,7 +104,7 @@ gNBs = #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; + prach_msg1_FrequencyStart = 27; zeroCorrelationZoneConfig = 13; preambleReceivedTargetPower = -96; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 001e5b917a..9a666d4c6b 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -104,7 +104,7 @@ gNBs = #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 0; + prach_msg1_FrequencyStart = 27; zeroCorrelationZoneConfig = 13; preambleReceivedTargetPower = -96; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) From e82915c4b1c4b198821394544ce95d53f4df5b71 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Mon, 22 Mar 2021 15:28:15 +0100 Subject: [PATCH 58/94] Revert "Fix msg1-FrequencyStart in config files for SA" This reverts commit b067406097781d543f260e42479d5d317532bdd7 --- .../GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 2 +- .../GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 0bd9861ad9..dd18cf624e 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -104,7 +104,7 @@ gNBs = #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 27; + prach_msg1_FrequencyStart = 0; zeroCorrelationZoneConfig = 13; preambleReceivedTargetPower = -96; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 9a666d4c6b..001e5b917a 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -104,7 +104,7 @@ gNBs = #prach_msg1_FDM #0 = one, 1=two, 2=four, 3=eight prach_msg1_FDM = 0; - prach_msg1_FrequencyStart = 27; + prach_msg1_FrequencyStart = 0; zeroCorrelationZoneConfig = 13; preambleReceivedTargetPower = -96; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) From b6513faa82b36f70b11e316d65ad3c1ec115ba13 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 22 Mar 2021 20:07:14 +0000 Subject: [PATCH 59/94] Fix PRACH msg1-FrequencyStart/k1 --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 42 +++++++++++-------------- openair1/PHY/NR_UE_TRANSPORT/nr_prach.c | 31 +++++++++--------- openair2/LAYER2/NR_MAC_UE/config_ue.c | 8 +++-- openair2/LAYER2/NR_MAC_gNB/config.c | 7 +++-- 4 files changed, 43 insertions(+), 45 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index bc9ca0db5e..9577860ab8 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -171,9 +171,6 @@ void rx_nr_prach_ru(RU_t *ru, int16_t *prach[ru->nb_rx]; int prach_sequence_length = ru->config.prach_config.prach_sequence_length.value; - - int msg1_frequencystart = ru->config.prach_config.num_prach_fd_occasions_list[numRA].k1.value; - int sample_offset_slot = (prachStartSymbol==0?0:fp->ofdm_symbol_size*prachStartSymbol+fp->nb_prefix_samples0+fp->nb_prefix_samples*(prachStartSymbol-1)); //to be checked for mu=0; @@ -195,8 +192,7 @@ void rx_nr_prach_ru(RU_t *ru, int16_t *prach2; if (prach_sequence_length == 0) { - LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %d, msg1_frequencyStart %d\n", - ru->idx,frame,slot2,prachFormat,msg1_frequencystart); + LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %d\n", ru->idx,frame,slot2,prachFormat); AssertFatal(prachFormat<4,"Illegal prach format %d for length 839\n",prachFormat); switch (prachFormat) { case 0: @@ -218,8 +214,8 @@ void rx_nr_prach_ru(RU_t *ru, } } else { - LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %s, msg1_frequencyStart %d,startSymbol %d\n", - ru->idx,frame,slot,prachfmt[prachFormat],msg1_frequencystart,prachStartSymbol); + LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %s,startSymbol %d\n", + ru->idx,frame,slot,prachfmt[prachFormat],prachStartSymbol); switch (prachFormat) { case 4: //A1 @@ -284,15 +280,15 @@ void rx_nr_prach_ru(RU_t *ru, K=1; kbar=2; } - int n_ra_prb = msg1_frequencystart; - int k = (12*n_ra_prb) - 6*fp->N_RB_UL; + + int k1 = (int16_t)ru->config.prach_config.num_prach_fd_occasions_list[numRA].k1.value; int N_ZC = (prach_sequence_length==0)?839:139; - if (k<0) k+=(fp->ofdm_symbol_size); - - k*=K; - k+=kbar; + if (k1<0) k1+=(fp->ofdm_symbol_size); + + k1*=K; + k1+=kbar; int reps=1; @@ -653,7 +649,7 @@ void rx_nr_prach_ru(RU_t *ru, int16_t rxsigF_tmp[N_ZC<<1]; // if (k+N_ZC > dftlen) { // PRACH signal is split around DC int16_t *rxsigF2=rxsigF[aa]; - int k2=k<<1; + int k2=k1<<1; for (int j=0;jnum_prach_fd_occasions_list[prach_pdu->num_ra].num_root_sequences.value; NCS = prach_pdu->num_cs;//cfg->num_prach_fd_occasions_list[0].prach_zero_corr_conf.value; int prach_sequence_length = cfg->prach_sequence_length.value; - int msg1_frequencystart = cfg->num_prach_fd_occasions_list[prach_pdu->num_ra].k1.value; // int num_unused_root_sequences = cfg->num_prach_fd_occasions_list[0].num_unused_root_sequences.value; // cfg->num_prach_fd_occasions_list[0].unused_root_sequences_list @@ -734,7 +728,8 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, prach_ifft = gNB->prach_vars.prach_ifft; prachF = gNB->prach_vars.prachF; if (LOG_DEBUGFLAG(PRACH)){ - if ((frame&1023) < 20) LOG_D(PHY,"PRACH (gNB) : running rx_prach for subframe %d, msg1_frequencystart %d, rootSequenceIndex %d\n", subframe,msg1_frequencystart,rootSequenceIndex); + if ((frame&1023) < 20) LOG_D(PHY,"PRACH (gNB) : running rx_prach for subframe %d, rootSequenceIndex %d\n", + subframe, rootSequenceIndex); } start_meas(&gNB->rx_prach); @@ -936,14 +931,13 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, if (LOG_DUMPFLAG(PRACH)) { //int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); // if (en>60) { - int k = (12*n_ra_prb) - 6*fp->N_RB_UL; + int k1 = (int16_t)cfg->num_prach_fd_occasions_list[prach_pdu->num_ra].k1.value; - if (k<0) k+=fp->ofdm_symbol_size; - - k*=12; - k+=13; - k*=2; + if (k1<0) k1+=fp->ofdm_symbol_size; + k1*=12; + k1+=13; + k1*=2; LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1); LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c index 0ba02c6bac..8c41b23c89 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c @@ -71,7 +71,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ int16_t Ncp = 0, amp, *prach, *prach2, *prachF, *Xu; int32_t Xu_re, Xu_im; - int prach_start, prach_sequence_length, i, prach_len, dftlen, mu, kbar, K, n_ra_prb, k, prachStartSymbol, sample_offset_slot; + int prach_start, prach_sequence_length, i, prach_len, dftlen, mu, kbar, K, k1, prachStartSymbol, sample_offset_slot; //int restricted_Type; prach = prach_tmp; @@ -83,7 +83,6 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ mu = nrUE_config->prach_config.prach_sub_c_spacing; restricted_set = prach_pdu->restricted_set; rootSequenceIndex = prach_pdu->root_seq_id; - n_ra_prb = prach_pdu->freq_msg1; NCS = prach_pdu->num_cs; prach_fmt_id = prach_pdu->prach_format; preamble_index = prach_resources->ra_PreambleIndex; @@ -93,7 +92,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ first_nonzero_root_idx = 0; kbar = 1; K = 24; - k = 12*n_ra_prb - 6*fp->N_RB_UL; + k1 = (int16_t)prach_pdu->freq_msg1; prachStartSymbol = prach_pdu->prach_start_symbol; //restricted_Type = 0; @@ -185,7 +184,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ // now generate PRACH signal #ifdef NR_PRACH_DEBUG if (NCS>0) - LOG_I(PHY, "PRACH [UE %d] generate PRACH in slot %d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %d msg1 frequency start %d\n", + LOG_I(PHY, "PRACH [UE %d] generate PRACH in slot %d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %dn", Mod_id, slot, rootSequenceIndex, @@ -194,8 +193,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ NCS, N_ZC, preamble_offset, - preamble_shift, - n_ra_prb); + preamble_shift); #endif // nsymb = (frame_parms->Ncp==0) ? 14:12; @@ -209,17 +207,16 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ kbar = 2; } - if (k<0) - k += fp->ofdm_symbol_size; + if (k1<0) + k1 += fp->ofdm_symbol_size; - k *= K; - k += kbar; - k *= 2; + k1 *= K; + k1 += kbar; + k1 *= 2; - LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d, preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id, + LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id, slot, - k, - n_ra_prb, + k1, preamble_offset, first_nonzero_root_idx); @@ -344,10 +341,10 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ Xu_re = (((int32_t)Xu[offset<<1]*amp)>>15); Xu_im = (((int32_t)Xu[1+(offset<<1)]*amp)>>15); - prachF[k++]= ((Xu_re*nr_ru[offset2<<1]) - (Xu_im*nr_ru[1+(offset2<<1)]))>>15; - prachF[k++]= ((Xu_im*nr_ru[offset2<<1]) + (Xu_re*nr_ru[1+(offset2<<1)]))>>15; + prachF[k1++]= ((Xu_re*nr_ru[offset2<<1]) - (Xu_im*nr_ru[1+(offset2<<1)]))>>15; + prachF[k1++]= ((Xu_im*nr_ru[offset2<<1]) + (Xu_re*nr_ru[1+(offset2<<1)]))>>15; - if (k==dftlen) k=0; + if (k1==dftlen) k1=0; } #if defined (PRACH_WRITE_OUTPUT_DEBUG) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index c45430bb45..361113b179 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -31,6 +31,7 @@ */ //#include "mac_defs.h" +#include #include "NR_MAC_UE/mac_proto.h" #include "NR_MAC-CellGroupConfig.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" @@ -309,8 +310,11 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139; else cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; - - cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart; + cfg->prach_config.num_prach_fd_occasions_list[i].k1 = + (NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + + (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i))*12 - + 6*scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup, nb_preambles, mac->frame_type, frequency_range); //cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ??? diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 2e661dfb73..d27531427f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -208,8 +208,11 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index.tl.tag = NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG; cfg->num_tlv++; - cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB( cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); -//k1= msg1_FrequencyStart + 12 (no. of FDM)(RB for PRACH occasion); + cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = + (NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + + (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i))*12 - + 6*scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; cfg->prach_config.num_prach_fd_occasions_list[i].k1.tl.tag = NFAPI_NR_CONFIG_K1_TAG; cfg->num_tlv++; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; From 7c2591f31875fe1b3a9f8a9a8a5c9ecd6e827be5 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Tue, 23 Mar 2021 16:04:01 +0100 Subject: [PATCH 60/94] Revert "Fix PRACH msg1-FrequencyStart/k1" This reverts commit b6513faa82b36f70b11e316d65ad3c1ec115ba13 --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 42 ++++++++++++++----------- openair1/PHY/NR_UE_TRANSPORT/nr_prach.c | 31 +++++++++--------- openair2/LAYER2/NR_MAC_UE/config_ue.c | 8 ++--- openair2/LAYER2/NR_MAC_gNB/config.c | 7 ++--- 4 files changed, 45 insertions(+), 43 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 9577860ab8..bc9ca0db5e 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -171,6 +171,9 @@ void rx_nr_prach_ru(RU_t *ru, int16_t *prach[ru->nb_rx]; int prach_sequence_length = ru->config.prach_config.prach_sequence_length.value; + + int msg1_frequencystart = ru->config.prach_config.num_prach_fd_occasions_list[numRA].k1.value; + int sample_offset_slot = (prachStartSymbol==0?0:fp->ofdm_symbol_size*prachStartSymbol+fp->nb_prefix_samples0+fp->nb_prefix_samples*(prachStartSymbol-1)); //to be checked for mu=0; @@ -192,7 +195,8 @@ void rx_nr_prach_ru(RU_t *ru, int16_t *prach2; if (prach_sequence_length == 0) { - LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %d\n", ru->idx,frame,slot2,prachFormat); + LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %d, msg1_frequencyStart %d\n", + ru->idx,frame,slot2,prachFormat,msg1_frequencystart); AssertFatal(prachFormat<4,"Illegal prach format %d for length 839\n",prachFormat); switch (prachFormat) { case 0: @@ -214,8 +218,8 @@ void rx_nr_prach_ru(RU_t *ru, } } else { - LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %s,startSymbol %d\n", - ru->idx,frame,slot,prachfmt[prachFormat],prachStartSymbol); + LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %s, msg1_frequencyStart %d,startSymbol %d\n", + ru->idx,frame,slot,prachfmt[prachFormat],msg1_frequencystart,prachStartSymbol); switch (prachFormat) { case 4: //A1 @@ -280,15 +284,15 @@ void rx_nr_prach_ru(RU_t *ru, K=1; kbar=2; } - - int k1 = (int16_t)ru->config.prach_config.num_prach_fd_occasions_list[numRA].k1.value; + int n_ra_prb = msg1_frequencystart; + int k = (12*n_ra_prb) - 6*fp->N_RB_UL; int N_ZC = (prach_sequence_length==0)?839:139; - if (k1<0) k1+=(fp->ofdm_symbol_size); - - k1*=K; - k1+=kbar; + if (k<0) k+=(fp->ofdm_symbol_size); + + k*=K; + k+=kbar; int reps=1; @@ -649,7 +653,7 @@ void rx_nr_prach_ru(RU_t *ru, int16_t rxsigF_tmp[N_ZC<<1]; // if (k+N_ZC > dftlen) { // PRACH signal is split around DC int16_t *rxsigF2=rxsigF[aa]; - int k2=k1<<1; + int k2=k<<1; for (int j=0;jnum_prach_fd_occasions_list[prach_pdu->num_ra].num_root_sequences.value; NCS = prach_pdu->num_cs;//cfg->num_prach_fd_occasions_list[0].prach_zero_corr_conf.value; int prach_sequence_length = cfg->prach_sequence_length.value; + int msg1_frequencystart = cfg->num_prach_fd_occasions_list[prach_pdu->num_ra].k1.value; // int num_unused_root_sequences = cfg->num_prach_fd_occasions_list[0].num_unused_root_sequences.value; // cfg->num_prach_fd_occasions_list[0].unused_root_sequences_list @@ -728,8 +734,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, prach_ifft = gNB->prach_vars.prach_ifft; prachF = gNB->prach_vars.prachF; if (LOG_DEBUGFLAG(PRACH)){ - if ((frame&1023) < 20) LOG_D(PHY,"PRACH (gNB) : running rx_prach for subframe %d, rootSequenceIndex %d\n", - subframe, rootSequenceIndex); + if ((frame&1023) < 20) LOG_D(PHY,"PRACH (gNB) : running rx_prach for subframe %d, msg1_frequencystart %d, rootSequenceIndex %d\n", subframe,msg1_frequencystart,rootSequenceIndex); } start_meas(&gNB->rx_prach); @@ -931,13 +936,14 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, if (LOG_DUMPFLAG(PRACH)) { //int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840)); // if (en>60) { - int k1 = (int16_t)cfg->num_prach_fd_occasions_list[prach_pdu->num_ra].k1.value; + int k = (12*n_ra_prb) - 6*fp->N_RB_UL; - if (k1<0) k1+=fp->ofdm_symbol_size; + if (k<0) k+=fp->ofdm_symbol_size; + + k*=12; + k+=13; + k*=2; - k1*=12; - k1+=13; - k1*=2; LOG_M("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1); LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c index 8c41b23c89..0ba02c6bac 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c @@ -71,7 +71,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ int16_t Ncp = 0, amp, *prach, *prach2, *prachF, *Xu; int32_t Xu_re, Xu_im; - int prach_start, prach_sequence_length, i, prach_len, dftlen, mu, kbar, K, k1, prachStartSymbol, sample_offset_slot; + int prach_start, prach_sequence_length, i, prach_len, dftlen, mu, kbar, K, n_ra_prb, k, prachStartSymbol, sample_offset_slot; //int restricted_Type; prach = prach_tmp; @@ -83,6 +83,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ mu = nrUE_config->prach_config.prach_sub_c_spacing; restricted_set = prach_pdu->restricted_set; rootSequenceIndex = prach_pdu->root_seq_id; + n_ra_prb = prach_pdu->freq_msg1; NCS = prach_pdu->num_cs; prach_fmt_id = prach_pdu->prach_format; preamble_index = prach_resources->ra_PreambleIndex; @@ -92,7 +93,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ first_nonzero_root_idx = 0; kbar = 1; K = 24; - k1 = (int16_t)prach_pdu->freq_msg1; + k = 12*n_ra_prb - 6*fp->N_RB_UL; prachStartSymbol = prach_pdu->prach_start_symbol; //restricted_Type = 0; @@ -184,7 +185,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ // now generate PRACH signal #ifdef NR_PRACH_DEBUG if (NCS>0) - LOG_I(PHY, "PRACH [UE %d] generate PRACH in slot %d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %dn", + LOG_I(PHY, "PRACH [UE %d] generate PRACH in slot %d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %d msg1 frequency start %d\n", Mod_id, slot, rootSequenceIndex, @@ -193,7 +194,8 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ NCS, N_ZC, preamble_offset, - preamble_shift); + preamble_shift, + n_ra_prb); #endif // nsymb = (frame_parms->Ncp==0) ? 14:12; @@ -207,16 +209,17 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ kbar = 2; } - if (k1<0) - k1 += fp->ofdm_symbol_size; + if (k<0) + k += fp->ofdm_symbol_size; - k1 *= K; - k1 += kbar; - k1 *= 2; + k *= K; + k += kbar; + k *= 2; - LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id, + LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d, preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id, slot, - k1, + k, + n_ra_prb, preamble_offset, first_nonzero_root_idx); @@ -341,10 +344,10 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ Xu_re = (((int32_t)Xu[offset<<1]*amp)>>15); Xu_im = (((int32_t)Xu[1+(offset<<1)]*amp)>>15); - prachF[k1++]= ((Xu_re*nr_ru[offset2<<1]) - (Xu_im*nr_ru[1+(offset2<<1)]))>>15; - prachF[k1++]= ((Xu_im*nr_ru[offset2<<1]) + (Xu_re*nr_ru[1+(offset2<<1)]))>>15; + prachF[k++]= ((Xu_re*nr_ru[offset2<<1]) - (Xu_im*nr_ru[1+(offset2<<1)]))>>15; + prachF[k++]= ((Xu_im*nr_ru[offset2<<1]) + (Xu_re*nr_ru[1+(offset2<<1)]))>>15; - if (k1==dftlen) k1=0; + if (k==dftlen) k=0; } #if defined (PRACH_WRITE_OUTPUT_DEBUG) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 361113b179..c45430bb45 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -31,7 +31,6 @@ */ //#include "mac_defs.h" -#include #include "NR_MAC_UE/mac_proto.h" #include "NR_MAC-CellGroupConfig.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" @@ -310,11 +309,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139; else cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; - cfg->prach_config.num_prach_fd_occasions_list[i].k1 = - (NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + - scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + - (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i))*12 - - 6*scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; + + cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup, nb_preambles, mac->frame_type, frequency_range); //cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ??? diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index d27531427f..2e661dfb73 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -208,11 +208,8 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index.tl.tag = NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG; cfg->num_tlv++; - cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = - (NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + - scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + - (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i))*12 - - 6*scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; + cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB( cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); +//k1= msg1_FrequencyStart + 12 (no. of FDM)(RB for PRACH occasion); cfg->prach_config.num_prach_fd_occasions_list[i].k1.tl.tag = NFAPI_NR_CONFIG_K1_TAG; cfg->num_tlv++; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; From 8c13604d619138ca4c3796a8aa6cf184dcd7b800 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 23 Mar 2021 15:22:36 +0000 Subject: [PATCH 61/94] Fix PRACH with k1 = msg1-FrequencyStart + initialUplinkBWPStart --- openair2/LAYER2/NR_MAC_UE/config_ue.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/config.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index c45430bb45..4d4dd45415 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -31,6 +31,7 @@ */ //#include "mac_defs.h" +#include #include "NR_MAC_UE/mac_proto.h" #include "NR_MAC-CellGroupConfig.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" @@ -310,7 +311,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, else cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; - cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart; + cfg->prach_config.num_prach_fd_occasions_list[i].k1 = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup, nb_preambles, mac->frame_type, frequency_range); //cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ??? diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 2e661dfb73..1524fa71ec 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -208,7 +208,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index.tl.tag = NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG; cfg->num_tlv++; - cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB( cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); + cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB( cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); //k1= msg1_FrequencyStart + 12 (no. of FDM)(RB for PRACH occasion); cfg->prach_config.num_prach_fd_occasions_list[i].k1.tl.tag = NFAPI_NR_CONFIG_K1_TAG; cfg->num_tlv++; From ee047b88e99c8dccaa438a612f3d21744f8c7fb4 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 23 Mar 2021 17:59:31 +0000 Subject: [PATCH 62/94] Remove TC-RNTI at PHY when RA procedure does not succeeded --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 12 +++++++++++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 3 +++ openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 2bf5ab437f..3d7458dedf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1378,7 +1378,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; NR_UE_harq_t *harq = &UE_info->UE_sched_ctrl[UE_id].harq_processes[current_harq_pid]; - LOG_D(MAC, "ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d\n", UE_id, ra->rnti, harq->is_waiting, harq->round, frame, slot, current_harq_pid); + LOG_D(NR_MAC, "ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d\n", UE_id, ra->rnti, harq->is_waiting, harq->round, frame, slot, current_harq_pid); if (harq->is_waiting == 0) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index fa609cddbe..37aeabe07c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1756,12 +1756,22 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti) if (pthread_mutex_lock(&rnti_to_remove_mutex)) exit(1); if (rnti_to_remove_count == 10) exit(1); rnti_to_remove[rnti_to_remove_count] = rnti; - LOG_W(MAC, "to remove in mac rnti_to_remove[%d]=%d\n", rnti_to_remove_count, rnti); + LOG_W(NR_MAC, "to remove in mac rnti_to_remove[%d] = 0x%04x\n", rnti_to_remove_count, rnti); rnti_to_remove_count++; if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1); } } +void nr_mac_remove_ra_rnti_ue(module_id_t mod_id, rnti_t rnti) { + // Hack to remove UE in the phy (following the same procedure as in function mac_remove_nr_ue) + if (pthread_mutex_lock(&rnti_to_remove_mutex)) exit(1); + if (rnti_to_remove_count == 10) exit(1); + rnti_to_remove[rnti_to_remove_count] = rnti; + LOG_W(NR_MAC, "to remove in mac rnti_to_remove[%d] = 0x%04x\n", rnti_to_remove_count, rnti); + rnti_to_remove_count++; + if (pthread_mutex_unlock(&rnti_to_remove_mutex)) exit(1); +} + uint8_t nr_get_tpc(int target, uint8_t cqi, int incr) { // al values passed to this function are x10 diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 83060215e9..fa973844cb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -492,6 +492,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if(no_sig) { LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); + nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); } else { @@ -516,6 +517,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if(ra->cfra) { LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) CFRA procedure succeeded!\n", UE_id, ra->rnti); + nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); free(ra->preambles.preamble_list); UE_info->active[UE_id] = true; @@ -555,6 +557,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, continue; LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); + nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); } } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 78de26b5b9..a7d9bc43b1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -312,6 +312,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *secon void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti); +void nr_mac_remove_ra_rnti_ue(module_id_t mod_id, rnti_t rnti); + int allocate_nr_CCEs(gNB_MAC_INST *nr_mac, NR_BWP_Downlink_t *bwp, NR_ControlResourceSet_t *coreset, From 86f70e27771fd3d4d01e5595580378656878c7af Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 23 Mar 2021 20:13:23 +0000 Subject: [PATCH 63/94] Add RA support for up to NUMBER_OF_NR_ULSCH_MAX UEs --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 3d7458dedf..3816fe0b50 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -577,7 +577,8 @@ void nr_initiate_ra_proc(module_id_t module_idP, LOG_D(MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP); int loop = 0; - if (!ra->cfra) { + // This condition allows for the usage of a preconfigured rnti for the first UE + if (!ra->cfra || ra->rnti == 0) { do { ra->rnti = (taus() % 65518) + 1; loop++; @@ -1385,7 +1386,6 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram if (harq->round == 0) { nr_clear_ra_proc(module_id, CC_id, frame, ra); - free(ra->preambles.preamble_list); UE_info->active[UE_id] = true; LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index fa973844cb..4bbe031742 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -519,7 +519,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) CFRA procedure succeeded!\n", UE_id, ra->rnti); nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); - free(ra->preambles.preamble_list); UE_info->active[UE_id] = true; } else { From feb2b9c8bbb8de5ab0f7dab520936e4b7f2730b1 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Wed, 24 Mar 2021 10:24:24 +0100 Subject: [PATCH 64/94] adding rxdataF signal to debug output --- openair1/SIMULATION/NR_PHY/prachsim.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 4c70f24dd9..01b7356f37 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -177,7 +177,7 @@ int main(int argc, char **argv){ double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0; double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs, bw; - int i, aa, aarx, **txdata, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1; + int i, l, aa, aarx, **txdata, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1; int N_RB_UL = 106, delay = 0, NCS_config = 13, rootSequenceIndex = 1, threequarter_fs = 0, mu = 1, fd_occasion = 0, loglvl = OAILOG_INFO, numRA = 0, prachStartSymbol = 0; uint8_t snr1set = 0, ue_speed1set = 0, transmission_mode = 1, n_tx = 1, n_rx = 1, awgn_flag = 0, msg1_frequencystart = 0, num_prach_fd_occasions = 1, prach_format=0; uint8_t frame = 1, slot=19, slot_gNB=19, config_index = 98, prach_sequence_length = 1, restrictedSetConfig = 0, N_dur, N_t_slot, start_symbol; @@ -808,7 +808,18 @@ int main(int argc, char **argv){ } } - + for (l = 0; l < frame_parms->symbols_per_slot; l++) { + for (aa = 0; aa < frame_parms->nb_antennas_rx; aa++) { + nr_slot_fep_ul(frame_parms, + ru->common.rxdata[aa], + ru->common.rxdataF[aa], + l, + slot, + ru->N_TA_offset, + 0); + } + } + rx_nr_prach_ru(ru, prach_format, numRA, prachStartSymbol, prachOccasion, frame, slot); gNB->prach_vars.rxsigF = ru->prach_rxsigF[prachOccasion]; @@ -831,7 +842,8 @@ int main(int argc, char **argv){ LOG_M("prachF0.m","prachF0", &gNB->prach_vars.prachF[0], N_ZC, 1, 1); LOG_M("rxsig0.m","rxs0", &gNB->common_vars.rxdata[0][subframe*frame_parms->samples_per_subframe], frame_parms->samples_per_subframe, 1, 1); LOG_M("ru_rxsig0.m","rxs0", &ru->common.rxdata[0][subframe*frame_parms->samples_per_subframe], frame_parms->samples_per_subframe, 1, 1); - LOG_M("ru_rxsigF0.m","rxsF0", ru->prach_rxsigF[0][0], N_ZC, 1, 1); + LOG_M("ru_rxsigF0.m","rxsF0", ru->common.rxdataF[0], frame_parms->ofdm_symbol_size*frame_parms->symbols_per_slot, 1, 1); + LOG_M("ru_prach_rxsigF0.m","rxsF0", ru->prach_rxsigF[0][0], N_ZC, 1, 1); LOG_M("prach_preamble.m","prachp", &gNB->X_u[0], N_ZC, 1, 1); LOG_M("ue_prach_preamble.m","prachp", &UE->X_u[0], N_ZC, 1, 1); #endif From 4840b895ddcec84900f94985c3013cbd2db18483 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 24 Mar 2021 10:13:28 +0100 Subject: [PATCH 65/94] adding PRACH signal to T tracer --- common/utils/T/T_defs.h | 4 ++-- common/utils/T/T_messages.txt | 4 ++++ executables/nr-ru.c | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/utils/T/T_defs.h b/common/utils/T/T_defs.h index 11c816f002..efab3e525c 100644 --- a/common/utils/T/T_defs.h +++ b/common/utils/T/T_defs.h @@ -42,9 +42,9 @@ /* maximum size of a message - increase if needed */ #if BASIC_SIMULATOR /* let's have 100 RBs functional for the basic simulator */ -# define T_BUFFER_MAX (1024*64*2) +# define T_BUFFER_MAX (1024*64*4) #else -# define T_BUFFER_MAX (1024*64*2) +# define T_BUFFER_MAX (1024*64*4) #endif /* size of the local cache for messages (must be pow(2,something)) */ diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index fedc50cf5d..2f52487c88 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -93,6 +93,10 @@ ID = GNB_PHY_PUCCH_PUSCH_IQ DESC = gNodeB input data in the frequency domain for a slot where some PUCCH or PUSCH detection was done GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB FORMAT = int,frame : int,slot : buffer,rxdataF +ID = GNB_PHY_PRACH_INPUT_SIGNAL + DESC = gNodeB input data in the time domain for slots with PRACH detection + GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB + FORMAT = int,frame : int,slot : int,antenna : buffer,rxdata #MAC logs ID = ENB_MAC_UE_DL_SDU diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 0e6c8f2818..9086de6866 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1343,6 +1343,10 @@ void *ru_thread( void *param ) { int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST); uint8_t prachStartSymbol,N_dur; if (prach_id>=0) { + + T(T_GNB_PHY_PRACH_INPUT_SIGNAL, T_INT(proc->frame_rx), T_INT(proc->tti_rx), T_INT(0), + T_BUFFER(&ru->common.rxdata[0][fp->get_samples_slot_timestamp(proc->tti_rx-1,fp,0)]/*-ru->N_TA_offset*/, fp->get_samples_per_slot(proc->tti_rx,fp)*4*2)); + N_dur = get_nr_prach_duration(ru->prach_list[prach_id].fmt); /* get_nr_prach_info_from_index(ru->config.prach_config.prach_ConfigurationIndex.value, From e84d1fe678d6389d05cb4de730494cba541e0b83 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 24 Mar 2021 16:07:11 +0100 Subject: [PATCH 66/94] adding UL LCID 52 for CCCH with 48 bits --- openair2/LAYER2/NR_MAC_COMMON/nr_mac.h | 3 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h index fa4d8d48ea..6b9060801d 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h @@ -334,11 +334,12 @@ typedef struct { #define DL_SCH_LCID_CON_RES_ID 0x3E #define DL_SCH_LCID_PADDING 0x3F -#define UL_SCH_LCID_CCCH 0x00 +#define UL_SCH_LCID_CCCH1 0x00 #define UL_SCH_LCID_SRB1 0x01 #define UL_SCH_LCID_SRB2 0x02 #define UL_SCH_LCID_SRB3 0x03 #define UL_SCH_LCID_DTCH 0x04 +#define UL_SCH_LCID_CCCH 0x34 #define UL_SCH_LCID_RECOMMENDED_BITRATE_QUERY 0x35 #define UL_SCH_LCID_MULTI_ENTRY_PHR_4_OCT 0x36 #define UL_SCH_LCID_CONFIGURED_GRANT_CONFIRMATION 0x37 diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 4bbe031742..c6a741cce9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -238,6 +238,7 @@ void nr_process_mac_pdu( // todo break; case UL_SCH_LCID_CCCH: + case UL_SCH_LCID_CCCH1: mac_subheader_len = 1; nr_mac_rrc_data_ind(module_idP, CC_id, From 39868c400a18264c9acba4fb190a009f7d0517aa Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 24 Mar 2021 16:07:53 +0100 Subject: [PATCH 67/94] adding format_indicator to dci_payload of msg3 --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 3816fe0b50..b16cd600c2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1294,6 +1294,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->BWPSize); + dci_payload.format_indicator = 1; dci_payload.time_domain_assignment.val = time_domain_assignment; dci_payload.vrb_to_prb_mapping.val = 0; dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; From 114508c120bb37ac4aee85c92a4b934e0d095ae2 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 24 Mar 2021 16:17:48 +0000 Subject: [PATCH 68/94] Minor fix in nr_prachsim --- openair1/SIMULATION/NR_PHY/prachsim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 01b7356f37..fb5cdfa7d4 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -37,6 +37,7 @@ #include "SCHED_NR_UE/phy_frame_config_nr.h" #include "PHY/phy_vars_nr_ue.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h" +#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/modulation_UE.h" #include "PHY/INIT/phy_init.h" @@ -815,8 +816,7 @@ int main(int argc, char **argv){ ru->common.rxdataF[aa], l, slot, - ru->N_TA_offset, - 0); + ru->N_TA_offset); } } From 8800789b0a74b57687e65f7d5553a3fc0d35bba6 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 25 Mar 2021 15:15:03 +0000 Subject: [PATCH 69/94] Fix preamble detection for NSA --- openair2/LAYER2/NR_MAC_UE/config_ue.c | 8 ++++++-- openair2/LAYER2/NR_MAC_gNB/config.c | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 4d4dd45415..79e6eca300 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -35,6 +35,7 @@ #include "NR_MAC_UE/mac_proto.h" #include "NR_MAC-CellGroupConfig.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" +#include "executables/softmodem-common.h" int set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg, int mu, @@ -310,8 +311,11 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139; else cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; - - cfg->prach_config.num_prach_fd_occasions_list[i].k1 = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); + if (get_softmodem_params()->sa) { + cfg->prach_config.num_prach_fd_occasions_list[i].k1 = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); + } else { + cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); + } cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup, nb_preambles, mac->frame_type, frequency_range); //cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ??? diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 1524fa71ec..77a20a63c8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -209,7 +209,11 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index.tl.tag = NFAPI_NR_CONFIG_PRACH_ROOT_SEQUENCE_INDEX_TAG; cfg->num_tlv++; cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB( cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); -//k1= msg1_FrequencyStart + 12 (no. of FDM)(RB for PRACH occasion); + if (get_softmodem_params()->sa) { + cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB( cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); + } else { + cfg->prach_config.num_prach_fd_occasions_list[i].k1.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart + (get_N_RA_RB( cfg->prach_config.prach_sub_c_spacing.value, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing ) * i); + } cfg->prach_config.num_prach_fd_occasions_list[i].k1.tl.tag = NFAPI_NR_CONFIG_K1_TAG; cfg->num_tlv++; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; From 7c90e58d3954d33442ab667fa6729546747fbd2d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 25 Mar 2021 17:37:03 +0000 Subject: [PATCH 70/94] Fix BWP selection for NSA mode --- .../NR_MAC_UE/nr_ue_dci_configuration.c | 12 +++++++++-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 10 +++++++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 21 ++++++++++++++----- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index f3b4acc9bd..206788598f 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -148,7 +148,11 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t monitoringSymbolsWithinSlot = (ss->monitoringSymbolsWithinSlot->buf[0]<<(sps-8)) | (ss->monitoringSymbolsWithinSlot->buf[1]>>(16-sps)); rel15->rnti = ra->ra_rnti; rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + if (get_softmodem_params()->sa) { + rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } else { // NSA mode is not using the Initial BWP + rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing; rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_RA, rel15->BWPSize, bwp_id); break; @@ -260,7 +264,11 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl LOG_D(NR_MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space (RA-Msg2)\n"); rel15->num_dci_options = 1; rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; - config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, -1); + if (get_softmodem_params()->sa) { + config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, -1); + } else { + config_dci_pdu(mac, rel15, dl_config, NR_RNTI_RA, ss_id); + } fill_dci_search_candidates(ss, rel15); break; case WAIT_CONTENTION_RESOLUTION: diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 475d26b61a..6473741076 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -651,8 +651,14 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr if( (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti) || (rnti == ra->t_crnti) ) { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; + if (get_softmodem_params()->sa) { + dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; + } else { // NSA mode is not using the Initial BWP + dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) + pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); + } } else { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index b16cd600c2..2b842dc968 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -849,13 +849,24 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; - NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; - NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; - NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + + long BWPStart = 0; + NR_SearchSpace_t *ss = NULL; + NR_BWP_Downlink_t *bwp = NULL; + NR_ControlResourceSet_t *coreset = NULL; + if (get_softmodem_params()->sa) { + bwp = nr_mac->sched_ctrlCommon->active_bwp; + BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + ss = nr_mac->sched_ctrlCommon->search_space; + coreset = nr_mac->sched_ctrlCommon->coreset; + } else { // NSA mode is not using the Initial BWP + bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; + BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + ss = ra->ra_ss; + coreset = get_coreset(bwp, ss, 0); + } uint16_t *vrb_map = cc[CC_id].vrb_map; for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { From 1af7e716e646c9d37f60b32084a132b29a7af0f4 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 26 Mar 2021 09:46:30 +0000 Subject: [PATCH 71/94] Fix mac sdu len calculation for CCCH and skip invalid CCCH1 messages for being processed --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index c6a741cce9..48204fc394 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -237,9 +237,29 @@ void nr_process_mac_pdu( case UL_SCH_LCID_SRB3: // todo break; + case UL_SCH_LCID_CCCH: case UL_SCH_LCID_CCCH1: + // fixed length mac_subheader_len = 1; + + if ( rx_lcid == UL_SCH_LCID_CCCH1 ) { + // RRCResumeRequest1 message includes the full I-RNTI and has a size of 8 bytes + mac_sdu_len = 8; + + // FIXME: Need to handle properly MAC PDU with all 00's + //[MAC] nr_process_mac_pdu() residual mac pdu length < 0!, pdu_len: -2 + //[MAC] MAC PDU 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + if (pdu_len != 9) { + //LOG_E(MAC, "%s() Invalid CCCH1 message!, pdu_len: %d\n", __func__, pdu_len); + return; + } + + } else { + // fixed length of 6 bytes + mac_sdu_len = 6; + } + nr_mac_rrc_data_ind(module_idP, CC_id, frameP, @@ -248,7 +268,7 @@ void nr_process_mac_pdu( rnti, CCCH, pdu_ptr+mac_subheader_len, - pdu_len-mac_subheader_len, + mac_sdu_len, 0); break; From 774b8d9a9f994ae03c869ed4af90e4769ed1a207 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 26 Mar 2021 16:54:34 +0000 Subject: [PATCH 72/94] Fix TA in CFRA --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 5 ++--- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 13 ++++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 6473741076..cf106184dd 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1816,9 +1816,8 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, // MAC CE case DL_SCH_LCID_CCCH: - // MSG4 RRC Connection Setup 38.331 + // MSG4 RRC Setup 38.331 // variable length - if(((NR_MAC_SUBHEADER_SHORT *)pduP)->F){ mac_sdu_len = ((uint16_t)(((NR_MAC_SUBHEADER_LONG *) pduP)->L1 & 0x7f) << 8) | ((uint16_t)((NR_MAC_SUBHEADER_LONG *) pduP)->L2 & 0xff); @@ -1828,7 +1827,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, mac_subheader_len = 2; } - if ( mac_sdu_len > 0) { + if ( mac_sdu_len > 0 ) { LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_sdu_len); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 48204fc394..8b75abca74 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -247,14 +247,11 @@ void nr_process_mac_pdu( // RRCResumeRequest1 message includes the full I-RNTI and has a size of 8 bytes mac_sdu_len = 8; - // FIXME: Need to handle properly MAC PDU with all 00's - //[MAC] nr_process_mac_pdu() residual mac pdu length < 0!, pdu_len: -2 - //[MAC] MAC PDU 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + // Check if it is a valid CCCH1 message, we get all 00's messages very often if (pdu_len != 9) { //LOG_E(MAC, "%s() Invalid CCCH1 message!, pdu_len: %d\n", __func__, pdu_len); return; } - } else { // fixed length of 6 bytes mac_sdu_len = 6; @@ -525,8 +522,13 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, current_rnti); continue; } + const int UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti, ra->secondaryCellGroup); UE_info->UE_beam_index[UE_id] = ra->beam_id; + + // re-initialize ta update variables after RA procedure completion + UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; + LOG_I(NR_MAC, "[gNB %d][RAPROC] PUSCH with TC-RNTI %x received correctly, " "adding UE MAC Context UE_id %d/RNTI %04x\n", @@ -555,9 +557,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, // First byte corresponds to R/LCID MAC sub-header memcpy(ra->cont_res_id, &sduP[1], sizeof(uint8_t) * 6); - // re-initialize ta update variables afrer RA procedure completion - UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; - nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP); ra->state = Msg4; From 8e89ab002239d34f4b3e0f8eb55c5998ef66822f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 27 Mar 2021 23:46:37 +0000 Subject: [PATCH 73/94] Fix Msg4 Ack at gNB and pdsch_to_harq_feedback_time_ind at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index cf106184dd..de4d51bc0e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -748,7 +748,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/ - dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind = dci->pdsch_to_harq_feedback_timing_indicator.val; + dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind = mac->ULbwp[mac->UL_BWP_Id-1]->bwp_Dedicated->pucch_Config->choice.setup->dl_DataToUL_ACK->list.array[dci->pdsch_to_harq_feedback_timing_indicator.val][0]; LOG_D(MAC,"(nr_ue_procedures.c) rnti = %x dl_config->number_pdus = %d\n", dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti, @@ -1334,7 +1334,7 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, } //end else break; - + case NR_RNTI_P: /* // Short Messages Indicator  E2 bits diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 2b842dc968..73919447f5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1096,7 +1096,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1; int UE_id = find_nr_UE_id(module_idP, ra->rnti); NR_UE_info_t *UE_info = &nr_mac->UE_info; @@ -1105,10 +1104,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - int nr_mix_slots = tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0; - int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots; - int first_ul_slot_tdd = tdd->nrofDownlinkSlots + nr_slots_period * (slotP / nr_slots_period); - // HARQ management int8_t current_harq_pid = sched_ctrl->dl_harq_pid; if (current_harq_pid < 0) { @@ -1125,9 +1120,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra DevAssert(!harq->is_waiting); add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid); harq->is_waiting = true; - harq->feedback_slot = first_ul_slot_tdd; ra->harq_pid = current_harq_pid; + nr_acknack_scheduling(module_idP, UE_id, frameP, slotP); + harq->feedback_slot = sched_ctrl->sched_pucch->ul_slot; + // Bytes to be transmitted uint8_t *buf = (uint8_t *) harq->tb; uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, buf, 255, ra->cont_res_id); @@ -1397,9 +1394,9 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram { if (harq->round == 0) { + LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti); nr_clear_ra_proc(module_id, CC_id, frame, ra); UE_info->active[UE_id] = true; - LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti); } else { From 86d252ef92b53140fa0c46ba7aaa43ef14c58a91 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Sun, 28 Mar 2021 11:35:15 +0100 Subject: [PATCH 74/94] Revert LOG to pass CI tests for RA --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 8b75abca74..c0c04cbad1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -529,6 +529,11 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, // re-initialize ta update variables after RA procedure completion UE_info->UE_sched_ctrl[UE_id].ta_frame = frameP; + LOG_I(NR_MAC, + "reset RA state information for RA-RNTI %04x/index %d\n", + ra->rnti, + i); + LOG_I(NR_MAC, "[gNB %d][RAPROC] PUSCH with TC-RNTI %x received correctly, " "adding UE MAC Context UE_id %d/RNTI %04x\n", From 1b427efaa13fb243e83e99799e09ea7af6fd95d5 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 29 Mar 2021 15:42:03 +0100 Subject: [PATCH 75/94] Revert LOG to pass CI tests for RA --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index c0c04cbad1..9f8cea9594 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -535,7 +535,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, i); LOG_I(NR_MAC, - "[gNB %d][RAPROC] PUSCH with TC-RNTI %x received correctly, " + "[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly, " "adding UE MAC Context UE_id %d/RNTI %04x\n", gnb_mod_idP, current_rnti, From 80941b0c311905954c8f6818017df277cbbe537c Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 29 Mar 2021 16:43:55 +0100 Subject: [PATCH 76/94] Minor LOG improvements --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 29 +++++++++---------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 3 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 8 ++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index a0ed18e135..f647a8585b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2372,7 +2372,7 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t rnti = mac->crnti; } - // FIXME: To be removed +#ifdef DEBUG_RAR LOG_I(NR_MAC, "rarh->E = 0x%x\n", rarh->E); LOG_I(NR_MAC, "rarh->T = 0x%x\n", rarh->T); LOG_I(NR_MAC, "rarh->RAPID = 0x%x (%i)\n", rarh->RAPID, rarh->RAPID); @@ -2390,20 +2390,19 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t LOG_I(NR_MAC, "rar->TCRNTI_1 = 0x%x\n", rar->TCRNTI_1); LOG_I(NR_MAC, "rar->TCRNTI_2 = 0x%x\n", rar->TCRNTI_2); - //#ifdef DEBUG_RAR - LOG_I(NR_MAC, "In %s:[%d.%d]: [UE %d] Received RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d t_crnti %x \n", - __FUNCTION__, - frame, - slot, - mod_id, - rar_grant.Msg3_t_alloc, - rar_grant.Msg3_f_alloc, - ul_time_alignment->ta_command, - rar_grant.mcs, - rar_grant.freq_hopping, - tpc_command, - ra->t_crnti); - //#endif + LOG_I(NR_MAC, "In %s:[%d.%d]: [UE %d] Received RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d t_crnti %x \n", + __FUNCTION__, + frame, + slot, + mod_id, + rar_grant.Msg3_t_alloc, + rar_grant.Msg3_f_alloc, + ul_time_alignment->ta_command, + rar_grant.mcs, + rar_grant.freq_hopping, + tpc_command, + ra->t_crnti); +#endif // Schedule Msg3 ret = nr_ue_pusch_scheduler(mac, is_Msg3, frame, slot, &frame_tx, &slot_tx, rar_grant.Msg3_t_alloc); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 73919447f5..629a644ebc 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1519,7 +1519,7 @@ void nr_fill_rar(uint8_t Mod_idP, rar->UL_GRANT_3 = (uint8_t) (ul_grant >> 8) & 0xff; rar->UL_GRANT_4 = (uint8_t) ul_grant & 0xff; - // FIXME: To be removed +#ifdef DEBUG_RAR //LOG_I(NR_MAC, "rarbi->E = 0x%x\n", rarbi->E); //LOG_I(NR_MAC, "rarbi->T = 0x%x\n", rarbi->T); //LOG_I(NR_MAC, "rarbi->R = 0x%x\n", rarbi->R); @@ -1541,6 +1541,7 @@ void nr_fill_rar(uint8_t Mod_idP, LOG_I(NR_MAC, "rar->TCRNTI_1 = 0x%x\n", rar->TCRNTI_1); LOG_I(NR_MAC, "rar->TCRNTI_2 = 0x%x\n", rar->TCRNTI_2); +#endif int mcs = (unsigned char) (rar->UL_GRANT_4 >> 4); // time alloc diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 98a14e34c8..a69f63365e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -249,7 +249,7 @@ void nr_process_mac_pdu( // Check if it is a valid CCCH1 message, we get all 00's messages very often if (pdu_len != 9) { - //LOG_E(MAC, "%s() Invalid CCCH1 message!, pdu_len: %d\n", __func__, pdu_len); + LOG_D(NR_MAC, "%s() Invalid CCCH1 message!, pdu_len: %d\n", __func__, pdu_len); return; } } else { @@ -517,7 +517,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, // random access pusch with TC-RNTI if (ra->rnti != current_rnti) { LOG_W(NR_MAC, - "expected TC-RNTI %04x to match current RNTI %04x\n", + "expected TC_RNTI %04x to match current RNTI %04x\n", ra->rnti, current_rnti); continue; @@ -554,7 +554,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, LOG_I(NR_MAC,"[RAPROC] RA-Msg3 received (sdu_lenP %d)\n",sdu_lenP); LOG_D(NR_MAC,"[RAPROC] Received Msg3:\n"); for (int k = 0; k < sdu_lenP; k++) { - LOG_I(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); + LOG_D(NR_MAC,"(%i): 0x%x\n",k,sduP[k]); } // UE Contention Resolution Identity @@ -567,7 +567,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ra->state = Msg4; ra->Msg4_frame = ( frameP +2 ) % 1024; ra->Msg4_slot = 1; - LOG_I(MAC, "Scheduling RA-Msg4 for TC-RNTI %04x (state %d, frame %d, slot %d)\n", ra->rnti, ra->state, ra->Msg4_frame, ra->Msg4_slot); + LOG_I(NR_MAC, "Scheduling RA-Msg4 for TC_RNTI %04x (state %d, frame %d, slot %d)\n", ra->rnti, ra->state, ra->Msg4_frame, ra->Msg4_slot); } return; From 56673386dc0d81a5d1b6b7ad2c0c53fd1a6c8bf7 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 29 Mar 2021 16:56:25 +0100 Subject: [PATCH 77/94] Skip invalid MAC CCCH messages for being processed at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index f647a8585b..5a4aa4f409 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1827,6 +1827,12 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, mac_subheader_len = 2; } + // Check if it is a valid CCCH message, we get all 00's messages very often + if ( pdu_len != (mac_subheader_len+mac_sdu_len) ) { + LOG_D(NR_MAC, "%s() Invalid CCCH message!, pdu_len: %d\n", __func__, pdu_len); + return; + } + if ( mac_sdu_len > 0 ) { LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_sdu_len); From feb2651ea76c0e052c8eec86fb6d7c3a28572848 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 30 Mar 2021 12:38:31 +0100 Subject: [PATCH 78/94] Fix issues due to merge --- openair1/PHY/NR_TRANSPORT/nr_dlsch.c | 2 +- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 6 +++--- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 3 ++- openair2/RRC/NR_UE/rrc_UE.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index bb17eae442..2d43fb5aed 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -521,7 +521,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, gNB->common_vars.beam_id[0][slot*frame_parms->symbols_per_slot+j] = rel15->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx; } else { - LOG_W(PHY,"beam index for PDSCH allocation already taken\n"); + LOG_D(PHY,"beam index for PDSCH allocation already taken\n"); } }// dlsch loop diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 17cc006402..b7e543ab1d 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -234,7 +234,7 @@ void ue_ta_procedures(PHY_VARS_NR_UE *ue, int slot_tx, int frame_tx){ ue->timing_advance += (ul_time_alignment->ta_command - 31) * bw_scaling; - LOG_I(PHY, "In %s: [UE %d] [%d.%d] Got timing advance command %u from MAC, new value is %d\n", + LOG_D(PHY, "In %s: [UE %d] [%d.%d] Got timing advance command %u from MAC, new value is %d\n", __FUNCTION__, ue->Mod_id, frame_tx, @@ -1692,9 +1692,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, } if ((frame_rx%64 == 0) && (nr_slot_rx==0)) { - printf("============================================\n"); + LOG_I(PHY,"============================================\n"); LOG_I(PHY,"Harq round stats for Downlink: %d/%d/%d/%d DLSCH errors: %d\n",ue->dl_stats[0],ue->dl_stats[1],ue->dl_stats[2],ue->dl_stats[3],ue->dl_stats[4]); - printf("============================================\n"); + LOG_I(PHY,"============================================\n"); } #ifdef NR_PDCCH_SCHED diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 891dbe274b..bd3417e5e0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -663,7 +663,8 @@ void nr_get_Msg3alloc(module_id_t module_id, NR_BWP_Uplink_t *ubwp, sub_frame_t current_slot, frame_t current_frame, - NR_RA_t *ra) { + NR_RA_t *ra, + int16_t *tdd_beam_association) { // msg3 is schedulend in mixed slot in the following TDD period diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 0d52f218a1..732b44ffe7 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2568,7 +2568,7 @@ void *rrc_nrue_task( void *args_p ) { LOG_E(NR_RRC, "[UE %d] Received unexpected message %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p)); break; } - LOG_I(NR_RRC, "[UE %d] RRC Status %d\n", ue_mod_id, nr_rrc_get_state(ue_mod_id)); + LOG_D(NR_RRC, "[UE %d] RRC Status %d\n", ue_mod_id, nr_rrc_get_state(ue_mod_id)); result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p); AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); msg_p = NULL; From 53f77219d428e2bed3f558c2f87ca9caa6c9ad7d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 31 Mar 2021 14:31:19 +0100 Subject: [PATCH 79/94] Rework default PDSCH time domain resource allocation tables --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 146 ++++++++++++++++++ openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h | 9 ++ openair2/LAYER2/NR_MAC_UE/mac_proto.h | 3 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 101 +++--------- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 29 ++-- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 6 +- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 2 +- .../gnb.sa.band41.fr1.106PRB.usrpb210.conf | 8 +- .../gnb.sa.band78.fr1.106PRB.usrpb210.conf | 8 +- 11 files changed, 208 insertions(+), 108 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index dbd4905aa2..f4051e7a49 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -118,6 +118,152 @@ const float table_38213_13_12_c3[16] = { 1, 0.5f, 1, 0.5f, 1, 0.5f, 0.5f, 0.5f const int32_t table_38213_10_1_1_c2[5] = { 0, 0, 4, 2, 1 }; +// for PDSCH from TS 38.214 subclause 5.1.2.1.1 +const uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[16][3]={ + {0,2,12}, // row index 1 + {0,2,10}, // row index 2 + {0,2,9}, // row index 3 + {0,2,7}, // row index 4 + {0,2,5}, // row index 5 + {0,9,4}, // row index 6 + {0,4,4}, // row index 7 + {0,5,7}, // row index 8 + {0,5,2}, // row index 9 + {0,9,2}, // row index 10 + {0,12,2}, // row index 11 + {0,1,13}, // row index 12 + {0,1,6}, // row index 13 + {0,2,4}, // row index 14 + {0,4,7}, // row index 15 + {0,8,4} // row index 16 +}; +const uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[16][3]={ + {0,3,11}, // row index 1 + {0,3,9}, // row index 2 + {0,3,8}, // row index 3 + {0,3,6}, // row index 4 + {0,3,4}, // row index 5 + {0,10,4}, // row index 6 + {0,6,4}, // row index 7 + {0,5,7}, // row index 8 + {0,5,2}, // row index 9 + {0,9,2}, // row index 10 + {0,12,2}, // row index 11 + {0,1,13}, // row index 12 + {0,1,6}, // row index 13 + {0,2,4}, // row index 14 + {0,4,7}, // row index 15 + {0,8,4} // row index 16 +}; +const uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos2[16][3]={ + {0,2,6}, // row index 1 + {0,2,10}, // row index 2 + {0,2,9}, // row index 3 + {0,2,7}, // row index 4 + {0,2,5}, // row index 5 + {0,6,4}, // row index 6 + {0,4,4}, // row index 7 + {0,5,6}, // row index 8 + {0,5,2}, // row index 9 + {0,9,2}, // row index 10 + {0,10,2}, // row index 11 + {0,1,11}, // row index 12 + {0,1,6}, // row index 13 + {0,2,4}, // row index 14 + {0,4,6}, // row index 15 + {0,8,4} // row index 16 +}; +const uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos3[16][3]={ + {0,3,5}, // row index 1 + {0,3,9}, // row index 2 + {0,3,8}, // row index 3 + {0,3,6}, // row index 4 + {0,3,4}, // row index 5 + {0,8,2}, // row index 6 + {0,6,4}, // row index 7 + {0,5,6}, // row index 8 + {0,5,2}, // row index 9 + {0,9,2}, // row index 10 + {0,10,2}, // row index 11 + {0,1,11}, // row index 12 + {0,1,6}, // row index 13 + {0,2,4}, // row index 14 + {0,4,6}, // row index 15 + {0,8,4} // row index 16 +}; +const uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos2[16][3]={ + {0,2,2}, // row index 1 + {0,4,2}, // row index 2 + {0,6,2}, // row index 3 + {0,8,2}, // row index 4 + {0,10,2}, // row index 5 + {1,2,2}, // row index 6 + {1,4,2}, // row index 7 + {0,2,4}, // row index 8 + {0,4,4}, // row index 9 + {0,6,4}, // row index 10 + {0,8,4}, // row index 11 + {0,10,4}, // row index 12 + {0,2,7}, // row index 13 + {0,2,12}, // row index 14 + {1,2,4}, // row index 15 + {0,0,0} // row index 16 +}; +const uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos3[16][3]={ + {0,2,2}, // row index 1 + {0,4,2}, // row index 2 + {0,6,2}, // row index 3 + {0,8,2}, // row index 4 + {0,10,2}, // row index 5 + {1,2,2}, // row index 6 + {1,4,2}, // row index 7 + {0,2,4}, // row index 8 + {0,4,4}, // row index 9 + {0,6,4}, // row index 10 + {0,8,4}, // row index 11 + {0,10,4}, // row index 12 + {0,2,7}, // row index 13 + {0,3,11}, // row index 14 + {1,2,4}, // row index 15 + {0,0,0} // row index 16 +}; +const uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos2[16][3]={ + {0,2,2}, // row index 1 + {0,4,2}, // row index 2 + {0,6,2}, // row index 3 + {0,8,2}, // row index 4 + {0,10,2}, // row index 5 + {0,0,0}, // row index 6 + {0,0,0}, // row index 7 + {0,2,4}, // row index 8 + {0,4,4}, // row index 9 + {0,6,4}, // row index 10 + {0,8,4}, // row index 11 + {0,10,4}, // row index 12 + {0,2,7}, // row index 13 + {0,2,12}, // row index 14 + {0,0,6}, // row index 15 + {0,2,6} // row index 16 +}; +const uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos3[16][3]={ + {0,2,2}, // row index 1 + {0,4,2}, // row index 2 + {0,6,2}, // row index 3 + {0,8,2}, // row index 4 + {0,10,2}, // row index 5 + {0,0,0}, // row index 6 + {0,0,0}, // row index 7 + {0,2,4}, // row index 8 + {0,4,4}, // row index 9 + {0,6,4}, // row index 10 + {0,8,4}, // row index 11 + {0,10,4}, // row index 12 + {0,2,7}, // row index 13 + {0,3,11}, // row index 14 + {0,0,6}, // row index 15 + {0,2,6} // row index 16 +}; + const char *prachfmt[]={"0","1","2","3", "A1","A2","A3","B1","B4","C0","C2","A1/B1","A2/B2","A3/B3"}; const char *duplex_mode[]={"FDD","TDD"}; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h index 8f7a726bb8..1e0ab98d4c 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h @@ -139,4 +139,13 @@ extern const float table_38213_13_12_c3[16]; extern const int32_t table_38213_10_1_1_c2[5]; +extern const uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[16][3]; +extern const uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[16][3]; +extern const uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos2[16][3]; +extern const uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP_dmrs_typeA_pos3[16][3]; +extern const uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos2[16][3]; +extern const uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B_dmrs_typeA_pos3[16][3]; +extern const uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos2[16][3]; +extern const uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C_dmrs_typeA_pos3[16][3]; + #endif //DEF_H diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index 14d1ea63fb..394ab58fc7 100755 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -178,7 +178,8 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu, - uint8_t time_domain_ind); + uint8_t time_domain_ind, + bool use_default); uint8_t nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 5803b23e8c..79878d59a4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -237,85 +237,15 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment(nfapi_nr_ue_pusch_pdu_t *p int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu, - uint8_t time_domain_ind - ){ + uint8_t time_domain_ind, + bool use_default){ + int dmrs_typeA_pos = mac->scc->dmrs_TypeA_Position; // uint8_t k_offset=0; uint8_t sliv_S=0; uint8_t sliv_L=0; - uint8_t table_5_1_2_1_1_2_time_dom_res_alloc_A[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?12:11}, // row index 1 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?10:9}, // row index 2 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?9:8}, // row index 3 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?7:6}, // row index 4 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?5:4}, // row index 5 - {0,(dmrs_typeA_pos == 0)?9:10,(dmrs_typeA_pos == 0)?4:4}, // row index 6 - {0,(dmrs_typeA_pos == 0)?4:6, (dmrs_typeA_pos == 0)?4:4}, // row index 7 - {0,5,7}, // row index 8 - {0,5,2}, // row index 9 - {0,9,2}, // row index 10 - {0,12,2}, // row index 11 - {0,1,13}, // row index 12 - {0,1,6}, // row index 13 - {0,2,4}, // row index 14 - {0,4,7}, // row index 15 - {0,8,4} // row index 16 - }; - /*uint8_t table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?6:5}, // row index 1 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?10:9}, // row index 2 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?9:8}, // row index 3 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?7:6}, // row index 4 - {0,(dmrs_typeA_pos == 0)?2:3, (dmrs_typeA_pos == 0)?5:4}, // row index 5 - {0,(dmrs_typeA_pos == 0)?6:8, (dmrs_typeA_pos == 0)?4:2}, // row index 6 - {0,(dmrs_typeA_pos == 0)?4:6, (dmrs_typeA_pos == 0)?4:4}, // row index 7 - {0,5,6}, // row index 8 - {0,5,2}, // row index 9 - {0,9,2}, // row index 10 - {0,10,2}, // row index 11 - {0,1,11}, // row index 12 - {0,1,6}, // row index 13 - {0,2,4}, // row index 14 - {0,4,6}, // row index 15 - {0,8,4} // row index 16 - };*/ - /*uint8_t table_5_1_2_1_1_4_time_dom_res_alloc_B[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,2,2}, // row index 1 - {0,4,2}, // row index 2 - {0,6,2}, // row index 3 - {0,8,2}, // row index 4 - {0,10,2}, // row index 5 - {1,2,2}, // row index 6 - {1,4,2}, // row index 7 - {0,2,4}, // row index 8 - {0,4,4}, // row index 9 - {0,6,4}, // row index 10 - {0,8,4}, // row index 11 - {0,10,4}, // row index 12 - {0,2,7}, // row index 13 - {0,(dmrs_typeA_pos == 0)?2:3,(dmrs_typeA_pos == 0)?12:11}, // row index 14 - {1,2,4}, // row index 15 - {0,0,0} // row index 16 - };*/ - /*uint8_t table_5_1_2_1_1_5_time_dom_res_alloc_C[16][3]={ // for PDSCH from TS 38.214 subclause 5.1.2.1.1 - {0,2,2}, // row index 1 - {0,4,2}, // row index 2 - {0,6,2}, // row index 3 - {0,8,2}, // row index 4 - {0,10,2}, // row index 5 - {0,0,0}, // row index 6 - {0,0,0}, // row index 7 - {0,2,4}, // row index 8 - {0,4,4}, // row index 9 - {0,6,4}, // row index 10 - {0,8,4}, // row index 11 - {0,10,4}, // row index 12 - {0,2,7}, // row index 13 - {0,(dmrs_typeA_pos == 0)?2:3,(dmrs_typeA_pos == 0)?12:11}, // row index 14 - {0,0,6}, // row index 15 - {0,2,6} // row index 16 - };*/ uint8_t mu_pusch = 1; + // definition table j Table 6.1.2.1.1-4 uint8_t j = (mu_pusch==3)?3:(mu_pusch==2)?2:1; uint8_t table_6_1_2_1_1_2_time_dom_res_alloc_A[16][3]={ // for PUSCH from TS 38.214 subclause 6.1.2.1.1 @@ -364,7 +294,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList->choice.setup; else if (mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - if (pdsch_TimeDomainAllocationList) { + if (pdsch_TimeDomainAllocationList && use_default==false) { if (time_domain_ind >= pdsch_TimeDomainAllocationList->list.count) { LOG_E(MAC, "time_domain_ind %d >= pdsch->TimeDomainAllocationList->list.count %d\n", @@ -387,8 +317,15 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, } else {// Default configuration from tables // k_offset = table_5_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind-1][0]; - sliv_S = table_5_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind-1][1]; - sliv_L = table_5_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind-1][2]; + + if(dmrs_typeA_pos == 0) { + sliv_S = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[time_domain_ind][1]; + sliv_L = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[time_domain_ind][2]; + } else { + sliv_S = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[time_domain_ind][1]; + sliv_L = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[time_domain_ind][2]; + } + // k_offset = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][0]; // sliv_S = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][1]; // sliv_L = table_5_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][2]; @@ -413,7 +350,7 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, pusch_TimeDomainAllocationList = mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; } - if (pusch_TimeDomainAllocationList) { + if (pusch_TimeDomainAllocationList && use_default==false) { if (time_domain_ind >= pusch_TimeDomainAllocationList->list.count) { LOG_E(MAC, "time_domain_ind %d >= pusch->TimeDomainAllocationList->list.count %d\n", time_domain_ind, pusch_TimeDomainAllocationList->list.count); @@ -430,8 +367,8 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, } else { // k_offset = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind-1][0]; - sliv_S = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind-1][1]; - sliv_L = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind-1][2]; + sliv_S = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][1]; + sliv_L = table_6_1_2_1_1_2_time_dom_res_alloc_A[time_domain_ind][2]; // k_offset = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][0]; // sliv_S = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][1]; // sliv_L = table_6_1_2_1_1_3_time_dom_res_alloc_A_extCP[nr_pdci_info_extracted->time_dom_resource_assignment][2]; @@ -678,7 +615,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr return -1; } /* TIME_DOM_RESOURCE_ASSIGNMENT */ - if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,dlsch_config_pdu_1_0,dci->time_domain_assignment.val) < 0) { + if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,dlsch_config_pdu_1_0,dci->time_domain_assignment.val,rnti==SI_RNTI) < 0) { LOG_W(MAC, "[%d.%d] Invalid time_domain_assignment. Possibly due to false DCI. Ignoring DCI!\n", frame, slot); return -1; } @@ -845,7 +782,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr return -1; } /* TIME_DOM_RESOURCE_ASSIGNMENT */ - if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,dlsch_config_pdu_1_1,dci->time_domain_assignment.val) < 0) { + if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,dlsch_config_pdu_1_1,dci->time_domain_assignment.val,false) < 0) { LOG_W(MAC, "[%d.%d] Invalid time_domain_assignment. Possibly due to false DCI. Ignoring DCI!\n", frame, slot); return -1; } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 542aee9af1..bc15353e9a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -647,7 +647,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, return -1; } /* TIME_DOM_RESOURCE_ASSIGNMENT */ - if (nr_ue_process_dci_time_dom_resource_assignment(mac, pusch_config_pdu, NULL, dci->time_domain_assignment.val) < 0) { + if (nr_ue_process_dci_time_dom_resource_assignment(mac, pusch_config_pdu, NULL, dci->time_domain_assignment.val,false) < 0) { return -1; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 0fbf843343..45dc319031 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -316,11 +316,15 @@ void schedule_control_sib1(module_id_t module_id, const uint16_t bwpSize = gNB_mac->type0_PDCCH_CSS_config.num_rbs; int rbStart = gNB_mac->type0_PDCCH_CSS_config.cset_start_rb; - // Calculate number of symbols - struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - const int startSymbolAndLength = tdaList->list.array[gNB_mac->sched_ctrlCommon->time_domain_allocation]->startSymbolAndLength; - int startSymbolIndex, nrOfSymbols; - SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); + int startSymbolIndex = 0; + int nrOfSymbols = 0; + if(gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position == 0) { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } else { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } if (nrOfSymbols == 2) { gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 1; @@ -345,7 +349,6 @@ void schedule_control_sib1(module_id_t module_id, gNB_mac->sched_ctrlCommon->rbSize = rbSize; gNB_mac->sched_ctrlCommon->rbStart = 0; - LOG_D(MAC,"SLIV = %i\n", startSymbolAndLength); LOG_D(MAC,"startSymbolIndex = %i\n", startSymbolIndex); LOG_D(MAC,"nrOfSymbols = %i\n", nrOfSymbols); LOG_D(MAC,"rbSize = %i\n", gNB_mac->sched_ctrlCommon->rbSize); @@ -526,11 +529,15 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) // Configure sched_ctrlCommon for SIB1 schedule_control_sib1(module_idP, CC_id, time_domain_allocation, mcsTableIdx, mcs, candidate_idx, sib1_sdu_length); - // Calculate number of symbols - int startSymbolIndex, nrOfSymbols; - struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - const int startSymbolAndLength = tdaList->list.array[gNB_mac->sched_ctrlCommon->time_domain_allocation]->startSymbolAndLength; - SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); + int startSymbolIndex = 0; + int nrOfSymbols = 0; + if(gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position == 0) { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } else { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } // Calculate number of PRB_DMRS uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 37aeabe07c..15bc84cdf3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1762,7 +1762,7 @@ void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti) } } -void nr_mac_remove_ra_rnti_ue(module_id_t mod_id, rnti_t rnti) { +void nr_mac_remove_ra_rnti(module_id_t mod_id, rnti_t rnti) { // Hack to remove UE in the phy (following the same procedure as in function mac_remove_nr_ue) if (pthread_mutex_lock(&rnti_to_remove_mutex)) exit(1); if (rnti_to_remove_count == 10) exit(1); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index a69f63365e..3eb5cac76c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -510,7 +510,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if(no_sig) { LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); - nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti); + nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); } else { @@ -545,7 +545,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if(ra->cfra) { LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) CFRA procedure succeeded!\n", UE_id, ra->rnti); - nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti); + nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); UE_info->active[UE_id] = true; @@ -581,7 +581,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, continue; LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); - nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti); + nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); } } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 2327d22da4..42f3bbf70f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -318,7 +318,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *secon void mac_remove_nr_ue(module_id_t mod_id, rnti_t rnti); -void nr_mac_remove_ra_rnti_ue(module_id_t mod_id, rnti_t rnti); +void nr_mac_remove_ra_rnti(module_id_t mod_id, rnti_t rnti); int allocate_nr_CCEs(gNB_MAC_INST *nr_mac, NR_BWP_Downlink_t *bwp, diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index dd18cf624e..9af4a3a9fa 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -64,13 +64,13 @@ gNBs = #initialULBWPmappingType #0=typeA,1=typeB initialDLBWPmappingType_0 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_0 = 53; + #this is SS=1,L=13 + initialDLBWPstartSymbolAndLength_0 = 40; initialDLBWPk0_1 = 0; initialDLBWPmappingType_1 = 0; - #this is SS=2,L=10 - initialDLBWPstartSymbolAndLength_1 = 81; + #this is SS=2,L=12 + initialDLBWPstartSymbolAndLength_1 = 53; initialDLBWPk0_2 = 0; initialDLBWPmappingType_2 = 0; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 001e5b917a..88bcf8defc 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -64,13 +64,13 @@ gNBs = #initialULBWPmappingType #0=typeA,1=typeB initialDLBWPmappingType_0 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_0 = 53; + #this is SS=1,L=13 + initialDLBWPstartSymbolAndLength_0 = 40; initialDLBWPk0_1 = 0; initialDLBWPmappingType_1 = 0; - #this is SS=2,L=10 - initialDLBWPstartSymbolAndLength_1 = 81; + #this is SS=2,L=12 + initialDLBWPstartSymbolAndLength_1 = 53; initialDLBWPk0_2 = 0; initialDLBWPmappingType_2 = 0; From f851af22f2b8c07196ba4de9a6e7b91bc42506fe Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 31 Mar 2021 10:41:11 +0100 Subject: [PATCH 80/94] fixing previous commit --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index f4051e7a49..20d8b917ce 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -2910,7 +2910,7 @@ int is_nr_DL_slot(NR_ServingCellConfigCommon_t *scc,slot_t slot) { int slots1=period1*(1<tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots ? 1 : 0); - else return(slot_in_period <= slots1+scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0); + else return(slot_in_period <= slots1+scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0); } int is_nr_UL_slot(NR_ServingCellConfigCommon_t *scc, slot_t slot, lte_frame_type_t frame_type) { @@ -2942,24 +2942,26 @@ int is_nr_UL_slot(NR_ServingCellConfigCommon_t *scc, slot_t slot, lte_frame_type int slots1=period1*(1<= scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots ? 1 : 0); - else return(slot_in_period >= slots1+scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0); + else return(slot_in_period >= slots1+scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0); } int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol) { int l0; - int ld = NrOfSymbols; + int ld = NrOfSymbols+startSymbol; if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2) l0=2; else if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3) l0=3; else AssertFatal(1==0,"Illegal dmrs_TypeA_Position %d\n",(int)dmrs_TypeA_Position); if (pdsch_Config == NULL) { // Initial BWP - return(1<dmrs_DownlinkForPDSCH_MappingTypeA && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup) { // Relative to start of slot - ld += startSymbol; NR_DMRS_DownlinkConfig_t *dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; AssertFatal(ld>1 && ld < 15,"Illegal l_d %d\n",ld); int pos2=0; From 8c9ed555d90dc1c20e8a899b4b3334ee55c64499 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 31 Mar 2021 15:32:45 +0100 Subject: [PATCH 81/94] Remove runtime callocs for dmrs_AdditionalPosition --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 16 +++++----------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 9 ++++----- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 79878d59a4..ec36486f70 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -570,7 +570,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_0 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; - NR_PDSCH_Config_t *pdsch_config=mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup; + NR_PDSCH_Config_t *pdsch_config = NULL; uint16_t BWPSize = 0; if(rnti == SI_RNTI) { @@ -578,7 +578,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dlsch_config_pdu_1_0->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs; dlsch_config_pdu_1_0->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb; dlsch_config_pdu_1_0->SubcarrierSpacing = mac->mib->subCarrierSpacingCommon; - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; // For PDSCH with mapping type A, the UE shall assume dmrs-AdditionalPosition='pos2' BWPSize = dlsch_config_pdu_1_0->BWPSize; } else { if (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti){ @@ -586,25 +585,20 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } else { dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; } - if( (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti) || (rnti == ra->t_crnti) ) { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); if (get_softmodem_params()->sa) { dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; } else { // NSA mode is not using the Initial BWP dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); + pdsch_config = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup; } } else { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; - if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); + pdsch_config = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup; } - BWPSize = n_RB_DLBWP; } @@ -624,7 +618,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr mac->scc->dmrs_TypeA_Position, dlsch_config_pdu_1_0->number_symbols, dlsch_config_pdu_1_0->start_symbol); - dlsch_config_pdu_1_0->dmrsConfigType = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + dlsch_config_pdu_1_0->dmrsConfigType = (pdsch_config) ? (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0; /* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */ if (dlsch_config_pdu_1_0->number_symbols == 2) dlsch_config_pdu_1_0->n_dmrs_cdm_groups = 1; @@ -633,7 +627,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr /* VRB_TO_PRB_MAPPING */ dlsch_config_pdu_1_0->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping.val == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved; /* MCS TABLE INDEX */ - dlsch_config_pdu_1_0->mcs_table = (pdsch_config->mcs_Table) ? (*pdsch_config->mcs_Table + 1) : 0; + dlsch_config_pdu_1_0->mcs_table = (pdsch_config) ? ((pdsch_config->mcs_Table) ? (*pdsch_config->mcs_Table + 1) : 0) : 0; /* MCS */ dlsch_config_pdu_1_0->mcs = dci->mcs; // Basic sanity check for MCS value to check for a false or erroneous DCI diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 45dc319031..49cfcbaf93 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -293,7 +293,6 @@ void schedule_control_sib1(module_id_t module_id, fill_default_coresetZero(gNB_mac->sched_ctrlCommon->coreset,servingcellconfigcommon); fill_default_initialDownlinkBWP(gNB_mac->sched_ctrlCommon->active_bwp,servingcellconfigcommon); } - gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; gNB_mac->sched_ctrlCommon->time_domain_allocation = time_domain_allocation; gNB_mac->sched_ctrlCommon->mcsTableIdx = mcsTableIdx; @@ -334,7 +333,7 @@ void schedule_control_sib1(module_id_t module_id, // Calculate number of PRB_DMRS uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; - uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); + uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); int rbSize = 0; @@ -421,7 +420,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, pdsch_pdu_rel15->nrOfLayers = 1; pdsch_pdu_rel15->transmissionScheme = 0; pdsch_pdu_rel15->refPoint = 1; - pdsch_pdu_rel15->dmrsConfigType = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + pdsch_pdu_rel15->dmrsConfigType = 0; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; pdsch_pdu_rel15->numDmrsCdmGrpsNoData = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData; @@ -436,7 +435,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->NrOfSymbols, pdsch_pdu_rel15->StartSymbolIndex); + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->NrOfSymbols, pdsch_pdu_rel15->StartSymbolIndex); LOG_D(MAC,"dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos); @@ -541,7 +540,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) // Calculate number of PRB_DMRS uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; - uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); + uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx), From d86566d3666203369837252ae363a1ffbc1a3988 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 31 Mar 2021 15:52:51 +0100 Subject: [PATCH 82/94] gNB: update ssPBCH_BlockPower to -25 dBm/RE in all USRP conf files --- .../GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 3 ++- .../GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 9af4a3a9fa..20423b50b9 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -21,6 +21,7 @@ gNBs = ssb_SubcarrierOffset = 0; pdsch_AntennaPorts = 1; + pusch_AntennaPorts = 1; pdcch_ConfigSIB1 = ( { @@ -191,7 +192,7 @@ gNBs = nrofUplinkSlots = 2; nrofUplinkSymbols = 4; - ssPBCH_BlockPower = 10; + ssPBCH_BlockPower = -25; } ); diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 88bcf8defc..c4d9de3347 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -21,6 +21,7 @@ gNBs = ssb_SubcarrierOffset = 0; pdsch_AntennaPorts = 1; + pusch_AntennaPorts = 1; pdcch_ConfigSIB1 = ( { @@ -191,7 +192,7 @@ gNBs = nrofUplinkSlots = 2; nrofUplinkSymbols = 4; - ssPBCH_BlockPower = 10; + ssPBCH_BlockPower = -25; } ); From 4a807dd0837da0547067e33a256de79828b4e845 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 1 Apr 2021 14:11:14 +0100 Subject: [PATCH 83/94] Minor improvements and LOG updates --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 5 ++--- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 14 ++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index bd3417e5e0..305f3b5e5a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -875,7 +875,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra fill_default_coresetZero(nr_mac->sched_ctrlCommon->coreset,cc->ServingCellConfigCommon); fill_default_initialDownlinkBWP(nr_mac->sched_ctrlCommon->active_bwp,cc->ServingCellConfigCommon); } - nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); @@ -1018,7 +1017,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->VRBtoPRBMapping = 0; pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex; pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, + pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); @@ -1172,7 +1171,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); - uint16_t dlDmrsSymbPos = fill_dmrs_mask(nr_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, + uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 7d12536f9a..3483182088 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -159,7 +159,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP, // get MIB every 8 frames if((slotP == 0) && (frameP & 7) == 0) { - mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 1, &cc->MIB_pdu.payload[0]); + mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 0, 1, &cc->MIB_pdu.payload[0]); LOG_D(MAC, "[gNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes\n", @@ -540,8 +540,6 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) { - LOG_D(MAC,"Schedule_nr_sib1: frameP = %i, slotP = %i\n", frameP, slotP); - // TODO: Get these values from RRC const int CC_id = 0; int time_domain_allocation = 0; @@ -577,14 +575,14 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) (type0_PDCCH_CSS_config->num_rbs > 0) && (type0_PDCCH_CSS_config->active == true)) { - LOG_D(MAC,"> SIB1 transmission\n"); + LOG_D(NR_MAC,"(%d.%d) SIB1 transmission: ssb_index %d\n", frameP, slotP, type0_PDCCH_CSS_config->ssb_index); // Get SIB1 uint8_t sib1_payload[NR_MAX_SIB_LENGTH/8]; - uint8_t sib1_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, BCCH, 1, sib1_payload); - LOG_D(MAC,"sib1_sdu_length = %i\n", sib1_sdu_length); - LOG_D(MAC,"SIB1: \n"); - for (int i=0;i Date: Thu, 1 Apr 2021 18:45:29 +0100 Subject: [PATCH 84/94] Fix for RA when Msg3 fails --- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 2 ++ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 8 ++++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index e70c353589..54464446a5 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -84,6 +84,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ } else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH){ dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_ra[0]; + dlsch0->rnti_type = _RA_RNTI_; + dlsch0->harq_processes[dlsch0->current_harq_pid]->status = ACTIVE; } else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH){ dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_SI[0]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 305f3b5e5a..9a0034cbb5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -444,19 +444,19 @@ void nr_schedule_msg2(uint16_t rach_frame, uint16_t rach_slot, uint8_t start_next_period = (rach_slot-(rach_slot%tdd_period_slot)+tdd_period_slot)%nr_slots_per_frame[mu]; *msg2_slot = start_next_period + last_dl_slot_period; // initializing scheduling of slot to next mixed (or last dl) slot - *msg2_frame = (*msg2_slot>(rach_slot))? rach_frame : (rach_frame +1); + *msg2_frame = ((*msg2_slot>(rach_slot))? rach_frame : (rach_frame+1))%1024; // we can't schedule msg2 before sl_ahead since prach int eff_slot = *msg2_slot+(*msg2_frame-rach_frame)*nr_slots_per_frame[mu]; if ((eff_slot-rach_slot)<=sl_ahead) { *msg2_slot = (*msg2_slot+tdd_period_slot)%nr_slots_per_frame[mu]; - *msg2_frame = (*msg2_slot>(rach_slot))? rach_frame : (rach_frame +1); + *msg2_frame = ((*msg2_slot>(rach_slot))? rach_frame : (rach_frame+1))%1024; } if (FR==nr_FR2) { int num_tdd_period = *msg2_slot/tdd_period_slot; while((tdd_beam_association[num_tdd_period]!=-1)&&(tdd_beam_association[num_tdd_period]!=beam_index)) { *msg2_slot = (*msg2_slot+tdd_period_slot)%nr_slots_per_frame[mu]; - *msg2_frame = (*msg2_slot>(rach_slot))? rach_frame : (rach_frame +1); + *msg2_frame = ((*msg2_slot>(rach_slot))? rach_frame : (rach_frame+1))%1024; num_tdd_period = *msg2_slot/tdd_period_slot; } if(tdd_beam_association[num_tdd_period] == -1) @@ -692,7 +692,7 @@ void nr_get_Msg3alloc(module_id_t module_id, if (nr_slots_per_frame[mu]>temp_slot) ra->Msg3_frame = current_frame; else - ra->Msg3_frame = current_frame + (temp_slot/nr_slots_per_frame[mu]); + ra->Msg3_frame = (current_frame + (temp_slot/nr_slots_per_frame[mu]))%1024; // beam association for FR2 if (*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0] >= 257) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 3eb5cac76c..15b743036c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -520,6 +520,13 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, "expected TC_RNTI %04x to match current RNTI %04x\n", ra->rnti, current_rnti); + + if( (frameP==ra->Msg3_frame) && (slotP==ra->Msg3_slot) ) { + LOG_W(NR_MAC, "Random Access %i failed at state %i\n", i, ra->state); + nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); + nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); + } + continue; } From 2ec6ee5f5bdbeb67b8c1cf959248fa448b80d894 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 7 Apr 2021 16:03:26 +0100 Subject: [PATCH 85/94] Fix Msg4 mac pdu with padding --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 16 +++++----------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 10 ++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 719fd5ea61..d00903a71e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1782,25 +1782,19 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, | ((uint16_t)((NR_MAC_SUBHEADER_LONG *) pduP)->L2 & 0xff); mac_subheader_len = 3; } else { - mac_sdu_len = ((NR_MAC_SUBHEADER_LONG *) pduP)->L1; + mac_sdu_len = ((NR_MAC_SUBHEADER_SHORT *) pduP)->L; mac_subheader_len = 2; } - // Check if it is a valid CCCH message, we get all 00's messages very often - if ( pdu_len != (mac_subheader_len+mac_sdu_len) ) { - LOG_D(NR_MAC, "%s() Invalid CCCH message!, pdu_len: %d\n", __func__, pdu_len); - return; - } + if ( pdu_len >= mac_sdu_len ) { - if ( mac_sdu_len > 0 ) { + LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d\n", mac_sdu_len); - LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d: bits\n", mac_sdu_len); - - LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n bits, rx bytes: \n", mac_sdu_len); + LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n", mac_sdu_len); for (int i = 0; i < mac_subheader_len; i++) { LOG_D(NR_MAC, "MAC header %d: 0x%x\n", i, pduP[i]); } - for (int i = 0; i < mac_sdu_len/8; i++) { + for (int i = 0; i < mac_sdu_len; i++) { LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[mac_subheader_len + i]); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 9a0034cbb5..06615f63d3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1377,6 +1377,16 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->BWPSize, nr_mac->sched_ctrlCommon->active_bwp->bwp_Id); + // Add padding header and zero rest out if there is space left + if (mac_pdu_length < harq->tb_size) { + NR_MAC_SUBHEADER_FIXED *padding = (NR_MAC_SUBHEADER_FIXED *) &buf[mac_pdu_length]; + padding->R = 0; + padding->LCID = DL_SCH_LCID_PADDING; + for(int k = mac_pdu_length+1; ktb_size; k++) { + buf[k] = 0; + } + } + // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; memcpy(tx_req->TLVs[0].value.direct, harq->tb, sizeof(uint8_t) * harq->tb_size); From 04b28e5f2addb5bb90a4227c7eb14fd5d7867691 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 7 Apr 2021 16:31:06 +0100 Subject: [PATCH 86/94] Fix Msg4 mac pdu with padding --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index d00903a71e..68b6bb5b3c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1786,7 +1786,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, mac_subheader_len = 2; } - if ( pdu_len >= mac_sdu_len ) { + if ( pdu_len >= (mac_subheader_len + mac_sdu_len) ) { LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d\n", mac_sdu_len); From 7c37794513ad74fd2841e38908f98405172bf694 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 8 Apr 2021 14:56:05 +0100 Subject: [PATCH 87/94] Revert code indentation in usrp_lib --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 844 ++++++++++--------- 1 file changed, 432 insertions(+), 412 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index d6ee1b340a..8025337ecb 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -272,6 +272,7 @@ static int sync_to_gps(openair0_device *device) { */ static int trx_usrp_start(openair0_device *device) { usrp_state_t *s = (usrp_state_t *)device->priv; + // setup GPIO for TDD, GPIO(4) = ATR_RX //set data direction register (DDR) to output s->usrp->set_gpio_attr("FP0", "DDR", 0xfff, 0xfff); @@ -284,16 +285,17 @@ static int trx_usrp_start(openair0_device *device) { s->usrp->set_gpio_attr("FP0", "ATR_XX", (1<<5), 0x7f); // set the output pins to 1 s->usrp->set_gpio_attr("FP0", "OUT", 7<<7, 0xf80); + s->wait_for_first_pps = 1; s->rx_count = 0; s->tx_count = 0; //s->first_tx = 1; //s->first_rx = 1; s->rx_timestamp = 0; + s->usrp->set_time_next_pps(uhd::time_spec_t(0.0)); // wait for the pps to change uhd::time_spec_t time_last_pps = s->usrp->get_time_last_pps(); - while (time_last_pps == s->usrp->get_time_last_pps()) { boost::this_thread::sleep(boost::posix_time::milliseconds(1)); } @@ -302,6 +304,7 @@ static int trx_usrp_start(openair0_device *device) { cmd.time_spec = uhd::time_spec_t(1.0); cmd.stream_now = false; // start at constant delay s->rx_stream->issue_stream_cmd(cmd); + return 0; } /*! \brief Terminate operation of the USRP transceiver -- free all associated resources @@ -315,8 +318,9 @@ static void trx_usrp_end(openair0_device *device) { if (s == NULL) return; - iqrecorder_end(device); + + } /*! \brief Called to send samples to the USRP RF target @@ -328,59 +332,64 @@ static void trx_usrp_end(openair0_device *device) { @param flags flags must be set to TRUE if timestamp parameter needs to be applied */ static int trx_usrp_write(openair0_device *device, - openair0_timestamp timestamp, - void **buff, - int nsamps, - int cc, - int flags) { + openair0_timestamp timestamp, + void **buff, + int nsamps, + int cc, + int flags) { int ret=0; usrp_state_t *s = (usrp_state_t *)device->priv; int nsamps2; // aligned to upper 32 or 16 byte boundary + int flags_lsb = flags&0xff; int flags_msb = (flags>>8)&0xff; + int end; openair0_thread_t *write_thread = &device->write_thread; openair0_write_package_t *write_package = write_thread->write_package; - AssertFatal( MAX_WRITE_THREAD_BUFFER_SIZE >= cc,"Do not support more than %d cc number\n", MAX_WRITE_THREAD_BUFFER_SIZE); - boolean_t first_packet_state=false,last_packet_state=false; - if (flags_lsb == 2) { // start of burst - // s->tx_md.start_of_burst = true; - // s->tx_md.end_of_burst = false; - first_packet_state = true; - last_packet_state = false; - } else if (flags_lsb == 3) { // end of burst - //s->tx_md.start_of_burst = false; - //s->tx_md.end_of_burst = true; - first_packet_state = false; - last_packet_state = true; - } else if (flags_lsb == 4) { // start and end + AssertFatal( MAX_WRITE_THREAD_BUFFER_SIZE >= cc,"Do not support more than %d cc number\n", MAX_WRITE_THREAD_BUFFER_SIZE); + + boolean_t first_packet_state=false,last_packet_state=false; + + if (flags_lsb == 2) { // start of burst + // s->tx_md.start_of_burst = true; + // s->tx_md.end_of_burst = false; + first_packet_state = true; + last_packet_state = false; + } else if (flags_lsb == 3) { // end of burst + //s->tx_md.start_of_burst = false; + //s->tx_md.end_of_burst = true; + first_packet_state = false; + last_packet_state = true; + } else if (flags_lsb == 4) { // start and end // s->tx_md.start_of_burst = true; // s->tx_md.end_of_burst = true; - first_packet_state = true; - last_packet_state = true; - } else if (flags_lsb==1) { // middle of burst + first_packet_state = true; + last_packet_state = true; + } else if (flags_lsb==1) { // middle of burst // s->tx_md.start_of_burst = false; // s->tx_md.end_of_burst = false; - first_packet_state = false; - last_packet_state = false; - } else if (flags_lsb==10) { // fail safe mode - // s->tx_md.has_time_spec = false; - // s->tx_md.start_of_burst = false; - // s->tx_md.end_of_burst = true; - first_packet_state = false; - last_packet_state = true; - } + first_packet_state = false; + last_packet_state = false; + } + else if (flags_lsb==10) { // fail safe mode + // s->tx_md.has_time_spec = false; + // s->tx_md.start_of_burst = false; + // s->tx_md.end_of_burst = true; + first_packet_state = false; + last_packet_state = true; + } - if(usrp_tx_thread == 0) { + if(usrp_tx_thread == 0){ #if defined(__x86_64) || defined(__i386__) -#ifdef __AVX2__ - nsamps2 = (nsamps+7)>>3; - __m256i buff_tx[8][nsamps2]; -#else + #ifdef __AVX2__ + nsamps2 = (nsamps+7)>>3; + __m256i buff_tx[8][nsamps2]; + #else nsamps2 = (nsamps+3)>>2; __m128i buff_tx[8][nsamps2]; -#endif + #endif #elif defined(__arm__) nsamps2 = (nsamps+3)>>2; int16x8_t buff_tx[8][nsamps2]; @@ -408,8 +417,8 @@ static int trx_usrp_write(openair0_device *device, s->tx_md.end_of_burst = last_packet_state; s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate); s->tx_count++; - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,1); +VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,1); // bit 3 enables gpio (for backward compatibility) if (flags_msb&8) { // push GPIO bits 7-9 from flags_msb @@ -418,8 +427,7 @@ static int trx_usrp_write(openair0_device *device, s->usrp->set_gpio_attr("FP0", "OUT", gpio789, 0x380); s->usrp->clear_command_time(); } - - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,0); +VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,0); if (cc>1) { std::vector buff_ptrs; @@ -428,18 +436,18 @@ static int trx_usrp_write(openair0_device *device, buff_ptrs.push_back(&(((int16_t *)buff_tx[i])[0])); ret = (int)s->tx_stream->send(buff_ptrs, nsamps, s->tx_md); - } else { + } + else { ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md); } - if (ret != nsamps) - LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); - + if (ret != nsamps) LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); return ret; - } else { + } + else{ pthread_mutex_lock(&write_thread->mutex_write); - if(write_thread->count_write >= MAX_WRITE_THREAD_PACKAGE) { + if(write_thread->count_write >= MAX_WRITE_THREAD_PACKAGE){ LOG_W(HW,"Buffer overflow, count_write = %d, start = %d end = %d, resetting write package\n", write_thread->count_write, write_thread->start, write_thread->end); write_thread->end = write_thread->start; write_thread->count_write = 0; @@ -452,16 +460,15 @@ static int trx_usrp_write(openair0_device *device, write_package[end].first_packet = first_packet_state; write_package[end].last_packet = last_packet_state; write_package[end].flags_msb = flags_msb; - for (int i = 0; i < cc; i++) write_package[end].buff[i] = buff[i]; - write_thread->count_write++; write_thread->end = (write_thread->end + 1)% MAX_WRITE_THREAD_PACKAGE; pthread_cond_signal(&write_thread->cond_write); pthread_mutex_unlock(&write_thread->mutex_write); return 0; } + } //-----------------------start-------------------------- @@ -473,11 +480,12 @@ static int trx_usrp_write(openair0_device *device, @param antenna_id index of the antenna if the device has multiple antennas @param flags flags must be set to TRUE if timestamp parameter needs to be applied */ -void *trx_usrp_write_thread(void *arg) { +void *trx_usrp_write_thread(void * arg){ int ret=0; openair0_device *device=(openair0_device *)arg; openair0_thread_t *write_thread = &device->write_thread; openair0_write_package_t *write_package = write_thread->write_package; + usrp_state_t *s; int nsamps2; // aligned to upper 32 or 16 byte boundary int start; @@ -489,13 +497,11 @@ void *trx_usrp_write_thread(void *arg) { signed char last_packet; int flags_msb; - while(1) { + while(1){ pthread_mutex_lock(&write_thread->mutex_write); - while (write_thread->count_write == 0) { pthread_cond_wait(&write_thread->cond_write,&write_thread->mutex_write); // this unlocks mutex_rxtx while waiting and then locks it again } - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD, 1 ); s = (usrp_state_t *)device->priv; start = write_thread->start; @@ -512,36 +518,38 @@ void *trx_usrp_write_thread(void *arg) { /*if(write_thread->count_write != 0){ LOG_W(HW,"count write = %d, start = %d, end = %d\n", write_thread->count_write, write_thread->start, write_thread->end); }*/ -#if defined(__x86_64) || defined(__i386__) -#ifdef __AVX2__ - nsamps2 = (nsamps+7)>>3; - __m256i buff_tx[8][nsamps2]; -#else - nsamps2 = (nsamps+3)>>2; - __m128i buff_tx[8][nsamps2]; -#endif -#elif defined(__arm__) - nsamps2 = (nsamps+3)>>2; - int16x8_t buff_tx[8][nsamps2]; -#else -#error Unsupported CPU architecture, USRP device cannot be built -#endif + + #if defined(__x86_64) || defined(__i386__) + #ifdef __AVX2__ + nsamps2 = (nsamps+7)>>3; + __m256i buff_tx[8][nsamps2]; + #else + nsamps2 = (nsamps+3)>>2; + __m128i buff_tx[8][nsamps2]; + #endif + #elif defined(__arm__) + nsamps2 = (nsamps+3)>>2; + int16x8_t buff_tx[8][nsamps2]; + #else + #error Unsupported CPU architecture, USRP device cannot be built + #endif // bring RX data into 12 LSBs for softmodem RX for (int i=0; itx_md.has_time_spec = true; s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet; s->tx_md.end_of_burst = last_packet; @@ -564,32 +572,34 @@ void *trx_usrp_write_thread(void *arg) { buff_ptrs.push_back(&(((int16_t *)buff_tx[i])[0])); ret = (int)s->tx_stream->send(buff_ptrs, nsamps, s->tx_md); - } else { + } + else { ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md); } - if (ret != nsamps) - LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); - + if (ret != nsamps) LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_USRP_SEND_RETURN, ret ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD, 0 ); - if(0) - break; + if(0) break; } return NULL; } -int trx_usrp_write_init(openair0_device *device) { +int trx_usrp_write_init(openair0_device *device){ + uhd::set_thread_priority_safe(1.0); openair0_thread_t *write_thread = &device->write_thread; printf("initializing tx write thread\n"); + write_thread->start = 0; write_thread->end = 0; write_thread->count_write = 0; printf("end of tx write thread\n"); + pthread_create(&write_thread->pthread_write,NULL,trx_usrp_write_thread,(void *)device); + return(0); } @@ -623,60 +633,57 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp int16x8_t buff_tmp[2][nsamps2]; #endif - if (cc>1) { - // receive multiple channels (e.g. RF A and RF B) - std::vector buff_ptrs; + if (cc>1) { + // receive multiple channels (e.g. RF A and RF B) + std::vector buff_ptrs; - for (int i=0; irx_stream->recv(buff_ptrs, nsamps, s->rx_md); - } else { - // receive a single channel (e.g. from connector RF A) - samples_received=0; + samples_received = s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md); + } else { + // receive a single channel (e.g. from connector RF A) + samples_received=0; - while (samples_received != nsamps) { - samples_received += s->rx_stream->recv((void *)((int32_t *)buff_tmp[0]+samples_received), - nsamps-samples_received, s->rx_md); + while (samples_received != nsamps) { + samples_received += s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received), + nsamps-samples_received, s->rx_md); - if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) - break; + if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) + break; - if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { - printf("sleep...\n"); //usleep(100); + if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { + printf("sleep...\n"); //usleep(100); + } } + if (samples_received == nsamps) s->wait_for_first_pps=0; } - if (samples_received == nsamps) - s->wait_for_first_pps=0; - } - - // bring RX data into 12 LSBs for softmodem RX - for (int i=0; irx_md.error_code != uhd::rx_metadata_t::ERROR_CODE_NONE) LOG_E(HW, "%s\n", s->rx_md.to_pp_string(true).c_str()); @@ -684,11 +691,12 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp s->rx_count += nsamps; s->rx_timestamp = s->rx_md.time_spec.to_ticks(s->sample_rate); *ptimestamp = s->rx_timestamp; + // push GPIO bits 7-9 from flags_msb - /*s->usrp->set_command_time(uhd::time_spec_t::from_ticks((s->rx_timestamp+(2*nsamps)),s->sample_rate)); - s->usrp->set_gpio_attr("FP0", "OUT", gpio789<<7, 0x380); - s->usrp->clear_command_time(); - gpio789 = (gpio789+1)&7;*/ + /*s->usrp->set_command_time(uhd::time_spec_t::from_ticks((s->rx_timestamp+(2*nsamps)),s->sample_rate)); + s->usrp->set_gpio_attr("FP0", "OUT", gpio789<<7, 0x380); + s->usrp->clear_command_time(); + gpio789 = (gpio789+1)&7;*/ recplay_state_t *recPlay=device->recplay_state; if ( recPlay != NULL) { // record mode @@ -937,6 +945,8 @@ extern "C" { device->trx_set_freq_func = trx_usrp_set_freq; device->trx_set_gains_func = trx_usrp_set_gains; device->trx_write_init = trx_usrp_write_init; + + // hotfix! to be checked later uhd::set_thread_priority_safe(1.0); // Initialize USRP device @@ -1003,319 +1013,329 @@ extern "C" { s->usrp = uhd::usrp::multi_usrp::make(args); if (args.find("clock_source")==std::string::npos) { - if (openair0_cfg[0].clock_source == internal) { - s->usrp->set_clock_source("internal"); - LOG_D(HW,"Setting clock source to internal\n"); - } else if (openair0_cfg[0].clock_source == external ) { - s->usrp->set_clock_source("external"); - LOG_D(HW,"Setting clock source to external\n"); - } else if (openair0_cfg[0].clock_source==gpsdo) { - s->usrp->set_clock_source("gpsdo"); - LOG_D(HW,"Setting clock source to gpsdo\n"); - } else { - LOG_W(HW,"Clock source set neither in usrp_args nor on command line, using default!\n"); - } - } else { - if (openair0_cfg[0].clock_source != unset) { - LOG_W(HW,"Clock source set in both usrp_args and in clock_source, ingnoring the latter!\n"); - } + if (openair0_cfg[0].clock_source == internal) { + s->usrp->set_clock_source("internal"); + LOG_D(HW,"Setting clock source to internal\n"); + } + else if (openair0_cfg[0].clock_source == external ) { + s->usrp->set_clock_source("external"); + LOG_D(HW,"Setting clock source to external\n"); + } + else if (openair0_cfg[0].clock_source==gpsdo) { + s->usrp->set_clock_source("gpsdo"); + LOG_D(HW,"Setting clock source to gpsdo\n"); + } + else { + LOG_W(HW,"Clock source set neither in usrp_args nor on command line, using default!\n"); + } } + else { + if (openair0_cfg[0].clock_source != unset) { + LOG_W(HW,"Clock source set in both usrp_args and in clock_source, ingnoring the latter!\n"); + } + } if (args.find("time_source")==std::string::npos) { - if (openair0_cfg[0].time_source == internal) { - s->usrp->set_time_source("internal"); - LOG_D(HW,"Setting time source to internal\n"); - } else if (openair0_cfg[0].time_source == external ) { - s->usrp->set_time_source("external"); - LOG_D(HW,"Setting time source to external\n"); - } else if (openair0_cfg[0].time_source==gpsdo) { - s->usrp->set_time_source("gpsdo"); - LOG_D(HW,"Setting time source to gpsdo\n"); - } else { - LOG_W(HW,"Time source set neither in usrp_args nor on command line, using default!\n"); - } + if (openair0_cfg[0].time_source == internal) { + s->usrp->set_time_source("internal"); + LOG_D(HW,"Setting time source to internal\n"); + } + else if (openair0_cfg[0].time_source == external ) { + s->usrp->set_time_source("external"); + LOG_D(HW,"Setting time source to external\n"); + } + else if (openair0_cfg[0].time_source==gpsdo) { + s->usrp->set_time_source("gpsdo"); + LOG_D(HW,"Setting time source to gpsdo\n"); + } + else { + LOG_W(HW,"Time source set neither in usrp_args nor on command line, using default!\n"); + } + } + else { + if (openair0_cfg[0].clock_source != unset) { + LOG_W(HW,"Time source set in both usrp_args and in time_source, ingnoring the latter!\n"); + } + } + + + if (s->usrp->get_clock_source(0) == "gpsdo") { + s->use_gps = 1; + + if (sync_to_gps(device)==EXIT_SUCCESS) { + LOG_I(HW,"USRP synced with GPS!\n"); } else { - if (openair0_cfg[0].clock_source != unset) { - LOG_W(HW,"Time source set in both usrp_args and in time_source, ingnoring the latter!\n"); - } + LOG_I(HW,"USRP fails to sync with GPS. Exiting.\n"); + exit(EXIT_FAILURE); + } + } else if (s->usrp->get_clock_source(0) == "external") { + if (check_ref_locked(s,0)) { + LOG_I(HW,"USRP locked to external reference!\n"); + } else { + LOG_I(HW,"Failed to lock to external reference. Exiting.\n"); + exit(EXIT_FAILURE); + } + } + + if (device->type==USRP_X300_DEV) { + openair0_cfg[0].rx_gain_calib_table = calib_table_x310; + std::cerr << "-- Using calibration table: calib_table_x310" << std::endl; + } + + if (device->type==USRP_N300_DEV) { + openair0_cfg[0].rx_gain_calib_table = calib_table_n310; + std::cerr << "-- Using calibration table: calib_table_n310" << std::endl; + } + + + if (device->type==USRP_N300_DEV || device->type==USRP_X300_DEV) { + LOG_I(HW,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate); + + switch ((int)openair0_cfg[0].sample_rate) { + case 122880000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; //to be checked + openair0_cfg[0].tx_bw = 80e6; + openair0_cfg[0].rx_bw = 80e6; + break; + + case 92160000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; //to be checked + openair0_cfg[0].tx_bw = 80e6; + openair0_cfg[0].rx_bw = 80e6; + break; + + case 61440000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 40e6; + openair0_cfg[0].rx_bw = 40e6; + break; + + case 46080000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 40e6; + openair0_cfg[0].rx_bw = 40e6; + break; + + case 30720000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 15360000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 45; + openair0_cfg[0].tx_bw = 10e6; + openair0_cfg[0].rx_bw = 10e6; + break; + + case 7680000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 5e6; + openair0_cfg[0].rx_bw = 5e6; + break; + + case 1920000: + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 1.25e6; + openair0_cfg[0].rx_bw = 1.25e6; + break; + + default: + LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; + } + } + + if (device->type == USRP_B200_DEV) { + if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210; + bw_gain_adjust=0; + std::cerr << "-- Using calibration table: calib_table_b210" << std::endl; // Bell Labs info + } else { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; + bw_gain_adjust=1; + std::cerr << "-- Using calibration table: calib_table_b210_38" << std::endl; // Bell Labs info } - if (s->usrp->get_clock_source(0) == "gpsdo") { - s->use_gps = 1; + switch ((int)openair0_cfg[0].sample_rate) { + case 46080000: + s->usrp->set_master_clock_rate(46.08e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 115; + openair0_cfg[0].tx_bw = 40e6; + openair0_cfg[0].rx_bw = 40e6; + break; - if (sync_to_gps(device)==EXIT_SUCCESS) { - LOG_I(HW,"USRP synced with GPS!\n"); - } else { - LOG_I(HW,"USRP fails to sync with GPS. Exiting.\n"); - exit(EXIT_FAILURE); - } - } else if (s->usrp->get_clock_source(0) == "external") { - if (check_ref_locked(s,0)) { - LOG_I(HW,"USRP locked to external reference!\n"); - } else { - LOG_I(HW,"Failed to lock to external reference. Exiting.\n"); - exit(EXIT_FAILURE); - } + case 30720000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 115; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 23040000: + s->usrp->set_master_clock_rate(23.04e6); //to be checked + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 113; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 15360000: + s->usrp->set_master_clock_rate(30.72e06); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 103; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 7680000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 80; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + case 1920000: + s->usrp->set_master_clock_rate(30.72e6); + //openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 40; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + break; + + default: + LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; } + } - if (device->type==USRP_X300_DEV) { - openair0_cfg[0].rx_gain_calib_table = calib_table_x310; - std::cerr << "-- Using calibration table: calib_table_x310" << std::endl; + /* device specific */ + //openair0_cfg[0].txlaunch_wait = 1;//manage when TX processing is triggered + //openair0_cfg[0].txlaunch_wait_slotcount = 1; //manage when TX processing is triggered + openair0_cfg[0].iq_txshift = 4;//shift + openair0_cfg[0].iq_rxrescale = 15;//rescale iqs + + for(int i=0; i<((int) s->usrp->get_rx_num_channels()); i++) { + if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); + s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); + set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); + ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); + // limit to maximum gain + AssertFatal( openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] <= gain_range.stop(), + "RX Gain too high, lower by %f dB\n", + openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] - gain_range.stop()); + s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],i); + LOG_I(HW,"RX Gain %d %f (%f) => %f (max %f)\n",i, + openair0_cfg[0].rx_gain[i],openair0_cfg[0].rx_gain_offset[i], + openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop()); } + } - if (device->type==USRP_N300_DEV) { - openair0_cfg[0].rx_gain_calib_table = calib_table_n310; - std::cerr << "-- Using calibration table: calib_table_n310" << std::endl; + LOG_D(HW, "usrp->get_tx_num_channels() == %zd\n", s->usrp->get_tx_num_channels()); + LOG_D(HW, "openair0_cfg[0].tx_num_channels == %d\n", openair0_cfg[0].tx_num_channels); + + for(int i=0; i<((int) s->usrp->get_tx_num_channels()); i++) { + ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); + + if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); + s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); + s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i); + LOG_I(HW,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]); } + } - if (device->type==USRP_N300_DEV || device->type==USRP_X300_DEV) { - LOG_I(HW,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate); + //s->usrp->set_clock_source("external"); + //s->usrp->set_time_source("external"); + // display USRP settings + LOG_I(HW,"Actual master clock: %fMHz...\n",s->usrp->get_master_clock_rate()/1e6); + LOG_I(HW,"Actual clock source %s...\n",s->usrp->get_clock_source(0).c_str()); + LOG_I(HW,"Actual time source %s...\n",s->usrp->get_time_source(0).c_str()); + sleep(1); + // create tx & rx streamer + uhd::stream_args_t stream_args_rx("sc16", "sc16"); + int samples=openair0_cfg[0].sample_rate; + int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); + samples/=10000; + LOG_I(HW,"RF board max packet size %u, size for 100µs jitter %d \n", max, samples); - switch ((int)openair0_cfg[0].sample_rate) { - case 122880000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; //to be checked - openair0_cfg[0].tx_bw = 80e6; - openair0_cfg[0].rx_bw = 80e6; - break; + if ( samples < max ) { + stream_args_rx.args["spp"] = str(boost::format("%d") % samples ); + } - case 92160000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; //to be checked - openair0_cfg[0].tx_bw = 80e6; - openair0_cfg[0].rx_bw = 80e6; - break; + LOG_I(HW,"rx_max_num_samps %zu\n", + s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps()); - case 61440000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; - openair0_cfg[0].tx_bw = 40e6; - openair0_cfg[0].rx_bw = 40e6; - break; + for (int i = 0; irx_stream = s->usrp->get_rx_stream(stream_args_rx); + uhd::stream_args_t stream_args_tx("sc16", "sc16"); - case 30720000: - // from usrp_time_offset - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 15; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; + for (int i = 0; itx_stream = s->usrp->get_tx_stream(stream_args_tx); - case 7680000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 50; - openair0_cfg[0].tx_bw = 5e6; - openair0_cfg[0].rx_bw = 5e6; - break; + /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ + for(int i=0; i<((int) s->usrp->get_tx_num_channels()) && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); - case 1920000: - //openair0_cfg[0].samples_per_packet = 2048; - openair0_cfg[0].tx_sample_advance = 50; - openair0_cfg[0].tx_bw = 1.25e6; - openair0_cfg[0].rx_bw = 1.25e6; - break; + for(int i=0; i<((int) s->usrp->get_rx_num_channels()) && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); - default: - LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); - exit(-1); - break; - } - } + for (int i=0; iusrp->get_rx_rate(i)/1e6); + LOG_I(HW," Actual RX frequency: %fGHz...\n", s->usrp->get_rx_freq(i)/1e9); + LOG_I(HW," Actual RX gain: %f...\n", s->usrp->get_rx_gain(i)); + LOG_I(HW," Actual RX bandwidth: %fM...\n", s->usrp->get_rx_bandwidth(i)/1e6); + LOG_I(HW," Actual RX antenna: %s...\n", s->usrp->get_rx_antenna(i).c_str()); + } - if (device->type == USRP_B200_DEV) { - if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { - openair0_cfg[0].rx_gain_calib_table = calib_table_b210; - bw_gain_adjust=0; - std::cerr << "-- Using calibration table: calib_table_b210" << std::endl; // Bell Labs info - } else { - openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; - bw_gain_adjust=1; - std::cerr << "-- Using calibration table: calib_table_b210_38" << std::endl; // Bell Labs info - } + for (int i=0; iusrp->get_tx_rate(i)/1e6); + LOG_I(HW," Actual TX frequency: %fGHz...\n", s->usrp->get_tx_freq(i)/1e9); + LOG_I(HW," Actual TX gain: %f...\n", s->usrp->get_tx_gain(i)); + LOG_I(HW," Actual TX bandwidth: %fM...\n", s->usrp->get_tx_bandwidth(i)/1e6); + LOG_I(HW," Actual TX antenna: %s...\n", s->usrp->get_tx_antenna(i).c_str()); + LOG_I(HW," Actual TX packet size: %lu\n",s->tx_stream->get_max_num_samps()); + } - switch ((int)openair0_cfg[0].sample_rate) { - case 46080000: - s->usrp->set_master_clock_rate(46.08e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 115; - openair0_cfg[0].tx_bw = 40e6; - openair0_cfg[0].rx_bw = 40e6; - break; + LOG_I(HW,"Device timestamp: %f...\n", s->usrp->get_time_now().get_real_secs()); + device->trx_write_func = trx_usrp_write; + device->trx_read_func = trx_usrp_read; + s->sample_rate = openair0_cfg[0].sample_rate; - case 30720000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 115; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; + // TODO: + // init tx_forward_nsamps based usrp_time_offset ex + if(is_equal(s->sample_rate, (double)30.72e6)) + s->tx_forward_nsamps = 176; - case 23040000: - s->usrp->set_master_clock_rate(23.04e6); //to be checked - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 113; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; + if(is_equal(s->sample_rate, (double)15.36e6)) + s->tx_forward_nsamps = 90; - case 15360000: - s->usrp->set_master_clock_rate(30.72e06); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 103; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - case 7680000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 80; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - case 1920000: - s->usrp->set_master_clock_rate(30.72e6); - //openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 40; - openair0_cfg[0].tx_bw = 20e6; - openair0_cfg[0].rx_bw = 20e6; - break; - - default: - LOG_E(HW,"Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); - exit(-1); - break; - } - } - - /* device specific */ - //openair0_cfg[0].txlaunch_wait = 1;//manage when TX processing is triggered - //openair0_cfg[0].txlaunch_wait_slotcount = 1; //manage when TX processing is triggered - openair0_cfg[0].iq_txshift = 4;//shift - openair0_cfg[0].iq_rxrescale = 15;//rescale iqs - - for(int i=0; i<((int) s->usrp->get_rx_num_channels()); i++) { - if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); - s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); - set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); - ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); - // limit to maximum gain - AssertFatal( openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] <= gain_range.stop(), - "RX Gain too high, lower by %f dB\n", - openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] - gain_range.stop()); - s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],i); - LOG_I(HW,"RX Gain %d %f (%f) => %f (max %f)\n",i, - openair0_cfg[0].rx_gain[i],openair0_cfg[0].rx_gain_offset[i], - openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop()); - } - } - - LOG_D(HW, "usrp->get_tx_num_channels() == %zd\n", s->usrp->get_tx_num_channels()); - LOG_D(HW, "openair0_cfg[0].tx_num_channels == %d\n", openair0_cfg[0].tx_num_channels); - - for(int i=0; i<((int) s->usrp->get_tx_num_channels()); i++) { - ::uhd::gain_range_t gain_range_tx = s->usrp->get_tx_gain_range(i); - - if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); - s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); - s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i); - LOG_I(HW,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]); - } - } - - //s->usrp->set_clock_source("external"); - //s->usrp->set_time_source("external"); - // display USRP settings - LOG_I(HW,"Actual master clock: %fMHz...\n",s->usrp->get_master_clock_rate()/1e6); - LOG_I(HW,"Actual clock source %s...\n",s->usrp->get_clock_source(0).c_str()); - LOG_I(HW,"Actual time source %s...\n",s->usrp->get_time_source(0).c_str()); - sleep(1); - // create tx & rx streamer - uhd::stream_args_t stream_args_rx("sc16", "sc16"); - int samples=openair0_cfg[0].sample_rate; - int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); - samples/=10000; - LOG_I(HW,"RF board max packet size %u, size for 100µs jitter %d \n", max, samples); - - if ( samples < max ) { - stream_args_rx.args["spp"] = str(boost::format("%d") % samples ); - } - - LOG_I(HW,"rx_max_num_samps %zu\n", - s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps()); - - for (int i = 0; irx_stream = s->usrp->get_rx_stream(stream_args_rx); - uhd::stream_args_t stream_args_tx("sc16", "sc16"); - - for (int i = 0; itx_stream = s->usrp->get_tx_stream(stream_args_tx); - - /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ - for(int i=0; i<((int) s->usrp->get_tx_num_channels()) && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); - - for(int i=0; i<((int) s->usrp->get_rx_num_channels()) && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); - - for (int i=0; iusrp->get_rx_rate(i)/1e6); - LOG_I(HW," Actual RX frequency: %fGHz...\n", s->usrp->get_rx_freq(i)/1e9); - LOG_I(HW," Actual RX gain: %f...\n", s->usrp->get_rx_gain(i)); - LOG_I(HW," Actual RX bandwidth: %fM...\n", s->usrp->get_rx_bandwidth(i)/1e6); - LOG_I(HW," Actual RX antenna: %s...\n", s->usrp->get_rx_antenna(i).c_str()); - } - - for (int i=0; iusrp->get_tx_rate(i)/1e6); - LOG_I(HW," Actual TX frequency: %fGHz...\n", s->usrp->get_tx_freq(i)/1e9); - LOG_I(HW," Actual TX gain: %f...\n", s->usrp->get_tx_gain(i)); - LOG_I(HW," Actual TX bandwidth: %fM...\n", s->usrp->get_tx_bandwidth(i)/1e6); - LOG_I(HW," Actual TX antenna: %s...\n", s->usrp->get_tx_antenna(i).c_str()); - LOG_I(HW," Actual TX packet size: %lu\n",s->tx_stream->get_max_num_samps()); - } - - LOG_I(HW,"Device timestamp: %f...\n", s->usrp->get_time_now().get_real_secs()); - device->trx_write_func = trx_usrp_write; - device->trx_read_func = trx_usrp_read; - s->sample_rate = openair0_cfg[0].sample_rate; - - // TODO: - // init tx_forward_nsamps based usrp_time_offset ex - if(is_equal(s->sample_rate, (double)30.72e6)) - s->tx_forward_nsamps = 176; - - if(is_equal(s->sample_rate, (double)15.36e6)) - s->tx_forward_nsamps = 90; - - if(is_equal(s->sample_rate, (double)7.68e6)) - s->tx_forward_nsamps = 50; + if(is_equal(s->sample_rate, (double)7.68e6)) + s->tx_forward_nsamps = 50; recplay_state_t *recPlay=device->recplay_state; @@ -1329,8 +1349,8 @@ extern "C" { std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl; exit(-1); } - } - return 0; } - /*@}*/ + return 0; +} +/*@}*/ }/* extern c */ From b2b3f3834490de98bc588ceade17f7b10dbe5367 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 8 Apr 2021 16:04:19 +0100 Subject: [PATCH 88/94] Skip invalid MAC CCCH messages for being processed at both gNB and UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 19 ++++++++++++++----- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 11 +++++++++-- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 68b6bb5b3c..78328e3888 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1786,18 +1786,27 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, mac_subheader_len = 2; } - if ( pdu_len >= (mac_subheader_len + mac_sdu_len) ) { + // Check if it is a valid CCCH message, we get all 00's messages very often + int i = 0; + for(i=0; i<(mac_subheader_len+mac_sdu_len); i++) { + if(pduP[i] != 0) { + break; + } + } + if (i == (mac_subheader_len+mac_sdu_len)) { + LOG_D(NR_MAC, "%s() Invalid CCCH message!, pdu_len: %d\n", __func__, pdu_len); + done = 1; + break; + } - LOG_D(NR_MAC,"DL_SCH_LCID_CCCH with payload len %d\n", mac_sdu_len); - - LOG_D(NR_MAC,"RRCSetup received at nr_ue_process_mac_pdu with payload len %d: \n", mac_sdu_len); + if ( mac_sdu_len > 0 ) { + LOG_D(NR_MAC,"DL_SCH_LCID_CCCH (e.g. RRCSetup) with payload len %d\n", mac_sdu_len); for (int i = 0; i < mac_subheader_len; i++) { LOG_D(NR_MAC, "MAC header %d: 0x%x\n", i, pduP[i]); } for (int i = 0; i < mac_sdu_len; i++) { LOG_D(NR_MAC, "%d: 0x%x\n", i, pduP[mac_subheader_len + i]); } - nr_mac_rrc_data_ind_ue(module_idP, CC_id, gNB_index, frameP, 0, mac->crnti, CCCH, pduP+mac_subheader_len, mac_sdu_len); } break; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 15b743036c..352b045fb7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -248,9 +248,16 @@ void nr_process_mac_pdu( mac_sdu_len = 8; // Check if it is a valid CCCH1 message, we get all 00's messages very often - if (pdu_len != 9) { + int i = 0; + for(i=0; i<(mac_subheader_len+mac_sdu_len); i++) { + if(pdu_ptr[i] != 0) { + break; + } + } + if (i == (mac_subheader_len+mac_sdu_len)) { LOG_D(NR_MAC, "%s() Invalid CCCH1 message!, pdu_len: %d\n", __func__, pdu_len); - return; + done = 1; + break; } } else { // fixed length of 6 bytes From ddfc737c65338ed10f0fdd3d011f3b16e11da903 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 9 Apr 2021 19:46:35 +0100 Subject: [PATCH 89/94] Fix search space for Msg2 and Msg4 at gNB --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 87 +++++++++++-------- openair2/RRC/NR/rrc_gNB_reconfig.c | 14 ++- 2 files changed, 63 insertions(+), 38 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 06615f63d3..7d73899f37 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -865,34 +865,31 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int rbStart = 0; int rbSize = 8; - if (nr_mac->sched_ctrlCommon == NULL){ - LOG_D(NR_MAC,"generate_Msg2: Filling nr_mac->sched_ctrlCommon\n"); - nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); - nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); - nr_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->coreset)); - nr_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->active_bwp)); - fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); - fill_default_coresetZero(nr_mac->sched_ctrlCommon->coreset,cc->ServingCellConfigCommon); - fill_default_initialDownlinkBWP(nr_mac->sched_ctrlCommon->active_bwp,cc->ServingCellConfigCommon); - } - NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - long BWPStart = 0; NR_SearchSpace_t *ss = NULL; - NR_BWP_Downlink_t *bwp = NULL; - NR_ControlResourceSet_t *coreset = NULL; - if (get_softmodem_params()->sa) { - bwp = nr_mac->sched_ctrlCommon->active_bwp; - BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - ss = nr_mac->sched_ctrlCommon->search_space; - coreset = nr_mac->sched_ctrlCommon->coreset; - } else { // NSA mode is not using the Initial BWP - bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + if(ra->ra_ss) { ss = ra->ra_ss; - coreset = get_coreset(bwp, ss, 0); + } else { + if (nr_mac->sched_ctrlCommon == NULL){ + nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); + } + if(nr_mac->sched_ctrlCommon->search_space == NULL) { + nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); + fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); + } + ss = nr_mac->sched_ctrlCommon->search_space; + } + + NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; + NR_ControlResourceSet_t *coreset = get_coreset(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1], ss, 0); + + long BWPStart = 0; + if (get_softmodem_params()->sa) { + BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } else { // NSA mode is not using the Initial BWP + BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); } uint16_t *vrb_map = cc[CC_id].vrb_map; @@ -930,10 +927,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); + uint8_t numDmrsCdmGrpsNoData = 2; if (nrOfSymbols == 2) { - nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 1; - } else { - nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 2; + numDmrsCdmGrpsNoData = 1; } // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially @@ -953,7 +949,11 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } // TODO: This assignment should be done in function nr_configure_pdcch() - pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; + if(get_softmodem_params()->sa) { + pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; + pdcch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdcch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); @@ -985,9 +985,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra mcsTableIdx = 2; } - AssertFatal(nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 1 || nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 2, + AssertFatal(numDmrsCdmGrpsNoData == 1 || numDmrsCdmGrpsNoData == 2, "nr_mac->schedCtrlCommon->numDmrsCdmGrpsNoData %d is not possible", - nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData); + numDmrsCdmGrpsNoData); pdsch_pdu_rel15->pduBitmap = 0; pdsch_pdu_rel15->rnti = ra->RA_rnti; @@ -1009,7 +1009,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; - pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData; + pdsch_pdu_rel15->numDmrsCdmGrpsNoData = numDmrsCdmGrpsNoData; pdsch_pdu_rel15->dmrsPorts = 1; pdsch_pdu_rel15->resourceAlloc = 1; pdsch_pdu_rel15->rbStart = rbStart; @@ -1074,7 +1074,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra NR_DL_DCI_FORMAT_1_0, NR_RNTI_RA, pdsch_pdu_rel15->BWPSize, - nr_mac->sched_ctrlCommon->active_bwp->bwp_Id); + bwp->bwp_Id); // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; @@ -1119,15 +1119,28 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint8_t time_domain_assignment = 0; uint8_t mcsIndex = 0; - NR_SearchSpace_t *ss = nr_mac->sched_ctrlCommon->search_space; - NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp; - NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset; - NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + NR_SearchSpace_t *ss = NULL; + if(ra->ra_ss) { + ss = ra->ra_ss; + } else { + if (nr_mac->sched_ctrlCommon == NULL){ + nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); + } + if(nr_mac->sched_ctrlCommon->search_space == NULL) { + nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); + fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); + } + ss = nr_mac->sched_ctrlCommon->search_space; + } + + NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; + NR_ControlResourceSet_t *coreset = get_coreset(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1], ss, 0); int UE_id = find_nr_UE_id(module_idP, ra->rnti); NR_UE_info_t *UE_info = &nr_mac->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); @@ -1260,6 +1273,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // TODO: This assignment should be done in function nr_configure_pdcch() pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; + pdcch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdcch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); @@ -1375,7 +1390,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra NR_DL_DCI_FORMAT_1_0, NR_RNTI_TC, pdsch_pdu_rel15->BWPSize, - nr_mac->sched_ctrlCommon->active_bwp->bwp_Id); + bwp->bwp_Id); // Add padding header and zero rest out if there is space left if (mac_pdu_length < harq->tb_size) { diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index b59d9716a2..19e8d77e05 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -483,7 +483,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco coreset->frequencyDomainResources.buf[0] = 0xf0; else coreset->frequencyDomainResources.buf[0] = 0xff; - if (curr_bwp < 96) + if (curr_bwp < 96 || get_softmodem_params()->sa==1) coreset->frequencyDomainResources.buf[1] = 0; else coreset->frequencyDomainResources.buf[1] = 0xff; @@ -494,7 +494,17 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco coreset->frequencyDomainResources.size = 6; coreset->frequencyDomainResources.bits_unused = 3; coreset->duration=1; - coreset->cce_REG_MappingType.present = NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved; + + if(get_softmodem_params()->sa) { + coreset->cce_REG_MappingType.present=NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved; + coreset->cce_REG_MappingType.choice.interleaved=calloc(1,sizeof(*coreset->cce_REG_MappingType.choice.interleaved)); + coreset->cce_REG_MappingType.choice.interleaved->reg_BundleSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6; + coreset->cce_REG_MappingType.choice.interleaved->interleaverSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n2; + coreset->cce_REG_MappingType.choice.interleaved->shiftIndex = servingcellconfigcommon->physCellId; + } else { + coreset->cce_REG_MappingType.present = NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved; + } + coreset->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle; coreset->tci_StatesPDCCH_ToAddList=calloc(1,sizeof(*coreset->tci_StatesPDCCH_ToAddList)); From cd14ba96672f9c60cc2cd373979a29bacc7cf279 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Sat, 10 Apr 2021 13:51:51 +0200 Subject: [PATCH 90/94] Revert "Revert "Revert RA preamble shift at gNB"" This reverts commit e06c7276042d2ce3a7956cc5d2e68e9b0a0b3bed --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index a25759d0e6..34c647810d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -776,7 +776,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, preamble_shift -= NCS; if (preamble_shift < 0) - preamble_shift+=((N_ZC/NCS)*NCS); + preamble_shift+=N_ZC; } } else { // This is the high-speed case new_dft = 0; From a8ca37a782857909640944678acd92c681b44c67 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 12 Apr 2021 13:48:47 +0100 Subject: [PATCH 91/94] Add support for InitialBWP in nr_configure_pdcch --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 4 ++-- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 7d73899f37..9efc03101d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -883,7 +883,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - NR_ControlResourceSet_t *coreset = get_coreset(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1], ss, 0); + NR_ControlResourceSet_t *coreset = get_coreset(bwp, ss, 0); long BWPStart = 0; if (get_softmodem_params()->sa) { @@ -1134,7 +1134,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - NR_ControlResourceSet_t *coreset = get_coreset(ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1], ss, 0); + NR_ControlResourceSet_t *coreset = get_coreset(bwp, ss, 0); int UE_id = find_nr_UE_id(module_idP, ra->rnti); NR_UE_info_t *UE_info = &nr_mac->UE_info; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 265c58c2e4..4f55d78604 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -563,6 +563,8 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu, NR_ServingCellConfigCommon_t *scc, NR_BWP_Downlink_t *bwp) { + int sps = 0; + if (bwp) { // This is not the InitialBWP pdcch_pdu->BWPSize = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); pdcch_pdu->BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); @@ -571,8 +573,18 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu, // first symbol //AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored"); - int sps = bwp->bwp_Common->genericParameters.cyclicPrefix == NULL ? 14 : 12; + sps = bwp->bwp_Common->genericParameters.cyclicPrefix == NULL ? 14 : 12; + } + else { // this is for InitialBWP + pdcch_pdu->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdcch_pdu->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + pdcch_pdu->SubcarrierSpacing = scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing; + pdcch_pdu->CyclicPrefix = (scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.cyclicPrefix==NULL) ? 0 : *scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.cyclicPrefix; + // first symbol + //AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored"); + sps = scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.cyclicPrefix == NULL ? 14 : 12; + } AssertFatal(ss->monitoringSymbolsWithinSlot!=NULL,"ss->monitoringSymbolsWithinSlot is null\n"); AssertFatal(ss->monitoringSymbolsWithinSlot->buf!=NULL,"ss->monitoringSymbolsWithinSlot->buf is null\n"); @@ -617,10 +629,6 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu, //precoderGranularity pdcch_pdu->precoderGranularity = coreset->precoderGranularity; - } - else { // this is for InitialBWP - AssertFatal(1==0,"Fill in InitialBWP PDCCH configuration\n"); - } } From e8f8297892ea878d1ca37dd35d400125db2469fc Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 12 Apr 2021 19:20:23 +0100 Subject: [PATCH 92/94] Fix search space and coreset for Msg2 and Msg4 at gNB --- openair2/GNB_APP/gnb_config.c | 32 ++++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 125 +++++++++--------- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- openair2/RRC/NR/rrc_gNB_reconfig.c | 16 +-- 4 files changed, 94 insertions(+), 81 deletions(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index b40ff5d9e2..a440c99537 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -123,7 +123,37 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) { scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon)); scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero = CALLOC(1,sizeof(long)); scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero = CALLOC(1,sizeof(long)); - // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(struct NR_ControlResourceSet)); + + NR_ControlResourceSet_t *coreset0 = CALLOC(1,sizeof(struct NR_ControlResourceSet)); + coreset0->controlResourceSetId = 0; + // frequencyDomainResources '11111111 00000000 00000000 00000000 00000000 00000'B, + if(coreset0->frequencyDomainResources.buf == NULL) coreset0->frequencyDomainResources.buf = calloc(1,6); + coreset0->frequencyDomainResources.buf[0] = 0xff; + coreset0->frequencyDomainResources.buf[1] = 0; + coreset0->frequencyDomainResources.buf[2] = 0; + coreset0->frequencyDomainResources.buf[3] = 0; + coreset0->frequencyDomainResources.buf[4] = 0; + coreset0->frequencyDomainResources.buf[5] = 0; + coreset0->frequencyDomainResources.size = 6; + coreset0->frequencyDomainResources.bits_unused = 3; + coreset0->duration = 1; + coreset0->cce_REG_MappingType.present=NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved; + coreset0->cce_REG_MappingType.choice.interleaved=calloc(1,sizeof(*coreset0->cce_REG_MappingType.choice.interleaved)); + coreset0->cce_REG_MappingType.choice.interleaved->reg_BundleSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6; + coreset0->cce_REG_MappingType.choice.interleaved->interleaverSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n2; + coreset0->cce_REG_MappingType.choice.interleaved->shiftIndex = scc->physCellId; + coreset0->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle; + if(coreset0->tci_StatesPDCCH_ToAddList == NULL) coreset0->tci_StatesPDCCH_ToAddList = calloc(1,sizeof(*coreset0->tci_StatesPDCCH_ToAddList)); + NR_TCI_StateId_t *tci[8]; + for (int i=0;i<8;i++) { + tci[i]=calloc(1,sizeof(*tci[i])); + *tci[i] = i; + ASN_SEQUENCE_ADD(&coreset0->tci_StatesPDCCH_ToAddList->list,tci[i]); + } + coreset0->tci_StatesPDCCH_ToReleaseList = NULL; + coreset0->tci_PresentInDCI = NULL; + coreset0->pdcch_DMRS_ScramblingID = NULL; + scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = coreset0; // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList)); // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = CALLOC(1,sizeof(NR_SearchSpaceId_t)); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 9efc03101d..e051bb5f9d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -528,10 +528,11 @@ void nr_initiate_ra_proc(module_id_t module_idP, else ra_rnti = 1 + symbol + (slotP * 14) + (freq_index * 14 * 80) + (ul_carrier_id * 14 * 80 * 8); - // This should be handled differently when we use the initialBWP for RA ra->bwp_id = 1; - NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList - ->list.array[ra->bwp_id - 1]; + NR_BWP_Downlink_t *bwp = NULL; // For SA we use InitialBWP + if(get_softmodem_params()->sa != 1) { + bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]; + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1); @@ -562,13 +563,21 @@ void nr_initiate_ra_proc(module_id_t module_idP, ra->timing_offset = timing_offset; ra->preamble_slot = slotP; - struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = - bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + NR_SearchSpaceId_t ra_SearchSpace = 0; + struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = NULL; + if(bwp) { + commonSearchSpaceList = bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + ra_SearchSpace = *bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; + } else { + commonSearchSpaceList = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + ra_SearchSpace = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; + } AssertFatal(commonSearchSpaceList->list.count > 0, "common SearchSpace list has 0 elements\n"); + // Common searchspace list for (int i = 0; i < commonSearchSpaceList->list.count; i++) { ss = commonSearchSpaceList->list.array[i]; - if (ss->searchSpaceId == *bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace) + if (ss->searchSpaceId == ra_SearchSpace) ra->ra_ss = ss; } @@ -866,30 +875,27 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int rbSize = 8; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + NR_SearchSpace_t *ss = ra->ra_ss; + long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - NR_SearchSpace_t *ss = NULL; - if(ra->ra_ss) { - ss = ra->ra_ss; - } else { - if (nr_mac->sched_ctrlCommon == NULL){ - nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); - } - if(nr_mac->sched_ctrlCommon->search_space == NULL) { - nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); - fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); - } - ss = nr_mac->sched_ctrlCommon->search_space; + NR_BWP_Downlink_t *bwp = NULL; // For SA we use InitialBWP + if(get_softmodem_params()->sa != 1) { + bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]; } - NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - NR_ControlResourceSet_t *coreset = get_coreset(bwp, ss, 0); + NR_ControlResourceSet_t *coreset = NULL; + if(bwp) { + coreset = get_coreset(bwp, ss, 0); + } else { + coreset = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet; + } long BWPStart = 0; - if (get_softmodem_params()->sa) { - BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - } else { // NSA mode is not using the Initial BWP + if (get_softmodem_params()->sa != 1) { BWPStart = NRRIV2PRBOFFSET(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } else { + BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); } uint16_t *vrb_map = cc[CC_id].vrb_map; @@ -923,7 +929,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // Calculate number of symbols int startSymbolIndex, nrOfSymbols; - const int startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength; + const int startSymbolAndLength = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated-> + downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup-> + pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); @@ -934,9 +942,8 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them - const int bwpid = bwp->bwp_Id; const int coresetid = coreset->controlResourceSetId; - nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid]; + nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][ra->bwp_id][coresetid]; if (!pdcch_pdu_rel15) { nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset(dl_tti_pdcch_pdu, 0, sizeof(nfapi_nr_dl_tti_request_pdu_t)); @@ -945,14 +952,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dl_req->nPDUs += 1; pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; nr_configure_pdcch(pdcch_pdu_rel15, ss, coreset, scc, bwp); - nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid] = pdcch_pdu_rel15; - } - - // TODO: This assignment should be done in function nr_configure_pdcch() - if(get_softmodem_params()->sa) { - pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; - pdcch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdcch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + nr_mac->pdcch_pdu_idx[CC_id][ra->bwp_id][coresetid] = pdcch_pdu_rel15; } nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; @@ -976,7 +976,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra const int pduindex = nr_mac->pdu_index[CC_id]++; uint8_t mcsTableIdx = 0; - if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) + if (bwp==NULL || bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) mcsTableIdx = 0; else{ if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) @@ -994,7 +994,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->pduIndex = pduindex; pdsch_pdu_rel15->BWPSize = BWPSize; pdsch_pdu_rel15->BWPStart = BWPStart; - pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; + pdsch_pdu_rel15->SubcarrierSpacing = bwp!=NULL ? bwp->bwp_Common->genericParameters.subcarrierSpacing : scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,mcsTableIdx); @@ -1006,7 +1006,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->nrOfLayers = 1; pdsch_pdu_rel15->transmissionScheme = 0; pdsch_pdu_rel15->refPoint = 0; - pdsch_pdu_rel15->dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + pdsch_pdu_rel15->dmrsConfigType = bwp!=NULL ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; pdsch_pdu_rel15->numDmrsCdmGrpsNoData = numDmrsCdmGrpsNoData; @@ -1074,7 +1074,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra NR_DL_DCI_FORMAT_1_0, NR_RNTI_RA, pdsch_pdu_rel15->BWPSize, - bwp->bwp_Id); + ra->bwp_id); // DL TX request nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; @@ -1119,28 +1119,25 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint8_t time_domain_assignment = 0; uint8_t mcsIndex = 0; - NR_SearchSpace_t *ss = NULL; - if(ra->ra_ss) { - ss = ra->ra_ss; - } else { - if (nr_mac->sched_ctrlCommon == NULL){ - nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); - } - if(nr_mac->sched_ctrlCommon->search_space == NULL) { - nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); - fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); - } - ss = nr_mac->sched_ctrlCommon->search_space; + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + NR_SearchSpace_t *ss = ra->ra_ss; + + NR_BWP_Downlink_t *bwp = NULL; // For SA we use InitialBWP + if(get_softmodem_params()->sa != 1) { + bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]; } - NR_BWP_Downlink_t *bwp = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - NR_ControlResourceSet_t *coreset = get_coreset(bwp, ss, 0); + NR_ControlResourceSet_t *coreset = NULL; + if(bwp) { + coreset = get_coreset(bwp, ss, 0); + } else { + coreset = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet; + } int UE_id = find_nr_UE_id(module_idP, ra->rnti); NR_UE_info_t *UE_info = &nr_mac->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); @@ -1180,7 +1177,9 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // Calculate number of symbols int startSymbolIndex, nrOfSymbols; - const int startSymbolAndLength = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength; + const int startSymbolAndLength = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated-> + downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup-> + pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); @@ -1191,7 +1190,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint16_t N_DMRS_SLOT = get_num_dmrs(dlDmrsSymbPos); - long dmrsConfigType = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + long dmrsConfigType = bwp!=NULL ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0; uint8_t N_PRB_DMRS = 0; AssertFatal(nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 1 || nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 2, @@ -1206,7 +1205,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } uint8_t mcsTableIdx = 0; - if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) + if (bwp==NULL || bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) mcsTableIdx = 0; else{ if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) @@ -1257,9 +1256,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them - const int bwpid = bwp->bwp_Id; const int coresetid = coreset->controlResourceSetId; - nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid]; + nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][ra->bwp_id][coresetid]; if (!pdcch_pdu_rel15) { nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset(dl_tti_pdcch_pdu, 0, sizeof(nfapi_nr_dl_tti_request_pdu_t)); @@ -1268,14 +1266,9 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dl_req->nPDUs += 1; pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; nr_configure_pdcch(pdcch_pdu_rel15, ss, coreset, scc, bwp); - nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid] = pdcch_pdu_rel15; + nr_mac->pdcch_pdu_idx[CC_id][ra->bwp_id][coresetid] = pdcch_pdu_rel15; } - // TODO: This assignment should be done in function nr_configure_pdcch() - pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; - pdcch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdcch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; @@ -1300,7 +1293,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->pduIndex = pduindex; pdsch_pdu_rel15->BWPSize = BWPSize; pdsch_pdu_rel15->BWPStart = BWPStart; - pdsch_pdu_rel15->SubcarrierSpacing = bwp->bwp_Common->genericParameters.subcarrierSpacing; + pdsch_pdu_rel15->SubcarrierSpacing = bwp!=NULL ? bwp->bwp_Common->genericParameters.subcarrierSpacing : scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing; pdsch_pdu_rel15->CyclicPrefix = 0; pdsch_pdu_rel15->NrOfCodewords = 1; pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(mcsIndex,mcsTableIdx); @@ -1390,7 +1383,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra NR_DL_DCI_FORMAT_1_0, NR_RNTI_TC, pdsch_pdu_rel15->BWPSize, - bwp->bwp_Id); + ra->bwp_id); // Add padding header and zero rest out if there is space left if (mac_pdu_length < harq->tb_size) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 4f55d78604..d4cf603c4f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -178,7 +178,7 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac, int coreset_id = coreset->controlResourceSetId; int *cce_list; - if(bwp->bwp_Id == 0) { + if( bwp==NULL || bwp->bwp_Id == 0 ) { cce_list = nr_mac->cce_list[1][0]; } else { cce_list = nr_mac->cce_list[bwp->bwp_Id][coreset_id]; diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 19e8d77e05..455acb770c 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -483,7 +483,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco coreset->frequencyDomainResources.buf[0] = 0xf0; else coreset->frequencyDomainResources.buf[0] = 0xff; - if (curr_bwp < 96 || get_softmodem_params()->sa==1) + if (curr_bwp < 96) coreset->frequencyDomainResources.buf[1] = 0; else coreset->frequencyDomainResources.buf[1] = 0xff; @@ -494,17 +494,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco coreset->frequencyDomainResources.size = 6; coreset->frequencyDomainResources.bits_unused = 3; coreset->duration=1; - - if(get_softmodem_params()->sa) { - coreset->cce_REG_MappingType.present=NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved; - coreset->cce_REG_MappingType.choice.interleaved=calloc(1,sizeof(*coreset->cce_REG_MappingType.choice.interleaved)); - coreset->cce_REG_MappingType.choice.interleaved->reg_BundleSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6; - coreset->cce_REG_MappingType.choice.interleaved->interleaverSize = NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n2; - coreset->cce_REG_MappingType.choice.interleaved->shiftIndex = servingcellconfigcommon->physCellId; - } else { - coreset->cce_REG_MappingType.present = NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved; - } - + coreset->cce_REG_MappingType.present = NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved; coreset->precoderGranularity = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle; coreset->tci_StatesPDCCH_ToAddList=calloc(1,sizeof(*coreset->tci_StatesPDCCH_ToAddList)); @@ -552,7 +542,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ss->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0 = calloc(1,sizeof(*ss->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0)); ASN_SEQUENCE_ADD(&bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList->list,ss); - + bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1=calloc(1,sizeof(*bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1)); *bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1=0; From 3c59974b23a2b5c6ae12946e81ae0d2451cd5898 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 13 Apr 2021 15:26:44 +0100 Subject: [PATCH 93/94] Fix phy-test DL traffic --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index bc15353e9a..97708be352 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -943,7 +943,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in tx_req.tx_request_body[0].pdu_index = j; tx_req.tx_request_body[0].pdu = ulsch_input_buffer; - if (ra->ra_state != RA_SUCCEEDED && !ra->cfra){ + if (ra->ra_state == WAIT_RAR && !ra->cfra){ LOG_I(NR_MAC,"[RAPROC] RA-Msg3 transmitted\n"); nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->gNB_index); } From a8a34df01f5bc7248576e9b192c0045b651087c1 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 14 Apr 2021 00:28:41 +0100 Subject: [PATCH 94/94] Fix compilation warning in oai_usrpdevif --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 8025337ecb..8a2800611d 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1337,18 +1337,18 @@ extern "C" { if(is_equal(s->sample_rate, (double)7.68e6)) s->tx_forward_nsamps = 50; - recplay_state_t *recPlay=device->recplay_state; + recplay_state_t *recPlay=device->recplay_state; - if (recPlay != NULL) { // record mode - recPlay->maxSizeBytes=openair0_cfg[0].recplay_conf->u_sf_max * + if (recPlay != NULL) { // record mode + recPlay->maxSizeBytes=openair0_cfg[0].recplay_conf->u_sf_max * (sizeof(iqrec_t)+BELL_LABS_IQ_BYTES_PER_SF); - recPlay->ms_sample = (iqrec_t *) malloc(recPlay->maxSizeBytes); - recPlay->currentPtr= (uint8_t *)recPlay->ms_sample; + recPlay->ms_sample = (iqrec_t *) malloc(recPlay->maxSizeBytes); + recPlay->currentPtr= (uint8_t *)recPlay->ms_sample; - if (recPlay->ms_sample == NULL) { - std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl; - exit(-1); - } + if (recPlay->ms_sample == NULL) { + std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl; + exit(-1); + } } return 0; }