Skip to content

Commit e41c27e

Browse files
wrajtartmichalak
authored andcommitted
Add new documentation
Signed-off-by: Wojciech Rajtar <[email protected]>
1 parent 8fafccd commit e41c27e

27 files changed

+840
-6
lines changed

.github/workflows/build-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ jobs:
2424

2525
- name: Build Docs
2626
run: |
27-
pushd docs
27+
pushd doc
2828
pip3 install -r requirements.txt
2929
TZ=UTC make html
3030
popd
31-
ls -lah docs/build
31+
ls -lah doc/build
3232
3333
- name: Pack artifacts
3434
if: always()
3535
uses: actions/upload-artifact@v4
3636
with:
3737
name: docs
38-
path: ./docs/build
38+
path: ./doc/build
3939

4040
- name: Deploy
4141
uses: peaceiris/actions-gh-pages@v4
4242
if: ${{ github.ref == 'refs/heads/main' }}
4343
with:
4444
github_token: ${{ secrets.GITHUB_TOKEN }}
45-
publish_dir: ./docs/build/html
45+
publish_dir: ./doc/build/html

doc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

doc/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SPHINXOPTS ?=
2+
SPHINXBUILD ?= sphinx-build
3+
SOURCEDIR = source
4+
BUILDDIR = build
5+
6+
# Catch-all target: route all unknown targets to Sphinx using the "make mode" option.
7+
# $(O) is meant as a shortcut for $(SPHINXOPTS).
8+
%:
9+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Sphinx>=8.0
2+
https://github.com/antmicro/antmicro-sphinx-utils/archive/main.zip

doc/source/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SPHINXOPTS ?=
2+
SPHINXBUILD ?= sphinx-build
3+
SOURCEDIR = source
4+
BUILDDIR = build
5+
6+
# Catch-all target: route all unknown targets to Sphinx using the "make mode" option.
7+
# $(O) is meant as a shortcut for $(SPHINXOPTS).
8+
%:
9+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/source/ccc.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# I3C Common Command Codes (CCC)
2+
3+
The I3C core supports all CCCs required by the I3C Basic spec, please see "Table 16 I3C Common Command Codes" for a full reference.
4+
5+
All CCCs are exercised with Cocotb tests.
6+
7+
## Broadcast CCCs
8+
9+
The following Broadcast CCCs are currently supported by the core (all required Broadcast CCCs as per the errata, and one optional Broadcast CCC):
10+
11+
* ENEC (R) - Enable Events Command
12+
* DISEC (R) - Disable Events Command
13+
* SETMWL (R) - Set Max Write Length
14+
* SETMRL (R) - Set Max Read Length
15+
* SETAASA (O) - Set All Addresses to Static Adresses
16+
* RSTACT (R) - Target Reset Action
17+
18+
## Direct CCCs
19+
20+
The following Direct CCCs are currently supported by the core (all required Direct CCCs, plus several optional/conditional ones):
21+
22+
* ENEC (R) - Enable Events Command
23+
* DISEC (R) - Disable Events Command
24+
* RSTDAA (R) - Direct Reset Dynamic Address Assignment - this direct CCC is deprecated, the core NACKs this command as per the spec
25+
* SETDASA (O) - Set Dynamic Address from Static Address
26+
* SETMWL (R) - Set Max Write Length
27+
* SETMRL (R) - Set Max Read Length
28+
* GETMWL (R) - Get Max Write Length
29+
* GETMRL (R) - Set Max Read Length
30+
* GETPID (C) - Get Provisioned ID
31+
* GETBCR (C) - Get Bus Characteristics Register
32+
* GETDCR (C) - Get Device Characteristics Register
33+
* GETSTATUS (R) - Get Device Status
34+
* RSTACT (R) - Target Reset Action

