You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So in Lambda16 I have a Fetched type, which is an instruction as well as some context (the PC it came from and the PC the predictor thought was coming up next). I figured that for some extra static safety, I could tag these Fetched values with a phantom type indicating the CPU stage they came from. E.g. an instruction + context emitted from the eXecute stage has type Fetched X, while one from Decode has type Fetched D.
The error
<no location info>:
CLaSH Error:
CLaSH.Netlist(169): Not in normal form: RHS of case-projection is not a variable: case subjLet_2532294 of GHC.Types.False -> CPU.Ops.Nop
started showing up in commit 36ff605. As you can see, I just added the type tags and wrote a function, pass, which "promotes" a Fetched value from one stage to the next.
Note that compiling to Haskell and running it works fine; it's just netlist generation that messes up.
The fix is included as part of (the just released) version 0.6.3 of the compiler. I really really hope this was the last bug in the DEC transformation.
Got a good one for you!
So in Lambda16 I have a
Fetched
type, which is an instruction as well as some context (the PC it came from and the PC the predictor thought was coming up next). I figured that for some extra static safety, I could tag theseFetched
values with a phantom type indicating the CPU stage they came from. E.g. an instruction + context emitted from the eXecute stage has typeFetched X
, while one from Decode has typeFetched D
.The error
started showing up in commit 36ff605. As you can see, I just added the type tags and wrote a function,
pass
, which "promotes" aFetched
value from one stage to the next.Note that compiling to Haskell and running it works fine; it's just netlist generation that messes up.
I suspect it has something to do with all the magic I'm using in https://github.com/wyager/Lambda16/blob/36ff60536ab3ad5ed300fe41f67966575f6584c9/CPU/Safety/Stages.hs
--Will
The text was updated successfully, but these errors were encountered: