Don't generate input ports for State arguments.
[matthijs/master-project/cλash.git] / cλash / CLasH / VHDL / Generate.hs
index 4de6b400172bf15bdcb439b6a2df9b66cb6b04cc..e71e0d91fbd028cca6dc5e0a6512023a28f527d3 100644 (file)
@@ -46,7 +46,8 @@ getEntity fname = Utils.makeCached fname tsEntities $ do
       expr <- Normalize.getNormalized fname
       -- Strip off lambda's, these will be arguments
       let (args, letexpr) = CoreSyn.collectBinders expr
-      args' <- mapM mkMap args
+      -- Generate ports for all non-state types
+      args' <- mapM mkMap (filter (not.hasStateType) args)
       -- There must be a let at top level 
       let (CoreSyn.Let binds (CoreSyn.Var res)) = letexpr
       res' <- mkMap res