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

Can not operate "shiftR" on Int #63

Closed
Alaya-in-Matrix opened this issue Jun 22, 2015 · 1 comment
Closed

Can not operate "shiftR" on Int #63

Alaya-in-Matrix opened this issue Jun 22, 2015 · 1 comment

Comments

@Alaya-in-Matrix
Copy link

module Learn where 
import CLaSH.Prelude

div2 = (flip shiftR) 1

topEntity :: Int -> Int
-- topEntity :: Unsigned 8 -> Unsigned 8
topEntity = div2

I intended to use shiftR to replace div, but found that code use shiftR failed to generate verilog code. However, if I change topEntity::Int->Int to topEntity::Unsigned 8 -> Unsigned 8, everything goes well.

@christiaanb
Copy link
Member

Thanks for the report. Indeed, I forgot to add primitives for those functions as I almost never work with Int myself.

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