-
Notifications
You must be signed in to change notification settings - Fork 155
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
unpack no longer warns #2397
base: master
Are you sure you want to change the base?
unpack no longer warns #2397
Conversation
4f99788
to
06b8b75
Compare
The blackbox for |
Please run the full test suite. I couldn't get tests to run. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely convinced this would pass CI, even after fixing the wrong-name issue it encounters now (see comment). Feel free to use the GitLab runners to run the tests. To safe some resources you could temporarily comment:
Lines 38 to 57 in 3819cba
tests-8.6: | |
extends: .common-trigger | |
variables: | |
GHC_VERSION: 8.6.5 | |
MULTIPLE_HIDDEN: "no" | |
tests-8.8: | |
extends: .common-trigger | |
variables: | |
GHC_VERSION: 8.8.4 | |
tests-8.10: | |
extends: .common-trigger | |
variables: | |
GHC_VERSION: 8.10.7 | |
tests-9.0: | |
extends: .common-trigger | |
variables: | |
GHC_VERSION: 9.0.2 |
, $(lift (pack w64)) | ||
, $(lift (pack cu)) | ||
) | ||
, ( $(bLit "0000000000000000000000000000000000000000000000000000000110100101") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
, ( $(bLit "0000000000000000000000000000000000000000000000000000000110100101") | |
, ( 0b0000000000000000000000000000000000000000000000000000000110100101 |
Shouldn't this just work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd have to do annotate each one with its size: 0b.... :: BitVector n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping type inference would take care of that as they're mentioned in Right nvm, it is all topEntity
.pack
ed.
| [DC _ [Left arg]] <- args | ||
, eval <- Evaluator ghcStep ghcUnwind ghcPrimStep ghcPrimUnwind | ||
#if MIN_VERSION_base(4,16,0) | ||
, mach2@Machine{mStack=[],mTerm=Literal (Int8Literal i)} <- whnf eval tcm True (setTerm arg $ stackClear mach) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
, mach2@Machine{mStack=[],mTerm=Literal (Int8Literal i)} <- whnf eval tcm True (setTerm arg $ stackClear mach) | |
, mach2@Machine{mStack=[],mTerm=Literal (Int8Literal i)} <- | |
whnf eval tcm True (setTerm arg $ stackClear mach) |
Keeps the line limit sensible
type: 'packInt16# :: Int16 | ||
-> Bitvector 16' | ||
template: ~ARG[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I doubt this is true for VHDL. Aren't Int
s typed as signed
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also under the impression int is signed and word is unsigned in netlist / HDL
@rowanG077 Do you intend on finishing this PR? :) |
@martijnbastiaan A yeah. I definitely want to finish this. It totally slipped my mind. |
FIXED: Clash no longer gives
Dubious primitive instantiation warning
when usingunpack
#2386.unpack
will never go throughfromIntegral
during synthesis.Fixes: #2386
Still TODO: