diff --git a/docs/cpuif/customizing.rst b/docs/cpuif/customizing.rst index dc806c5..5ceea58 100644 --- a/docs/cpuif/customizing.rst +++ b/docs/cpuif/customizing.rst @@ -93,7 +93,8 @@ The easiest way to add your cpuif is via the TOML config file. See the Via a package's entry point definition ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you are publishing a collection of PeakRDL plugins as an installable Python -package, you can advertise them to PeakRDL using an entry point. +package, you can advertise them to PeakRDL using an entry point defined in your +``pyproject.toml`` file. This advertises your custom CPUIF class to the PeakRDL-regblock tool as a plugin that should be loaded, and made available as a command-line option in PeakRDL. @@ -103,12 +104,11 @@ that should be loaded, and made available as a command-line option in PeakRDL. my-cpuif = "my_package.my_module:MyCPUIF" -* ``my_package``: The name of your installable Python module * ``peakrdl-regblock.cpuif``: This is the namespace that PeakRDL-regblock will search. Any cpuif plugins you create must be enclosed in this namespace in order to be discovered. -* ``my_package.my_module:MyCPUIF``: This is the import path that - points to your CPUIF class definition. * ``my-cpuif``: The lefthand side of the assignment is your cpuif's name. This text is what the end-user uses in the command line interface to select your CPUIF implementation. +* ``my_package.my_module:MyCPUIF``: This is the import path that + points to your CPUIF class definition. diff --git a/src/peakrdl_regblock/validate_design.py b/src/peakrdl_regblock/validate_design.py index 1ce14f2..a32bc05 100644 --- a/src/peakrdl_regblock/validate_design.py +++ b/src/peakrdl_regblock/validate_design.py @@ -23,7 +23,6 @@ class DesignValidator(RDLListener): self.msg = self.top_node.env.msg self._contains_external_block_stack = [] # type: List[bool] - self.contains_external_block = False @property def top_node(self) -> 'AddrmapNode': @@ -178,9 +177,6 @@ class DesignValidator(RDLListener): if self._contains_external_block_stack: # Still in the design. Update stack self._contains_external_block_stack[-1] |= contains_external_block - else: - # Exiting top addrmap. Resolve final answer - self.contains_external_block = contains_external_block if contains_external_block: # Check that addressing follows strict alignment rules to allow diff --git a/tests/README.md b/tests/README.md index bb3996c..c20ca4e 100644 --- a/tests/README.md +++ b/tests/README.md @@ -48,13 +48,14 @@ Use `pytest --workers auto` to run tests in parallel. To run all tests: ```bash -python3 setup.py install -pytest tests +python3 -m pip install ".[cli]" +cd tests +pytest ``` You can also run a specific testcase. For example: ```bash -pytest tests/test_hw_access +pytest test_hw_access ``` Command-line arguments can be used to explicitly select which simulator/synthesis tools are used