Skip to content

Commit 313c146

Browse files
committed
[Docs]: applying the review changes
Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent 82a50d8 commit 313c146

File tree

7 files changed

+84
-58
lines changed

7 files changed

+84
-58
lines changed

doc/src/odin/quickstart.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ To build you may use the Makefile wrapper in the $VTR_ROOT/ODIN_II ``make build`
3030

3131
*Requires one and only one of `-c`, `-v`, or `-b`
3232

33-
| arg | following argument | Description |
33+
| arg | following argument | Description |
3434
|------|---|---|
35-
| `-c` | XML Configuration File | an XML configuration file dictating the runtime parameters of odin |
36-
| `-v` | Verilog HDL FIle | You may specify multiple verilog HDL files |
37-
| `-b` | BLIF File | You may specify multiple blif files |
38-
| `-o` | BLIF output file | full output path and file name for the blif output file |
39-
| `-a` | architecture file | You may specify multiple verilog HDL files for synthesis |
40-
| `-h` | | Print help |
35+
| `-c` | XML Configuration File | an XML configuration file dictating the runtime parameters of odin |
36+
| `-v` | Verilog HDL File | You may specify multiple space-separated verilog HDL files |
37+
| `-b` | BLIF File | You may specify multiple space-separated blif files |
38+
| `-o` | BLIF output file | full output path and file name for the blif output file |
39+
| `-a` | architecture file | You may not specify the architecture file, which results in pure soft logic synthesis |
40+
| `-h` | | Print help |
4141

4242
## Example Usage
4343

doc/src/odin/user_guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
| arg | following argument | Description |
66
|-------|:-----------------------:|------------------------------------------------------- |
7-
| `-c` | XML Configuration File | XML runtime directives for the syntesizer such as the verilog file, and parametrized synthesis |
8-
| `-v` | Verilog HDL FIle | You may specify multiple verilog HDL files for synthesis|
9-
| `-b` | BLIF File | |
10-
| `-o` | BLIF output file | full output path and file name for the blif output file |
11-
| `-a` | architecture file | You may specify multiple verilog HDL files for synthesis |
12-
| `-G` | | Output netlist graph in GraphViz viewable .dot format. (net.dot, opens with dotty) |
13-
| `-A` | | Output AST graph in in GraphViz viewable .dot format. |
14-
| `-W` | | Print all warnings. (Can be substantial.) |
15-
| `-h` | | Print help |
7+
| `-c` | XML Configuration File | XML runtime directives for the syntesizer such as the verilog file, and parametrized synthesis |
8+
| `-v` | Verilog HDL File | You may specify multiple space-separated verilog HDL files for synthesis |
9+
| `-b` | BLIF File | You may **not** specify multiple BLIF files as only single input BLIF file is accepted |
10+
| `-o` | BLIF output file | full output path and file name for the BLIF output file |
11+
| `-a` | architecture file | You may specify multiple space-separated Verilog HDL files for synthesis |
12+
| `-G` | | Output netlist graph in GraphViz viewable .dot format. (net.dot, opens with dotty) |
13+
| `-A` | | Output AST graph in in GraphViz viewable .dot format. |
14+
| `-W` | | Print all warnings. (Can be substantial.) |
15+
| `-h` | | Print help |
1616

1717
## Simulation Arguments
1818

doc/src/vtr/run_vtr_flow.rst

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ They will cause VPR to perform only :ref:`packing and placement <general_options
7171
# Using the Surelog plugin if installed, otherwise failure on the unsupported file type
7272
./run_vtr_flow <path/to/UHDM/File> <path/to/arch/file> -elaborator yosys -fflegalize
7373
74-
Passes a Verilog/SystemVerilog/UHDM file to Yosys for performing elaboration.
74+
Passes a Verilog/SystemVerilog/UHDM file to Yosys to perform elaboration.
7575
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.
7676
Then ABC and VPR perform the default behaviour for the VTR flow, respectively.
7777

@@ -230,13 +230,13 @@ Detailed Command-line Options
230230

231231
.. option:: -min_hard_mult_size <min_hard_mult_size>
232232

233-
Tells ODIN II the minimum multiplier size to be implemented using hard multiplier.
233+
Tells ODIN II the minimum multiplier size (in bits) to be implemented using hard multiplier.
234234

235235
**Default:** 3
236236

237237
.. option:: -min_hard_adder_size <MIN_HARD_ADDER_SIZE>
238238

239-
Tells ODIN II the minimum adder size that should be implemented using hard adder.
239+
Tells ODIN II the minimum adder size (in bits) that should be implemented using hard adder.
240240

241241
**Default:** 1
242242

