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

Fix 748 - Updates RAM32X1S property to correct default #751

Merged
merged 3 commits into from
Jul 21, 2023
Merged

Conversation

clavin-xlnx
Copy link
Member

@clavin-xlnx clavin-xlnx commented Jul 12, 2023

Fixes #748 by updating unisim_data.dat with the appropriate setting for IS_CLK_INVERTED.

@clavin-xlnx clavin-xlnx requested a review from eddieh-xlnx July 12, 2023 19:15
@eddieh-xlnx
Copy link
Collaborator

Looking back at #748, what should RapidWright do if we instantiate a RAM32X1S_1 instead here? I'm seeing that Vivado emits this:

create_cell -reference RAM32X1S_1 inst
WARNING: [Coretcl 2-1024] Primitives of type 'RAM32X1S_1' are not supported by the current part and have been retargeted to 'RAM32X1S'.

However, RapidWright doesn't retarget (not reasonable to expect it to retarget to RAM32X1S?) but it might be reasonable to expand this directly to the end result (where inst/SP is a RAMS32) with the IS_CLK_INVERTED set correctly?

I'll push my modified test; we can revert if it's out of scope of this PR.

@clavin-xlnx
Copy link
Member Author

However, RapidWright doesn't retarget (not reasonable to expect it to retarget to RAM32X1S?) but it might be reasonable to expand this directly to the end result (where inst/SP is a RAMS32) with the IS_CLK_INVERTED set correctly?

RapidWright doesn't support deprecated primitives that require re-targeting. It doesn't have the retargeting information necessary to do it properly. It also doesn't contain an exhaustive list of primitives that require retargeting.

Usually, this doesn't cause an issue as primitives are retargeted automatically in Vivado. It would be a significant task to add this support and handle this more elegantly but its unclear that there is a significant benefit.

I'll push my modified test; we can revert if it's out of scope of this PR.

The best we could do for now is just detect these specific cases and throw an error, but it wouldn't be exhaustive for all other retargeted prims.

@eddieh-xlnx
Copy link
Collaborator

eddieh-xlnx commented Jul 13, 2023

That's reasonable, let's revert my test. In this case, would we expect the IS_CLK_INVERTED property of a RAM32X1S_1 instance created by/loaded into RapidWright to be unreliable then?

@clavin-xlnx
Copy link
Member Author

That's reasonable, let's revert my test. In this case, would we expect the IS_CLK_INVERTED property of a RAM32X1S_1 instance created by/loaded into RapidWright to be unreliable then?

That is correct.

Copy link
Collaborator

@eddieh-xlnx eddieh-xlnx left a comment

Choose a reason for hiding this comment

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

Changed unsupported macros into a canary test.

@clavin-xlnx clavin-xlnx merged commit 1b6e1a7 into master Jul 21, 2023
@clavin-xlnx clavin-xlnx deleted the fix_748 branch July 21, 2023 22:09
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.

RW reports CLK_INVERTED as 1'b1 when it is reported as 1'b0 in Vivado
2 participants