Ejemplo n.º 1
0
#   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
Ejemplo n.º 2
0
#   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 = {
Ejemplo n.º 3
0
#   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"
Ejemplo n.º 4
0
#		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):
Ejemplo n.º 5
0
Archivo: ISE.py Proyecto: krabo0om/PoC
#   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

Ejemplo n.º 6
0
#    
#
# 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

Ejemplo n.º 7
0
#   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):
Ejemplo n.º 8
0
#		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()
Ejemplo n.º 9
0
#   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 = {
Ejemplo n.º 10
0
#   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"
Ejemplo n.º 11
0
#   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"
			}
Ejemplo n.º 12
0
# 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__

Ejemplo n.º 13
0
#   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
Ejemplo n.º 14
0
Archivo: GHDL.py Proyecto: krabo0om/PoC
#   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
Ejemplo n.º 15
0
#   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"
Ejemplo n.º 16
0
#		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)
Ejemplo n.º 17
0
#   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

Ejemplo n.º 18
0
#		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
Ejemplo n.º 19
0
#   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):
Ejemplo n.º 20
0
# 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
Ejemplo n.º 21
0
#   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):
Ejemplo n.º 22
0
# 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
Ejemplo n.º 23
0
#		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