pyIPCMI.ToolChain.Altera.ModelSim

Exceptions

Classes

exception pyIPCMI.ToolChain.Altera.ModelSim.ModelSimException(message='')[source]

Inheritance

Inheritance diagram of ModelSimException

Members

__init__(message='')

Exception initializer

Parameters:message (str) – The exception message.
__str__()

Returns the exception’s message text.

args
class pyIPCMI.ToolChain.Altera.ModelSim.AlteraModelSimEditions(name, section)[source]

Enumeration of all ModelSim editions provided by Altera.

Inheritance

Inheritance diagram of AlteraModelSimEditions

Members

ModelSimAlteraEdition = 1
ModelSimAlteraStarterEdition = 2
class pyIPCMI.ToolChain.Altera.ModelSim.Configuration(host: pyIPCMI.Base.IHost)[source]

Inheritance

Inheritance diagram of Configuration

Members

_vendor = 'Altera'

The name of the tools vendor.

_multiVersionSupport = False

ModelSim Altera (Starter) Edition doesn’t support multiple versions.

CheckDependency()[source]

Check if general Altera support is configured in pyIPCMI.

ConfigureForAll()[source]

Configuration routine for Mentor Graphics ModelSim on all supported platforms.

  1. Ask if ModelSim is installed.
  • Pass → skip this configuration. Don’t change existing settings.
  • Yes → collect installation information for ModelSim.
  • No → clear the ModelSim configuration section.
  1. Ask for ModelSim’s version.
  2. Ask for ModelSim’s edition (PE, PE student, SE 32-bit, SE 64-bit).
  3. Ask for ModelSim’s installation directory.
_ConfigureEdition()[source]

Configure ModelSim for Altera.

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.

classmethod GetSections(platform)[source]

Return all section names for this configuration.

Host

Return the hosting object.

IsConfigured()[source]

Return true if the configurations section is configured

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.

PrepareOptions(writeWarnings=True)[source]
PrepareSections(warningWasWritten, writeWarnings=True)[source]
PrepareVersionedSections(writeWarnings=False)
RunPostConfigurationTasks()[source]

Virtual method. Overwrite to execute post-configuration tasks.

SectionName

Return the configuration’s section name.

State

Return the configuration state.

_Ask(question, default, beforeDefault='', afterDefault='', indent=1)
_AskInstalled(question)[source]

Ask a Yes/No/Pass question.

_AskYes_NoPass(question, indent=1)

Ask a yes/NO/pass question.

_Ask_YesNoPass(question, indent=1)

Ask a YES/no/pass question.

_CheckModelSimVersion(binPath, version)[source]
_Configuration__GetModelSimVersion(binPath)
_ConfigureBinaryDirectory()

Updates section with value from _template and returns directory as Path object.

_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.

_GetDefaultInstallationDirectory()[source]

Return unresolved default installation directory (str) from template.

Overwrite function in sub-class for automatic search of installation directory.

_GetDefaultOptionValue(optionName)[source]
_GetDefaultVersion()

Returns unresolved default version (str) from template.

Overwrite this method in a sub-class for automatic search of version.

_GetModelSimVersion(binPath)[source]
_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)
_section = 'INSTALL.Vendor.Tool'
_template = {'ALL': {'INSTALL.Vendor.Tool': {'Version': '1.0'}}, 'Darwin': {'INSTALL.Vendor.Tool': {'BinaryDirectory': '${InstallationDirectory}/bin', 'InstallationDirectory': '${INSTALL.Vendor:InstallationDirectory}/${Version}/Tool'}}, 'Linux': {'INSTALL.Vendor.Tool': {'BinaryDirectory': '${InstallationDirectory}/bin', 'InstallationDirectory': '${INSTALL.Vendor:InstallationDirectory}/${Version}/Tool'}}, 'Windows': {'INSTALL.Vendor.Tool': {'BinaryDirectory': '${InstallationDirectory}/bin', 'InstallationDirectory': '${INSTALL.Vendor:InstallationDirectory}/${Version}/Tool/'}}}
_toolName = 'Mentor ModelSim'
class pyIPCMI.ToolChain.Altera.ModelSim.AlteraEditionConfiguration(host: pyIPCMI.Base.IHost)[source]

Inheritance

Inheritance diagram of AlteraEditionConfiguration

Members

_toolName = 'Altera ModelSim'

