Skip to content

Commit 22ff4ee

Browse files
committed
removed ABC from parmys section
1 parent 3a700ce commit 22ff4ee

File tree

2 files changed

+72
-72
lines changed

2 files changed

+72
-72
lines changed
-34.9 KB
Loading

doc/src/quickstart/index.rst

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -260,76 +260,9 @@ We can now take a look at the circuit which Parmys produced (``blink.parmys.blif
260260

261261
.. seealso:: For more information on the BLIF file format see :ref:`blif_format`.
262262

263-
Optimizing and Technology Mapping with ABC
264-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
265-
266-
Next, we'll optimize and technology map our circuit using ABC, providing the option:
267-
268-
* ``-c <script>``, where ``<script>`` is a set of commands telling ABC how to synthesize our circuit.
269-
270-
We'll use the following, simple ABC commands::
271-
272-
read blink.parmys.blif; #Read the circuit synthesized by Parmys
273-
if -K 6; #Technology map to 6 input LUTs (6-LUTs)
274-
write_hie blink.parmys.blif blink.abc_no_clock.blif #Write new circuit to blink.abc_no_clock.blif
275-
276-
.. 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.
277-
278-
The corresponding command to run is:
279-
280-
.. code-block:: bash
281-
282-
> $VTR_ROOT/abc/abc \
283-
-c 'read ~/vtr_work/quickstart/blink_manual/temp/blink.parmys.blif; if -K 6; write_hie ~/vtr_work/quickstart/blink_manual/temp/blink.parmys.blif ~/vtr_work/quickstart/blink_manual/temp/blink.abc_no_clock.blif'
284-
285-
286-
When run, ABC's output should look similar to::
287-
288-
ABC command line: "read blink.parmys.blif; if -K 6; write_hie blink.parmys.blif blink.abc_no_clock.blif".
289-
290-
Hierarchy reader converted 6 instances of blackboxes.
291-
The network was strashed and balanced before FPGA mapping.
292-
Hierarchy writer reintroduced 6 instances of blackboxes.
293-
294-
If we now inspect the produced BLIF file (``blink.abc_no_clock.blif``) we see that ABC was able to significantly simplify and optimize the circuit's logic (compared to ``blink.parmys.blif``):
295-
296-
.. literalinclude:: blink.abc_no_clock.blif
297-
:linenos:
298-
:emphasize-lines: 6-10,13-18,21-38
299-
:caption: blink.abc_no_clock.blif
300-
301-
ABC has kept the ``.latch`` and ``.subckt adder`` primitives, but has significantly simplified the other logic (``.names``).
302-
303-
304-
However, there is an issue with the above BLIF produced by ABC: the latches (rising edge Flip-Flops) do not have any clocks or edge sensitivity specified, which is information required by VPR.
305-
306-
Re-inserting clocks
307-
^^^^^^^^^^^^^^^^^^^
308-
We will restore the clock information by running a script which will transfer that information from the original Parmys BLIF file (writing it to the new file ``blink.pre-vpr.blif``):
309-
310-
.. code-block:: bash
311-
312-
> $VTR_ROOT/vtr_flow/scripts/restore_multiclock_latch.pl \
313-
~/vtr_work/quickstart/blink_manual/temp/blink.parmys.blif \
314-
~/vtr_work/quickstart/blink_manual/temp/blink.abc_no_clock.blif \
315-
~/vtr_work/quickstart/blink_manual/temp/blink.pre-vpr.blif
316-
317-
If we inspect ``blink.pre-vpr.blif`` we now see that the clock (``blink^clk``) has been restored to the Flip-Flops:
318-
319-
.. code-block:: bash
320-
321-
> grep 'latch' blink.pre-vpr.blif
322-
323-
.latch n19 blink^r_counter~0_FF re blink^clk 3
324-
.latch n24 blink^r_counter~4_FF re blink^clk 3
325-
.latch n29 blink^r_counter~3_FF re blink^clk 3
326-
.latch n34 blink^r_counter~2_FF re blink^clk 3
327-
.latch n39 blink^r_counter~1_FF re blink^clk 3
328-
329-
330263
Implementing the circuit with VPR
331264
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
332-
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).
265+
Now that we have the optimized and technology mapped netlist (``blink.parmys.blif``), we can invoke VPR to implement it onto the ``EArch`` FPGA architecture (in the same way we did with the ``tseng`` design earlier).
333266
However, since our BLIF file doesn't match the design name we explicitly specify:
334267

335268
* ``blink`` as the circuit name, and
@@ -343,7 +276,7 @@ The resulting command is:
343276
344277
> $VTR_ROOT/vpr/vpr \
345278
$VTR_ROOT/vtr_flow/arch/timing/EArch.xml \
346-
~/vtr_work/quickstart/blink_manual/temp/blink.pre-vpr.blif \
279+
~/vtr_work/quickstart/blink_manual/temp/blink.parmys.blif \
347280
--route_chan_width 100
348281
349282
and after VPR finishes we should see the resulting implementation files:
@@ -352,15 +285,15 @@ and after VPR finishes we should see the resulting implementation files:
352285
353286
> ls *.net *.place *.route
354287
355-
blink.net blink.place blink.route
288+
blink.parmys.net blink.parmys.place blink.parmys.route
356289
357290
We can then view the implementation as usual by appending ``--analysis --disp on`` to the command:
358291

