# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module Base.Exceptions") class ExceptionBase(Exception): def __init__(self, message=""): super().__init__() self.message = message def __str__(self): return self.message class EnvironmentException(ExceptionBase): pass class PlatformNotSupportedException(ExceptionBase): pass
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module ToolChains.Aldec.Aldec") from Base.Configuration import Configuration as BaseConfiguration from Base.ToolChain import ToolChainException class AldecException(ToolChainException): pass class Configuration(BaseConfiguration): _vendor = "Aldec" _toolName = None # automatically configure only vendor path _section = "INSTALL.Aldec" _template = {
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module ToolChains.Lattice.ActiveHDL") from subprocess import check_output from Base.Configuration import Configuration as BaseConfiguration, ConfigurationException from ToolChains.Lattice.Lattice import LatticeException class ActiveHDLException(LatticeException): pass class Configuration(BaseConfiguration): _vendor = "Lattice" _toolName = "Active-HDL Lattice Edition"
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module Simulator.GHDLSimulator") # load dependencies from pathlib import Path from Base.Exceptions import * from Simulator.Base import PoCSimulator from Simulator.Exceptions import * class Simulator(PoCSimulator): __executables = {} __vhdlStandard = "93" __guiMode = False def __init__(self, host, showLogs, showReport, vhdlStandard, guiMode):
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module ToolChains.Xilinx.ISE") from subprocess import check_output from Base.Configuration import Configuration as BaseConfiguration, ConfigurationException from Base.Exceptions import PlatformNotSupportedException from Base.Executable import Executable from Base.Executable import ExecutableArgument, ShortFlagArgument, ShortTupleArgument, StringArgument, CommandLineArgumentList from Base.Logging import LogEntry, Severity from Base.Project import Project as BaseProject, ProjectFile, ConstraintFile, FileTypes from Base.Simulator import SimulationResult, PoCSimulationResultFilter from ToolChains.Xilinx.Xilinx import XilinxException from lib.Functions import CallByRefParam
# # # License: # ============================================================================== # Copyright 2007-2016 Technische Universitaet Dresden - Germany # Chair for VLSI-Design, Diagnostics and Architecture # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Repository Service Tool") # load dependencies
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module PoC.Entity") # load dependencies from collections import OrderedDict from enum import Enum, unique from pathlib import Path from flags import Flags from lib.Functions import Init from lib.Decorators import LazyLoadTrigger, ILazyLoadable from Base.Configuration import ConfigurationException @unique class EntityTypes(Enum):
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module Processor.Base") # load dependencies from Base.Exceptions import * class PoCProcessor(object): __host = None __debug = False __verbose = False __quiet = False showLogs = False showReport = False dryRun = False def __init__(self, host, showLogs, showReport): self.__debug = host.getDebug()
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module ToolChains.Mentor.QuestaSim") from Base.Configuration import Configuration as BaseConfiguration from Base.ToolChain import ToolChainException class MentorException(ToolChainException): pass class Configuration(BaseConfiguration): _vendor = "Mentor" _toolName = None # automatically configure only vendor path _section = "INSTALL.Mentor" _template = {
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module ToolChains.Altera.ModelSim") from re import compile as RegExpCompile from subprocess import check_output from Base.Configuration import Configuration as BaseConfiguration, ConfigurationException from ToolChains.Altera.Altera import AlteraException class ModelSimException(AlteraException): pass class Configuration(BaseConfiguration): _vendor = "Altera"
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__" : # place library initialization code here pass else : from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module ToolChains.Xilinx.HardwareServer") from Base.Configuration import Configuration as BaseConfiguration class Configuration(BaseConfiguration): _vendor = "Xilinx" _toolName = "Xilinx HardwareServer" _section = "INSTALL.Xilinx.HardwareServer" _template = { "Windows": { _section: { "Version": "2015.4", "InstallationDirectory": "${INSTALL.Xilinx:InstallationDirectory}/Vivado/${Version}", "BinaryDirectory": "${InstallationDirectory}/bin" }
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # entry point from PoC.Entity import Visibility if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module PoC.Project") # load dependencies from collections import OrderedDict from textwrap import dedent from lib.Decorators import ILazyLoadable, LazyLoadTrigger from Base.Exceptions import CommonException from Base.Configuration import ConfigurationException from Base.Project import Project as BaseProject, File, FileTypes, VHDLSourceFile, VerilogSourceFile, CocotbSourceFile #, ProjectFile from Parser.FilesParser import FilesParserMixIn from Parser.RulesParser import RulesParserMixIn from PoC import __POC_SOLUTION_KEYWORD__
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module Base.Executable") # load dependencies from pathlib import Path from subprocess import Popen as Subprocess_Popen from subprocess import PIPE as Subprocess_Pipe from subprocess import STDOUT as Subprocess_StdOut from Base.Exceptions import CommonException from Base.Logging import ILogable class ExecutableException(BaseException): def __init__(self, message=""): super().__init__(message) self.message = message
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module ToolChains.GHDL") from pathlib import Path from re import compile as RegExpCompile from subprocess import check_output, CalledProcessError from Base.Configuration import Configuration as BaseConfiguration, ConfigurationException from Base.Exceptions import PlatformNotSupportedException from Base.Executable import Executable from Base.Executable import ExecutableArgument, PathArgument, StringArgument, ValuedFlagListArgument from Base.Executable import ShortFlagArgument, LongFlagArgument, ShortValuedFlagArgument, CommandLineArgumentList from Base.Logging import LogEntry, Severity from Base.Simulator import PoCSimulationResultFilter, SimulationResult from Base.ToolChain import ToolChainException from lib.Functions import CallByRefParam
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module ToolChains.Xilinx.Xilinx") from os import environ from pathlib import Path from Base.Configuration import Configuration as BaseConfiguration from Base.Project import FileTypes, VHDLVersion from Base.ToolChain import ToolChainException class XilinxException(ToolChainException): pass class Configuration(BaseConfiguration): _vendor = "Xilinx"
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Class Compiler(PoCCompiler)") # load dependencies from pathlib import Path from Base.Exceptions import * from Compiler.Base import PoCCompiler from Compiler.Exceptions import * class Compiler(PoCCompiler): __executables = {} def __init__(self, host, showLogs, showReport): super(self.__class__, self).__init__(host, showLogs, showReport)
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": pass # place library initialization code here else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module Simulator.Base") # load dependencies from datetime import datetime from enum import Enum, unique from lib.Functions import Init from Base.Exceptions import ExceptionBase, SkipableException from Base.Logging import LogEntry from Base.Project import Environment, VHDLVersion from Base.Shared import Shared from PoC.Entity import WildCard from PoC.TestCase import TestSuite, TestCase, Status
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module Base.PoCBase") # load dependencies from pathlib import Path from Base.Exceptions import * class CommandLineProgram(object): import platform # configure hard coded variables here __scriptDirectoryName = "py" __pocPrivateConfigFileName = "config.private.ini" __pocPublicConfigFileName = "config.public.ini" # private fields
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module PoC.Config") # load dependencies from enum import Enum, unique from re import compile as RegExpCompile from lib.Functions import Init from Base.Configuration import ConfigurationException class BaseEnum(Enum): def __str__(self): return self.name def __repr__(self):
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point from Base.Exceptions import PlatformNotSupportedException if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("The PoC-Library - Python Module Compiler.XSTCompiler") # load dependencies from pathlib import Path from Base.Compiler import Compiler as BaseCompiler, CompilerException, SkipableCompilerException from Base.Project import ToolChain, Tool from PoC.Entity import WildCard from ToolChains.Lattice.Diamond import Diamond, SynthesisArgumentFile from ToolChains.Lattice.Lattice import LatticeException class Compiler(BaseCompiler): _TOOL_CHAIN = ToolChain.Lattice_Diamond _TOOL = Tool.Lattice_LSE
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module Base.Configuration") from collections import OrderedDict from pathlib import Path from Base.Exceptions import ExceptionBase class ConfigurationException(ExceptionBase): pass class SkipConfigurationException(ExceptionBase): pass # class RegisterSubClassesMeta(type):
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point import time if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module ToolChains.Lattice.Diamond") from pathlib import Path from subprocess import check_output, CalledProcessError, STDOUT from Base.Configuration import Configuration as BaseConfiguration, ConfigurationException from Base.Exceptions import PlatformNotSupportedException from Base.Executable import Executable, CommandLineArgumentList, ExecutableArgument, ShortTupleArgument from Base.Logging import Severity, LogEntry from Base.Project import File, FileTypes from ToolChains.Lattice.Lattice import LatticeException class DiamondException(LatticeException): pass
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== # # entry point if __name__ != "__main__": # place library initialization code here pass else: from lib.Functions import Exit Exit.printThisIsNoExecutableFile("PoC Library - Python Module Simulator.Exceptions") # load dependencies from Base.Exceptions import * class SimulatorException(BaseException): def __init__(self, message=""): super().__init__(message) self.message = message class TestbenchException(SimulatorException): def __init__(self, pocEntity, testbench, message): super().__init__(message) self.pocEntity = pocEntity self.testbench = testbench