Skip to content

Commit 9b913ab

Browse files
committed
docs: update for pin-lock and tweak CI for docs
1 parent 3a84216 commit 9b913ab

File tree

9 files changed

+251
-108
lines changed

9 files changed

+251
-108
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# .github/workflows/deploy.yml
2+
name: Deploy
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup PDM
14+
uses: pdm-project/setup-pdm@v4
15+
with:
16+
python-version: 3.12
17+
cache: true
18+
19+
- name: Install dependencies
20+
run: pdm install
21+
22+
- name: Build docs
23+
run: pdm docs
24+
25+
- uses: JamesIves/github-pages-deploy-action@v4
26+
with:
27+
folder: docs/_build
28+
branch: gh-pages
29+
clean-exclude: pr-preview
30+
force: false

.github/workflows/main.yaml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -39,48 +39,3 @@ jobs:
3939
- name: Check source code licenses
4040
run: |
4141
docker run --platform=linux/amd64 -v ${PWD}:/src ghcr.io/google/addlicense -v -check -l BSD-2-Clause -c "ChipFlow" -s=only -ignore **/__init__.py **/*.py
42-
43-
build-docs:
44-
needs: test
45-
runs-on: ubuntu-22.04
46-
steps:
47-
- name: Checkout
48-
uses: actions/checkout@v4
49-
- name: Set up PDM
50-
uses: pdm-project/setup-pdm@v4
51-
with:
52-
python-version: 3.9
53-
- name: Install deps
54-
run: pdm install
55-
- name: Build docs
56-
run: pdm run document
57-
- name: Upload docs artifact
58-
uses: actions/upload-artifact@v4
59-
with:
60-
name: docs
61-
path: docs/_build
62-
63-
publish-docs:
64-
needs: build-docs
65-
if: ${{ github.repository == 'chipflow/chipflow-lib' }}
66-
runs-on: ubuntu-latest
67-
steps:
68-
- name: Checkout
69-
uses: actions/checkout@v4
70-
with:
71-
fetch-depth: 0
72-
- name: Download docs artifact
73-
uses: actions/download-artifact@v4
74-
with:
75-
name: docs
76-
path: docs/
77-
- name: Publish "latest" docs
78-
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
79-
uses: JamesIves/github-pages-deploy-action@releases/v4
80-
with:
81-
repository-name: chipflow/chipflow.github.io
82-
ssh-key: ${{ secrets.PAGES_DEPLOY_KEY }}
83-
branch: main
84-
folder: docs/
85-
target-folder: chipflow-lib/latest/
86-

.github/workflows/preview-docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# .github/workflows/preview.yml
2+
name: Deploy PR previews
3+
concurrency: preview-${{ github.ref }}
4+
on:
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- synchronize
10+
- closed
11+
jobs:
12+
deploy-preview:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup PDM
18+
uses: pdm-project/setup-pdm@v4
19+
with:
20+
python-version: 3.12
21+
cache: true
22+
23+
- name: Install dependencies
24+
run: pdm install
25+
26+
- name: Build docs
27+
run: pdm docs
28+
if: github.event.action != 'closed'
29+
30+
- uses: rossjrw/pr-preview-action@v1
31+
with:
32+
source-dir: docs/_build
33+
preview-branch: gh-pages
34+
umbrella-dir: pr-preview
35+
action: auto
36+
pages-base-url: chipflow-lib.docs.chipflow-infra.com

docs/_static/chipflow-logo.png

90 KB
Loading

docs/_static/chipflow-logo.svg

Lines changed: 18 additions & 0 deletions
Loading

docs/chipflow-toml-guide.rst

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Intro to chipflow.toml
2-
======================
1+
Intro to ``chipflow.toml``
2+
==========================
33

44
The ``chipflow.toml`` file provides configuration for your design with the ChipFlow platform.
55

@@ -14,25 +14,55 @@ Let's start with a typical example:
1414
# Assert that example-chipflow.toml matches the current config schema. If
1515
# this test fails, then its likely that the content in this file will need
1616
# to be updated.
17-
from chipflow_lib.cli import _parse_config_file
17+
from chipflow_lib import _parse_config_file
1818
_parse_config_file("docs/example-chipflow.toml")
1919

20-
project_id
21-
===========
20+
``[chipflow]``
21+
--------------
2222

23-
The ``project_id`` is set to the project ID which you can get from the ChipFlow app project page.
23+
.. code-block:: TOML
24+
25+
[chipflow]
26+
project_name = "my_project"
27+
28+
29+
The ``project_name`` is a human-readable identifier for this project. If not set, the tool and library will use the project name configured in ``pyproject.toml``.
30+
31+
``[chipflow.steps]``
32+
--------------------
33+
34+
The ``steps`` section allows overriding or addition to the standard steps available from `chipflow_lib`_.
35+
36+
For example, if you want to override the standard silicon preparation step, you could derive from :class:`chipflow_lib.steps.silicon.SiliconStep`, add your custom functionality
37+
and add the following to your `chipflow.toml`, with the appropriate Python `qualified name`_ :
38+
39+
.. code-block:: TOML
40+
41+
[chipflow.stepe]
42+
silicon = "my_design.steps.silicon:SiliconStep"
2443
25-
steps
26-
=====
2744
28-
The ``steps`` define the Python class which will be used as an entry point to these parts of the ChipFlow process.
2945
You probably won't need to change these if you're starting from an example repository.
3046

31-
silicon
32-
=======
47+
.. _chipflow_lib: https://github.com/ChipFlow/chipflow-lib]
48+
.. _qualified name: https://docs.python.org/3/glossary.html#term-qualified-name
3349

34-
The ``silicon`` section sets the Foundry ``process`` we are targeting for manufacturing, and the physical ``pad_ring`` we want to place our design inside.
35-
You'll choose the ``process`` and ``pad_ring`` based in the requirements of your design.
50+
51+
``[chipflow.clocks]``
52+
---------------------
53+
54+
``[chipflow.silicon]``
55+
----------------------
56+
57+
.. code-block:: TOML
58+
59+
[chipflow.silicon]
60+
process = "ihp_sg13g2"
61+
package = "pga144"
62+
63+
64+
The ``silicon`` section sets the Foundry ``process`` we are targeting for manufacturing, and the physical ``package`` we want to place our design inside.
65+
You'll choose the ``process`` and ``package`` based in the requirements of your design.
3666

3767
Available processes
3868
-------------------
@@ -56,12 +86,8 @@ Available pad rings
5686
+----------+-----------+--------------------+------------------------------------+
5787
| Pad ring | Pad count | Pad locations | Notes |
5888
+==========+===========+====================+====================================+
59-
|| caravel || TBC || TBC || The `Caravel Harness`_ contains |
60-
|| || || || additional logic which wraps your |
61-
|| || || || design. |
62-
|| || || || It handles its own power pins. |
6389
+----------+-----------+--------------------+------------------------------------+
64-
|| cf20 || 20 || ``N1`` ... ``N7`` || |
90+
|| cf20 || 20 || ``N1`` ... ``N7`` || Bare die package with 20 pins |
6591
|| || || ``S1`` ... ``S7`` || |
6692
|| || || ``E1`` ... ``E3`` || |
6793
|| || || ``W1`` ... ``W3`` || |
@@ -74,10 +100,12 @@ Available pad rings
74100
+----------+-----------+--------------------+------------------------------------+
75101

76102

103+
104+
77105
silicon.pads
78106
============
79107

80-
The ``silicon.pads`` section lists the pads we will be using.
108+
The ``silicon.pads`` section lists special pads. In general you are unlikely to need to add to this.
81109

82110
For each pad, there's a label which is used by our design, and what ``type`` and ``loc`` each pad should be.
83111

@@ -86,8 +114,8 @@ type
86114

87115
The ``type`` for each pad can be set to one of:
88116

89-
clk
90-
External clock.
117+
clock
118+
External clock input.
91119

92120
i
93121
Input.

0 commit comments

Comments
 (0)