def info(): base = ToolValidator.info() extras = { 'bitstream_name': StringValidator.info(), 'device_part': StringValidator.info(), 'vlog_params': ParamsDictValidator.info(), 'generics': ParamsDictValidator.info(), 'vlog_defines': ParamsDictValidator.info(), 'synth_only': BoolValidator.info(), 'build_project_only': BoolValidator.info(), } return {**base, **extras}
def info(): return { 'strParam': StringValidator.info(), 'boolParam': BoolValidator.info(), 'intParam': IntValidator.info(), 'floatParam': FloatValidator.info(), }
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 validate(self): super(EnziConfigValidator, self).validate() # check `enzi_version` enzi_version = self.val['enzi_version'] if not enzi_version in ENZI_CONFIG_VERSIONS: _v = StringValidator(key='enzi_version', val=enzi_version, parent=self) msg = 'unknown enzi_version: {}'.format(enzi_version) raise ValidatorError(_v.chain_keys_str(), msg) # check self dependency if 'dependencies' in self.val: package_name = self.val['package']['name'] if package_name in self.val['dependencies']: fmt = 'Possible self dependency for package: {} at {}' msg = fmt.format(package_name, self.key) logger.error(msg) raise SystemExit(EnziConfigValidator.BASE_ESTRING + msg) return self.val
def validate(self): super(EnziConfigValidator, self).validate() enzi_version = self.val['enzi_version'] if not enzi_version in ENZI_CONFIG_VERSIONS: _v = StringValidator(key='enzi_version', val=enzi_version, parent=self) msg = 'unknown enzi_version: {}'.format(enzi_version) raise ValidatorError(_v.chain_keys_str(), msg) # check if all filesets in the minimal sections exists # in this package's filesets. if 'minimal' in self.val: known_filesets = OrderedSet(self.val['filesets'].keys()) minimal_filesets = OrderedSet(self.val['minimal'].get('filesets')) if not minimal_filesets: self.val['minimal']['filesets'] = known_filesets else: diff = minimal_filesets - known_filesets if diff: k = self.chain_keys_str() + '.minimal.filesets' fmt = 'filesets: {} not exists' msg = fmt.format(list(diff)) raise ValidatorError(k, msg) self.val['minimal']['filesets'] = minimal_filesets # check self dependency if 'dependencies' in self.val: package_name = self.val['package']['name'] if package_name in self.val['dependencies']: fmt = 'Possible self dependency for package: {} at {}' msg = fmt.format(package_name, self.key) logger.error(msg) raise SystemExit(EnziConfigValidator.BASE_ESTRING + msg) return self.val
def info(): return { 'default_tool': StringValidator.info(), 'toplevel': StringValidator.info(), 'filesets': StringListValidator.info() }