Bit Vector of Unknown Size Error in Generated Bluespec Code #648
Replies: 2 comments 1 reply
-
|
The relevant code that it is complaining about is: isequal_2_arg0 :: Prelude.Bool;
isequal_2_arg0 =
(Prelude.==)
(4::(Prelude.Int 16))
(select
(update newVector 0 (4::(Prelude.Int 16)))
(0::(Prelude.UInt 32))); };This calls Two possible ways of fixing this that come to mind:
The Bluespec Reference Guide notes that |
Beta Was this translation helpful? Give feedback.
-
|
I see that this was closed, but I think there is still an unresolved bug in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I created a Copilot (Haskell) specification that, when compiled into bluespec, produces code that BSC cannot compile correctly.
Specifically, I created the following haskell file, which compares the first element of an array of 1 with a constant value of 4 to just a single constant value of 4.
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} module Main (main) where import GHC.Generics (Generic) import Copilot.Compile.Bluespec import Language.Copilot import Prelude hiding ((++), (==), (!)) -- Testing Equivalence -- array == vector in bluespec -- have to wrap it in a constant because we want one value arr :: Stream (Array 1 Int16) arr = constant (array [4::Int16]) single :: Stream Int16 single = constant (4::Int16) --extract the first element of your array arrfirst :: Stream Int16 arrfirst = arr ! 0 isequal :: Stream Bool isequal = single == arrfirst spec :: Spec spec = do trigger "single" (true) [arg single] trigger "vector" (true) [arg arr] trigger "isequal" (true) [arg isequal] main :: IO () main = do spec' <- reify spec compile "TestOne" spec'Compiling this into bluespec completes without errors but, when I compile the resulting bluespec, I get issues from the generated bluespec code stating:
Below is my top bluespec module, which should just display the (numeric) values of
singleandarr, and the Boolean value ofisequalat any point in time:TestOne.bs Generated Bluespec File
TestOneIfc.bs Generated Bluespec File
Beta Was this translation helpful? Give feedback.
All reactions