ToolChain.GHDL¶
Exceptions
GHDLException: Base class for all tool specific exceptionsGHDLReanalyzeException: Base class for all tool specific exceptions
Classes
Configuration: Base class for all tool Configuration classes.GHDL: Represent an executable.GHDLAnalyze: Represent an executable.GHDLElaborate: Represent an executable.GHDLRun: Represent an executable.
Functions
GHDLAnalyzeFilter(): Undocumented.GHDLElaborateFilter(): Undocumented.GHDLRunFilter(): Undocumented.
-
exception
ToolChain.GHDL.GHDLException(message='')[source]¶ Inheritance
Members
-
__str__()¶ Returns the exception’s message text.
-
args¶
-
-
exception
ToolChain.GHDL.GHDLReanalyzeException(message='')[source]¶ Inheritance
Members
-
__str__()¶ Returns the exception’s message text.
-
args¶
-
-
class
ToolChain.GHDL.Configuration(host: Base.IHost)[source]¶ Inheritance
Members
-
_vendor= 'tgingold'¶ The name of the tools vendor.
-
_toolName= 'GHDL'¶ The name of the tool.
-
_section= 'INSTALL.GHDL'¶ The name of the configuration section. Pattern:
INSTALL.Vendor.ToolName.
-
_multiVersionSupport= True¶ Git supports multiple versions installed on the same system.
-
_template= {'Windows': {'INSTALL.GHDL': {'SectionName': ('%{PathWithRoot}#${Version}-${Runtime}-${Backend}', None), 'Runtime': 'gnatgpl32', 'InstallationDirectory': ('${${SectionName}:InstallationDirectory}', 'C:/Tools/GHDL/${Version}-${Runtime}-${Backend}'), 'Backend': 'mcode', 'Version': '0.34-dev', 'BinaryDirectory': ('${${SectionName}:BinaryDirectory}', '${InstallationDirectory}/bin'), 'ScriptDirectory': ('${${SectionName}:ScriptDirectory}', '${InstallationDirectory}/lib/vendors')}}, 'Linux': {'INSTALL.GHDL': {'SectionName': ('%{PathWithRoot}#${Version}-${Backend}', None), 'BinaryDirectory': ('${${SectionName}:BinaryDirectory}', '${InstallationDirectory}/bin'), 'InstallationDirectory': ('${${SectionName}:InstallationDirectory}', '/usr/local'), 'Backend': 'llvm', 'Version': '0.34-dev', 'ScriptDirectory': ('${${SectionName}:ScriptDirectory}', '${InstallationDirectory}/lib/ghdl/vendors')}}, 'Darwin': {'INSTALL.GHDL': {'SectionName': ('%{PathWithRoot}#${Version}-${Backend}', None), 'BinaryDirectory': ('${${SectionName}:BinaryDirectory}', '${InstallationDirectory}/bin'), 'InstallationDirectory': ('${${SectionName}:InstallationDirectory}', '/usr/local'), 'Backend': 'llvm', 'Version': '0.34-dev', 'ScriptDirectory': ('${${SectionName}:ScriptDirectory}', '${InstallationDirectory}/lib/ghdl/vendors')}}}¶ The template for the configuration sections represented as nested dictionaries.
-
_ConfigureBinaryDirectory()[source]¶ Updates section with value from _template and returns directory as Path object.
-
_ConfigureScriptDirectory()[source]¶ Updates section with value from _template and returns directory as Path object.
-
CheckDependency()[source]¶ Check if all vendor or tool dependencies are fulfilled to configure this tool.
-
ClearSection(writeWarnings=False)[source]¶ Clear the configuration section associated to this Configuration class.
-
ConfigureForDarwin()[source]¶ Start the configuration procedure for Darwin.
This method is a wrapper for
ConfigureForAll(). Overwrite this method to implement a Darwin specific configuration routine.
-
ConfigureForLinux()[source]¶ Start the configuration procedure for Linux.
This method is a wrapper for
ConfigureForAll(). Overwrite this method to implement a Linux specific configuration routine.
-
ConfigureForWindows()[source]¶ Start the configuration procedure for Windows.
This method is a wrapper for
ConfigureForAll(). Overwrite this method to implement a Windows specific configuration routine.
-
Host¶ Return the hosting object.
-
IsSupportedPlatform()[source]¶ Return true if the given platform is supported by this configuration routine.
-
Log(entry, condition=True)¶ Write an entry to the local logger.
-
LogDebug(*args, condition=True, **kwargs)¶
-
LogDryRun(*args, condition=True, **kwargs)¶
-
LogError(*args, condition=True, **kwargs)¶
-
LogFatal(*args, condition=True, **kwargs)¶
-
LogInfo(*args, condition=True, **kwargs)¶
-
LogNormal(*args, condition=True, **kwargs)¶
-
LogQuiet(*args, condition=True, **kwargs)¶
-
LogVerbose(*args, condition=True, **kwargs)¶
-
LogWarning(*args, condition=True, **kwargs)¶
-
Logger¶ Return the local logger instance.
-
PrepareVersionedSections(writeWarnings=False)¶
-
SectionName¶ Return the configuration’s section name.
-
State¶ Return the configuration state.
-
_Ask(question, default, beforeDefault='', afterDefault='', indent=1)¶
-
_AskYes_NoPass(question, indent=1)¶ Ask a yes/NO/pass question.
-
_Ask_YesNoPass(question, indent=1)¶ Ask a YES/no/pass question.
-
_Configuration__WriteGHDLSection(binPath)¶
-
_ConfigureEdition(editions, defaultEdition)¶
-
_ConfigureInstallationDirectory()[source]¶ Asks for installation directory and updates section. Checks if entered directory exists and returns Path object. If no installation directory was configured before, then _GetDefaultInstallationDir is called.
-
_ConfigureVersion()¶ If no version was configured before, then _GetDefaultVersion is called. Asks for version and updates section. Returns version as string.
-
_GetDefaultEdition()¶ Returns unresolved default edition (str) from template.
Overwrite this method in a sub-class for automatic search of editions.
-
_GetDefaultVersion()¶ Returns unresolved default version (str) from template.
Overwrite this method in a sub-class for automatic search of version.
-
_PrintAvailableEditions(editions, selectedEdition)¶ Print all available editions and return the selected index.
-
_TestDefaultInstallPath(defaults)[source]¶ Helper function for automatic search of installation directory.
-
_TryLog(*args, condition=True, **kwargs)¶
-
-
class
ToolChain.GHDL.GHDL(platform, dryrun, binaryDirectoryPath, version, backend, logger=None)[source]¶ Inheritance
Members
-
BinaryDirectoryPath¶
-
Backend¶
-
Version¶
-
Executable¶
-
GHDL.Parameters= [<class 'ToolChain.GHDL.GHDL.CmdAnalyze'>, <class 'ToolChain.GHDL.GHDL.CmdElaborate'>, <class 'ToolChain.GHDL.GHDL.CmdRun'>, <class 'ToolChain.GHDL.GHDL.FlagVerbose'>, <class 'ToolChain.GHDL.GHDL.FlagDebug'>, <class 'ToolChain.GHDL.GHDL.FlagExplicit'>, <class 'ToolChain.GHDL.GHDL.FlagRelaxedRules'>, <class 'ToolChain.GHDL.GHDL.FlagWarnBinding'>, <class 'ToolChain.GHDL.GHDL.FlagNoVitalChecks'>, <class 'ToolChain.GHDL.GHDL.FlagMultiByteComments'>, <class 'ToolChain.GHDL.GHDL.FlagSynBinding'>, <class 'ToolChain.GHDL.GHDL.FlagPSL'>, <class 'ToolChain.GHDL.GHDL.FlagProfileArcs'>, <class 'ToolChain.GHDL.GHDL.FlagTestCoverage'>, <class 'ToolChain.GHDL.GHDL.SwitchCompilerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchAssemblerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchLinkerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchIEEEFlavor'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLVersion'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLLibrary'>, <class 'ToolChain.GHDL.GHDL.ArgListLibraryReferences'>, <class 'ToolChain.GHDL.GHDL.ArgSourceFile'>, <class 'ToolChain.GHDL.GHDL.ArgTopLevel'>]¶
-
GHDL.RunOptions= [<class 'ToolChain.GHDL.GHDL.SwitchIEEEAsserts'>, <class 'ToolChain.GHDL.GHDL.SwitchStopDelta'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDGZWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchFastWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchGHDLWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchWaveformOptionFile'>]¶
-
GHDL.GetReader()¶
-
GHDL.HasErrors¶ True if errors or fatals errors were found while processing the output stream.
-
GHDL.HasWarnings¶ True if errors or fatals errors were found while processing the output stream.
-
GHDL.Log(entry, condition=True)¶ Write an entry to the local logger.
-
GHDL.LogDebug(*args, condition=True, **kwargs)¶
-
GHDL.LogDryRun(*args, condition=True, **kwargs)¶
-
GHDL.LogError(*args, condition=True, **kwargs)¶
-
GHDL.LogFatal(*args, condition=True, **kwargs)¶
-
GHDL.LogInfo(*args, condition=True, **kwargs)¶
-
GHDL.LogNormal(*args, condition=True, **kwargs)¶
-
GHDL.LogQuiet(*args, condition=True, **kwargs)¶
-
GHDL.LogVerbose(*args, condition=True, **kwargs)¶
-
GHDL.LogWarning(*args, condition=True, **kwargs)¶
-
GHDL.Logger¶ Return the local logger instance.
-
GHDL.Path¶
-
GHDL.ReadUntilBoundary(indent=0)¶
-
GHDL.Send(line, end='\n')¶
-
GHDL.SendBoundary()¶
-
GHDL.StartProcess(parameterList)¶
-
GHDL.Terminate()¶
-
GHDL._POC_BOUNDARY= '====== POC BOUNDARY ======'¶
-
GHDL._TryLog(*args, condition=True, **kwargs)¶
-
-
class
ToolChain.GHDL.GHDLAnalyze(platform, dryrun, binaryDirectoryPath, version, backend, logger=None)[source]¶ Inheritance
Members
-
class
GHDLAnalyze.ArgSourceFile¶
-
class
GHDLAnalyze.ArgTopLevel¶
-
GHDLAnalyze.Backend¶
-
GHDLAnalyze.BinaryDirectoryPath¶
-
GHDLAnalyze.Executable¶
-
GHDLAnalyze.GetGHDLAnalyze()¶
-
GHDLAnalyze.GetGHDLElaborate()¶
-
GHDLAnalyze.GetGHDLRun()¶
-
GHDLAnalyze.GetReader()¶
-
GHDLAnalyze.HasErrors¶ True if errors or fatals errors were found while processing the output stream.
-
GHDLAnalyze.HasWarnings¶ True if errors or fatals errors were found while processing the output stream.
-
GHDLAnalyze.Log(entry, condition=True)¶ Write an entry to the local logger.
-
GHDLAnalyze.LogDebug(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogDryRun(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogError(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogFatal(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogInfo(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogNormal(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogQuiet(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogVerbose(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.LogWarning(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.Logger¶ Return the local logger instance.
-
GHDLAnalyze.Parameters= [<class 'ToolChain.GHDL.GHDL.CmdAnalyze'>, <class 'ToolChain.GHDL.GHDL.CmdElaborate'>, <class 'ToolChain.GHDL.GHDL.CmdRun'>, <class 'ToolChain.GHDL.GHDL.FlagVerbose'>, <class 'ToolChain.GHDL.GHDL.FlagDebug'>, <class 'ToolChain.GHDL.GHDL.FlagExplicit'>, <class 'ToolChain.GHDL.GHDL.FlagRelaxedRules'>, <class 'ToolChain.GHDL.GHDL.FlagWarnBinding'>, <class 'ToolChain.GHDL.GHDL.FlagNoVitalChecks'>, <class 'ToolChain.GHDL.GHDL.FlagMultiByteComments'>, <class 'ToolChain.GHDL.GHDL.FlagSynBinding'>, <class 'ToolChain.GHDL.GHDL.FlagPSL'>, <class 'ToolChain.GHDL.GHDL.FlagProfileArcs'>, <class 'ToolChain.GHDL.GHDL.FlagTestCoverage'>, <class 'ToolChain.GHDL.GHDL.SwitchCompilerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchAssemblerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchLinkerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchIEEEFlavor'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLVersion'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLLibrary'>, <class 'ToolChain.GHDL.GHDL.ArgListLibraryReferences'>, <class 'ToolChain.GHDL.GHDL.ArgSourceFile'>, <class 'ToolChain.GHDL.GHDL.ArgTopLevel'>]¶
-
GHDLAnalyze.Path¶
-
GHDLAnalyze.ReadUntilBoundary(indent=0)¶
-
GHDLAnalyze.RunOptions= [<class 'ToolChain.GHDL.GHDL.SwitchIEEEAsserts'>, <class 'ToolChain.GHDL.GHDL.SwitchStopDelta'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDGZWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchFastWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchGHDLWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchWaveformOptionFile'>]¶
-
GHDLAnalyze.Send(line, end='\n')¶
-
GHDLAnalyze.SendBoundary()¶
-
GHDLAnalyze.StartProcess(parameterList)¶
-
GHDLAnalyze.Terminate()¶
-
GHDLAnalyze.Version¶
-
GHDLAnalyze._POC_BOUNDARY= '====== POC BOUNDARY ======'¶
-
GHDLAnalyze._TryLog(*args, condition=True, **kwargs)¶
-
GHDLAnalyze.deco(Arg)¶
-
class
-
class
ToolChain.GHDL.GHDLElaborate(platform, dryrun, binaryDirectoryPath, version, backend, logger=None)[source]¶ Inheritance
Members
-
class
GHDLElaborate.ArgSourceFile¶
-
class
GHDLElaborate.ArgTopLevel¶
-
GHDLElaborate.Backend¶
-
GHDLElaborate.BinaryDirectoryPath¶
-
GHDLElaborate.Executable¶
-
GHDLElaborate.GetGHDLAnalyze()¶
-
GHDLElaborate.GetGHDLElaborate()¶
-
GHDLElaborate.GetGHDLRun()¶
-
GHDLElaborate.GetReader()¶
-
GHDLElaborate.HasErrors¶ True if errors or fatals errors were found while processing the output stream.
-
GHDLElaborate.HasWarnings¶ True if errors or fatals errors were found while processing the output stream.
-
GHDLElaborate.Log(entry, condition=True)¶ Write an entry to the local logger.
-
GHDLElaborate.LogDebug(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogDryRun(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogError(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogFatal(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogInfo(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogNormal(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogQuiet(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogVerbose(*args, condition=True, **kwargs)¶
-
GHDLElaborate.LogWarning(*args, condition=True, **kwargs)¶
-
GHDLElaborate.Logger¶ Return the local logger instance.
-
GHDLElaborate.Parameters= [<class 'ToolChain.GHDL.GHDL.CmdAnalyze'>, <class 'ToolChain.GHDL.GHDL.CmdElaborate'>, <class 'ToolChain.GHDL.GHDL.CmdRun'>, <class 'ToolChain.GHDL.GHDL.FlagVerbose'>, <class 'ToolChain.GHDL.GHDL.FlagDebug'>, <class 'ToolChain.GHDL.GHDL.FlagExplicit'>, <class 'ToolChain.GHDL.GHDL.FlagRelaxedRules'>, <class 'ToolChain.GHDL.GHDL.FlagWarnBinding'>, <class 'ToolChain.GHDL.GHDL.FlagNoVitalChecks'>, <class 'ToolChain.GHDL.GHDL.FlagMultiByteComments'>, <class 'ToolChain.GHDL.GHDL.FlagSynBinding'>, <class 'ToolChain.GHDL.GHDL.FlagPSL'>, <class 'ToolChain.GHDL.GHDL.FlagProfileArcs'>, <class 'ToolChain.GHDL.GHDL.FlagTestCoverage'>, <class 'ToolChain.GHDL.GHDL.SwitchCompilerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchAssemblerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchLinkerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchIEEEFlavor'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLVersion'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLLibrary'>, <class 'ToolChain.GHDL.GHDL.ArgListLibraryReferences'>, <class 'ToolChain.GHDL.GHDL.ArgSourceFile'>, <class 'ToolChain.GHDL.GHDL.ArgTopLevel'>]¶
-
GHDLElaborate.Path¶
-
GHDLElaborate.ReadUntilBoundary(indent=0)¶
-
GHDLElaborate.RunOptions= [<class 'ToolChain.GHDL.GHDL.SwitchIEEEAsserts'>, <class 'ToolChain.GHDL.GHDL.SwitchStopDelta'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDGZWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchFastWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchGHDLWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchWaveformOptionFile'>]¶
-
GHDLElaborate.Send(line, end='\n')¶
-
GHDLElaborate.SendBoundary()¶
-
GHDLElaborate.StartProcess(parameterList)¶
-
GHDLElaborate.Terminate()¶
-
GHDLElaborate.Version¶
-
GHDLElaborate._POC_BOUNDARY= '====== POC BOUNDARY ======'¶
-
GHDLElaborate._TryLog(*args, condition=True, **kwargs)¶
-
GHDLElaborate.deco(Arg)¶
-
class
-
class
ToolChain.GHDL.GHDLRun(platform, dryrun, binaryDirectoryPath, version, backend, logger=None)[source]¶ Inheritance
Members
-
class
GHDLRun.ArgSourceFile¶
-
class
GHDLRun.ArgTopLevel¶
-
GHDLRun.Backend¶
-
GHDLRun.BinaryDirectoryPath¶
-
GHDLRun.Executable¶
-
GHDLRun.GetGHDLAnalyze()¶
-
GHDLRun.GetGHDLElaborate()¶
-
GHDLRun.GetGHDLRun()¶
-
GHDLRun.GetReader()¶
-
GHDLRun.HasErrors¶ True if errors or fatals errors were found while processing the output stream.
-
GHDLRun.HasWarnings¶ True if errors or fatals errors were found while processing the output stream.
-
GHDLRun.Log(entry, condition=True)¶ Write an entry to the local logger.
-
GHDLRun.LogDebug(*args, condition=True, **kwargs)¶
-
GHDLRun.LogDryRun(*args, condition=True, **kwargs)¶
-
GHDLRun.LogError(*args, condition=True, **kwargs)¶
-
GHDLRun.LogFatal(*args, condition=True, **kwargs)¶
-
GHDLRun.LogInfo(*args, condition=True, **kwargs)¶
-
GHDLRun.LogNormal(*args, condition=True, **kwargs)¶
-
GHDLRun.LogQuiet(*args, condition=True, **kwargs)¶
-
GHDLRun.LogVerbose(*args, condition=True, **kwargs)¶
-
GHDLRun.LogWarning(*args, condition=True, **kwargs)¶
-
GHDLRun.Logger¶ Return the local logger instance.
-
GHDLRun.Parameters= [<class 'ToolChain.GHDL.GHDL.CmdAnalyze'>, <class 'ToolChain.GHDL.GHDL.CmdElaborate'>, <class 'ToolChain.GHDL.GHDL.CmdRun'>, <class 'ToolChain.GHDL.GHDL.FlagVerbose'>, <class 'ToolChain.GHDL.GHDL.FlagDebug'>, <class 'ToolChain.GHDL.GHDL.FlagExplicit'>, <class 'ToolChain.GHDL.GHDL.FlagRelaxedRules'>, <class 'ToolChain.GHDL.GHDL.FlagWarnBinding'>, <class 'ToolChain.GHDL.GHDL.FlagNoVitalChecks'>, <class 'ToolChain.GHDL.GHDL.FlagMultiByteComments'>, <class 'ToolChain.GHDL.GHDL.FlagSynBinding'>, <class 'ToolChain.GHDL.GHDL.FlagPSL'>, <class 'ToolChain.GHDL.GHDL.FlagProfileArcs'>, <class 'ToolChain.GHDL.GHDL.FlagTestCoverage'>, <class 'ToolChain.GHDL.GHDL.SwitchCompilerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchAssemblerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchLinkerOption'>, <class 'ToolChain.GHDL.GHDL.SwitchIEEEFlavor'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLVersion'>, <class 'ToolChain.GHDL.GHDL.SwitchVHDLLibrary'>, <class 'ToolChain.GHDL.GHDL.ArgListLibraryReferences'>, <class 'ToolChain.GHDL.GHDL.ArgSourceFile'>, <class 'ToolChain.GHDL.GHDL.ArgTopLevel'>]¶
-
GHDLRun.Path¶
-
GHDLRun.ReadUntilBoundary(indent=0)¶
-
GHDLRun.RunOptions= [<class 'ToolChain.GHDL.GHDL.SwitchIEEEAsserts'>, <class 'ToolChain.GHDL.GHDL.SwitchStopDelta'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchVCDGZWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchFastWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchGHDLWaveform'>, <class 'ToolChain.GHDL.GHDL.SwitchWaveformOptionFile'>]¶
-
GHDLRun.Send(line, end='\n')¶
-
GHDLRun.SendBoundary()¶
-
GHDLRun.StartProcess(parameterList)¶
-
GHDLRun.Terminate()¶
-
GHDLRun.Version¶
-
GHDLRun._POC_BOUNDARY= '====== POC BOUNDARY ======'¶
-
GHDLRun._TryLog(*args, condition=True, **kwargs)¶
-
GHDLRun.deco(Arg)¶
-
class
Functions
-
ToolChain.GHDL.GHDLElaborateFilter(gen)¶