Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QuickStart] Yosys/Parmys Update #2776

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ZohairZaidi
Copy link
Contributor

Description

This pull request updates the VTR Quick Start Guide by replacing Odin II as the primary synthesis tool with the Yosys/Parmys flow. I have also updated the graphic images

Related Issue

closes #2739

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@github-actions github-actions bot added the docs Documentation label Oct 16, 2024
Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ZohairZaidi !
I have some comments about the parmys flow (I think we've listed some unnecessary steps for it) that you should take a look at closely. Adding @amirarjmand93 and @KennethKent to review; in case @AlexandreSinger has time to review I've tagged him too

doc/src/quickstart/index.rst Outdated Show resolved Hide resolved

Hierarchy reader converted 6 instances of blackboxes.
The network was strashed and balanced before FPGA mapping.
Hierarchy writer reintroduced 6 instances of blackboxes.

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``):
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``):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at the two files and see if this is true. Are the number of .names significantly different? Confirm they are different a bit at least. We shouldn't say it is significantly simpler / optimized unless it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just double checked and that seems to be an error on my part as the number of .names are the same. Thanks for catching that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I think we should just simplify then to show running parmys in this section, without abc or the clock relabelling (we can leave those in the Odin-II section). If you can confirm the clock relabeling is not called for the parmys flow in run_vtr_flow that would be ideal -- then we can confidently remove it from this section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing. It does not appear to be called in run_vtr_flow.

My initial confusion stemmed from reading the Parmys paper, which states, "the Parmys pass is called to perform partial mapping according to the target architecture, and then a series of optimization and logic mappings are performed to convert all the remaining Yosys internal types to primitives. Next, the output is passed to ABC and VPR stages."

This led me to believe that running only the Parmys part of the flow would require a separate invocation of ABC since we are executing the command with both -start parmys and -end parmys, it explicitly skips the ABC.

I will update the PR and also wait for final confirmation by the added members

doc/src/quickstart/index.rst Show resolved Hide resolved
doc/src/quickstart/index.rst Outdated Show resolved Hide resolved
doc/src/quickstart/index.rst Outdated Show resolved Hide resolved
@ZohairZaidi
Copy link
Contributor Author

Thanks @vaughnbetz!, I have addressed your suggestions. Will wait for the added members to review as well.

Copy link
Contributor

@AlexandreSinger AlexandreSinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZohairZaidi Thank you for these changes! I like how you are running Yosys. I think using the vtr_flow script just on the Yosys step is perfectly fine since running Yosys directly is such a pain. The main goal is to know how to make the .blif file.

I have left some comments below, but overall the documentation is very good.

doc/src/quickstart/index.rst Show resolved Hide resolved
@@ -440,16 +346,16 @@ which should produce output similar to::

EArch/blink OK (took 0.26 seconds)

There are also multiple log files (including for ABC, ODIN and VPR), which by convention the script names with the ``.out`` suffix:
There are also multiple log files (including for ABC, Parmys and VPR), which by convention the script names with the ``.out`` suffix:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, is ABC log files still generated?

@@ -462,10 +368,10 @@ You will also see there are several BLIF files produced:

> ls *.blif

0_blink.abc.blif 0_blink.raw.abc.blif blink.odin.blif
0_blink.odin.blif blink.abc.blif blink.pre-vpr.blif
0_blink.abc.blif 0_blink.raw.abc.blif blink.parmys.blif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these abc blif files still there?

@@ -370,7 +276,7 @@ The resulting command is:

> $VTR_ROOT/vpr/vpr \
$VTR_ROOT/vtr_flow/arch/timing/EArch.xml \
blink --circuit_file blink.pre-vpr.blif \
~/vtr_work/quickstart/blink_manual/temp/blink.parmys.blif \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you passing the full file path? If someone is following your steps correctly, should they not already be in the ~/vtr_work/quickstart/blink_manual/ folder? If you do want to make it explicit, I would recommend creating a $WRK_DIR variable, similar to $VTR_ROOT instead of passing the whole path.


We can then view the implementation as usual by appending ``--analysis --disp on`` to the command:

.. code-block:: bash

> $VTR_ROOT/vpr/vpr \
$VTR_ROOT/vtr_flow/arch/timing/EArch.xml \
blink --circuit_file blink.pre-vpr.blif \
~/vtr_work/quickstart/blink_manual/temp/blink.parmys.blif \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same path comment as above.

doc/src/quickstart/index.rst Show resolved Hide resolved

.. code-block:: bash

> make CMAKE_PARAMS="-DWITH_ODIN=on"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing since the line above tells the user to change directory to ~/vtr_work/quickstart/blink_manual and now you are saying to use the make command. This should be in the VTR directory. I would move the build instructions above the prior code block and provide the cd command to go to the correct directory.

@vaughnbetz
Copy link
Contributor

Adding @soheilshahrouz in case he can help figure out the required flow ... we need to document this well in the quickstart as Mohamed and I were confused about it.

@ZohairZaidi
Copy link
Contributor Author

I agree @vaughnbetz, I plan to work on it this reading week. Please let me know what you were confused about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update VTR quick start guide to use yosys / parmys
3 participants