def info(): base = ToolValidator.info() extras = { 'link_libs': StringListValidator.info(), 'gen_waves': BoolValidator.info(), 'vlog_opts': StringListValidator.info(), 'vhdl_opts': StringListValidator.info(), 'vlog_defines': StringListValidator.info(), 'vhdl_generics': StringListValidator.info(), 'elab_opts': StringListValidator.info(), 'sim_opts': StringListValidator.info(), 'compile_log': StringValidator.info(), 'elaborate_log': StringValidator.info(), 'simulate_log': StringValidator.info() } return {**base, **extras}
def base_dict(package_name, authors=None): """generate a minimal Enzi.toml's dict with given information""" d = {} d['enzi_version'] = '0.3' package = {'name': str(package_name), 'version': '0.1.0'} if authors is None: authors = [] elif type(authors) == str: authors = [authors] elif type(authors) == list: authors = StringListValidator(key='authors', val=authors).validate() else: raise ValueError('authors must be a string or a string list') package['authors'] = authors d['package'] = package d['filesets'] = {'src': {'files': []}} return d
def info(): return {'filesets': StringListValidator.info()}
def info(): return { 'default_tool': StringValidator.info(), 'toplevel': StringValidator.info(), 'filesets': StringListValidator.info() }