@@ -252,10 +252,14 @@ Detailed Command-line Options
252252

253253
.. option:: -coarsen
254254

255-
Notifies ODIN II if the input BLIF is coarse-grained
256-
255+
Notifies ODIN II if the input BLIF is coarse-grained.
256+
257257
**Default:** False
258258

259+
.. note::
260+
261+
A coarse-grained BLIF file is defined as a BLIF file inclduing unmapped cells with the Yosys internal cell (listed `here <https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/b913727959e22ae7a535ac8b907d0aaa9a3eda3d/ODIN_II/SRC/enum_str.cpp#L402-L494>`_) format which are represented by the ``.subckt`` tag in coarse-grained BLIF.
262+
259263
.. option:: -fflegalize
260264

261265
Makes flip-flops rising edge for coarse-grained input BLIFs in the partial technology mapping phase (ODIN II synthesis flow generates rising edge FFs by default, should be used for Yosys+Odin-II)
@@ -264,8 +268,29 @@ Detailed Command-line Options
264268

265269
.. option:: -encode_names
266270

267-
Enables ODIN II utilization of operation-type-encoded naming style for Yosys coarse-grained RTLIL nodes
271+
Enables ODIN II utilization of operation-type-encoded naming style for Yosys coarse-grained RTLIL nodes.
268272

273+
.. code-block::
274+
275+
# example of a DFF subcircuit in the Yosys coarse-grained BLIF
276+
.subckt $dff CLK=clk D=a Q=inst1.inst2.temp
277+
.param CLK_POLARITY 1
278+
279+
.names inst1.inst2.temp o
280+
1 1
281+
282+
# fine-grained BLIF file with enabled encode_names option for Odin-II partial mapper
283+
.latch test^a test^inst1.inst2.temp^FF~0 re test^clk 3
284+
285+
.names test^inst1.inst2.temp^FF~0 test^o
286+
1 1
287+
288+
# fine-grained BLIF file with disabled encode_names option for Odin-II partial mapper
289+
.latch test^a test^$dff^FF~0 re test^clk 3
290+
291+
.names test^$dff^FF~0 test^o
292+
1 1
293+
269294
**Default:** False
270295

271296
.. option:: -yosys_script <YOSYS_SCRIPT>
@@ -277,12 +302,14 @@ Detailed Command-line Options
277302
.. option:: -parser <PARSER>
278303

279304
Specify a parser for the Yosys synthesizer [yosys (Verilog-2005), surelog (UHDM), yosys-plugin (SystemVerilog)].
280-
The script considers the Yosys conventional Verilog parser if this argument is not used.
305+
The script uses the Yosys conventional Verilog parser if this argument is not used.
281306

282307
**Default:** yosys
283308

284309
.. note::
285310

286-
The ``-parser`` option is only available for the Yosys standalone front-end.
287-
On the other hand, the Yosys+Odin-II front-end automatically determine the Yosys HDL parser according to the input file extension.
288-
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.
311+
Universal Hardware Data Model (UHDM) is a complete modeling of the IEEE SystemVerilog Object Model with VPI Interface, Elaborator, Serialization, Visitor and Listener.
312+
UHDM is used as a compiled interchange format in between SystemVerilog tools.
313+
The ``yosys-plugins`` parser, which represents the ``read_systemverilog`` command, reads SystemVerilog files directly in Yosys.
314+
It executes Surelog with provided filenames and converts them (in memory) into UHDM file. Then, this UHDM file is converted into Yosys AST. `[Yosys-SystemVerilog] <https://github.com/antmicro/yosys-systemverilog#usage>`_
315+
On the other hand, the ``surelog`` parser, which uses the ``read_uhdm`` Yosys command, walks the design tree and converts its nodes into Yosys AST nodes using Surelog. `[UHDM-Yosys <https://github.com/chipsalliance/UHDM-integration-tests#uhdm-yosys>`_, `Surelog] <https://github.com/chipsalliance/Surelog#surelog>`_

