def _setDefaultBuildFlagsIfNeeded(self): """ Tries to get a default set of flags if none were specified """ if self.getBuilder() == 'fallback': return builder_class = getBuilderByName(self.getBuilder()) # If the global/batch/single flags list is not set, overwrite # with the values given by the builder class for context in builder_class.default_flags: for lang in builder_class.default_flags[context]: if not self._parms[context][lang]: self._logger.debug( "Flag '%s' for '%s' wasn't set, using the default " "value from '%s' class: '%s'", context, lang, builder_class.builder_name, builder_class.default_flags[context][lang]) self._parms[context][lang] = builder_class.default_flags[ context][lang] else: self._logger.debug( "Flag '%s' for '%s' was already set with value '%s'", context, lang, self._parms[context][lang])
def _addVunitIfFound(self): """ Tries to import files to support VUnit right out of the box """ if not foundVunit() or self._parms['builder'] == 'fallback': return import vunit self._logger.info("VUnit installation found") # logging.getLogger('vunit').setLevel(logging.ERROR) builder_class = getBuilderByName(self.getBuilder()) if 'systemverilog' in builder_class.file_types: from vunit.verilog import VUnit self._logger.debug("Builder supports Verilog, " "using vunit.verilog.VUnit") builder_class.addExternalLibrary('verilog', 'vunit_lib') builder_class.addIncludePath( 'verilog', p.join(p.dirname(vunit.__file__), 'verilog', 'include')) self._importVunitFiles(VUnit) from vunit import VUnit self._importVunitFiles(VUnit)
def _addVunitIfFound(self): """ Tries to import files to support VUnit right out of the box """ if not foundVunit() or self._parms['builder'] == 'fallback': return import vunit # pylint: disable=import-error logging.getLogger('vunit').setLevel(logging.WARNING) self._logger.info("VUnit installation found") builder_class = getBuilderByName(self.getBuilder()) if 'systemverilog' in builder_class.file_types: from vunit.verilog import VUnit # pylint: disable=import-error self._logger.debug("Builder supports Verilog, " "using vunit.verilog.VUnit") builder_class.addExternalLibrary('verilog', 'vunit_lib') builder_class.addIncludePath( 'verilog', p.join(p.dirname(vunit.__file__), 'verilog', 'include')) self._importVunitFiles(VUnit) from vunit import VUnit # pylint: disable=import-error self._importVunitFiles(VUnit)
def _setDefaultBuildFlagsIfNeeded(self): """ Tries to get a default set of flags if none were specified """ if self.getBuilder() == 'fallback': return builder_class = getBuilderByName(self.getBuilder()) # If the global/batch/single flags list is not set, overwrite # with the values given by the builder class for context in builder_class.default_flags: for lang in builder_class.default_flags[context]: if not self._parms[context][lang]: self._logger.debug( "Flag '%s' for '%s' wasn't set, using the default " "value from '%s' class: '%s'", context, lang, builder_class.builder_name, builder_class.default_flags[context][lang]) self._parms[context][lang] = builder_class.default_flags[context][lang] else: self._logger.debug( "Flag '%s' for '%s' was already set with value '%s'", context, lang, self._parms[context][lang])