Fix doc search path

This commit is contained in:
Alex Mykyta
2022-05-27 23:11:55 -07:00
parent ef5a1137ee
commit 693040d145
2 changed files with 47 additions and 47 deletions

View File

@@ -12,7 +12,7 @@
# #
import os import os
import sys import sys
sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('../src/'))
import datetime import datetime

View File

@@ -21,7 +21,7 @@ Install from `PyPi`_ using pip
.. code-block:: bash .. code-block:: bash
python3 -m pip install peakrdl-regblock python3 -m pip install peakrdl-regblock
.. _PyPi: https://pypi.org/project/peakrdl-regblock .. _PyPi: https://pypi.org/project/peakrdl-regblock
@@ -34,35 +34,35 @@ Below is a simple example that demonstrates how to generate a SystemVerilog
implementation from SystemRDL source. implementation from SystemRDL source.
.. code-block:: python .. code-block:: python
:emphasize-lines: 2-3, 23-27 :emphasize-lines: 2-3, 23-27
from systemrdl import RDLCompiler, RDLCompileError from systemrdl import RDLCompiler, RDLCompileError
from peakrdl.regblock import RegblockExporter from peakrdl.regblock import RegblockExporter
from peakrdl.regblock.cpuif.apb3 import APB3_Cpuif from peakrdl.regblock.cpuif.apb3 import APB3_Cpuif
input_files = [ input_files = [
"PATH/TO/my_register_block.rdl" "PATH/TO/my_register_block.rdl"
] ]
# Create an instance of the compiler # Create an instance of the compiler
rdlc = RDLCompiler() rdlc = RDLCompiler()
try: try:
# Compile your RDL files # Compile your RDL files
for input_file in input_files: for input_file in input_files:
rdlc.compile_file(input_file) rdlc.compile_file(input_file)
# Elaborate the design # Elaborate the design
root = rdlc.elaborate() root = rdlc.elaborate()
except RDLCompileError: except RDLCompileError:
# A compilation error occurred. Exit with error code # A compilation error occurred. Exit with error code
sys.exit(1) sys.exit(1)
# Export a SystemVerilog implementation # Export a SystemVerilog implementation
exporter = RegblockExporter() exporter = RegblockExporter()
exporter.export( exporter.export(
root, "path/to/output_dir", root, "path/to/output_dir",
cpuif_cls=APB3_Cpuif cpuif_cls=APB3_Cpuif
) )
Links Links
@@ -77,31 +77,31 @@ Links
.. toctree:: .. toctree::
:hidden: :hidden:
self self
architecture architecture
hwif hwif
api api
limitations limitations
.. toctree:: .. toctree::
:hidden: :hidden:
:caption: CPU Interfaces :caption: CPU Interfaces
cpuif/introduction cpuif/introduction
cpuif/apb3 cpuif/apb3
cpuif/axi4lite cpuif/axi4lite
cpuif/passthrough cpuif/passthrough
cpuif/internal_protocol cpuif/internal_protocol
cpuif/customizing cpuif/customizing
.. toctree:: .. toctree::
:hidden: :hidden:
:caption: Property Support :caption: Property Support
props/field props/field
props/reg props/reg
props/addrmap props/addrmap
props/signal props/signal
props/rhs_props props/rhs_props