Skip to content

Update Documentation with recent changes for Yosys Plugins #2139

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

Merged
merged 8 commits into from
Sep 3, 2022

Conversation

sdamghan
Copy link
Member

@sdamghan sdamghan commented Aug 22, 2022

Description

This PR includes:

  • updating the Odin-II documentation for recent changes in its input HDL argument
  • updating the Yosys+Odin-II documentation for recent changes related to SystemVerilog and UHDM plugins
  • updating the run_vtr_flow documentation for recent changes to all of the VTR front-ends
  • updating the Yosys documentation for recent changes related to SystemVerilog and UHDM plugins

Related Issue

#2068
#2086
#2110

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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

@sdamghan sdamghan added the docs Documentation label Aug 22, 2022
@github-actions github-actions bot removed the docs Documentation label Aug 22, 2022
@sdamghan sdamghan force-pushed the yosys_plugins_docs branch from 7575cef to 82a50d8 Compare August 23, 2022 13:22
@sdamghan
Copy link
Member Author

@vaughnbetz - This PR is ready for your review. It would be great to know your comments.

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.

Looks good; some typos and clarifications (e.g. what is UHDM?) requested.

There's a comment that vpr can only handle positive-edge triggered registers; asking @kmurray if that's true since I thought Tatum handled negative-edge triggered registers.

./run_vtr_flow <path/to/SystemVerilog/File> <path/to/arch/file> -elaborator yosys -fflegalize

# Using the Surelog plugin if installed, otherwise failure on the unsupported file type
./run_vtr_flow <path/to/UHDM/File> <path/to/arch/file> -elaborator yosys -fflegalize
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we should explain what a UHDM file is and how it was created (run an earlier Surelog command?). Can be brief and include a link to the UHDM documentation, but should give some idea I think.

Signed-off-by: Seyed Alireza Damghani <[email protected]>
@sdamghan
Copy link
Member Author

sdamghan commented Sep 2, 2022

@vaughnbetz - I have applied some changes to address your reviews. Kindly, let me know if you want additional modifications.

@vaughnbetz
Copy link
Contributor

Thanks Seyed.

@vaughnbetz
Copy link
Contributor

I think it looks good and am going to merge it. I have one last thing to consider for a follow-up PR though.
Thanks for adding the UHDM definition. From an end-user perspective though, they will specify a .sv file as input even when using surelog, not a UHDM file, right? If so I think that should be made clear in the UHDM format description you've added; we use UHDM to mean this alternative flow, but the input file is still systemverilog (or perhaps can be either .sv or .v).

@vaughnbetz vaughnbetz merged commit 6eb8a0a into master Sep 3, 2022
@vaughnbetz vaughnbetz deleted the yosys_plugins_docs branch September 3, 2022 19:35
@sdamghan
Copy link
Member Author

sdamghan commented Sep 4, 2022

Thanks @vaughnbetz - that absolutely makes sense. I will investigate more about the file extensions and will add more info to the documentation. Meanwhile, I noticed that Surelog or even Yosys plugins do not check the file extension; they only read whatever is inside the file using the user-specified parser. For instance, you can have a file with .v extension while it contains a SystemVerilog HDL, and based on what the user specified as the parser, Yosys performs the synthesis for the given HDL.
With the recent change I made, our approach would be similar to Surelog or Yosys, i.e., whatever the VTR flow receives, regardless of its extension, will be passed to the front-ends and based on the -parser value that is specified by the user, the front-end performs parsing and synthesis.
Overall, the VTR flow script does not accept any format other than what specified below for Yosys:

FILE_TYPES = {
".v": "Verilog",
".vh": "Verilog",
".sv": "SystemVerilog",
".svh": "SystemVerilog",
".blif": "BLIF",
".aig": "aiger",
".json": "JSON",
".lib": "Liberty",
".ys": "RTLIL",
}

Overall, the VTR flow does not check the file extension for deciding about the parser, the same as Surelog and Yosys. That means, the file extension is unimportant; however, the parser value is. If you would like, I can add to the documentation that files that include UHDM descriptions can have both .v and .sv extensions; though, considering the synthesizers' approach, they can have any extension.

@vaughnbetz
Copy link
Contributor

Thanks Seyed. You could just say "typically .v or .sv files". Basically right now the documentation makes it sounds like UHDM is a file type (some .uhdm extension or some such) and it really isn't -- it's a parser flow. Clarifying that would be good.

@sdamghan sdamghan mentioned this pull request Sep 4, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants