File size: 3,544 Bytes
cb65407 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | # Copyright cocotb contributors
# Licensed under the Revised BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-3-Clause
"""
Classes to compare simulation versions.
These are for cocotb-internal use only.
.. warning::
These classes silently allow comparing versions of different simulators.
"""
from cocotb._vendor.distutils_version import LooseVersion
class ActivehdlVersion(LooseVersion):
"""Version numbering class for Aldec Active-HDL.
NOTE: unsupported versions exist, e.g.
ActivehdlVersion("10.5a.12.6914") > ActivehdlVersion("10.5.216.6767")
"""
pass
class CvcVersion(LooseVersion):
"""Version numbering class for Tachyon DA CVC.
Example:
>>> CvcVersion("OSS_CVC_7.00b-x86_64-rhel6x of 07/07/14 (Linux-elf)") > CvcVersion("OSS_CVC_7.00a-x86_64-rhel6x of 07/07/14 (Linux-elf)")
True
"""
pass
class GhdlVersion(LooseVersion):
"""Version numbering class for GHDL."""
pass
class IcarusVersion(LooseVersion):
"""Version numbering class for Icarus Verilog.
Example:
>>> IcarusVersion("11.0 (devel)") > IcarusVersion("10.3 (stable)")
True
>>> IcarusVersion("10.3 (stable)") <= IcarusVersion("10.3 (stable)")
True
"""
pass
class ModelsimVersion(LooseVersion):
"""Version numbering class for Mentor ModelSim."""
pass
class QuestaVersion(LooseVersion):
"""Version numbering class for Mentor Questa.
Example:
>>> QuestaVersion("10.7c 2018.08") > QuestaVersion("10.7b 2018.06")
True
>>> QuestaVersion("2020.1 2020.01") > QuestaVersion("10.7c 2018.08")
True
>>> QuestaVersion("2020.1 2020.01") == QuestaVersion("2020.1")
True
>>> QuestaVersion("2023.1_2 2023.03") > QuestaVersion("2023.1_1")
True
"""
def parse(self, vstring):
# A Questa version string, as returned by the simulator, consists of two
# space-separated parts. The first part is the actual version number,
# the second part seems to be the year and month of the initial release.
# We only need the first part, which is also used in public
# communication by Siemens.
try:
first_component = vstring.split(" ", 1)[0]
except IndexError:
first_component = vstring
super().parse(first_component)
class RivieraVersion(LooseVersion):
"""Version numbering class for Aldec Riviera-PRO.
Example:
>>> RivieraVersion("2019.10.138.7537") == RivieraVersion("2019.10.138.7537")
True
"""
pass
class VcsVersion(LooseVersion):
"""Version numbering class for Synopsys VCS.
Example:
>>> VcsVersion("Q-2020.03-1_Full64") > VcsVersion("K-2015.09_Full64")
True
"""
pass
class VerilatorVersion(LooseVersion):
"""Version numbering class for Verilator.
Example:
>>> VerilatorVersion("4.032 2020-04-04") > VerilatorVersion("4.031 devel")
True
"""
pass
class XceliumVersion(LooseVersion):
"""Version numbering class for Cadence Xcelium.
Example:
>>> XceliumVersion("20.06-g183") > XceliumVersion("20.03-s002")
True
>>> XceliumVersion("20.07-e501") > XceliumVersion("20.06-g183")
True
"""
pass
class IusVersion(XceliumVersion): # inherit everything from Xcelium
"""Version numbering class for Cadence IUS.
Example:
>>> IusVersion("15.20-s050") > IusVersion("15.20-s049")
True
"""
pass
|