Skip to content

Commit e2e569e

Browse files
committed
doc: Various quickstart clarifications and fixes
1 parent 68c44e3 commit e2e569e

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

doc/src/quickstart/index.rst

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ We will use the following simple example circuit, which causes it's output to to
168168
:language: verilog
169169
:linenos:
170170
:emphasize-lines: 10,15,26
171-
:caption: blink.v
171+
:caption: blink.v (``$VTR_ROOT/doc/src/quickstart/blink.v``)
172172

173173
This Verilog creates a sequential 5-bit register (``r_counter``) which increments every clock cycle.
174174
If the count is below ``16`` it drives the output (``o_led``) high, otherwise it drives it low.
@@ -184,9 +184,9 @@ Lets start by making a fresh directory for us to work in:
184184
185185
Next we need to run the three main sets of tools:
186186

187-
* :ref:`odin_II` performs 'synthesis' which converts our behavioural Verilog into a circuit netlist (``.blif`` file) consisting of logic equations and FPGA architecture primitives (Flip-Flops, adders etc.),
188-
* :ref:`ABC` performs 'logic optimization' which simplifies the circuit logic, and 'technology mapping' which converts logic equations to Look-Up-Tables (LUTs), and
189-
* :ref:`VPR` which performs packing, placement and routing of the circuit onto the targetted FPGA architecture.
187+
* :ref:`odin_II` performs 'synthesis' which converts our behavioural Verilog (``.v`` file) into a circuit netlist (``.blif`` file) consisting of logic equations and FPGA architecture primitives (Flip-Flops, adders etc.),
188+
* :ref:`ABC` performs 'logic optimization' which simplifies the circuit logic, and 'technology mapping' which converts logic equations into the Look-Up-Tables (LUTs) available on an FPGA, and
189+
* :ref:`VPR` which performs packing, placement and routing of the circuit to implement it on the targetted FPGA architecture.
190190

191191
Synthesizing with ODIN II
192192
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -220,15 +220,15 @@ Some interesting highlights are shown below:
220220

221221
.. literalinclude:: blink.odin.blif
222222
:lines: 14,40
223-
:caption: Instantiations of rising-edge triggered Latches (i.e. Flip-Flops) in ``blink.odin.blif`` which implement (``r_counter`` in blink.v)
223+
:caption: Instantiations of rising-edge triggered Latches (i.e. Flip-Flops) in ``blink.odin.blif`` (implements part of ``r_counter`` in blink.v)
224224

225225
.. literalinclude:: blink.odin.blif
226226
:lines: 17-19,21-22
227-
:caption: Adder primitive instantiations in ``blink.odin.blif``, used to perform addition (``+`` operator in blink.v)
227+
:caption: Adder primitive instantiations in ``blink.odin.blif``, used to perform addition (implements part of the ``+`` operator in blink.v)
228228

229229
.. literalinclude:: blink.odin.blif
230230
:lines: 45-50
231-
:caption: Logic equation (.names truth-table) in ``blink.odin.blif``, implementing logical OR
231+
:caption: Logic equation (.names truth-table) in ``blink.odin.blif``, implementing logical OR (implements part of the ``<`` operator in blink.v)
232232

233233
.. seealso:: For more information on the BLIF file format see :ref:`blif_format`.
234234

@@ -242,7 +242,7 @@ Next, we'll optimize and technology map our circuit using ABC, providing the opt
242242
We'll use the following, simple ABC commands::
243243

244244
read blink.odin.blif; #Read the circuit synthesized by ODIN
245-
if -K 6; #Technology map to 6-LUTs
245+
if -K 6; #Technology map to 6 input LUTs (6-LUTs)
246246
write_hie blink.odin.blif blink.abc_no_clock.blif #Write new circuit to blink.abc_no_clock.blif
247247

248248
.. note:: Usually you should use a more complicated script (such as that used by :ref:`run_vtr_flow`) to ensure ABC optitmizes your circuit well.
@@ -271,11 +271,12 @@ If we now inspect the produced BLIF file (``blink.abc_no_clock.blif``) we see th
271271

272272
ABC has kept the ``.latch`` and ``.subckt adder`` primitives, but has significantly simplified the other logic (``.names``).
273273

