Skip to content

Commit 3f9740e

Browse files
luarssvvbandeira
andauthored
Theme change for docs to fix header linking issue (#1131)
* changed theme, added docs build folder to gitignore * Fixed missing link in GettingInvolved * update faqs * removed commented code * update search tips and admonitions * added link to git quickstart, using wget * add comments for conf.py Signed-off-by: luarss <[email protected]> Signed-off-by: Vitor Bandeira <[email protected]> Co-authored-by: Vitor Bandeira <[email protected]>
1 parent 077cb25 commit 3f9740e

18 files changed

+286
-266
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,7 @@ dependencies/
8484
perf.data
8585
perf.data.old
8686

87+
# documentation specific
8788
docs/main
8889
docs/build
90+
GitGuide.md

docs/conf.py

Lines changed: 54 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import docutils
1414
import os
1515
import re
16+
import requests
1617

1718
# -- Project information -----------------------------------------------------
1819

@@ -33,6 +34,7 @@
3334
'sphinx.ext.napoleon',
3435
'sphinx.ext.todo',
3536
'sphinx_external_toc',
37+
'sphinx_copybutton',
3638
'myst_parser',
3739
]
3840

@@ -87,62 +89,54 @@
8789
# The theme to use for HTML and HTML Help pages. See the documentation for
8890
# a list of builtin themes.
8991
#
90-
html_theme = "sphinx_symbiflow_theme"
92+
html_theme = "sphinx_book_theme"
9193

9294
html_theme_options = {
93-
# Repository integration
94-
# Set the repo url for the link to appear
95-
'github_url': 'https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts',
96-
# The name of the repo. If must be set if github_url is set
97-
'repo_name': 'OpenROAD Flow',
98-
# Must be one of github, gitlab or bitbucket
99-
'repo_type': 'github',
100-
101-
# Set the name to appear in the left sidebar/header. If not provided, uses
102-
# html_short_title if defined, or html_title
103-
'nav_title': "OpenROAD Flow",
104-
105-
# A list of dictionaries where each has three keys:
106-
# href: The URL or pagename (str)
107-
# title: The title to appear (str)
108-
# internal: Flag indicating to use pathto (bool)
109-
'nav_links': [
110-
{"title": "Home", "href": "index", "internal": True},
111-
{"title": "The OpenROAD Project", "href": "https://theopenroadproject.org", "internal": False},
112-
],
113-
114-
# Customize css colors.
115-
# For details see link.
116-
# https://getmdl.io/customize/index.html
117-
#
118-
# Primary colors:
119-
# red, pink, purple, deep-purple, indigo, blue, light-blue, cyan,
120-
# teal, green, light-green, lime, yellow, amber, orange, deep-orange,
121-
# brown, grey, blue-grey, white
122-
# (Default: deep-purple)
123-
'color_primary': 'indigo',
124-
# Values: Same as color_primary.
125-
#(Default: indigo)
126-
'color_accent': 'blue',
127-
128-
# Hide the symbiflow links
129-
'hide_symbiflow_links': True,
130-
131-
"html_minify": False,
132-
"html_prettify": True,
133-
"css_minify": True,
134-
"globaltoc_depth": 2,
135-
"table_classes": ["plain"],
136-
"master_doc": False,
95+
"repository_url": "https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts",
96+
"repository_branch": "master",
97+
"use_download_button": True,
98+
99+
# list for more fine-grained ordering of icons
100+
"icon_links": [
101+
{
102+
"name": "The OpenROAD Project",
103+
"url": "https://theopenroadproject.org/",
104+
"icon": "fa-solid fa-globe",
105+
},
106+
{
107+
"name": "Twitter",
108+
"url": "https://twitter.com/OpenROAD_EDA",
109+
"icon": "fa-brands fa-twitter",
110+
},
111+
{
112+
"name": "Email",
113+
"url": "mailto:[email protected]",
114+
"icon": "fa-solid fa-envelope",
115+
},
116+
{
117+
"name": "GitHub",
118+
"url": "https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts",
119+
"icon": "fa-brands fa-github",
120+
},
121+
{
122+
"name": "Stars",
123+
"url": "https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/stargazers",
124+
"icon": "https://img.shields.io/github/stars/The-OpenROAD-Project/OpenROAD-flow-scripts",
125+
"type": "url",
126+
},
127+
],
137128
}
138129

