Skip to content

Commit d900c7a

Browse files
committed
[Docs]: Fix a few typos and styles
Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent 34ca0c4 commit d900c7a

File tree

5 files changed

+135
-133
lines changed

5 files changed

+135
-133
lines changed

doc/src/vtr/run_vtr_flow.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Detailed Command-line Options
188188

189189
.. option:: -adder_cin_global
190190

191-
Tells ODIN II to connect the first cin in an adder/subtractorchain to a global gnd/vdd net.
191+
Tells ODIN II to connect the first cin in an adder/subtractor chain to a global gnd/vdd net.
192192

193193
.. option:: -use_odin_simulation
194194

@@ -208,34 +208,37 @@ Detailed Command-line Options
208208

209209
.. option:: -elaborator <ELABORATOR>
210210

211-
Specify the elaborator of the synthesis flow for ODIN II [odin, yosys]
211+
Specifies the elaborator of the synthesis flow for ODIN II [odin, yosys]
212212

213213
**Default:** odin
214214

215215
.. option:: -top_module <TOP_MODULE>
216-
Specify the name of the module in the design that should be considered as top
216+
217+
Specifies the name of the module in the design that should be considered as top
217218

218219
.. option:: -coarsen
219220

220-
Notify ODIN II if the input BLIF is coarse-grain
221+
Notifies ODIN II if the input BLIF is coarse-grain
221222

222223
**Default:** False
223224

224225
.. option:: -fflegalize
225226

226-
Make flip-flops rising edge for coarse-grain input BLIFs in the techmap (ODIN II synthesis flow generates rising edge FFs by default, should be used for Yosys+Odin-II)
227+
Makes flip-flops rising edge for coarse-grain input BLIFs in the techmap (ODIN II synthesis flow generates rising edge FFs by default, should be used for Yosys+Odin-II)
227228

228229
**Default:** False
229230

230231
.. option:: -encode_names
231232

232-
Enable Odin-II utilization of operation-type-encoded naming style for Yosys coarse-grained RTLIL nodes
233+
Enables Odin-II utilization of operation-type-encoded naming style for Yosys coarse-grained RTLIL nodes
233234

234235
**Default:** False
235236

236237
.. option:: -yosys_script <YOSYS_SCRIPT>
237238

238-
Supplies Yosys with a .ys script file (similar to Tcl script), including synthesis steps. (default: None)
239+
Supplies Yosys with a .ys script file (similar to Tcl script), including synthesis steps.
240+
241+
**Default:** None
239242

240243
.. option:: -parser <PARSER>
241244

@@ -246,25 +249,25 @@ Detailed Command-line Options
246249

247250
.. note::
248251

249-
The ``-parser`` option is only available for the Yosys standalone front-end.
252+
The ``-parser`` option is only available for the Yosys standalone front-end.
250253
On the other hand, the Yosys+Odin-II front-end automatically determine the Yosys HDL parser according to the input file extension.
251254
If the input HDL type is not supported by the Yosys conventional Verilog front-end (i.e., ``read_verilog -sv``) and the Yosys plugins are not installed, the Yosys+Odin-II flow results in failure.
252255

253256

254257
.. code-block:: bash
255258
256-
./run_vtr_flow <path/to/Verilog/File> <path/to/arch/file> -elaborator yosys -fflegalize
257-
./run_vtr_flow <path/to/SystemVerilog/File> <path/to/arch/file> -elaborator yosys -fflegalize
258-
./run_vtr_flow <path/to/UHDM/File> <path/to/arch/file> -elaborator yosys -fflegalize
259+
./run_vtr_flow <path/to/Verilog/File> <path/to/arch/file> -elaborator yosys -fflegalize
260+
./run_vtr_flow <path/to/SystemVerilog/File> <path/to/arch/file> -elaborator yosys -fflegalize
261+
./run_vtr_flow <path/to/UHDM/File> <path/to/arch/file> -elaborator yosys -fflegalize
259262
260263
Passes a Verilog/SystemVerilog/UHDM file to Yosys for performing elaboration.
261264
The BLIF elaboration and partial mapping phases will be executed on the generated netlist by Odin-II, and all latches in the Yosys+Odin-II output file will be rising edge.
262265
Then ABC and VPR perform the default behaviour for the VTR flow, respectively.
263266