359292
.. code-block:: bash
360293
361294
> $VTR_ROOT/vpr/vpr \
362295
$VTR_ROOT/vtr_flow/arch/timing/EArch.xml \
363-
~/vtr_work/quickstart/blink_manual/temp/blink.pre-vpr.blif \
296+
~/vtr_work/quickstart/blink_manual/temp/blink.parmys.blif \
364297
--route_chan_width 100 \
365298
--analysis --disp on
366299
@@ -460,6 +393,8 @@ which we can visualize with:
460393
461394
Manually Running VTR with ODIN II
462395
----------------------------------
396+
VTR includes a second synthesis tool, ODIN II. Below we explain how to run this alternative synthesis flow.
397+
463398
Let's start by making a new directory for us to work in:
464399

465400
.. code-block:: bash
@@ -517,8 +452,73 @@ Some interesting highlights are shown below:
517452

518453
.. seealso:: For more information on the BLIF file format see :ref:`blif_format`.
519454

455+
Optimizing and Technology Mapping with ABC
456+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
457+
458+
Next, we'll optimize and technology map our circuit using ABC, providing the option:
459+
460+
* ``-c <script>``, where ``<script>`` is a set of commands telling ABC how to synthesize our circuit.
461+
462+
We'll use the following, simple ABC commands::
463+
464+
read blink.odin.blif; #Read the circuit synthesized by ODIN
465+
if -K 6; #Technology map to 6 input LUTs (6-LUTs)
466+
write_hie blink.odin.blif blink.abc_no_clock.blif #Write new circuit to blink.abc_no_clock.blif
467+
468+
.. 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.
469+
470+
The corresponding command to run is:
471+
472+
.. code-block:: bash
473+
474+
> $VTR_ROOT/abc/abc \
475+
-c 'read blink.odin.blif; if -K 6; write_hie blink.odin.blif blink.abc_no_clock.blif'
476+
477+
When run, ABC's output should look similar to::
478+
479+
ABC command line: "read blink.odin.blif; if -K 6; write_hie blink.odin.blif blink.abc_no_clock.blif".
480+
481+
Hierarchy reader converted 6 instances of blackboxes.
482+
The network was strashed and balanced before FPGA mapping.
483+
Hierarchy writer reintroduced 6 instances of blackboxes.
484+
485+
If we now inspect the produced BLIF file (``blink.abc_no_clock.blif``) we see that ABC was able to significantly simplify and optimize the circuit's logic (compared to ``blink.odin.blif``):
486+
487+
.. literalinclude:: blink.abc_no_clock.blif
488+
:linenos:
489+
:emphasize-lines: 6-10,13-18,21-38
490+
:caption: blink.abc_no_clock.blif
491+
492+
ABC has kept the ``.latch`` and ``.subckt adder`` primitives, but has significantly simplified the other logic (``.names``).
493+
494+
495+
However, there is an issue with the above BLIF produced by ABC: the latches (rising edge Flip-Flops) do not have any clocks or edge sensitivity specified, which is information required by VPR.
496+
497+
Re-inserting clocks
498+
^^^^^^^^^^^^^^^^^^^
499+
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``):
500+
501+
.. code-block:: bash
502+
503+
> $VTR_ROOT/vtr_flow/scripts/restore_multiclock_latch.pl \
504+
blink.odin.blif \
505+
blink.abc_no_clock.blif \
506+
blink.pre-vpr.blif
507+
508+
If we inspect ``blink.pre-vpr.blif`` we now see that the clock (``blink^clk``) has been restored to the Flip-Flops:
509+
510+
.. code-block:: bash
511+
512+
> grep 'latch' blink.pre-vpr.blif
513+
514+
.latch n19 blink^r_counter~0_FF re blink^clk 3
515+
.latch n24 blink^r_counter~4_FF re blink^clk 3
516+
.latch n29 blink^r_counter~3_FF re blink^clk 3
517+
.latch n34 blink^r_counter~2_FF re blink^clk 3
518+
.latch n39 blink^r_counter~1_FF re blink^clk 3
519+
520520
521-
After synthesizing the netlist, you can proceed to follow the steps outlined in the section titled :ref:'Optimizing and Technology Mapping with ABC' using the generated `blink.odin.blif` file instead of `blink.parmys.blif`.
521+
After optimizing the netlist, we can proceed to follow the steps outlined in the section titled :ref:'Implementing the circuit with VPR' using the genrated `blink.pre-vpr.blif` instead of `blink.parmys.blif`.
522522

523523
Next Steps
524524
==========

0 commit comments

Comments
 (0)