139130
# Add any paths that contain custom static files (such as style sheets) here,
140131
# relative to this directory. They are copied after the builtin static files,
141132
# so a file named "default.css" will overwrite the builtin "default.css".
142-
# html_static_path = ['_static']
133+
134+
def get_file_from_url(url, fname):
135+
r = requests.get(url)
136+
with open(fname, 'wb') as f:
137+
f.write(r.content)
143138

144139
def setup(app):
145-
import os
146140
if not os.path.exists('main'):
147141
os.symlink('..', 'main')
148142
prefix = '(../'
@@ -152,3 +146,16 @@ def setup(app):
152146
lines = lines.replace(prefix, newPath)
153147
with open('index.md', 'wt') as f:
154148
f.write(lines)
149+
150+
url = 'https://raw.githubusercontent.com/The-OpenROAD-Project/OpenROAD/master/docs/contrib/GitGuide.md'
151+
get_file_from_url(url, 'contrib/GitGuide.md')
152+
153+
# edit OpenROAD to OpenROAD-flow-scripts for GitGuide
154+
with open('contrib/GitGuide.md', 'r') as f:
155+
content = f.read()
156+
157+
content = content.replace('user/Build.md', '../index.md#build-or-installing-orfs-dependencies')
158+
content = content.replace('OpenROAD', 'OpenROAD-flow-scripts')
159+
content = content.replace('The-OpenROAD-flow-scripts', 'The-OpenROAD')
160+
with open('contrib/GitGuide.md', 'w') as f:
161+
f.write(content)

docs/contrib/CI.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ navigate Jenkins to access these features are available
2121

2222
- OpenROAD-flow-script-Public [folder]
2323
- `public_tests_all`
24-
- Description: runs flow tests except RTLMP designs. Should finish in
25-
less than three hours.
24+
- Description: runs flow tests that finish in less than three hours.
2625
- Target: master branch.
2726
- `public_tests_all-pr`
28-
- Description: runs flow tests except RTLMP designs. Should finish in
29-
less than three hours.
27+
- Description: runs flow tests that finish in less than three hours.
3028
- Target: all open PRs.
3129
- `publish-results-to-dashboard`
3230
- Description: uploads metrics to dashboard website.
@@ -36,10 +34,9 @@ navigate Jenkins to access these features are available
3634
- Target: master branch.
3735
- OpenROAD-flow-scripts-Private [folder]
3836
- `public_tests_small`
39-
- Description: runs fast flow tests, does not include RTLMP designs.
40-
Should finish in less than one hour.
37+
- Description: runs fast flow tests that finish in less than one hour.
4138
- Target: all branches that are not filed as PR. CI will run for PR
4239
branches on the public side after "Ready to Sync Public" workflow.
4340
- OpenROAD-flow-scripts-All-Tests-Private
44-
- Description: runs flow tests, does not include RTLMP designs.
45-
- Target: secure branches.
41+
- Description: runs flow tests for private branches.
42+
- Target: secure branches.

docs/contrib/CODE_OF_CONDUCT.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,9 @@ the community.
114114

115115
## Attribution
116116

