From: Matthijs Kooijman Date: Wed, 4 Mar 2009 10:35:08 +0000 (+0100) Subject: Map the clk port on stateful function applications. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=57a2771de1d155d9c382614531f88882ed74325b;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Map the clk port on stateful function applications. --- diff --git a/VHDL.hs b/VHDL.hs index 80b069b..b448672 100644 --- a/VHDL.hs +++ b/VHDL.hs @@ -203,7 +203,9 @@ mkConcSm sigs (FApp hsfunc args res) = do (funcEntity fdata) let entity_id = ent_id entity label <- uniqueName (AST.fromVHDLId entity_id) - let portmaps = mkAssocElems sigs args res entity + -- Add a clk port if we have state + let clk_port = Maybe.fromJust $ mkAssocElem (Just $ mkVHDLId "clk") "clk" + let portmaps = mkAssocElems sigs args res entity ++ (if hasState hsfunc then [clk_port] else []) return $ AST.CSISm $ AST.CompInsSm (mkVHDLId label) (AST.IUEntity (AST.NSimple entity_id)) (AST.PMapAspect portmaps) mkConcSm sigs (UncondDef src dst) = do