Skip to content

Commit

Permalink
Switch to use regular non-namespaced package
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Jun 10, 2022
1 parent 693040d commit 8d13a9d
Show file tree
Hide file tree
Showing 52 changed files with 26 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Run Lint
run: |
pylint --rcfile tests/pylint.rc peakrdl
pylint --rcfile tests/pylint.rc peakrdl_regblock
#-------------------------------------------------------------------------------
mypy:
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Type Check
run: |
mypy --config-file tests/mypy.ini src/peakrdl
mypy --config-file tests/mypy.ini src/peakrdl_regblock
#-------------------------------------------------------------------------------
build_sdist:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recursive-include src/peakrdl/regblock *.sv
recursive-include src/peakrdl_regblock *.sv
prune tests
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Exporter API
============

.. autoclass:: peakrdl.regblock.RegblockExporter
.. autoclass:: peakrdl_regblock.RegblockExporter
:members:
4 changes: 2 additions & 2 deletions docs/cpuif/apb3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ CPU interface.
The APB3 CPU interface comes in two i/o port flavors:

SystemVerilog Interface
Class: :class:`peakrdl.regblock.cpuif.apb3.APB3_Cpuif`
Class: :class:`peakrdl_regblock.cpuif.apb3.APB3_Cpuif`

Interface Definition: :download:`apb3_intf.sv <../../tests/lib/cpuifs/apb3/apb3_intf.sv>`

Flattened inputs/outputs
Flattens the interface into discrete input and output ports.

Class: :class:`peakrdl.regblock.cpuif.apb3.APB3_Cpuif_flattened`
Class: :class:`peakrdl_regblock.cpuif.apb3.APB3_Cpuif_flattened`


.. warning::
Expand Down
4 changes: 2 additions & 2 deletions docs/cpuif/axi4lite.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ CPU interface.
The AXI4-Lite CPU interface comes in two i/o port flavors:

SystemVerilog Interface
Class: :class:`peakrdl.regblock.cpuif.axi4lite.AXI4Lite_Cpuif`
Class: :class:`peakrdl_regblock.cpuif.axi4lite.AXI4Lite_Cpuif`

Interface Definition: :download:`axi4lite_intf.sv <../../tests/lib/cpuifs/axi4lite/axi4lite_intf.sv>`

Flattened inputs/outputs
Flattens the interface into discrete input and output ports.

Class: :class:`peakrdl.regblock.cpuif.axi4lite.AXI4Lite_Cpuif_flattened`
Class: :class:`peakrdl_regblock.cpuif.axi4lite.AXI4Lite_Cpuif_flattened`


Pipelined Performance
Expand Down
4 changes: 2 additions & 2 deletions docs/cpuif/customizing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Rather than rewriting a new CPU interface definition, you can extend and adjust

.. code-block:: python
from peakrdl.regblock.cpuif.axi4lite import AXI4Lite_Cpuif
from peakrdl_regblock.cpuif.axi4lite import AXI4Lite_Cpuif
class My_AXI4Lite(AXI4Lite_Cpuif):
@property
Expand Down Expand Up @@ -70,7 +70,7 @@ you can define your own.

2. Create a Python class that defines your CPUIF

Extend your class from :class:`peakrdl.regblock.cpuif.CpuifBase`.
Extend your class from :class:`peakrdl_regblock.cpuif.CpuifBase`.
Define the port declaration string, and provide a reference to your template file.

3. Use your new CPUIF definition when exporting!
2 changes: 1 addition & 1 deletion docs/cpuif/passthrough.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ CPUIF Passthrough
This CPUIF mode bypasses the protocol converter stage and directly exposes the
internal CPUIF handshake signals to the user.

Class: :class:`peakrdl.regblock.cpuif.passthrough.PassthroughCpuif`
Class: :class:`peakrdl_regblock.cpuif.passthrough.PassthroughCpuif`

