def assign_targets(target_list, target_id = ""):
    if(target_id == "fir" or target_id == "all"):
        target_list.append([0, 0, "Global FIR Section"])
        target_list.append([0x5013C00, 0x5013C03, "OCAPI FIR Reg0"])
        target_list.append([0x5013C40, 0x5013C43, "OCAPI FIR Reg1"])
        target_list.append([0x5013C80, 0x5013C83, "OCAPI FIR Reg2"])
    if(target_id == "odl" or target_id == "all"):
        target_list.append([0, 0, "ODL Section"])
        target_list.append([0x9010800, 0x9010803, "DLL FIR Reg0"])
#        target_list.append([0x9010801, 0x9010804, "DLL FIR Reg1"])
#        target_list.append([0x9010802, 0x9010805, "DLL FIR Reg2"])
        target_list.append([0x901082C, 0, "ODL 0 Status"]) #confirm masks in this section
        target_list.append([0x901082D, 0, "ODL 1 Status"])
        target_list.append([0x901082E, 0, "ODL 0 Training Status"])
        target_list.append([0x901082F, 0, "ODL 1 Training Status"])
        target_list.append([0x901081E, 0, "OLL Performance Monitor Counter 0"])
        target_list.append([0x901081F, 0, "OLL Performance Monitor Counter 1"])
        target_list.append([0x9010832, 0, "ODL 0 DLx Info"])
        target_list.append([0x9010833, 0, "ODL 1 DLx Info"])
    if(target_id == "otl1" or target_id == "all"):
        target_list.append([0, 0, "Stack 1 OTL Section"])
        target_list.append([0x5011356, 0x5011357, "OCAPI STCK1.OTL0 CERR HOLD0"])
        target_list.append([0x5011366, 0x5011367, "OCAPI STCK1.OTL0 CERR HOLD1"])
        target_list.append([0x5011386, 0x5011387, "OCAPI STCK1.OTL1 CERR HOLD0"])
        target_list.append([0x5011396, 0x5011397, "OCAPI STCK1.OTL1 CERR HOLD1"])
        target_list.append([0x501135E, 0, "OCAPI STCK1.OTL0 RXI"])
        target_list.append([0x501135F, 0, "OCAPI STCK1.OTL0 RXO"])
        target_list.append([0x501138E, 0, "OCAPI STCK1.OTL1 RXI"])
        target_list.append([0x501138F, 0, "OCAPI STCK1.OTL1 RXO"])
    if(target_id == "ctl1" or target_id == "all"):
        target_list.append([0, 0, "Stack 1 CS.CTL.MISC Section"])
        target_list.append([0x50112DA, 0x50112DC, "OCAPI STCK1.CS.CTL.MISC CERR FIRST0"])
        target_list.append([0x50112DE, 0x50112DC, "OCAPI STCK1.CS.CTL.MISC CERR HOLD0"])
        target_list.append([0x50112DB, 0x50112DD, "OCAPI STCK1.CS.CTL.MISC CERR FIRST1"])
        target_list.append([0x50112DF, 0x50112DD, "OCAPI STCK1.CS.CTL.MISC CERR HOLD1"])
    if(target_id == "dat1" or target_id == "all"):
        target_list.append([0, 0, "Stack 1 DAT.MISC Section"])
        target_list.append([0x50112F4, 0x50112F5, "OCAPI STCK1.DAT.MISC.CERR_ECC_HOLD"])
        target_list.append([0x50112F6, 0x50112F5, "OCAPI STCK1.DAT.MISC.CERR_ECC_FIRST"])
        target_list.append([0x50112F7, 0x50112F8, "OCAPI STCK1.DAT.MISC.CERR_PTY_HOLD"])
        target_list.append([0x50112F9, 0x50112F8, "OCAPI STCK1.DAT.MISC.CERR_PTY_FIRST"])
        target_list.append([0x50112FA, 0x50112FB, "OCAPI STCK1.DAT.MISC.CERR_LOG_HOLD"])
        target_list.append([0x50112FC, 0x50112FB, "OCAPI STCK1.DAT.MISC.CERR_LOG_FIRST"])
    if(target_id == "smx1" or target_id == "all"):
        target_list.append([0, 0, "Stack 1 CS.SMx Section"])
        target_list.append([0x5011217, 0x501121A, "OCAPI STCK1.CS.SM0 CERR FIRST0"])
        target_list.append([0x501121D, 0x501121A, "OCAPI STCK1.CS.SM0 CERR HOLD0"])
        target_list.append([0x5011218, 0x501121B, "OCAPI STCK1.CS.SM0 CERR FIRST1"])
        target_list.append([0x501121E, 0x501121B, "OCAPI STCK1.CS.SM0 CERR HOLD1"])
        target_list.append([0x5011219, 0x501121C, "OCAPI STCK1.CS.SM0 CERR FIRST2"])
        target_list.append([0x501121F, 0x501121C, "OCAPI STCK1.CS.SM0 CERR HOLD2"])
        target_list.append([0x5011247, 0x501124A, "OCAPI STCK1.CS.SM1 CERR FIRST0"])
        target_list.append([0x501124D, 0x501124A, "OCAPI STCK1.CS.SM1 CERR HOLD0"])
        target_list.append([0x5011248, 0x501124B, "OCAPI STCK1.CS.SM1 CERR FIRST1"])
        target_list.append([0x501124E, 0x501124B, "OCAPI STCK1.CS.SM1 CERR HOLD1"])
        target_list.append([0x5011249, 0x501124C, "OCAPI STCK1.CS.SM1 CERR FIRST2"])
        target_list.append([0x501124F, 0x501124C, "OCAPI STCK1.CS.SM1 CERR HOLD2"])
        target_list.append([0x5011277, 0x501127A, "OCAPI STCK1.CS.SM2 CERR FIRST0"])
        target_list.append([0x501127D, 0x501127A, "OCAPI STCK1.CS.SM2 CERR HOLD0"])
        target_list.append([0x5011278, 0x501127B, "OCAPI STCK1.CS.SM2 CERR FIRST1"])
        target_list.append([0x501127E, 0x501127B, "OCAPI STCK1.CS.SM2 CERR HOLD1"])
        target_list.append([0x5011279, 0x501127C, "OCAPI STCK1.CS.SM2 CERR FIRST2"])
        target_list.append([0x501127F, 0x501127C, "OCAPI STCK1.CS.SM2 CERR HOLD2"])
        target_list.append([0x50112A7, 0x50112AA, "OCAPI STCK1.CS.SM3 CERR FIRST0"])
        target_list.append([0x50112AD, 0x50112AA, "OCAPI STCK1.CS.SM3 CERR HOLD0"])
        target_list.append([0x50112A8, 0x50112AB, "OCAPI STCK1.CS.SM3 CERR FIRST1"])
        target_list.append([0x50112AE, 0x50112AB, "OCAPI STCK1.CS.SM3 CERR HOLD1"])
        target_list.append([0x50112A9, 0x50112AC, "OCAPI STCK1.CS.SM3 CERR FIRST2"])
        target_list.append([0x50112AF, 0x50112AC, "OCAPI STCK1.CS.SM3 CERR HOLD2"])
    if(target_id == "otl2" or target_id == "all"):
        target_list.append([0, 0, "Stack 2 OTL Section"])
        target_list.append([0x5011556, 0x5011557, "OCAPI STCK2.OTL0 CERR HOLD0"])
        target_list.append([0x5011566, 0x5011567, "OCAPI STCK2.OTL0 CERR HOLD1"])
        target_list.append([0x5011586, 0x5011587, "OCAPI STCK2.OTL1 CERR HOLD0"])
        target_list.append([0x5011596, 0x5011597, "OCAPI STCK2.OTL1 CERR HOLD1"])
        target_list.append([0x501155E, 0, "OCAPI STCK2.OTL0 RXI"])
        target_list.append([0x501155F, 0, "OCAPI STCK2.OTL0 RXO"])
        target_list.append([0x501158E, 0, "OCAPI STCK2.OTL1 RXI"])
        target_list.append([0x501158F, 0, "OCAPI STCK2.OTL1 RXO"])
    if(target_id == "ctl2" or target_id == "all"):
        target_list.append([0, 0, "Stack 2 CS.CTL.MISC Section"])
        target_list.append([0x50114DA, 0x50114DC, "OCAPI STCK2.CS.CTL.MISC CERR FIRST0"])
        target_list.append([0x50114DE, 0x50114DC, "OCAPI STCK2.CS.CTL.MISC CERR HOLD0"])
        target_list.append([0x50114DB, 0x50114DD, "OCAPI STCK2.CS.CTL.MISC CERR FIRST1"])
        target_list.append([0x50114DF, 0x50114DD, "OCAPI STCK2.CS.CTL.MISC CERR HOLD1"])
    if(target_id == "dat2" or target_id == "all"):
        target_list.append([0, 0, "Stack 2 DAT.MISC Section"])
        target_list.append([0x50114F4, 0x50114F5, "OCAPI STCK2.DAT.MISC.CERR_ECC_HOLD"])
        target_list.append([0x50114F6, 0x50114F5, "OCAPI STCK2.DAT.MISC.CERR_ECC_FIRST"])
        target_list.append([0x50114F7, 0x50114F8, "OCAPI STCK2.DAT.MISC.CERR_PTY_HOLD"])
        target_list.append([0x50114F9, 0x50114F8, "OCAPI STCK2.DAT.MISC.CERR_PTY_FIRST"])
        target_list.append([0x50114FA, 0x50114FB, "OCAPI STCK2.DAT.MISC.CERR_LOG_HOLD"])
        target_list.append([0x50114FC, 0x50114FB, "OCAPI STCK2.DAT.MISC.CERR_LOG_FIRST"])
    if(target_id == "smx2" or target_id == "all"):
        target_list.append([0, 0, "Stack 2 CS.SMx Section"])
        target_list.append([0x5011417, 0x501141A, "OCAPI STCK2.CS.SM0 CERR FIRST0"])
        target_list.append([0x501141D, 0x501141A, "OCAPI STCK2.CS.SM0 CERR HOLD0"])
        target_list.append([0x5011418, 0x501141B, "OCAPI STCK2.CS.SM0 CERR FIRST1"])
        target_list.append([0x501141E, 0x501141B, "OCAPI STCK2.CS.SM0 CERR HOLD1"])
        target_list.append([0x5011419, 0x501141C, "OCAPI STCK2.CS.SM0 CERR FIRST2"])
        target_list.append([0x501141F, 0x501141C, "OCAPI STCK2.CS.SM0 CERR HOLD2"])
        target_list.append([0x5011447, 0x501144A, "OCAPI STCK2.CS.SM1 CERR FIRST0"])
        target_list.append([0x501144D, 0x501144A, "OCAPI STCK2.CS.SM1 CERR HOLD0"])
        target_list.append([0x5011448, 0x501144B, "OCAPI STCK2.CS.SM1 CERR FIRST1"])
        target_list.append([0x501144E, 0x501144B, "OCAPI STCK2.CS.SM1 CERR HOLD1"])
        target_list.append([0x5011449, 0x501144C, "OCAPI STCK2.CS.SM1 CERR FIRST2"])
        target_list.append([0x501144F, 0x501144C, "OCAPI STCK2.CS.SM1 CERR HOLD2"])
        target_list.append([0x5011477, 0x501147A, "OCAPI STCK2.CS.SM2 CERR FIRST0"])
        target_list.append([0x501147D, 0x501147A, "OCAPI STCK2.CS.SM2 CERR HOLD0"])
        target_list.append([0x5011478, 0x501147B, "OCAPI STCK2.CS.SM2 CERR FIRST1"])
        target_list.append([0x501147E, 0x501147B, "OCAPI STCK2.CS.SM2 CERR HOLD1"])
        target_list.append([0x5011479, 0x501147C, "OCAPI STCK2.CS.SM2 CERR FIRST2"])
        target_list.append([0x501147F, 0x501147C, "OCAPI STCK2.CS.SM2 CERR HOLD2"])
        target_list.append([0x50114A7, 0x50114AA, "OCAPI STCK2.CS.SM3 CERR FIRST0"])
        target_list.append([0x50114AD, 0x50114AA, "OCAPI STCK2.CS.SM3 CERR HOLD0"])
        target_list.append([0x50114A8, 0x50114AB, "OCAPI STCK2.CS.SM3 CERR FIRST1"])
        target_list.append([0x50114AE, 0x50114AB, "OCAPI STCK2.CS.SM3 CERR HOLD1"])
        target_list.append([0x50114A9, 0x50114AC, "OCAPI STCK2.CS.SM3 CERR FIRST2"])
        target_list.append([0x50114AF, 0x50114AC, "OCAPI STCK2.CS.SM3 CERR HOLD2"])
    if(target_id == "cerr0" or target_id == "all"):
        target_list.append([0, 0, "STCK0 c_err_rpt Message Section"])
        target_list.append([0x5011011, 0, "NPU.STCK0.CS.SM0.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011012, 0, "NPU.STCK0.CS.SM0.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011013, 0, "NPU.STCK0.CS.SM0.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011014, 0, "NPU.STCK0.CS.SM0.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011015, 0, "NPU.STCK0.CS.SM0.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011025, 0, "NPU.STCK0.CS.SM0.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011026, 0, "NPU.STCK0.CS.SM0.MISC.CERR_MESSAGE6"])
        target_list.append([0x5011041, 0, "NPU.STCK0.CS.SM1.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011042, 0, "NPU.STCK0.CS.SM1.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011043, 0, "NPU.STCK0.CS.SM1.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011044, 0, "NPU.STCK0.CS.SM1.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011045, 0, "NPU.STCK0.CS.SM1.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011055, 0, "NPU.STCK0.CS.SM1.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011056, 0, "NPU.STCK0.CS.SM1.MISC.CERR_MESSAGE6"])
        target_list.append([0x5011071, 0, "NPU.STCK0.CS.SM2.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011072, 0, "NPU.STCK0.CS.SM2.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011073, 0, "NPU.STCK0.CS.SM2.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011074, 0, "NPU.STCK0.CS.SM2.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011075, 0, "NPU.STCK0.CS.SM2.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011085, 0, "NPU.STCK0.CS.SM2.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011086, 0, "NPU.STCK0.CS.SM2.MISC.CERR_MESSAGE6"])
        target_list.append([0x50110A1, 0, "NPU.STCK0.CS.SM3.MISC.CERR_MESSAGE0"])
        target_list.append([0x50110A2, 0, "NPU.STCK0.CS.SM3.MISC.CERR_MESSAGE1"])
        target_list.append([0x50110A3, 0, "NPU.STCK0.CS.SM3.MISC.CERR_MESSAGE2"])
        target_list.append([0x50110A4, 0, "NPU.STCK0.CS.SM3.MISC.CERR_MESSAGE3"])
        target_list.append([0x50110A5, 0, "NPU.STCK0.CS.SM3.MISC.CERR_MESSAGE4"])
        target_list.append([0x50110B5, 0, "NPU.STCK0.CS.SM3.MISC.CERR_MESSAGE5"])
        target_list.append([0x50110B6, 0, "NPU.STCK0.CS.SM3.MISC.CERR_MESSAGE6"])
        target_list.append([0x50110D8, 0, "NPU.STCK0.CS.CTL.MISC.CERR_MESSAGE0"])
        target_list.append([0x50110D9, 0, "NPU.STCK0.CS.CTL.MISC.CERR_MESSAGE1"])
    if(target_id == "cerr1" or target_id == "all"):
        target_list.append([0, 0, "STCK1 c_err_rpt Message Section"])
        target_list.append([0x5011211, 0, "NPU.STCK1.CS.SM0.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011212, 0, "NPU.STCK1.CS.SM0.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011213, 0, "NPU.STCK1.CS.SM0.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011214, 0, "NPU.STCK1.CS.SM0.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011215, 0, "NPU.STCK1.CS.SM0.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011225, 0, "NPU.STCK1.CS.SM0.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011226, 0, "NPU.STCK1.CS.SM0.MISC.CERR_MESSAGE6"])
        target_list.append([0x5011241, 0, "NPU.STCK1.CS.SM1.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011242, 0, "NPU.STCK1.CS.SM1.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011243, 0, "NPU.STCK1.CS.SM1.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011244, 0, "NPU.STCK1.CS.SM1.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011245, 0, "NPU.STCK1.CS.SM1.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011255, 0, "NPU.STCK1.CS.SM1.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011256, 0, "NPU.STCK1.CS.SM1.MISC.CERR_MESSAGE6"])
        target_list.append([0x5011271, 0, "NPU.STCK1.CS.SM2.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011272, 0, "NPU.STCK1.CS.SM2.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011273, 0, "NPU.STCK1.CS.SM2.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011274, 0, "NPU.STCK1.CS.SM2.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011275, 0, "NPU.STCK1.CS.SM2.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011285, 0, "NPU.STCK1.CS.SM2.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011286, 0, "NPU.STCK1.CS.SM2.MISC.CERR_MESSAGE6"])
        target_list.append([0x50112A1, 0, "NPU.STCK1.CS.SM3.MISC.CERR_MESSAGE0"])
        target_list.append([0x50112A2, 0, "NPU.STCK1.CS.SM3.MISC.CERR_MESSAGE1"])
        target_list.append([0x50112A3, 0, "NPU.STCK1.CS.SM3.MISC.CERR_MESSAGE2"])
        target_list.append([0x50112A4, 0, "NPU.STCK1.CS.SM3.MISC.CERR_MESSAGE3"])
        target_list.append([0x50112A5, 0, "NPU.STCK1.CS.SM3.MISC.CERR_MESSAGE4"])
        target_list.append([0x50112B5, 0, "NPU.STCK1.CS.SM3.MISC.CERR_MESSAGE5"])
        target_list.append([0x50112B6, 0, "NPU.STCK1.CS.SM3.MISC.CERR_MESSAGE6"])
        target_list.append([0x50112D8, 0, "NPU.STCK1.CS.CTL.MISC.CERR_MESSAGE0"])
        target_list.append([0x50112D9, 0, "NPU.STCK1.CS.CTL.MISC.CERR_MESSAGE1"])
    if(target_id == "cerr2" or target_id == "all"):
        target_list.append([0, 0, "STCK2 c_err_rpt Message Section"])
        target_list.append([0x5011411, 0, "NPU.STCK2.CS.SM0.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011412, 0, "NPU.STCK2.CS.SM0.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011413, 0, "NPU.STCK2.CS.SM0.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011414, 0, "NPU.STCK2.CS.SM0.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011415, 0, "NPU.STCK2.CS.SM0.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011425, 0, "NPU.STCK2.CS.SM0.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011426, 0, "NPU.STCK2.CS.SM0.MISC.CERR_MESSAGE6"])
        target_list.append([0x5011441, 0, "NPU.STCK2.CS.SM1.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011442, 0, "NPU.STCK2.CS.SM1.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011443, 0, "NPU.STCK2.CS.SM1.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011444, 0, "NPU.STCK2.CS.SM1.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011445, 0, "NPU.STCK2.CS.SM1.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011455, 0, "NPU.STCK2.CS.SM1.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011456, 0, "NPU.STCK2.CS.SM1.MISC.CERR_MESSAGE6"])
        target_list.append([0x5011471, 0, "NPU.STCK2.CS.SM2.MISC.CERR_MESSAGE0"])
        target_list.append([0x5011472, 0, "NPU.STCK2.CS.SM2.MISC.CERR_MESSAGE1"])
        target_list.append([0x5011473, 0, "NPU.STCK2.CS.SM2.MISC.CERR_MESSAGE2"])
        target_list.append([0x5011474, 0, "NPU.STCK2.CS.SM2.MISC.CERR_MESSAGE3"])
        target_list.append([0x5011475, 0, "NPU.STCK2.CS.SM2.MISC.CERR_MESSAGE4"])
        target_list.append([0x5011485, 0, "NPU.STCK2.CS.SM2.MISC.CERR_MESSAGE5"])
        target_list.append([0x5011486, 0, "NPU.STCK2.CS.SM2.MISC.CERR_MESSAGE6"])
        target_list.append([0x50114A1, 0, "NPU.STCK2.CS.SM3.MISC.CERR_MESSAGE0"])
        target_list.append([0x50114A2, 0, "NPU.STCK2.CS.SM3.MISC.CERR_MESSAGE1"])
        target_list.append([0x50114A3, 0, "NPU.STCK2.CS.SM3.MISC.CERR_MESSAGE2"])
        target_list.append([0x50114A4, 0, "NPU.STCK2.CS.SM3.MISC.CERR_MESSAGE3"])
        target_list.append([0x50114A5, 0, "NPU.STCK2.CS.SM3.MISC.CERR_MESSAGE4"])
        target_list.append([0x50114B5, 0, "NPU.STCK2.CS.SM3.MISC.CERR_MESSAGE5"])
        target_list.append([0x50114B6, 0, "NPU.STCK2.CS.SM3.MISC.CERR_MESSAGE6"])
        target_list.append([0x50114D8, 0, "NPU.STCK2.CS.CTL.MISC.CERR_MESSAGE0"])
        target_list.append([0x50114D9, 0, "NPU.STCK2.CS.CTL.MISC.CERR_MESSAGE1"])