264267
.. code-block:: bash
265268
266-
./run_vtr_flow <path/to/Verilog/File> <path/to/arch/file> -start yosys
267-
./run_vtr_flow <path/to/SystemVerilog/File> <path/to/arch/file> -start yosys
269+
./run_vtr_flow <path/to/Verilog/File> <path/to/arch/file> -start yosys
270+
./run_vtr_flow <path/to/SystemVerilog/File> <path/to/arch/file> -start yosys
268271
269272
Running the VTR flow with the default behaviour using the Yosys standalone front-end.
270273
The parser for these runs is considered the Yosys conventional Verilog/SystemVerilog parser (i.e., ``read_verilog -sv``), as the parser is not explicitly specified.

doc/src/yosys+odin/dev_guide/contributing.rst

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -28,82 +28,82 @@ The flow is depicted in the figure below.
2828

2929
.. code-block:: tcl
3030
31-
# FILE: $VTR_ROOT/ODIN_II/regression_test/tools/synth.tcl #
32-
yosys -import
33-
34-
# the environment variable VTR_ROOT is set by Odin-II.
35-
# Feel free to specify file paths using "$env(VTR_ROOT)/ ..."
36-
# Read VTR baseline library first
31+
# FILE: $VTR_ROOT/ODIN_II/regression_test/tools/synth.tcl #
32+
yosys -import
33+
34+
# the environment variable VTR_ROOT is set by Odin-II.
35+
# Feel free to specify file paths using "$env(VTR_ROOT)/ ..."
36+
# Read VTR baseline library first
3737
read_verilog -nomem2reg $env(ODIN_TECHLIB)/../../vtr_flow/primitives.v
3838
setattr -mod -set keep_hierarchy 1 single_port_ram
3939
setattr -mod -set keep_hierarchy 1 dual_port_ram
4040
4141
# Read the HDL file with pre-defined parer in the "run_yosys.sh" script
4242
if {$env(PARSER) == "surelog" } {
43-
puts "Using Yosys read_uhdm command"
44-
plugin -i systemverilog;
45-
yosys -import
46-
read_uhdm -debug $env(TCL_CIRCUIT);
43+
puts "Using Yosys read_uhdm command"
44+
plugin -i systemverilog;
45+
yosys -import
46+
read_uhdm -debug $env(TCL_CIRCUIT);
4747
} elseif {$env(PARSER) == "yosys-plugin" } {
48-
puts "Using Yosys read_systemverilog command"
49-
plugin -i systemverilog;
50-
yosys -import
51-
read_systemverilog -debug $env(TCL_CIRCUIT)
48+
puts "Using Yosys read_systemverilog command"
49+
plugin -i systemverilog;
50+
yosys -import
51+
read_systemverilog -debug $env(TCL_CIRCUIT)
5252
} elseif {$env(PARSER) == "yosys" } {
53-
puts "Using Yosys read_verilog command"
54-
read_verilog -sv -nomem2reg -nolatches $env(TCL_CIRCUIT);
53+
puts "Using Yosys read_verilog command"
54+
read_verilog -sv -nomem2reg -nolatches $env(TCL_CIRCUIT);
5555
} else {
56-
error "Invalid PARSER"
56+
error "Invalid PARSER"
5757
}
58-
59-
# Read the hardware decription Verilog
60-
read_verilog -nomem2reg -nolatches PATH_TO_VERILOG_FILE.v;
61-
# Check that cells match libraries and find top module
62-
hierarchy -check -auto-top;
63-
64-
# Make name convention more readable
65-
autoname;
66-
# Translate processes to netlist components such as MUXs, FFs and latches
67-
procs; opt;
68-
# Extraction and optimization of finite state machines
69-
fsm; opt;
70-
# Collects memories, their port and create multiport memory cells
71-
memory_collect; memory_dff; opt;
72-
73-
# Looking for combinatorial loops, wires with multiple drivers and used wires without any driver.
74-
check;
75-
# resolve asynchronous dffs
76-
techmap -map $VTR_ROOT/ODIN_II/techlib/adff2dff.v;
77-
techmap -map $VTR_ROOT/ODIN_II/techlib/adffe2dff.v;
58+
59+
# Read the hardware decription Verilog
60+
read_verilog -nomem2reg -nolatches PATH_TO_VERILOG_FILE.v;
61+
# Check that cells match libraries and find top module
62+
hierarchy -check -auto-top;
63+
64+
# Make name convention more readable
65+
autoname;
66+
# Translate processes to netlist components such as MUXs, FFs and latches
67+
procs; opt;
68+
# Extraction and optimization of finite state machines
69+
fsm; opt;
70+
# Collects memories, their port and create multiport memory cells
71+
memory_collect; memory_dff; opt;
72+
73+
# Looking for combinatorial loops, wires with multiple drivers and used wires without any driver.
74+
check;
75+
# resolve asynchronous dffs
76+
techmap -map $VTR_ROOT/ODIN_II/techlib/adff2dff.v;
77+
techmap -map $VTR_ROOT/ODIN_II/techlib/adffe2dff.v;
7878
# To resolve Yosys internal indexed part-select circuitry
7979
techmap */t:\$shift */t:\$shiftx;
80-
81-
## Utilizing the "memory_bram" command and the Verilog design provided at "$VTR_ROOT/ODIN_II/techlib/mem_map.v"
82-
## we could map Yosys memory blocks to BRAMs and ROMs before the Odin-II partial mapping phase.
83-
## However, Yosys complains about expression widths more than 24 bits.
84-
## E.g. reg [63:0] memory [18:0] ==> ERROR: Expression width 33554432 exceeds implementation limit of 16777216!
85-
## Although we provided the required design files for this process (located in ODIN_II/techlib), we will handle
86-
## memory blocks in the Odin-II BLIF elaborator and partial mapper.
87-
# memory_bram -rules $VTR_ROOT/ODIN_II/techlib/mem_rules.txt
88-
# techmap -map $VTR_ROOT/ODIN_II/techlib/mem_map.v;
89-
90-
# Transform the design into a new one with single top module
91-
flatten;
92-
# Transforms pmux into trees of regular multiplexers
93-
pmuxtree;
80+
81+
## Utilizing the "memory_bram" command and the Verilog design provided at "$VTR_ROOT/ODIN_II/techlib/mem_map.v"
82+
## we could map Yosys memory blocks to BRAMs and ROMs before the Odin-II partial mapping phase.
83+
## However, Yosys complains about expression widths more than 24 bits.
84+
## E.g. reg [63:0] memory [18:0] ==> ERROR: Expression width 33554432 exceeds implementation limit of 16777216!
85+
## Although we provided the required design files for this process (located in ODIN_II/techlib), we will handle
86+
## memory blocks in the Odin-II BLIF elaborator and partial mapper.
87+
# memory_bram -rules $VTR_ROOT/ODIN_II/techlib/mem_rules.txt
88+
# techmap -map $VTR_ROOT/ODIN_II/techlib/mem_map.v;
89+
90+
# Transform the design into a new one with single top module
91+
flatten;
92+
# Transforms pmux into trees of regular multiplexers
93+
pmuxtree;
9494
# To possibly reduce words size
9595
wreduce;
96-
# "undirven" to ensure there is no wire without drive
96+
# "undirven" to ensure there is no wire without drive
9797
# "opt_muxtree" removes dead branches, "opt_expr" performs constant folding,
9898
# removes "undef" inputs from mux cells, and replaces muxes with buffers and inverters.
9999
# "-noff" a potential option to remove all sdff and etc. Only dff will remain
100-
opt -undriven -full; opt_muxtree; opt_expr -mux_undef -mux_bool -fine;;;
101-
# Make name convention more readable
102-
autoname;
103-
# Print statistics
104-
stat;
105-
# Output BLIF
106-
write_blif -param -impltf TCL_BLIF;
100+
opt -undriven -full; opt_muxtree; opt_expr -mux_undef -mux_bool -fine;;;
101+
# Make name convention more readable
102+
autoname;
103+
# Print statistics
104+
stat;
105+
# Output BLIF
106+
write_blif -param -impltf TCL_BLIF;
107107
108108
**Algorithm 1** - The Yosys+Odin-II Tcl Script File
109109

