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 9 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 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

Choose a reason for hiding this comment

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

I think you were right and I was wrong @ZohairZaidi ! After talking to Ken Kent at UNB, it does seem we need to run ABC and the clock add/removal script after Parmys. So I think your original edits were right. Can you run the flow to check exactly what happens in run_vtr_flow with parmys? I think it runs ABC and the clock recovery script after all, so we should document them again.

I also think we should change the order of the text. After saying how to run vpr, I think we should say how to use run_vtr_flow with parmys to synthesize, place and route a circuit. Then we can have a "running manually" section to dig more into how to run each tool. Finally we can have the existing Odin II section.

doc/src/quickstart/index.rst Outdated 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 Outdated Show resolved Hide resolved
doc/src/quickstart/index.rst Outdated Show resolved Hide resolved
doc/src/quickstart/index.rst Outdated Show resolved Hide resolved
doc/src/quickstart/index.rst Outdated Show resolved Hide resolved
doc/src/quickstart/index.rst Outdated Show resolved Hide resolved
doc/src/quickstart/index.rst Show resolved Hide resolved
doc/src/quickstart/index.rst Show resolved Hide resolved
@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.

Comment on lines 428 to 431
.. code-block:: bash

> mkdir -p ~/vtr_work/quickstart/blink_manual
> cd ~/vtr_work/quickstart/blink_manual
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering if this is necessary. I would assume that if they opt with ODIN they would skip the synthesizing with Parmys section so I left it here.

Choose a reason for hiding this comment

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

That seems reasonable.

@ZohairZaidi
Copy link
Contributor Author

Hi @vaughnbetz, let me know how this is. I changed the order and made it smoother for the user to follow.

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
4 participants