Coverage for pyVHDLModel/STD/__init__.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.18.0, created at 2026-12-03 15:52 +0000

1# ==================================================================================================================== # 

2# __ ___ _ ____ _ __ __ _ _ # 

3# _ __ _ \ \ / / | | | _ \| | | \/ | ___ __| | ___| | # 

4# | '_ \| | | \ \ / /| |_| | | | | | | |\/| |/ _ \ / _` |/ _ \ | # 

5# | |_) | |_| |\ V / | _ | |_| | |___| | | | (_) | (_| | __/ | # 

6# | .__/ \__, | \_/ |_| |_|____/|_____|_| |_|\___/ \__,_|\___|_| # 

7# |_| |___/ # 

8# ==================================================================================================================== # 

9# Authors: # 

10# Patrick Lehmann # 

11# # 

12# License: # 

13# ==================================================================================================================== # 

14# Copyright 2017-2026 Patrick Lehmann - Boetzingen, Germany # 

15# Copyright 2016-2017 Patrick Lehmann - Dresden, Germany # 

16# # 

17# Licensed under the Apache License, Version 2.0 (the "License"); # 

18# you may not use this file except in compliance with the License. # 

19# You may obtain a copy of the License at # 

20# # 

21# http://www.apache.org/licenses/LICENSE-2.0 # 

22# # 

23# Unless required by applicable law or agreed to in writing, software # 

24# distributed under the License is distributed on an "AS IS" BASIS, # 

25# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 

26# See the License for the specific language governing permissions and # 

27# limitations under the License. # 

28# # 

29# SPDX-License-Identifier: Apache-2.0 # 

30# ==================================================================================================================== # 

31# 

32""" 

33This package contains library and package declarations for VHDL library ``STD``. 

34 

35Each predefined VHDL package of the library is declared in a module of its own, e.g. ``std.standard`` in 

36:mod:`~pyVHDLModel.STD.StandardPkg`. 

37""" 

38from pyTooling.Decorators import export 

39 

40from pyVHDLModel import VHDLVersion 

41from pyVHDLModel.Predefined import PredefinedLibrary 

42from pyVHDLModel.STD.StandardPkg import EdgeFunctionsMixin, Boolean, Bit, Real, Time, BitVector, UniversalTypeMixin, \ 

43 UniversalInteger, UniversalReal, Standard, Standard_Body 

44from pyVHDLModel.STD.TextIOPkg import TextIO, TextIO_Body 

45from pyVHDLModel.STD.EnvPkg import Env, Env_Body 

46 

47 

48@export 

49class Std(PredefinedLibrary): 

50 """ 

51 Predefined VHDL library ``std``. 

52 

53 The following predefined packages are in this library: 

54 

55 * :class:`~pyVHDLModel.STD.StandardPkg.Standard` 

56 * :class:`~pyVHDLModel.STD.EnvPkg.Env` 

57 * :class:`~pyVHDLModel.STD.TextIOPkg.TextIO` 

58 

59 .. seealso:: 

60 

61 Other predefined libraries: 

62 * Library :class:`~pyVHDLModel.IEEE.Ieee` 

63 """ 

64 

65 def __init__(self, vhdlVersion: VHDLVersion = VHDLVersion.VHDL2008) -> None: 

66 """ 

67 Initializes the ``std`` library. 

68 

69 :param vhdlVersion: Optional, the VHDL version of the library's packages. Default: ``VHDLVersion.VHDL2008``. 

70 :raises ValueError: If parameter 'vhdlVersion' is None. 

71 :raises TypeError: If parameter 'vhdlVersion' is not of type :class:`~pyVHDLModel.VHDLVersion`. 

72 :raises ValueError: If parameter 'vhdlVersion' is not a supported VHDL version (VHDL-2008, VHDL-2019). 

73 """ 

74 super().__init__(PACKAGES, vhdlVersion) 

75 

76 

77PACKAGES = ( 

78 (Standard, Standard_Body), 

79 (TextIO, TextIO_Body), 

80 (Env, Env_Body), 

81)