From 520f541c3a476bd91e0506c5fa9a3c5eaca5a842 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 29 Jun 2021 14:41:30 +0200 Subject: Preparations for PSL. --- pyGHDL/dom/DesignUnit.py | 4 +- pyGHDL/dom/NonStandard.py | 13 ++++++ pyGHDL/dom/PSL.py | 112 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 pyGHDL/dom/PSL.py (limited to 'pyGHDL/dom') diff --git a/pyGHDL/dom/DesignUnit.py b/pyGHDL/dom/DesignUnit.py index 54816aef1..d5bf161fd 100644 --- a/pyGHDL/dom/DesignUnit.py +++ b/pyGHDL/dom/DesignUnit.py @@ -41,8 +41,6 @@ This module contains all DOM classes for VHDL's design units (:class:`context . +# +# SPDX-License-Identifier: GPL-2.0-or-later +# ============================================================================ + +""" +This module contains all DOM classes for VHDL's design units (:class:`context `, +:class:`architecture `, :class:`package `, +:class:`package body `, :class:`context ` and +:class:`configuration `. + + +""" +from pydecor import export + +from pyVHDLModel.PSLModel import ( + VerificationUnit as VHDLModel_VerificationUnit, + VerificationProperty as VHDLModel_VerificationProperty, + VerificationMode as VHDLModel_VerificationMode, +) + +from pyGHDL.libghdl._types import Iir +from pyGHDL.dom import DOMMixin +from pyGHDL.dom._Utils import GetNameOfNode + + +__all__ = [] + + +@export +class VerificationUnit(VHDLModel_VerificationUnit, DOMMixin): + def __init__( + self, + node: Iir, + identifier: str, + ): + super().__init__(identifier) + DOMMixin.__init__(self, node) + + @classmethod + def parse(cls, vunitNode: Iir): + name = GetNameOfNode(vunitNode) + + # FIXME: needs an implementation + + return cls(vunitNode, name) + + +@export +class VerificationProperty(VHDLModel_VerificationProperty, DOMMixin): + def __init__( + self, + node: Iir, + identifier: str, + ): + super().__init__(identifier) + DOMMixin.__init__(self, node) + + @classmethod + def parse(cls, vpropNode: Iir): + name = GetNameOfNode(vpropNode) + + # FIXME: needs an implementation + + return cls(vpropNode, name) + + +@export +class VerificationMode(VHDLModel_VerificationMode, DOMMixin): + def __init__( + self, + node: Iir, + identifier: str, + ): + super().__init__(identifier) + DOMMixin.__init__(self, node) + + @classmethod + def parse(cls, vmodeNode: Iir): + name = GetNameOfNode(vmodeNode) + + # FIXME: needs an implementation + + return cls(vmodeNode, name) -- cgit v1.2.3