Skip to content

Commit 835f4d0

Browse files
committed
Add a new custom domain for vpr constraints file format
1 parent fe5b660 commit 835f4d0

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

dev/pylint_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
repo_path / "doc/_exts/rrgraphdomain/__init__.py",
6161
repo_path / "doc/_exts/sdcdomain/__init__.py",
6262
repo_path / "doc/_exts/archdomain/__init__.py",
63+
repo_path / "doc/_exts/constraintsdomain/__init__.py",
6364
repo_path / "vpr/scripts/compare_timing_reports.py",
6465
repo_path / "vpr/scripts/profile/util.py",
6566
repo_path / "vpr/scripts/profile/parse_and_plot_detailed.py",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from sphinxcontrib.domaintools import custom_domain
2+
from sphinx.util.docfields import *
3+
4+
5+
def setup(app):
6+
app.add_domain(
7+
custom_domain(
8+
"VPRConstraintsDomain",
9+
name="vpr_constraints",
10+
label="Place and Route Constraints",
11+
elements=dict(
12+
tag=dict(
13+
objname="Attribute",
14+
indextemplate="pair: %s; Tag Attribute",
15+
fields=[
16+
GroupedField(
17+
"required_parameter", label="Required Attributes", names=["req_param"]
18+
),
19+
GroupedField(
20+
"optional_parameter", label="Optional Attributes", names=["opt_param"]
21+
),
22+
Field("required", label="Tag Required", names=["required"]),
23+
],
24+
),
25+
),
26+
)
27+
)

doc/src/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"sphinx_markdown_tables",
4646
"sdcdomain",
4747
"archdomain",
48+
"constraintsdomain",
4849
"rrgraphdomain",
4950
"myst_parser",
5051
"sphinx.ext.autodoc",

0 commit comments

Comments
 (0)