Skip to content

Update the vqm2blif parser to add support for Stratix 10 and Agliex vqm files #1936

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
Dec 17, 2021

Conversation

kimiatkh
Copy link
Contributor

Description

This PR includes a few minor modifications to the vqm2blif parser. Small changes have been made to the parser grammar files (vqm_parser.l and vqm_parser.y) in order to achieve the following objectives:

  • The synthesis attributes and directives inside (* and *) delimiters should be ignored

  • The names that start with \ (called TOKEN_ESCAPEID) should be allowed to be used for declaration of a vector. Currently the name of the vectors can only start with alphabetic characters and _ (TOKEN_REGULARID).

  • If a line in the code ends with a TOKEN_ESCAPEID and there is no space between the token and the ; at the end of the line, ; should not be considered part of the TOKEN_ESCAPEID.

  • The ! operator is escaped. Though it should be noted that this results in the lut_mask parameter being incorrect after conversion from VQM to BLIF.

  • Bit strings in hexadecimal format (nh’[0-9|A-F]+) should be accepted by the parser.

  • If the declarations and statements appear in a mixed order the parser should still be able to successfully parse the VQM file.

Related Issue

This PR is related to the issue #1931

Motivation and Context

The purpose of these modifications is to enable the tool to parse the Quartus VQM files targeting Stratix 10 and Agilex. The current version of the parser grammar is written based on the VQM files targeting Stratix IV devices. The new VQM files cannot successfully go through the parser as they differ slightly in formatting.

How Has This Been Tested?

In order to be able to test the changes, the architecture description of Stratix 10 or Agilex is required. The tests will be included in a different pull request once the architecture capture of one of these two devices has reached a major milestone.

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

@kimiatkh kimiatkh added the VPR VPR FPGA Placement & Routing Tool label Dec 14, 2021
@kimiatkh kimiatkh requested a review from vaughnbetz December 14, 2021 23:01
@kimiatkh kimiatkh self-assigned this Dec 14, 2021
@github-actions github-actions bot removed the VPR VPR FPGA Placement & Routing Tool label Dec 14, 2021
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; let's merge and then you can add these comments for a future PR.

[ \t]+ /* skip white spaces */
! /* skip the logical operator ! applied on the input ports of the lut - this results in lut mask not being valid anoymore */
Copy link
Contributor

Choose a reason for hiding this comment

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

probably want to explain this means inversion in the vqm netlist, but we are ignoring it (hence the LUTmask won't be correct).

@@ -197,7 +197,9 @@ extern t_boolean buffd_outs; //user-set flag that regulates whether to keep buff
*/
const map<std::string, DeviceInfo> device_parameter_database {
// stratix 4 device
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a more descriptive comment here (device family, combinational cell name, output name, 1?, dff name, dff output name).

@vaughnbetz vaughnbetz merged commit 36cc78f into master Dec 17, 2021
@vaughnbetz vaughnbetz deleted the S10_vqm2blif_fixes branch December 17, 2021 14:53
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