117-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118-
version 2.0, available at
119-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
117+
This Code of Conduct is adapted from the [Contributor Covenant version 2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
120118

121119
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122120
enforcement ladder](https://github.com/mozilla/inclusion).
123121

124-
[homepage]: https://www.contributor-covenant.org
125-
126-
For answers to common questions about this code of conduct, see the FAQ at
127-
https://www.contributor-covenant.org/faq. Translations are available at
128-
https://www.contributor-covenant.org/translations.
122+
For answers to common questions about this code of conduct, see the FAQ [here](https://www.contributor-covenant.org/faq). Translations are available [here](https://www.contributor-covenant.org/translations).

docs/contrib/DeveloperGuide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
- Adding a new design: [Guide](../user/AddingNewDesign.md).
55
- Continuous Integration: [Guide](./CI.md).
66
- How do I update the codebase? There are different ways to update your codebase depending on the method you installed it. We provide detailed instructions in this [guide](../user/FAQS.md).
7+
- How do I contribute? Follow our Git Quickstart guide [here](./GitGuide.md).

docs/contrib/GettingInvolved.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you find code in our project that does *not* follow this guide, then within e
4141
you edit, follow the style in that file.
4242

4343
Please pay careful attention to the
44-
[tool checklist](DeveloperGuide.md#Tool Checklist) for all code. If you want
44+
[tool checklist](https://openroad.readthedocs.io/en/latest/contrib/DeveloperGuide.html#tool-checklist) for all code. If you want
4545
to add or improve functionality in OpenROAD, please start with the
4646
top-level [app](https://github.com/The-OpenROAD-Project/OpenROAD/) repo. You
4747
can see in the `src` directory that submodules exist pointing to tested

docs/contrib/PlatformBringUp.md

Lines changed: 34 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ easily integrate and test a new technology in to the OpenROAD RTL to GDS
77
flow. OpenROAD allows you to integrate any PDK (Process Design Kit) for any
88
feature size and implement a fully open-sourced RTL-GDSII flow (synthesizable
99
Verilog to merged GDSII). The OpenROAD flow has been validated for feature
10-
sizes down to 7nm and used to design and tapeout over 100 ASIC and SoCs
10+
sizes down to 7nm and used to design and tapeout over 600 ASIC and SoCs
1111
to date.
1212

1313
## Prerequisites
@@ -58,7 +58,7 @@ each other unless otherwise stated.
5858
Make the following edits to the Makefile (located in `flow/Makefile`)
5959
so that OpenROAD can run the flow on a design using the new platform.
6060

61-
At the beginning of the Makefile, there is a block of `DESIGN_CONFIG`
61+
At the beginning of the Makefile, there is a block of `DESIGN_CONFIG`
6262
variables that are commented out. These variables tell OpenROAD which
6363
design to run and on what platform. `DESIGN_CONFIG` specifically points
6464
to a `config.mk` file located in the designs directory for the respective
@@ -70,8 +70,8 @@ already made which can be used with any platform (see `flow/designs/src`
7070
for a list of usable designs). For example, a `DESIGN_CONFIG` variable
7171
using the `gcd` design on a new platform would look as follows:
7272

73-
```
74-
#Makefile
73+
```{code-block} Makefile
74+
:caption: Makefile
7575
DESIGN_CONFIG=./designs/MyNewPlatform/gcd/config.mk
7676
```
7777

@@ -83,8 +83,8 @@ Directory](content:design:directory) section of this document.
8383
Create a directory for the new technology inside `flow/platforms` to contain
8484
the necessary files for the OpenROAD flow.
8585

86-
```
87-
$ mkdir flow/platforms/MyNewPlatform
86+
``` shell
87+
mkdir flow/platforms/MyNewPlatform
8888
```
8989
(content:design:directory)=
9090
### Design Directory
@@ -95,17 +95,18 @@ to contain the relevant files and directories for all the designs for the
9595
flow in that specific platform. Each design requires its own `config.mk`
9696
and `constraint.sdc` files.
9797

98+
:::{tip}
9899
Follow the steps below to create the necessary directories and files.
99-
**NOTE: gcd is just an example and not a required name.**:
100+
Note gcd is just an example and not a required name.
100101

102+
``` shell
103+
mkdir -p flow/designs/MyNewPlatform/gcd
104+
touch flow/designs/MyNewPlatform/gcd/config.mk
105+
touch flow/designs/MyNewPlatform/gcd/constraint.sdc
101106
```
102-
$ mkdir -p flow/designs/MyNewPlatform/gcd
103-
$ touch flow/designs/MyNewPlatform/gcd/config.mk
104-
$ touch flow/designs/MyNewPlatform/gcd/constraint.sdc
105-
```
106-
107107
This creates two directories MyNewPlatform and `gcd` and two empty files
108108
`config.mk` and `constraint.sdc` in `flow/designs/MyNewPlatform/gcd`.
109+
:::
109110

110111
### Platform Configuration
111112

@@ -147,9 +148,8 @@ descriptor of all variables see [here](../user/FlowVariables.md).
147148

148149
Following is a sample `config.mk` file for the `gcd` design:
149150

150-
```
151-
#config.mk
152-
###########################
151+
```{code-block} shell
152+
:caption: config.mk
153153
export DESIGN_NAME = gcd
154154
export PLATFORM = sky130hd
155155
@@ -172,9 +172,8 @@ need to be consistent with the liberty time units. Here’s an example of
172172
a `constraint.sdc` file which defines a clock `clk` with a period of 8.4
173173
nanoseconds (nanoseconds being consistent with the liberty time units).
174174

175-
```
176-
#constraint.sdc
177-
############################
175+
```{code-block} tcl
176+
:caption: constraint.sdc
178177
create_clock [get_ports clk] -period 8.4 #Units are in nanoseconds
179178
```
180179

@@ -191,10 +190,10 @@ have all relevant files in one localized directory. The `.lib`, `.lef`, and
191190
`.gds` reside in directories named respectively for the specific technology.
192191

193192
For example:
194-
```
195-
$ mdkir flow/platforms/MyNewPlatform/lib
196-
$ mdkir flow/platforms/MyNewPlatform/lef
197-
$ mdkir flow/platforms/MyNewPlatform/gds
193+
``` shell
194+
mdkir flow/platforms/MyNewPlatform/lib
195+
mdkir flow/platforms/MyNewPlatform/lef
196+
mdkir flow/platforms/MyNewPlatform/gds
198197
```
199198

200199
A merged GDS file may be used instead of adding every individual `.gds`
@@ -218,9 +217,8 @@ design.
218217
To create this module, a gated clock standard cell is required. This standard
219218
cell is used to create the generic module `OPENROAD_CLKGATE`, as shown below.
220219

221-
```
222-
// cells_clkgate.v
223-
//////////////////////////
220+
```{code-block} verilog
221+
:caption: cells_clkgate.v
224222
module OPENROAD_CLKGATE (CK, E, GCK);
225223
input CK;
226224
input E;
@@ -232,10 +230,9 @@ endmodule
232230

233231
An example instantiation of this module in a user design is shown below.
234232

235-
```
236-
// buffer.v
233+
```{code-block} verilog
234+
:caption: buffer.v
237235
// This is not a platform file, this is an example user design
238-
//////////////////////////
239236
240237
module buffer (clk, enable, in, out);
241238
@@ -267,9 +264,8 @@ level-sensitive latch.
267264

268265
This file is only required if you want to infer latches for your design.
269266

270-
```
271-
// cells_latch.v
272-
//////////////////////////
267+
```{code-block} verilog
268+
:caption: cells_latch.v
273269
module $_DLATCH_P_(input E, input D, output Q);
274270
<d_latch_std_cell> _TECHMAP_REPLACE_ (
275271
.D (D),
@@ -295,11 +291,9 @@ layer resources, set which routing heuristic to use when routing, etc. It’s
295291
recommended to use the default `fastroute.tcl` due to its simplicity and
296292
effectiveness. Following is the default FastRoute configuration file.
297293

298-
```
299-
# fastroute.tcl
300-
#####################
294+
```{code-block} tcl
295+
:caption: fastroute.tcl
301296
set_global_routing_layer_adjustment $::env(MIN_ROUTING_LAYER)-$::env(MAX_ROUTING_LAYER) 0.5
302-
303297
set_routing_layers -signal $::env(MIN_ROUTING_LAYER)-$::env(MAX_ROUTING_LAYER)
304298
```
305299

@@ -323,9 +317,8 @@ to the `LAYER` definition section for each metal in the tech LEF. Following
323317
is a generalized metal tracks configuration file with five metal tracks
324318
defined. **Units are in microns**.
325319

326-
```
327-
# make_tracks.tcl
328-
###############################
320+
```{code-block} tcl
321+
:caption: make_tracks.tcl
329322
make_tracks metal1 -x_offset 0.24 -x_pitch 0.82 -y_offset 0.24 -y_pitch 0.82
330323
make_tracks metal2 -x_offset 0.28 -x_pitch 0.82 -y_offset 0.28 -y_pitch 0.82
331324
make_tracks metal3 -x_offset 0.28 -x_pitch 0.82 -y_offset 0.28 -y_pitch 0.82
@@ -334,8 +327,7 @@ make_tracks metal5 -x_offset 0.28 -x_pitch 0.82 -y_offset 0.28 -y_pitch 0.82
334327
```
335328

336329
Following is the `LAYER` definition for `metal1` in the `sky130hd` tech LEF.
337-
338-
```
330+
```
339331
LAYER met1
340332
TYPE ROUTING ;
341333
DIRECTION HORIZONTAL ;
@@ -397,9 +389,8 @@ values. Often, per-unit-length values are available in the PDK user guide. For
397389
of a `setRC` configuration file which sets the resistance and capacitance
398390
of five metal layers, four vias, one signal wire, and one clock wire.
399391

400-
```
401-
# setRC.tcl
402-
#######################
392+
```{code-block} tcl
393+
:caption: setRC.tcl
403394
set_layer_rc -layer M1 -capacitance 1.449e-04 -resistance 8.929e-04
404395
set_layer_rc -layer M2 -capacitance 1.331e-04 -resistance 8.929e-04
405396
set_layer_rc -layer M3 -capacitance 1.464e-04 -resistance 1.567e-04

0 commit comments

Comments
 (0)