doc/src/yosys+odin/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In this approach, the compile flag ``-DODIN_USE_YOSYS=ON`` should be passed to t
3737

3838
.. note::
3939

40-
To take advantage of Yosys System Verilog and UHDM plugins, you need to pass the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` compile flag to CMake paramters.
40+
Compiling the VTR flow with the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` flag is required to build and install Yosys SystemVerilog and UHDM plugins.
4141
Using this compile flag, the `Yosys-F4PGA-Plugins <https://github.com/chipsalliance/yosys-f4pga-plugins>`_ and `Surelog <https://github.com/chipsalliance/Surelog>`_ repositories are cloned in the ``$VTR_ROOT/libs/EXTERNAL`` directory and then will be compiled and added as external plugins to the Yosys front-end.
4242

4343
.. note::

doc/src/yosys+odin/user_guide.rst

Lines changed: 58 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -80,83 +80,82 @@ Example of Tcl script for Yosys+Odin-II
8080

8181
.. code-block:: tcl
8282
83-
# FILE: $VTR_ROOT/ODIN_II/regression_test/tools/synth.tcl #
84-
yosys -import
85-
86-
# the environment variable VTR_ROOT is set by Odin-II.
87-
83+
# FILE: $VTR_ROOT/ODIN_II/regression_test/tools/synth.tcl #
84+
yosys -import
85+
86+
# the environment variable VTR_ROOT is set by Odin-II.
87+
8888
# Read VTR baseline library first
8989
read_verilog -nomem2reg $env(ODIN_TECHLIB)/../../vtr_flow/primitives.v
9090
setattr -mod -set keep_hierarchy 1 single_port_ram
9191
setattr -mod -set keep_hierarchy 1 dual_port_ram
9292
9393
# Read the HDL file with pre-defined parer in the "run_yosys.sh" script
9494
if {$env(PARSER) == "surelog" } {
95-
puts "Using Yosys read_uhdm command"
96-
plugin -i systemverilog;
97-
yosys -import
98-
read_uhdm -debug $env(TCL_CIRCUIT);
95+
puts "Using Yosys read_uhdm command"
96+
plugin -i systemverilog;
97+
yosys -import
98+
read_uhdm -debug $env(TCL_CIRCUIT);
9999
} elseif {$env(PARSER) == "yosys-plugin" } {
100-
puts "Using Yosys read_systemverilog command"
101-
plugin -i systemverilog;
102-
yosys -import
103-
read_systemverilog -debug $env(TCL_CIRCUIT)
100+
puts "Using Yosys read_systemverilog command"
101+
plugin -i systemverilog;
102+
yosys -import
103+
read_systemverilog -debug $env(TCL_CIRCUIT)
104104
} elseif {$env(PARSER) == "yosys" } {
105-
puts "Using Yosys read_verilog command"
106-
read_verilog -sv -nomem2reg -nolatches $env(TCL_CIRCUIT);
105+
puts "Using Yosys read_verilog command"
106+
read_verilog -sv -nomem2reg -nolatches $env(TCL_CIRCUIT);
107107
} else {
108-
error "Invalid PARSER"
108+
error "Invalid PARSER"
109109
}
110-
111-
# Read the hardware decription Verilog
112-
read_verilog -nomem2reg -nolatches PATH_TO_VERILOG_FILE.v;
113-
# Check that cells match libraries and find top module
114-
hierarchy -check -auto-top;
115-
116-
# Make name convention more readable
117-
autoname;
118-
# Translate processes to netlist components such as MUXs, FFs and latches
119-
procs; opt;
120-
# Extraction and optimization of finite state machines
121-
fsm; opt;
122-
# Collects memories, their port and create multiport memory cells
123-
memory_collect; memory_dff; opt;
124-
125-
# Looking for combinatorial loops, wires with multiple drivers and used wires without any driver.
126-
check;
127-
# resolve asynchronous dffs
128-
techmap -map $VTR_ROOT/ODIN_II/techlib/adff2dff.v;
129-
techmap -map $VTR_ROOT/ODIN_II/techlib/adffe2dff.v;
110+
111+
# Read the hardware decription Verilog
112+
read_verilog -nomem2reg -nolatches PATH_TO_VERILOG_FILE.v;
113+
# Check that cells match libraries and find top module
114+
hierarchy -check -auto-top;
115+
116+
# Make name convention more readable
117+
autoname;
118+
# Translate processes to netlist components such as MUXs, FFs and latches
119+
procs; opt;
120+
# Extraction and optimization of finite state machines
121+
fsm; opt;
122+
# Collects memories, their port and create multiport memory cells
123+
memory_collect; memory_dff; opt;
124+
125+
# Looking for combinatorial loops, wires with multiple drivers and used wires without any driver.
126+
check;
127+
# resolve asynchronous dffs
128+
techmap -map $VTR_ROOT/ODIN_II/techlib/adff2dff.v;
129+
techmap -map $VTR_ROOT/ODIN_II/techlib/adffe2dff.v;
130130
# To resolve Yosys internal indexed part-select circuitry
131131
techmap */t:\$shift */t:\$shiftx;
132-
133-
## Utilizing the "memory_bram" command and the Verilog design provided at "$VTR_ROOT/ODIN_II/techlib/mem_map.v"
134-
## we could map Yosys memory blocks to BRAMs and ROMs before the Odin-II partial mapping phase.
135-
## However, Yosys complains about expression widths more than 24 bits.
136-
## E.g. reg [63:0] memory [18:0] ==> ERROR: Expression width 33554432 exceeds implementation limit of 16777216!
137-
## Although we provided the required design files for this process (located in ODIN_II/techlib), we will handle
138-
## memory blocks in the Odin-II BLIF elaborator and partial mapper.
139-
# memory_bram -rules $VTR_ROOT/ODIN_II/techlib/mem_rules.txt
140-
# techmap -map $VTR_ROOT/ODIN_II/techlib/mem_map.v;
141-
142-
# Transform the design into a new one with single top module
143-
flatten;
144-
# Transforms pmux into trees of regular multiplexers
145-
pmuxtree;
132+
133+
## Utilizing the "memory_bram" command and the Verilog design provided at "$VTR_ROOT/ODIN_II/techlib/mem_map.v"
134+
## we could map Yosys memory blocks to BRAMs and ROMs before the Odin-II partial mapping phase.
135+
## However, Yosys complains about expression widths more than 24 bits.
136+
## E.g. reg [63:0] memory [18:0] ==> ERROR: Expression width 33554432 exceeds implementation limit of 16777216!
137+
## Although we provided the required design files for this process (located in ODIN_II/techlib), we will handle
138+
## memory blocks in the Odin-II BLIF elaborator and partial mapper.
139+
# memory_bram -rules $VTR_ROOT/ODIN_II/techlib/mem_rules.txt
140+
# techmap -map $VTR_ROOT/ODIN_II/techlib/mem_map.v;
141+
142+
# Transform the design into a new one with single top module
143+
flatten;
144+
# Transforms pmux into trees of regular multiplexers
145+
pmuxtree;
146146
# To possibly reduce words size
147147
wreduce;
148-
# "undriven" to ensure there is no wire without drive
148+
# "undriven" to ensure there is no wire without drive
149149
# "opt_muxtree" removes dead branches, "opt_expr" performs constant folding,
150150
# removes "undef" inputs from mux cells, and replaces muxes with buffers and inverters.
151151
# "-noff" a potential option to remove all sdff and etc. Only dff will remain
152-
opt -undriven -full; opt_muxtree; opt_expr -mux_undef -mux_bool -fine;;;
153-
# Make name convention more readable
154-
autoname;
155-
# Print statistics
156-
stat;
157-
# Output BLIF
158-
write_blif -param -impltf TCL_BLIF;
159-
152+
opt -undriven -full; opt_muxtree; opt_expr -mux_undef -mux_bool -fine;;;
153+
# Make name convention more readable
154+
autoname;
155+
# Print statistics
156+
stat;
157+
# Output BLIF
158+
write_blif -param -impltf TCL_BLIF;
160159
161160
.. note::
162161

doc/src/yosys/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The compile flag ``-DWITH_YOSYS=ON`` should be passed to the CMake parameters to
3434

3535
.. note::
3636

37-
Compiling the VTR flow with the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` flag is required to build and install Yosys SystemVerilog and UHDM plugins.
37+
Compiling the VTR flow with the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` flag is required to build and install Yosys SystemVerilog and UHDM plugins.
3838
Using this compile flag, the `Yosys-F4PGA-Plugins <https://github.com/chipsalliance/yosys-f4pga-plugins>`_ and `Surelog <https://github.com/chipsalliance/Surelog>`_ repositories are cloned in the ``$VTR_ROOT/libs/EXTERNAL`` directory and then will be compiled and added as external plugins to the Yosys front-end.
3939

4040

0 commit comments

Comments
 (0)