-
Notifications
You must be signed in to change notification settings - Fork 415
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
Conversation
declarations and assign statements
hexadecimal format
line, this character would not be considered part of TOKEN_ESCAPEID
be used for declaration of vectors
inside (* and *) delimiters are skipped
listed under available devices and the user can select them
There was a problem hiding this 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 */ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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).
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
Checklist: