Skip to content

Commit

Permalink
Merge branch 'master' into lekcyjna/autumn-cleaning-2
Browse files Browse the repository at this point in the history
  • Loading branch information
lekcyjna123 authored Oct 7, 2023
2 parents 12fd8e4 + e496a63 commit e2f9426
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions constants/ecp5_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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]]
Expand Down Expand Up @@ -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 = []
Expand Down
5 changes: 3 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# API

```{eval-rst}
.. include:: modules.rst
```
.. include:: modules-coreblocks.rst
.. include:: modules-transactron.rst
```
2 changes: 2 additions & 0 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"include": [
"coreblocks",
"test",
"constants",
"transactron",
"scripts"
],

Expand Down
3 changes: 2 additions & 1 deletion scripts/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e2f9426

Please sign in to comment.