From 15c1e02108ce00f7eaa187358f7e207a81b1b49f Mon Sep 17 00:00:00 2001 From: lekcyjna123 <34948061+lekcyjna123@users.noreply.github.com> Date: Sat, 7 Oct 2023 12:22:36 +0200 Subject: [PATCH 1/2] Add generating API for transactron. (#469) --- docs/api.md | 5 +++-- scripts/build_docs.sh | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/api.md b/docs/api.md index ab2def980..5daa246b7 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,5 +1,6 @@ # API ```{eval-rst} -.. include:: modules.rst -``` \ No newline at end of file +.. include:: modules-coreblocks.rst +.. include:: modules-transactron.rst +``` diff --git a/scripts/build_docs.sh b/scripts/build_docs.sh index 74cd6d1f0..6f58a5a6b 100755 --- a/scripts/build_docs.sh +++ b/scripts/build_docs.sh @@ -59,5 +59,6 @@ fi $ROOT_PATH/scripts/core_graph.py -p -f mermaid $DOCS_DIR/auto_graph.rst sed -i -e '1i\.. mermaid::\n' -e 's/^/ /' $DOCS_DIR/auto_graph.rst -sphinx-apidoc -o $DOCS_DIR $ROOT_PATH/coreblocks/ +sphinx-apidoc --tocfile modules-coreblocks -o $DOCS_DIR $ROOT_PATH/coreblocks/ +sphinx-apidoc --tocfile modules-transactron -o $DOCS_DIR $ROOT_PATH/transactron/ sphinx-build -b html -W $DOCS_DIR $BUILD_DIR From e496a63e2616bf1381d688205656d58cba2331e3 Mon Sep 17 00:00:00 2001 From: lekcyjna123 <34948061+lekcyjna123@users.noreply.github.com> Date: Sat, 7 Oct 2023 12:39:21 +0200 Subject: [PATCH 2/2] Fix broken synthesis after cleanup (#468) --- constants/ecp5_platforms.py | 6 ++++-- pyrightconfig.json | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/constants/ecp5_platforms.py b/constants/ecp5_platforms.py index 55ad94478..8bca17145 100644 --- a/constants/ecp5_platforms.py +++ b/constants/ecp5_platforms.py @@ -8,7 +8,7 @@ from constants.ecp5_pinout import ecp5_bg756_pins, ecp5_bg756_pclk from coreblocks.peripherals.wishbone import WishboneParameters -from coreblocks.transactions.lib import AdapterBase +from transactron.lib import AdapterBase __all__ = ["make_ecp5_platform"] @@ -60,6 +60,7 @@ def named_pin(self, names: list[str]): if name in self.pin_bag: self.pin_bag.remove(name) return name + raise RuntimeError("Named pins %s not free" % ", ".join(names)) ResourceBuilder: TypeAlias = Callable[[PinManager], list[Resource]] @@ -123,9 +124,10 @@ class ECP5BG756Platform(LatticeECP5Platform): default_clk = "clk" default_rst = "rst" + clk_pin = pins.named_pin(ecp5_bg756_pclk) resources = [ Resource("rst", 0, PinsN(pins.p(), dir="i"), Attrs(IO_TYPE="LVCMOS33")), - Resource("clk", 0, Pins(pins.named_pin(ecp5_bg756_pclk), dir="i"), Clock(12e6), Attrs(IO_TYPE="LVCMOS33")), + Resource("clk", 0, Pins(clk_pin, dir="i"), Clock(12e6), Attrs(IO_TYPE="LVCMOS33")), ] + resource_builder(pins) connectors = [] diff --git a/pyrightconfig.json b/pyrightconfig.json index dd4c65a88..aadb361ef 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -2,6 +2,8 @@ "include": [ "coreblocks", "test", + "constants", + "transactron", "scripts" ],