Skip to content

Commit b2a60ab

Browse files
committed
Intial pyslang additions
1 parent b13f3c6 commit b2a60ab

30 files changed

Lines changed: 246 additions & 2992 deletions

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
17+
python-version: ['3.10', '3.11', '3.12', '3.13']
1818

1919
steps:
2020
- uses: actions/checkout@v2

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: "2"
33
build:
44
os: "ubuntu-22.04"
55
tools:
6-
python: "3.12"
6+
python: "3.13"
77

88
python:
99
install:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ authors = [{name = "Benjamin Davis", email = "allrisc.dev@gmail.com"}]
2929
license = {file = "LICENSE"}
3030
dependencies = [
3131
"jinja2>3.0.0",
32+
"pyslang>=8.1.0",
3233
]
3334
classifiers = [
3435
"Development Status :: 5 - Production/Stable",
@@ -44,7 +45,7 @@ classifiers = [
4445
"Topic :: Utilities",
4546
]
4647
keywords = ["rtl", "utilities", "SystemVerilog", "Verilog", "UVM"]
47-
requires-python = ">=3.8"
48+
requires-python = ">=3.10"
4849

4950
[project.urls]
5051
Homepage = "https://github.com/RISC-Lib/rtlpy"

src/rtlpy/__init__.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
##########################################################################
2-
# rtlpy is a open-source utility library for RTL developers #
3-
# Copyright (C) 2022, RISCY-Lib Contributors #
4-
# #
5-
# This program is free software: you can redistribute it and/or modify #
6-
# it under the terms of the GNU General Public License as published by #
7-
# the Free Software Foundation, either version 3 of the License, or #
8-
# (at your option) any later version. #
9-
# #
10-
# This program is distributed in the hope that it will be useful, #
11-
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
12-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
13-
# GNU General Public License for more details. #
14-
# #
15-
# You should have received a copy of the GNU General Public License #
16-
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
17-
##########################################################################
1+
####################################################################################################
2+
# rtlpy is a open-source utility library for RTL developers #
3+
# Copyright (C) 2022, RISCY-Lib Contributors #
4+
# #
5+
# This program is free software: you can redistribute it and/or modify #
6+
# it under the terms of the GNU General Public License as published by #
7+
# the Free Software Foundation, either version 3 of the License, or #
8+
# (at your option) any later version. #
9+
# #
10+
# This program is distributed in the hope that it will be useful, #
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
13+
# GNU General Public License for more details. #
14+
# #
15+
# You should have received a copy of the GNU General Public License #
16+
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
17+
####################################################################################################
1818

1919
from __future__ import annotations
2020

21-
import re
21+
from rtlpy._info import version_info
2222

23-
#####################################################################################
24-
# Version Information
25-
#####################################################################################
26-
from rtlpy._info import __version__
27-
28-
version_info = [int(x) if x.isdigit() else x for x in re.split(r"\.|-", __version__)]
23+
__all__ = [
24+
"version_info",
25+
"__version__",
26+
"__author__",
27+
"__license__",
28+
]

src/rtlpy/_info.py

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,58 @@
1-
##########################################################################
2-
# rtlpy is a open-source utility library for RTL developers #
3-
# Copyright (C) 2024, RISCY-Lib Contributors #
4-
# #
5-
# This program is free software: you can redistribute it and/or modify #
6-
# it under the terms of the GNU General Public License as published by #
7-
# the Free Software Foundation, either version 3 of the License, or #
8-
# (at your option) any later version. #
9-
# #
10-
# This program is distributed in the hope that it will be useful, #
11-
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
12-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
13-
# GNU General Public License for more details. #
14-
# #
15-
# You should have received a copy of the GNU General Public License #
16-
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
17-
##########################################################################
18-
1+
####################################################################################################
2+
# rtlpy is a open-source utility library for RTL developers #
3+
# Copyright (C) 2022, RISCY-Lib Contributors #
4+
# #
5+
# This program is free software: you can redistribute it and/or modify #
6+
# it under the terms of the GNU General Public License as published by #
7+
# the Free Software Foundation, either version 3 of the License, or #
8+
# (at your option) any later version. #
9+
# #
10+
# This program is distributed in the hope that it will be useful, #
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
13+
# GNU General Public License for more details. #
14+
# #
15+
# You should have received a copy of the GNU General Public License #
16+
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
17+
####################################################################################################
1918

2019
from __future__ import annotations
20+
from typing import NamedTuple, Literal
21+
22+
23+
__all__ = [
24+
"__version__",
25+
"__author__",
26+
"version_info",
27+
]
28+
29+
30+
class _VersionInfo(NamedTuple):
31+
32+
major: int
33+
minor: int
34+
micro: int
35+
releaseLevel: Literal["alpha", "beta", "candidate", "final"]
36+
serial: int
37+
38+
39+
version_info: _VersionInfo = _VersionInfo(
40+
major=2,
41+
minor=0,
42+
micro=0,
43+
releaseLevel="beta",
44+
serial=1,
45+
)
2146

47+
if version_info.releaseLevel == "final":
48+
__version__: str = f"{version_info.major}." + \
49+
f"{version_info.minor}." + \
50+
f"{version_info.micro}"
51+
else:
52+
__version__: str = f"{version_info.major}." + \
53+
f"{version_info.minor}." + \
54+
f"{version_info.micro}" + \
55+
f"-{version_info.releaseLevel[0]}{version_info.serial}"
2256

23-
__version__: str = "2.0.0-b1"
24-
__author__: str = "RISCY-Lib Contributors"
57+
__author__ = "RISCY-Lib Contributors"
58+
__license__ = "GPL-3.0-or-later"

src/rtlpy/_uvm_templates/uvm_reg.jinja

Lines changed: 0 additions & 82 deletions
This file was deleted.

src/rtlpy/_uvm_templates/uvm_reg_block.jinja

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)