sys.exit(-1)

    if not os.path.exists(gen_path):
        log(LogLevel.error,
            'Can not find "%s", gen path not exist!' % (gen_path))
        sys.exit(-1)

    if not os.path.exists(log_path):
        log(LogLevel.error,
            'Can not find "%s", log path not exist!' % (log_path))
        sys.exit(-1)

    if is_oldDws(dws_path, gen_spec):
        sys.exit(0)

    chipId = ChipObj.get_chipId(dws_path)
    log(LogLevel.info, 'chip id: %s' % (chipId))
    chipObj = None
    if cmp(chipId, 'MT6797') == 0:
        chipObj = Everest(dws_path, gen_path)
    elif cmp(chipId, 'MT6757') == 0:
        chipObj = Olympus(dws_path, gen_path)
    elif cmp(chipId, 'KIBOPLUS') == 0:
        chipObj = KiboPlus(dws_path, gen_path)
    elif cmp(chipId, 'MT6570') == 0:
        chipObj = Rushmore(dws_path, gen_path)
    elif cmp(chipId, 'MT6799') == 0:
        chipObj = Whitney(dws_path, gen_path)
    else:
        chipObj = ChipObj(dws_path, gen_path)
    if not os.path.exists(dws_path):
        log(LogLevel.error, 'Can not find "%s", file not exist!' %(dws_path))
        sys.exit(-1)

    if not os.path.exists(gen_path):
        log(LogLevel.error, 'Can not find "%s", gen path not exist!' %(gen_path))
        sys.exit(-1)

    if not os.path.exists(log_path):
        log(LogLevel.error, 'Can not find "%s", log path not exist!' %(log_path))
        sys.exit(-1)

    if is_oldDws(dws_path, gen_spec):
        sys.exit(0)

    chipId = ChipObj.get_chipId(dws_path)
    log(LogLevel.info, 'chip id: %s' %(chipId))
    chipObj = None
    if cmp(chipId, 'MT6797') == 0:
        chipObj = MT6797(dws_path, gen_path)
    elif cmp(chipId, 'MT6757') == 0:
        chipObj = MT6757(dws_path, gen_path)
    elif cmp(chipId, 'MT6757-P25') == 0:
        chipObj = MT6757_P25(dws_path, gen_path)
    elif cmp(chipId, 'MT6570') == 0:
        chipObj = MT6570(dws_path, gen_path)
    elif cmp(chipId, 'MT6799') == 0:
        chipObj = MT6799(dws_path, gen_path)
    elif cmp(chipId, 'MT6763') == 0:
        chipObj = MT6763(dws_path, gen_path)
    elif cmp(chipId, 'MT6759') == 0: