+/** @ingroup group_nr5g_test_config
+ *
+ * @param[in] power_control_offset_ss
+ *
+ * @return uint16_t mapping
+ *
+ * @description
+ * This function maps FAPI to IAPI value range.
+ *
+ *
+ * nEpreRatioOfDmrsToSSB: 1->20000, 0.001dB step, -6dB to 14dB
+ * powerControlOffsetSS: 0->3, 3dB step, -3dB to 6dB
+ * |----------------------------------------------|
+ * | nEpreRatioOfDmrsToSSB | powerControlOffsetSS |
+ * |----------------------------------------------|
+ * | 3000 | 0 |
+ * | 6000 | 1 |
+ * | 9000 | 2 |
+ * | 12000 | 3 |
+ * |----------------------------------------------|
+ *
+**/
+uint16_t nr5g_fapi_calculate_nEpreRatioOfDmrsToSSB(
+ uint8_t power_control_offset_ss)
+{
+ switch(power_control_offset_ss)
+ {
+ case 0:
+ return 3000;
+ case 1:
+ return 6000;
+ case 2:
+ return 9000;
+ case 3:
+ return 12000;
+ default:
+ NR5G_FAPI_LOG(ERROR_LOG,
+ ("Unsupported value of power_control_offset_ss."));
+ return 0;
+ }
+}
+
+
+/** @ingroup group_nr5g_test_config
+ *
+ * @param[in] power_control_offset
+ *
+ * @return uint16_t mapping
+ *
+ * @description
+ * This function maps FAPI to IAPI value range.
+ *
+ *
+ * nEpreRatioOfPDSCHToSSB: 1->20000, 0.001dB step, -6dB to 14dB
+ * powerControlOffset: 0->23, 1dB step, -8dB to 15dB
+ * |----------------------------------------------|
+ * | nEpreRatioOfPDSCHToSSB | powerControlOffset |
+ * |----------------------------------------------|
+ * | 1 | 0-2 |
+ * | 1000 | 3 |
+ * | 2000 | 4 |
+ * | 3000 | 5 |
+ * | 4000 | 6 |
+ * | 5000 | 7 |
+ * | 6000 | 8 |
+ * | 7000 | 9 |
+ * | 8000 | 10 |
+ * | 9000 | 11 |
+ * | 10000 | 12 |
+ * | 11000 | 13 |
+ * | 12000 | 14 |
+ * | 13000 | 15 |
+ * | 14000 | 16 |
+ * | 15000 | 17 |
+ * | 16000 | 18 |
+ * | 17000 | 19 |
+ * | 18000 | 20 |
+ * | 19000 | 21 |
+ * | 20000 | 22-23 |
+ * |----------------------------------------------|
+ *
+**/
+uint16_t nr5g_fapi_calculate_nEpreRatioOfPDSCHToSSB(uint8_t power_control_offset)
+{
+ static const uint8_t MAPPING_SIZE = 24;
+ static const uint16_t power_control_offset_to_epre_ratio[MAPPING_SIZE] = {
+ // 0 1 2 3 4 5 6 7
+ 1, 1, 1, 1000, 2000, 3000, 4000, 5000,
+ // 8 9 10 11 12 13 14 15
+ 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000,
+ // 16 17 18 19 20 21 22 23
+ 14000, 15000, 16000, 17000, 18000, 19000, 20000, 20000
+ };
+
+ if(MAPPING_SIZE > power_control_offset)
+ {
+ return power_control_offset_to_epre_ratio[power_control_offset];
+ }
+ else
+ {
+ NR5G_FAPI_LOG(ERROR_LOG,
+ ("Unsupported value of power_control_offset=%u.",
+ power_control_offset));
+ return 0;
+ }
+}
+
+/** @ingroup group_nr5g_test_config
+ *
+ * @param[in] ssb_offset_point_a
+ * @param[in] sub_c_common
+ *
+ * @return uint8_t nSSBPrbOffset
+ *
+ * @description
+ * This function maps FAPI to IAPI value range.
+ *
+ * Please refer 5G FAPI-IAPI Translator Module SW Design Document for details on
+ * the mapping.
+ *
+**/
+uint8_t nr5g_fapi_calculate_nSSBPrbOffset(
+ uint16_t ssb_offset_point_a, uint8_t sub_c_common)
+{
+ return ssb_offset_point_a/pow(2, sub_c_common);
+}
+