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

flow: convert DONT_USE to text files if GZ, ensure files are read as … #373

Conversation

openroad-robot
Copy link
Contributor

…ASCII, and fix attribute statement yosys does not parse correctly

…ASCII, and fix attribute statement yosys does not parse correctly

Signed-off-by: Peter Gadfort <[email protected]>
@gadfort gadfort marked this pull request as ready for review March 2, 2022 21:51
@gadfort gadfort requested a review from maliberty March 2, 2022 21:51
else:
f = open(args.inputFile)
f = open(args.inputFile, encoding="ascii")
Copy link
Member

Choose a reason for hiding this comment

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

Based on your comments today, do you need to use utf8?

Copy link
Contributor

Choose a reason for hiding this comment

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

When I read it as acsii, the characters are ignored, so it has the same effect as reading it as uft-8 and then converting (except being a little simpler)

Copy link
Contributor

Choose a reason for hiding this comment

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

I was wrong, I had the wrong version of the file copied in

@gadfort gadfort merged commit 6c4b113 into The-OpenROAD-Project:master Mar 2, 2022
@openroad-robot openroad-robot deleted the flow-compressed branch March 2, 2022 23:53
@@ -45,6 +45,12 @@
content, count = re.subn(pattern, replace, content)
print("Commented", count, "lines containing \"original_pin\"")

# Yosys, does not like properties that start with : !, without quotes
Copy link
Contributor

Choose a reason for hiding this comment

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

I know I'm necroposting, but I'm revisiting the necessity for this script from the yosys side. Is this a workaround for YosysHQ/yosys#3498 which has been fixed?

cc @povik

Copy link
Collaborator

Choose a reason for hiding this comment

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

Highly likely, you can try removing those lines (file is currently called preprocessLib.py) and see if it still works as intended. I think I recall that it used to emit a warning that it was ignoring the cell, not error out.

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.

5 participants