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

Add rotate by constant #352

merged 1 commit into from Apr 13, 2020


Copy link

@Ravenslofty Ravenslofty commented Apr 11, 2020

I think I got the signs right, anyway.

Closes #339.

Copy link

@whitequark whitequark left a comment

Please add some tests. In this case, some assertRepr tests in, and a functional test in In the latter, if you write the literals in binary, it'll be easy to see if you got the signs right.

Copy link

codecov bot commented Apr 11, 2020

Codecov Report

Merging #352 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #352      +/-   ##
+ Coverage   82.69%   82.72%   +0.02%     
  Files          35       35              
  Lines        5919     5940      +21     
  Branches     1201     1206       +5     
+ Hits         4895     4914      +19     
- Misses        863      864       +1     
- Partials      161      162       +1     
Impacted Files Coverage Δ
nmigen/hdl/ 88.71% <100.00%> (+0.18%) ⬆️
nmigen/hdl/ 97.51% <0.00%> (-1.19%) ⬇️
nmigen/build/ 31.25% <0.00%> (ø)
nmigen/build/ 28.15% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e40dc0...220b5ad. Read the comment docs.

@Ravenslofty Ravenslofty force-pushed the const_rotates branch 2 times, most recently from 0a28e16 to 9e2b4f9 Compare Apr 12, 2020
Copy link

@whitequark whitequark left a comment

Please add tests for rotates by non-1, and in particular for rotates by values larger than the value size, since currently that would be an error.

Also, if you think negative rotates should be supported, tests for those, too. If you think they should not be, then add raise SyntaxError if they are encountered. (Personally I am fine with either option.)

nmigen/hdl/ Outdated Show resolved Hide resolved
nmigen/test/ Outdated Show resolved Hide resolved
Copy link

@whitequark whitequark left a comment

Should be good after one more round of changes.

nmigen/hdl/ Outdated Show resolved Hide resolved
nmigen/hdl/ Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

Add rotate left/right by constant amount
2 participants