def resolve_dump_format(tool, dump):
    'Decide on the correct dumping format\n\n    This is called after reading the config file. tool is the chosen tool,\n    which will always have been resolved by this point. waves is a boolean\n    which determines whether waves should be dumped at all (from the --waves\n    argument). dump is the dumping format chosen on the command line or None.\n\n    '
    assert (tool is not None)
    SUPPORTED_DUMP_FMTS = {'vcs': ['fsdb', 'vpd'], 'xcelium': ['fsdb', 'shm', 'vpd']}
    fmts = SUPPORTED_DUMP_FMTS.get(tool)
    if (dump is not None):
        if ((fmts is not None) and (dump not in fmts)):
            log.error('Chosen tool ({}) does not support wave dumping format {!r}.'.format(tool, dump))
            sys.exit(1)
        return dump
    if (not fmts):
        return 'vpd'
    return pick_dump_format(fmts)
Decide on the correct dumping format

This is called after reading the config file. tool is the chosen tool,
which will always have been resolved by this point. waves is a boolean
which determines whether waves should be dumped at all (from the --waves
argument). dump is the dumping format chosen on the command line or None.
def resolve_dump_format(tool, dump):
    'Decide on the correct dumping format\n\n    This is called after reading the config file. tool is the chosen tool,\n    which will always have been resolved by this point. waves is a boolean\n    which determines whether waves should be dumped at all (from the --waves\n    argument). dump is the dumping format chosen on the command line or None.\n\n    '
    assert (tool is not None)
    SUPPORTED_DUMP_FMTS = {'vcs': ['fsdb', 'vpd'], 'xcelium': ['fsdb', 'shm', 'vpd']}
    fmts = SUPPORTED_DUMP_FMTS.get(tool)
    if (dump is not None):
        if ((fmts is not None) and (dump not in fmts)):
            log.error('Chosen tool ({}) does not support wave dumping format {!r}.'.format(tool, dump))
            sys.exit(1)
        return dump
    if (not fmts):
        return 'vpd'
    return pick_dump_format(fmts)