274+
275+
However, there is an issue with the above BLIF produced by ABC: the latches (rising edge Flip-Flops) do not have any clocks specified, which is information required by VPR.
276+
274277
Re-inserting clocks
275278
^^^^^^^^^^^^^^^^^^^
276-
There is an issue with the above BLIF produced by ABC.
277-
The latches (rising edge Flip-Flops) do not have any clocks specified, which is information required by VPR.
278-
We will restore this information by running a script which will transfer that information from the original ODIN BLIF file:
279+
We will restore the clock information by running a script which will transfer that information from the original ODIN BLIF file (writing it to the new file ``blink.pre-vpr.blif``):
279280

280281
.. code-block:: bash
281282
@@ -299,7 +300,7 @@ If we inspect ``blink.pre-vpr.blif`` we now see that the clock (``blink^clk``) h
299300
300301
Implementing the circuit with VPR
301302
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
302-
Now that we have the optimized and technology mapped netlist (``blink.pre-vpr.blif``), we can invoke VPR to implement it onto the ``EArch`` FPGA architecture, in the same way we did with the ``tseng`` design.
303+
Now that we have the optimized and technology mapped netlist (``blink.pre-vpr.blif``), we can invoke VPR to implement it onto the ``EArch`` FPGA architecture (in the same way we did with the ``tseng`` design earlier).
303304
However, since our BLIF file doesn't match the design name we explicitly specify:
304305

305306
* ``blink`` as the circuit name, and
@@ -340,14 +341,14 @@ We can then view the implementation as usual by appending ``--analysis --disp on
340341

341342
Automatically Running the VTR Flow
342343
----------------------------------
343-
Running each stage of the flow manually is time consuming.
344+
Running each stage of the flow manually is time consuming (and potentially error prone).
344345
For convenience, VTR provides a script (:ref:`run_vtr_flow`) which automates this process.
345346

346347
Lets make a new directory to work in named ``blink_run_flow``:
347348

348349
.. code-block:: bash
349350
350-
> mkdir -p ~/vtr_work/quickstart/blink_manual
351+
> mkdir -p ~/vtr_work/quickstart/blink_run_flow
351352
> cd ~/vtr_work/quickstart/blink_run_flow
352353
353354
Now lets run the script (``$VTR_ROOT/vtr_flow/scripts/run_vtr_flow.pl``) passing in:
@@ -371,7 +372,7 @@ The resulting command is:
371372
-temp_dir . \
372373
--route_chan_width 100
373374
374-
.. note:: Options unrecognized by run_vtr_flow (like --route_chan_width) are passed on to VPR.
375+
.. note:: Options unrecognized by run_vtr_flow (like ``--route_chan_width``) are passed on to VPR.
375376

376377
which should produce output similar to::
377378

@@ -395,7 +396,7 @@ You will also see there are several BLIF files produced:
395396
0_blink.abc.blif 0_blink.raw.abc.blif blink.odin.blif
396397
0_blink.odin.blif blink.abc.blif blink.pre-vpr.blif
397398
398-
With the main files of intereset being ``blink.odin.blif`` (netlist produced by ODIN), ``blink.abc.blif`` (final netlist produced by ABC after clock restoration), ``blink.pre-vpr.blif`` netlist used by VPR (identical to ``blink.abc.blif``).
399+
With the main files of interest being ``blink.odin.blif`` (netlist produced by ODIN), ``blink.abc.blif`` (final netlist produced by ABC after clock restoration), ``blink.pre-vpr.blif`` netlist used by VPR (usually identical to ``blink.abc.blif``).
399400

400401
Like before, we can also see the implementation files generated by VPR:
401402

@@ -421,9 +422,9 @@ Now that you've finished the VTR quickstart, you're ready to start experimenting
421422

422423
Here are some possible next steps for users wishing to use VTR:
423424

424-
* Try modifying the verilog file (e.g. ``blink.v``) or make your own circuit and try running it through the flow.
425+
* Try modifying the Verilog file (e.g. ``blink.v``) or make your own circuit and try running it through the flow.
425426

426-
* Learn about FPGA architecture modelling (:ref:`Tutorials <arch_tutorial>`, :ref:`Reference <fpga_architecture_description>`), and try modifying a copy of ``EArch`` to see how it changes the implementation of ``blinky.v``.
427+
* Learn about FPGA architecture modelling (:ref:`Tutorials <arch_tutorial>`, :ref:`Reference <fpga_architecture_description>`), and try modifying a copy of ``EArch`` to see how it changes the implementation of ``blink.v``.
427428

428429
* Read more about the :ref:`VTR CAD Flow <vtr_cad_flow>`, and :ref:`Task <vtr_tasks>` automation framework.
429430

0 commit comments

Comments
 (0)