ToolChain.Xilinx.Vivado

Exceptions

Classes

Functions

exception ToolChain.Xilinx.Vivado.VivadoException(message='')[source]

Inheritance

Inheritance diagram of VivadoException

Members

__init__(message='')

Exception initializer

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

Returns the exception’s message text.

args
class ToolChain.Xilinx.Vivado.Configuration(host: Base.IHost)[source]

Inheritance

Inheritance diagram of Configuration

Members

_vendor = 'Xilinx'

The name of the tools vendor.

_toolName = 'Xilinx Vivado'

The name of the tool.

_section = 'INSTALL.Xilinx.Vivado'

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

_multiVersionSupport = True

Xilinx Vivado supports multiple versions installed on the same system.

_template = {'Windows': {'INSTALL.Xilinx.Vivado': {'Version': '2016.3', 'SectionName': ('%{PathWithRoot}#${Version}', None), 'InstallationDirectory': ('${${SectionName}:InstallationDirectory}', '${INSTALL.Xilinx:InstallationDirectory}/Vivado/${Version}'), 'BinaryDirectory': ('${${SectionName}:BinaryDirectory}', '${InstallationDirectory}/bin')}}, 'Linux': {'INSTALL.Xilinx.Vivado': {'Version': '2016.3', 'SectionName': ('%{PathWithRoot}#${Version}', None), 'InstallationDirectory': ('${${SectionName}:InstallationDirectory}', '${INSTALL.Xilinx:InstallationDirectory}/Vivado/${Version}'), 'BinaryDirectory': ('${${SectionName}:BinaryDirectory}', '${InstallationDirectory}/bin')}}}

The template for the configuration sections represented as nested dictionaries.

CheckDependency()[source]

Check if general Xilinx support is configured in PoC.

ConfigureForAll()[source]
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.

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.

_Configuration__CheckVivadoVersion(binPath, version)
_ConfigureBinaryDirectory()

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

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

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

_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.Xilinx.Vivado.ToolMixIn(platform, dryrun, binaryDirectoryPath, version, logger=None)[source]

Inheritance

Inheritance diagram of ToolMixIn

Members

class ToolChain.Xilinx.Vivado.Vivado(platform, dryrun, binaryDirectoryPath, version, logger=None)[source]

Inheritance

Inheritance diagram of Vivado

Members

PreparseEnvironment(installationDirectory)[source]
GetElaborator()[source]
GetSimulator()[source]
GetSynthesizer()[source]
class ToolChain.Xilinx.Vivado.XElab(toolchain: ToolChain.ToolMixIn)[source]

Inheritance

Inheritance diagram of XElab

Members