For more details on the protocol itself, see: :ref:`cpuif_protocol`.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ implementation from SystemRDL source.
:emphasize-lines: 2-3, 23-27
from systemrdl import RDLCompiler, RDLCompileError
from peakrdl.regblock import RegblockExporter
from peakrdl.regblock.cpuif.apb3 import APB3_Cpuif
from peakrdl_regblock import RegblockExporter
from peakrdl_regblock.cpuif.apb3 import APB3_Cpuif
input_files = [
"PATH/TO/my_register_block.rdl"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
long_description = fh.read()


with open(os.path.join("src/peakrdl/regblock", "__about__.py"), encoding='utf-8') as f:
with open(os.path.join("src/peakrdl_regblock", "__about__.py"), encoding='utf-8') as f:
v_dict = {}
exec(f.read(), v_dict)
version = v_dict['__version__']
Expand All @@ -20,7 +20,7 @@
long_description_content_type="text/markdown",
url="https://github.com/SystemRDL/PeakRDL-regblock",
package_dir={'': 'src'},
packages=setuptools.find_namespace_packages("src", include=['peakrdl.*']),
packages=setuptools.find_packages("src"),
include_package_data=True,
python_requires='>=3.6',
install_requires=[
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def export(self, node: Union[RootNode, AddrmapNode], output_dir:str, **kwargs: A
output_dir: str
Path to the output directory where generated SystemVerilog will be written.
Output includes two files: a module definition and package definition.
cpuif_cls: :class:`peakrdl.regblock.cpuif.CpuifBase`
cpuif_cls: :class:`peakrdl_regblock.cpuif.CpuifBase`
Specify the class type that implements the CPU interface of your choice.
Defaults to AMBA APB3.
module_name: str
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/lib/base_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest
from systemrdl import RDLCompiler

from peakrdl.regblock import RegblockExporter
from peakrdl_regblock import RegblockExporter
from .cpuifs.base import CpuifTestMode
from .cpuifs.apb3 import APB3

Expand Down Expand Up @@ -72,7 +72,7 @@ def _write_params(cls) -> None:
@classmethod
def _export_regblock(cls):
"""
Call the peakrdl.regblock exporter to generate the DUT
Call the peakrdl_regblock exporter to generate the DUT
"""
this_dir = cls.get_testcase_dir()

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cpuifs/apb3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ..base import CpuifTestMode

from peakrdl.regblock.cpuif.apb3 import APB3_Cpuif, APB3_Cpuif_flattened
from peakrdl_regblock.cpuif.apb3 import APB3_Cpuif, APB3_Cpuif_flattened

class APB3(CpuifTestMode):
cpuif_cls = APB3_Cpuif
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cpuifs/axi4lite/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ..base import CpuifTestMode

from peakrdl.regblock.cpuif.axi4lite import AXI4Lite_Cpuif, AXI4Lite_Cpuif_flattened
from peakrdl_regblock.cpuif.axi4lite import AXI4Lite_Cpuif, AXI4Lite_Cpuif_flattened

class AXI4Lite(CpuifTestMode):
cpuif_cls = AXI4Lite_Cpuif
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/cpuifs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import jinja2 as jj

from peakrdl.regblock.cpuif.base import CpuifBase
from peakrdl_regblock.cpuif.base import CpuifBase

from ..sv_line_anchor import SVLineAnchor

if TYPE_CHECKING:
from peakrdl.regblock import RegblockExporter
from peakrdl_regblock import RegblockExporter
from ..sim_testcase import SimTestCase

class CpuifTestMode:
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cpuifs/passthrough/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ..base import CpuifTestMode

from peakrdl.regblock.cpuif.passthrough import PassthroughCpuif
from peakrdl_regblock.cpuif.passthrough import PassthroughCpuif

class Passthrough(CpuifTestMode):
cpuif_cls = PassthroughCpuif
Expand Down
1 change: 0 additions & 1 deletion tests/pylint.rc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ disable=

# Noise / Don't care
no-else-return,
no-self-use,
unused-variable,
invalid-name,
missing-docstring,
Expand Down
4 changes: 2 additions & 2 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export SKIP_SYNTH_TESTS=1
pytest --workers auto

# Run lint
pylint --rcfile $this_dir/pylint.rc ../src/peakrdl
pylint --rcfile $this_dir/pylint.rc ../src/peakrdl_regblock

# Run static type checking
mypy $this_dir/../src/peakrdl
mypy $this_dir/../src/peakrdl_regblock
2 changes: 1 addition & 1 deletion tests/test_user_cpuif/testcase.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from peakrdl.regblock.cpuif.apb3 import APB3_Cpuif
from peakrdl_regblock.cpuif.apb3 import APB3_Cpuif
from ..lib.cpuifs.apb3 import APB3
from ..lib.base_testcase import BaseTestCase

Expand Down

0 comments on commit 8d13a9d

Please sign in to comment.