import Language.Haskell.Syntax
import Types
import Data.Param.TFVec
+import Data.RangedWord
mainIO f = Sim.simulateIO (Sim.stateless f) ()
in
\c d -> op' d c
-functiontest :: TFVec D4 Bit -> Bit
-functiontest = \v -> let r = head v in r
+functiontest :: TFVec D4 Bit -> RangedWord D3 -> Bit
+functiontest = \v i -> let r = v!i in r
highordtest2 = \a b ->
case a of
genUnconsVectorFuns elemTM vectorTM =
[ AST.SubProgBody exSpec [] [exExpr]
, AST.SubProgBody replaceSpec [AST.SPVD replaceVar] [replaceExpr,replaceRet]
- , AST.SubProgBody headSpec [] [headExpr]
- , AST.SubProgBody lastSpec [] [lastExpr]
- , AST.SubProgBody initSpec [AST.SPVD initVar] [initExpr, initRet]
- , AST.SubProgBody tailSpec [AST.SPVD tailVar] [tailExpr, tailRet]
- , AST.SubProgBody takeSpec [AST.SPVD takeVar] [takeExpr, takeRet]
- , AST.SubProgBody dropSpec [AST.SPVD dropVar] [dropExpr, dropRet]
+ , AST.SubProgBody headSpec [] [headExpr]
+ , AST.SubProgBody lastSpec [] [lastExpr]
+ , AST.SubProgBody initSpec [AST.SPVD initVar] [initExpr, initRet]
+ , AST.SubProgBody tailSpec [AST.SPVD tailVar] [tailExpr, tailRet]
+ , AST.SubProgBody takeSpec [AST.SPVD takeVar] [takeExpr, takeRet]
+ , AST.SubProgBody dropSpec [AST.SPVD dropVar] [dropExpr, dropRet]
]
where
ixPar = AST.unsafeVHDLBasicId "ix"
globalNameTable :: NameTable
globalNameTable = mkGlobalNameTable
- [ (show ('(V.!)) , (2, genExprFCall2L exId ) )
- , ("head" , (1, genExprFCall1L headId ) )
+ [ ("!" , (2, genExprFCall2L exId ) )
+ , ("head" , (1, genExprFCall1L headId ) )
]
\ No newline at end of file