The name of the tool.

__editionName = None

The name of the tool.

_section = 'INSTALL.Altera.ModelSimAE'

The name of the configuration section. Pattern: INSTALL.Vendor.ToolName.

_template = {'Linux': {'INSTALL.Altera.ModelSimAE': {'Edition': 'ModelSim Altera Edition', 'BinaryDirectory': '${InstallationDirectory}/linuxaloem', 'AdditionalVSimOptions': '', 'AdditionalVComOptions': '', 'InstallationDirectory': '${INSTALL.Altera:InstallationDirectory}/${INSTALL.Altera.Quartus:Version}/modelsim_ae', 'Version': '10.5b'}}, 'Windows': {'INSTALL.Altera.ModelSimAE': {'Edition': 'ModelSim Altera Edition', 'BinaryDirectory': '${InstallationDirectory}/win32aloem', 'AdditionalVSimOptions': '', 'AdditionalVComOptions': '', 'InstallationDirectory': '${INSTALL.Altera:InstallationDirectory}/${INSTALL.Altera.Quartus:Version}/modelsim_ae', 'Version': '10.5b'}}}
CheckDependency()

Check if general Altera support is configured in pyIPCMI.

ClearSection(writeWarnings=False)

Clear the configuration section associated to this Configuration class.

ConfigureForAll()

Configuration routine for Mentor Graphics ModelSim on all supported platforms.

  1. Ask if ModelSim is installed.
  • Pass → skip this configuration. Don’t change existing settings.
  • Yes → collect installation information for ModelSim.
  • No → clear the ModelSim configuration section.
  1. Ask for ModelSim’s version.
  2. Ask for ModelSim’s edition (PE, PE student, SE 32-bit, SE 64-bit).
  3. Ask for ModelSim’s installation directory.
ConfigureForDarwin()

Start the configuration procedure for Darwin.

This method is a wrapper for ConfigureForAll(). Overwrite this method to implement a Darwin specific configuration routine.

ConfigureForLinux()

Start the configuration procedure for Linux.

This method is a wrapper for ConfigureForAll(). Overwrite this method to implement a Linux specific configuration routine.

ConfigureForWindows()

Start the configuration procedure for Windows.

This method is a wrapper for ConfigureForAll(). Overwrite this method to implement a Windows specific configuration routine.

classmethod GetSections(platform)

Return all section names for this configuration.

Host

Return the hosting object.

IsConfigured()

Return true if the configurations section is configured

IsSupportedPlatform()

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.

PrepareOptions(writeWarnings=True)
PrepareSections(warningWasWritten, writeWarnings=True)
PrepareVersionedSections(writeWarnings=False)
RunPostConfigurationTasks()

Virtual method. Overwrite to execute post-configuration tasks.

SectionName

Return the configuration’s section name.

State

Return the configuration state.

_AlteraEditionConfiguration__editionName = 'ModelSim Altera Edition'
_Ask(question, default, beforeDefault='', afterDefault='', indent=1)
_AskInstalled(question)

Ask a Yes/No/Pass question.

_AskYes_NoPass(question, indent=1)

Ask a yes/NO/pass question.

_Ask_YesNoPass(question, indent=1)

Ask a YES/no/pass question.

_CheckModelSimVersion(binPath, version)
_Configuration__GetModelSimVersion(binPath)
_ConfigureBinaryDirectory()

Updates section with value from _template and returns directory as Path object.

_ConfigureEdition()

Configure ModelSim for Altera.

_ConfigureInstallationDirectory()

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.

_GetDefaultInstallationDirectory()

Return unresolved default installation directory (str) from template.

Overwrite function in sub-class for automatic search of installation directory.

_GetDefaultOptionValue(optionName)
_GetDefaultVersion()

Returns unresolved default version (str) from template.

Overwrite this method in a sub-class for automatic search of version.

_GetModelSimVersion(binPath)
_PrintAvailableEditions(editions, selectedEdition)

Print all available editions and return the selected index.

_TestDefaultInstallPath(defaults)

Helper function for automatic search of installation directory.

_TryLog(*args, condition=True, **kwargs)
_multiVersionSupport = False
_vendor = 'Altera'
class pyIPCMI.ToolChain.Altera.ModelSim.AlteraStarterEditionConfiguration(host: pyIPCMI.Base.IHost)[source]

