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

Investigate possible impact of $shiftx vs. $shr #26

Open
ninehusky opened this issue Apr 6, 2024 · 1 comment
Open

Investigate possible impact of $shiftx vs. $shr #26

ninehusky opened this issue Apr 6, 2024 · 1 comment

Comments

@ninehusky
Copy link
Member

According to the Yosys documentation:

The $shift cell performs a right logical shift if the second operand is positive (or unsigned), and a left logical shift if it is negative. The $shiftx cell performs the same operation as the $shift cell, but the vacated bit positions are filled with undef (x) bits, and corresponds to the Verilog indexed part-select expression.

Because Churchroad doesn't support X bits, for now we'll encode both to a regular right shift, but this is something to potentially keep in mind.

@gussmith23
Copy link
Contributor

This eventually came up. I posted a discussion question here:
YosysHQ/yosys#4342

Essentially, any time we have an indexing expression in Verilog (e.g. INIT[idx] in LUT6), we'll get $shiftx. I don't think we actually want $shiftx in Churchroad, because its semantics are more complicated than standard shifts. It's not that complicated, but I would still like to avoid it if possible.

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

No branches or pull requests

2 participants