doc/src/yosys+odin/quickstart.rst

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ Basic Usage
6464
Arg Following Argument Description
6565
==== ========================== ===================================================================================================
6666
`-c` XML Configuration File an XML configuration file dictating the runtime parameters of odin
67-
`-v` Verilog HDL File You may specify multiple Verilog HDL files
68-
`-s` System Verilog HDL File You may specify multiple System Verilog files
69-
`-u` UHDM File You may specify multiple UHDM files (require compiling with the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` flag)
70-
`-b` BLIF File You may specify multiple blif files (require compiling with the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` flag)
71-
`-o` BLIF Output File full output path and file name for the blif output file
72-
`-a` Architecture File You may specify multiple verilog HDL files for synthesis
67+
`-v` Verilog HDL File You may specify multiple space-separated Verilog HDL files
68+
`-s` System Verilog HDL File You may specify multiple space-separated System Verilog files
69+
`-u` UHDM File You may specify multiple space-separated UHDM files (require compiling with the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` flag)
70+
`-b` BLIF File You may specify multiple space-separated BLIF files (require compiling with the ``-DYOSYS_SV_UHDM_PLUGIN=ON`` flag)
71+
`-o` BLIF Output File full output path and file name for the BLIF output file
72+
`-a` Architecture File VPR XML architecture file. You may not specify the architecture file, which results in pure soft logic synthesis
7373
`-h` Print help
7474
==== ========================== ===================================================================================================
7575

@@ -80,12 +80,15 @@ Example Usage
8080
The following are simple command-line arguments and a description of what they do.
8181
It is assumed that they are being performed in the Odin-II directory.
8282

83+
The following commands pass a Verilog/SystemVerilog/UHDM HDL file to Yosys for elaboration, then Odin-II performs the partial mapping and optimization into pure soft logic.
84+
Warnings and errors may appear regarding the HDL code by Yosys.
85+
8386
.. code-block:: bash
8487
85-
# Elaborate the input file using Yosys convetional Verilog parser and then partial map the coarse-grained netlist using Odin-II
88+
# Elaborate the input file using Yosys conventional Verilog parser and then partial map the coarse-grained netlist using Odin-II
8689
./odin_II --elaborator yosys -v <path/to/Verilog/File>
8790
88-
# Elaborate the input file using the Yosys-SystemVerilog plugin if installed, otherwise the Yosys convetional Verilog parser
91+
# Elaborate the input file using the Yosys-SystemVerilog plugin if installed, otherwise the Yosys conventional Verilog parser
8992
# and then partial map the coarse-grained netlist using Odin-II
9093
./odin_II --elaborator yosys -s <path/to/SystemVerilog/File>
9194
@@ -94,33 +97,29 @@ It is assumed that they are being performed in the Odin-II directory.
9497
./odin_II --elaborator yosys -u <path/to/UHDM/File>
9598
9699
97-
Passes a Verilog/SystemVerilog/UHDM HDL file to Yosys for elaboration, then Odin-II performs the partial mapping and optimization.
98-
Warnings and errors may appear regarding the HDL code by Yosys.
99-
100100
.. note::
101101

102102
The entire log file of the Yosys elaboration for each run is outputted into a file called ``elaboration.yosys.log`` located in the same directory of the final output BLIF file.
103103

104-
.. code-block:: bash
105-
106-
./odin_II --elaborator yosys -v <path/to/Verilog/File> -a <path/to/arch/file> -o output.blif
107-
108-
Passes a Verilog HDL file and architecture to Yosys+Odin-II, where it is synthesized.
104+
The following command passes a Verilog HDL file and architecture to Yosys+Odin-II, where it is synthesized.
109105
Yosys will use the HDL files to perform elaboration.
110106
Then, Odin-II will use the architecture to do partial technology mapping, and will output the BLIF in the current directory at ``./output.blif``.
111107
If the output BLIF file is not specified, ``default_out.blif`` is considered the output file name, again located in the current directory.
112108

109+
.. code-block:: bash
110+
111+
./odin_II --elaborator yosys -v <path/to/Verilog/File> -a <path/to/arch/file> -o output.blif
112+
113113
.. note::
114114

115115
Once the elaboration is fully executed, Yosys generates a coarse-grained BLIF file that the Odin-II BLIF reader will read to create a netlist. This file is named ``coarsen_netlist.yosys.blif`` located in the current directory.
116116

117+
The following command passes a Tcl script file, including commands for the elaboration by Yosys, along with the architecture file.
117118

118119
.. code-block:: bash
119120
120121
./odin_II -S <path/to/Tcl/File> -a <path/to/arch/file> -o myModel.blif
121122
122-
Passes a Tcl script file, including commands for the elaboration by Yosys, along with the architecture file.
123-
124123
.. note::
125124

126125
The Tcl script file should follow the same generic synthesis flow, brought as an example in the `$VTR_ROOT/ODIN_II/regression_test/tools/synth.tcl`.

doc/src/yosys+odin/user_guide.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Synthesis Arguments
1313
Arg Following Argument Description
1414
======================= ============================== =====================================================================================================================================================================
1515
`-c` XML Configuration File XML runtime directives for the syntesizer such as the Verilog file, and parametrized synthesis
16-
`-v` Verilog HDL File You may specify multiple Verilog HDL files for synthesis
17-
**`-s`** **SystemVerilog HDL File** **You may specify multiple SystemVerilog HDL files for synthesis**
18-
**`-u`** **UHDM File** **You may specify multiple UHDM files for synthesis**
19-
`-b` BLIF File
16+
`-v` Verilog HDL File You may specify multiple space-separated Verilog HDL files for synthesis
17+
**`-s`** **SystemVerilog HDL File** **You may specify multiple space-separated SystemVerilog HDL files for synthesis**
18+
**`-u`** **UHDM File** **You may specify multiple space-separated UHDM files for synthesis**
19+
`-b` BLIF File You may **not** specify multiple BLIF files as only single input BLIF file is accepted
2020
**`-S/--tcl`** **Tcl Script File** **You may utilize additional commands for the Yosys elaborator**
2121
`-o` BLIF Output File full output path and file name for the BLIF output file
22-
`-a` Architecture File You may specify multiple verilog HDL files for synthesis
22+
`-a` Architecture File You may specify multiple space-separated verilog HDL files for synthesis
2323
`-G` Output netlist graph in GraphViz viewable .dot format. (net.dot, opens with dotty)
2424
`-A` Output AST graph in in GraphViz viewable .dot format.
2525
`-W` Print all warnings. (Can be substantial.)
@@ -38,17 +38,17 @@ Additional Examples using Odin-II with the Yosys elaborator
3838

3939
.. code-block:: bash
4040
41-
# Elaborate the input file using Yosys convetional Verilog parser
41+
# Elaborate the input file using Yosys conventional Verilog parser
4242
./odin_II --elaborator yosys -v <path/to/Verilog/File> --fflegalize
4343
44-
# Elaborate the input file using the Yosys-SystemVerilog plugin if installed, otherwise the Yosys convetional Verilog parser
44+
# Elaborate the input file using the Yosys-SystemVerilog plugin if installed, otherwise the Yosys conventional Verilog parser
4545
./odin_II --elaborator yosys -s <path/to/SystemVerilog/File> --fflegalize
4646
4747
# Elaborate the input file using the Surelog plugin if installed, otherwise failure on the unsupported type
4848
./odin_II --elaborator yosys -u <path/to/UHDM/File> --fflegalize
4949
5050
51-
Passes a Verilog/SystemVerilog/UHDM file to Yosys for performing elaboration.
51+
Passes a Verilog/SystemVerilog/UHDM file to Yosys to perform elaboration.
5252
The BLIF elaboration and partial mapping phases will be executed on the generated netlist.
5353
However, all latches in the Yosys+Odin-II output file will be rising edge.
5454

@@ -181,7 +181,7 @@ Example of .xml configuration file for `-c`
181181
182182
<config>
183183
<inputs>
184-
<!-- These are the output flags for the project -->
184+
<!-- These are the input flags for the project -->
185185
<!-- possible types: [verilog, verilog_header, systemverilog, systemverilog_header, uhdm, blif] -->
186186
<input_type>Verilog</input_type>
187187
<!-- Way of specifying multiple files in a project -->
@@ -228,10 +228,10 @@ Examples using input/output vector files
228228

229229
.. code-block:: bash
230230
231-
# Elaborate the input file using Yosys convetional Verilog parser
231+
# Elaborate the input file using Yosys conventional Verilog parser
232232
./odin_II --elaborator yosys -v <Path/to/Verilog/file> -t <Path/to/Input/Vector/File> -T <Path/to/Output/Vector/File>
233233
234-
# Elaborate the input file using the Yosys-SystemVerilog plugin if installed, otherwise the Yosys convetional Verilog parser
234+
# Elaborate the input file using the Yosys-SystemVerilog plugin if installed, otherwise the Yosys conventional Verilog parser
235235
./odin_II --elaborator yosys -s <Path/to/SystemVerilog/file> -t <Path/to/Input/Vector/File> -T <Path/to/Output/Vector/File>
236236
237237
# Elaborate the input file using the Surelog plugin if installed, otherwise failure on the unsupported type

doc/src/yosys/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Building
3030
--------
3131

3232
To build the VTR flow with the Yosys front-end you may use the VTR Makefile wrapper, by calling the ``make CMAKE_PARAMS="-DWITH_YOSYS=ON"`` command in the `$VTR_ROOT` directory.
33-
The compile flag ``-DWITH_YOSYS=ON`` should be passed to the CMake parameters to enable Yosys compilation process.
33+
The compile flag ``-DWITH_YOSYS=ON`` should be passed to the CMake parameters to enable the Yosys compilation process.
3434

3535
.. note::
3636

0 commit comments

Comments
 (0)