doc/source/conf.py

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This file is execfile()d with the current directory set to its containing dir.
4+
#
5+
# Note that not all possible configuration values are present in this file.
6+
#
7+
# All configuration values have a default; values that are commented out
8+
# serve to show the default.
9+
#
10+
# Updated documentation of the configuration options is available at
11+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
12+
13+
from datetime import datetime
14+
15+
from antmicro_sphinx_utils.defaults import (
16+
numfig_format,
17+
extensions as default_extensions,
18+
myst_enable_extensions as default_myst_enable_extensions,
19+
myst_fence_as_directive as default_myst_fence_as_directive,
20+
antmicro_html,
21+
antmicro_latex
22+
)
23+
24+
# If extensions (or modules to document with autodoc) are in another directory,
25+
# add these directories to sys.path here. If the directory is relative to the
26+
# documentation root, use os.path.abspath to make it absolute, like shown here.
27+
#sys.path.insert(0, os.path.abspath('.'))
28+
29+
# -- General configuration -----------------------------------------------------
30+
31+
# General information about the project.
32+
project = u'CHIPS Alliance Caliptra Open Source I3C core'
33+
basic_filename = u'i3c-core-docs'
34+
authors = u'Antmicro'
35+
copyright = f'{authors}, {datetime.now().year}'
36+
37+
# The short X.Y version.
38+
version = ''
39+
# The full version, including alpha/beta/rc tags.
40+
release = ''
41+
42+
# This is temporary before the clash between myst-parser and immaterial is fixed
43+
sphinx_immaterial_override_builtin_admonitions = False
44+
45+
numfig = True
46+
47+
# If you need to add extensions just add to those lists
48+
extensions = default_extensions
49+
myst_enable_extensions = default_myst_enable_extensions
50+
myst_fence_as_directive = default_myst_fence_as_directive
51+
52+
myst_substitutions = {
53+
"project": project
54+
}
55+
56+
myst_heading_anchors = 4
57+
58+
today_fmt = '%Y-%m-%d'
59+
60+
todo_include_todos=False
61+
62+
# -- Options for HTML output ---------------------------------------------------
63+
64+
html_theme = 'sphinx_immaterial'
65+
66+
html_last_updated_fmt = today_fmt
67+
68+
html_show_sphinx = False
69+
70+
(
71+
html_logo,
72+
html_theme_options,
73+
html_context
74+
) = antmicro_html(pdf_url=f"{basic_filename}.pdf")
75+
76+
html_title = project
77+
78+
(
79+
latex_elements,
80+
latex_documents,
81+
latex_logo,
82+
latex_additional_files
83+
) = antmicro_latex(basic_filename, authors, project)

doc/source/dv.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Design verification
2+
3+
This chapter presents the available models and tools which are used for I3C verification.
4+
The core is verified with [the Cocotb + unit tests](https://github.com/chipsalliance/i3c-core/tree/main/verification/cocotb/block) and [the UVM test suite](https://github.com/chipsalliance/i3c-core/tree/main/verification/uvm_i3c).
5+
6+
There are also non-public tests which utilize Avery I3C VIP framework. The tests include: `private_read`, `private_write` and `recovery` and verify operation of target mode private reads and writes and the secure firmware recovery flow respectively.
7+
8+
## Testplans
9+
10+
This section contains testplans for the verification.
11+
12+
Definitions:
13+
* `testplan` - an organized collection of testpoints
14+
* `testpoint` - an actionable item, which can be turned into a test:
15+
* `name` - typically related to the tested feature
16+
* `desc` - detailed description; should contain description of the feature, configuration mode, stimuli, expected behavior.
17+
* `stage` - can be used to assign testpoints to milestones.
18+
* `tests` - names of implemented tests, which cover the testpoint. Relation test-testpoint can be many to many.
19+
* `tags` - additional tags that can be used to group testpoints
20+
21+
### Testplans for individual blocks
22+
23+
```{include} ../../verification/testplan/generated/testplans_blocks.md
24+
```
25+
26+
### Testplans for the core
27+
28+
```{include} ../../verification/testplan/generated/testplans_core.md
29+
```

0 commit comments

Comments
 (0)