class Executable[source]
_value = None
class XElab.FlagRangeCheck[source]
_name = 'rangecheck'
_value = None
class XElab.SwitchMultiThreading[source]
_name = 'mt'
_value = None
class XElab.SwitchVerbose[source]
_name = 'verbose'
_value = None
class XElab.SwitchDebug[source]
_name = 'debug'
_value = None
class XElab.SwitchOptimization[source]
_pattern = '--{0}{1}'
_name = 'O'
_value = None
class XElab.SwitchTimeResolution[source]
_name = 'timeprecision_vhdl'
_value = None
class XElab.SwitchProjectFile[source]
_name = 'prj'
_value = None
class XElab.SwitchLogFile[source]
_name = 'log'
_value = None
class XElab.SwitchSnapshot[source]
_name = 's'
_value = None
class XElab.ArgTopLevel[source]
_value = None
XElab.Parameters = [<class 'ToolChain.Xilinx.Vivado.XElab.Executable'>, <class 'ToolChain.Xilinx.Vivado.XElab.FlagRangeCheck'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchMultiThreading'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchTimeResolution'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchVerbose'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchDebug'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchOptimization'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchProjectFile'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchLogFile'>, <class 'ToolChain.Xilinx.Vivado.XElab.SwitchSnapshot'>, <class 'ToolChain.Xilinx.Vivado.XElab.ArgTopLevel'>]
XElab.GetReader()
XElab.HasErrors

True if errors or fatals errors were found while processing the output stream.

XElab.HasWarnings

True if errors or fatals errors were found while processing the output stream.

XElab.Log(entry, condition=True)

Write an entry to the local logger.

XElab.LogDebug(*args, condition=True, **kwargs)
XElab.LogDryRun(*args, condition=True, **kwargs)
XElab.LogError(*args, condition=True, **kwargs)
XElab.LogFatal(*args, condition=True, **kwargs)
XElab.LogInfo(*args, condition=True, **kwargs)
XElab.LogNormal(*args, condition=True, **kwargs)
XElab.LogQuiet(*args, condition=True, **kwargs)
XElab.LogVerbose(*args, condition=True, **kwargs)
XElab.LogWarning(*args, condition=True, **kwargs)
XElab.Logger

Return the local logger instance.

XElab.Path
XElab.ReadUntilBoundary(indent=0)
XElab.Send(line, end='\n')
XElab.SendBoundary()
XElab.StartProcess(parameterList)
XElab.Terminate()
XElab._POC_BOUNDARY = '====== POC BOUNDARY ======'
XElab._TryLog(*args, condition=True, **kwargs)
class ToolChain.Xilinx.Vivado.XSim(toolchain: ToolChain.ToolMixIn)[source]

Inheritance

Inheritance diagram of XSim

Members

class Executable[source]
_value = None
class XSim.SwitchLogFile[source]
_name = '-log'
_value = None
class XSim.FlagGuiMode[source]
_name = '-gui'
_value = None
class XSim.SwitchTclBatchFile[source]
_name = '-tclbatch'
_value = None
class XSim.SwitchWaveformFile[source]
_name = '-view'
_value = None
class XSim.SwitchSnapshot[source]
_value = None
XSim.Parameters = [<class 'ToolChain.Xilinx.Vivado.XSim.Executable'>, <class 'ToolChain.Xilinx.Vivado.XSim.SwitchLogFile'>, <class 'ToolChain.Xilinx.Vivado.XSim.FlagGuiMode'>, <class 'ToolChain.Xilinx.Vivado.XSim.SwitchTclBatchFile'>, <class 'ToolChain.Xilinx.Vivado.XSim.SwitchWaveformFile'>, <class 'ToolChain.Xilinx.Vivado.XSim.SwitchSnapshot'>]
XSim.Simulate()[source]
XSim.GetReader()
XSim.HasErrors

True if errors or fatals errors were found while processing the output stream.

XSim.HasWarnings

True if errors or fatals errors were found while processing the output stream.

XSim.Log(entry, condition=True)

Write an entry to the local logger.

XSim.LogDebug(*args, condition=True, **kwargs)
XSim.LogDryRun(*args, condition=True, **kwargs)
XSim.LogError(*args, condition=True, **kwargs)
XSim.LogFatal(*args, condition=True, **kwargs)
XSim.LogInfo(*args, condition=True, **kwargs)
XSim.LogNormal(*args, condition=True, **kwargs)
XSim.LogQuiet(*args, condition=True, **kwargs)
XSim.LogVerbose(*args, condition=True, **kwargs)
XSim.LogWarning(*args, condition=True, **kwargs)
XSim.Logger

Return the local logger instance.

XSim.Path
XSim.ReadUntilBoundary(indent=0)
XSim.Send(line, end='\n')
XSim.SendBoundary()
XSim.StartProcess(parameterList)
XSim.Terminate()
XSim._POC_BOUNDARY = '====== POC BOUNDARY ======'
XSim._TryLog(*args, condition=True, **kwargs)
class ToolChain.Xilinx.Vivado.Synth(toolchain: ToolChain.ToolMixIn)[source]

Inheritance

Inheritance diagram of Synth

Members

class Executable[source]
_value = None
class Synth.SwitchLogFile[source]
_name = 'log'
_value = None
class Synth.SwitchSourceFile[source]
_name = 'source'
_value = None
class Synth.SwitchMode[source]
_name = 'mode'
_value = 'batch'
Synth.Parameters = [<class 'ToolChain.Xilinx.Vivado.Synth.Executable'>, <class 'ToolChain.Xilinx.Vivado.Synth.SwitchLogFile'>, <class 'ToolChain.Xilinx.Vivado.Synth.SwitchSourceFile'>, <class 'ToolChain.Xilinx.Vivado.Synth.SwitchMode'>]
Synth.Compile()[source]
Synth.GetReader()
Synth.HasErrors

True if errors or fatals errors were found while processing the output stream.

Synth.HasWarnings

True if errors or fatals errors were found while processing the output stream.

Synth.Log(entry, condition=True)

Write an entry to the local logger.

Synth.LogDebug(*args, condition=True, **kwargs)
Synth.LogDryRun(*args, condition=True, **kwargs)
Synth.LogError(*args, condition=True, **kwargs)
Synth.LogFatal(*args, condition=True, **kwargs)
Synth.LogInfo(*args, condition=True, **kwargs)
Synth.LogNormal(*args, condition=True, **kwargs)
Synth.LogQuiet(*args, condition=True, **kwargs)
Synth.LogVerbose(*args, condition=True, **kwargs)
Synth.LogWarning(*args, condition=True, **kwargs)
Synth.Logger

Return the local logger instance.

Synth.Path
Synth.ReadUntilBoundary(indent=0)
Synth.Send(line, end='\n')
Synth.SendBoundary()
Synth.StartProcess(parameterList)
Synth.Terminate()
Synth._POC_BOUNDARY = '====== POC BOUNDARY ======'
Synth._TryLog(*args, condition=True, **kwargs)
class ToolChain.Xilinx.Vivado.VivadoProject(name)[source]

Inheritance

Inheritance diagram of VivadoProject

Members

AddExternalVHDLLibraries(library)
AddFile(file, fileSet=None)
AddFileSet(fileSet)
AddSourceFile(file, fileSet=None)
Board
CreateFileSet(name, setDefault=True)
DefaultFileSet
Device
Environment
ExternalVHDLLibraries
ExtractVHDLLibrariesFromVHDLSourceFiles()
FileSets
Files(fileType=<FileTypes(Text|ProjectFile|FileListFile|RulesFile|SourceFile|VHDLSourceFile|VerilogSourceFile|PythonSourceFile|CocotbSourceFile|ConstraintFile|UcfConstraintFile|XdcConstraintFile|SdcConstraintFile|LdcConstraintFile|SettingsFile|QuartusSettingsFile) bits=0xFFFF>, fileSet=None)
GetVariables()
Name
RootDirectory
Tool
ToolChain
VHDLLibraries
VHDLVersion
pprint(indent=0)
class ToolChain.Xilinx.Vivado.VivadoProjectFile(file)[source]

Inheritance

Inheritance diagram of VivadoProjectFile

Members

FileName
FileSet
FileType
Open()
Path
Project
ReadFile()
_FileType = <FileTypes.ProjectFile bits=0x0002 data=UNDEFINED>
_ReadContent()
class ToolChain.Xilinx.Vivado.XilinxDesignConstraintFile(file, project=None, fileSet=None)[source]

Inheritance

Inheritance diagram of XilinxDesignConstraintFile

Members

FileName
FileSet
FileType
Open()
Path
Project
ReadFile()
_ReadContent()
_FileType = <FileTypes.XdcConstraintFile bits=0x0800 data=UNDEFINED>

Functions

ToolChain.Xilinx.Vivado.ElaborationFilter(gen)[source]
ToolChain.Xilinx.Vivado.SimulatorFilter(gen)[source]
ToolChain.Xilinx.Vivado.CompilerFilter(gen)[source]