Inheritance

Inheritance diagram of AlteraStarterEditionConfiguration

Members

_toolName = 'Altera ModelSim (Starter Edition)'

The name of the tool.

__editionName = None

The name of the tool.

_section = 'INSTALL.Altera.ModelSimASE'

The name of the configuration section. Pattern: INSTALL.Vendor.ToolName.

_template = {'Linux': {'INSTALL.Altera.ModelSimASE': {'Edition': 'ModelSim Altera Starter Edition', 'BinaryDirectory': '${InstallationDirectory}/linuxaloem', 'AdditionalVSimOptions': '', 'AdditionalVComOptions': '', 'InstallationDirectory': '${INSTALL.Altera:InstallationDirectory}/${INSTALL.Altera.Quartus:Version}/modelsim_ase', 'Version': '10.5b'}}, 'Windows': {'INSTALL.Altera.ModelSimASE': {'Edition': 'ModelSim Altera Starter Edition', 'BinaryDirectory': '${InstallationDirectory}/win32aloem', 'AdditionalVSimOptions': '', 'AdditionalVComOptions': '', 'InstallationDirectory': '${INSTALL.Altera:InstallationDirectory}/${INSTALL.Altera.Quartus:Version}/modelsim_ase', 'Version': '10.5b'}}}
CheckDependency()

Check if general Altera support is configured in pyIPCMI.

ClearSection(writeWarnings=False)

Clear the configuration section associated to this Configuration class.

ConfigureForAll()

Configuration routine for Mentor Graphics ModelSim on all supported platforms.

  1. Ask if ModelSim is installed.
  • Pass → skip this configuration. Don’t change existing settings.
  • Yes → collect installation information for ModelSim.
  • No → clear the ModelSim configuration section.
  1. Ask for ModelSim’s version.
  2. Ask for ModelSim’s edition (PE, PE student, SE 32-bit, SE 64-bit).
  3. Ask for ModelSim’s installation directory.
ConfigureForDarwin()

Start the configuration procedure for Darwin.

This method is a wrapper for ConfigureForAll(). Overwrite this method to implement a Darwin specific configuration routine.

ConfigureForLinux()

Start the configuration procedure for Linux.

This method is a wrapper for ConfigureForAll(). Overwrite this method to implement a Linux specific configuration routine.

ConfigureForWindows()

Start the configuration procedure for Windows.

This method is a wrapper for ConfigureForAll(). Overwrite this method to implement a Windows specific configuration routine.

classmethod GetSections(platform)

Return all section names for this configuration.

Host

Return the hosting object.

IsConfigured()

Return true if the configurations section is configured

IsSupportedPlatform()

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.

PrepareOptions(writeWarnings=True)
PrepareSections(warningWasWritten, writeWarnings=True)
PrepareVersionedSections(writeWarnings=False)
RunPostConfigurationTasks()

Virtual method. Overwrite to execute post-configuration tasks.

SectionName

Return the configuration’s section name.

State

Return the configuration state.

_AlteraStarterEditionConfiguration__editionName = 'ModelSim Altera Starter Edition'
_Ask(question, default, beforeDefault='', afterDefault='', indent=1)
_AskInstalled(question)

Ask a Yes/No/Pass question.

_AskYes_NoPass(question, indent=1)

Ask a yes/NO/pass question.

_Ask_YesNoPass(question, indent=1)

Ask a YES/no/pass question.

_CheckModelSimVersion(binPath, version)
_Configuration__GetModelSimVersion(binPath)
_ConfigureBinaryDirectory()

Updates section with value from _template and returns directory as Path object.

_ConfigureEdition()

Configure ModelSim for Altera.

_ConfigureInstallationDirectory()

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.

_GetDefaultInstallationDirectory()

Return unresolved default installation directory (str) from template.

Overwrite function in sub-class for automatic search of installation directory.

_GetDefaultOptionValue(optionName)
_GetDefaultVersion()

Returns unresolved default version (str) from template.

Overwrite this method in a sub-class for automatic search of version.

_GetModelSimVersion(binPath)
_PrintAvailableEditions(editions, selectedEdition)

Print all available editions and return the selected index.

_TestDefaultInstallPath(defaults)

Helper function for automatic search of installation directory.

_TryLog(*args, condition=True, **kwargs)
_multiVersionSupport = False
_vendor = 'Altera'