From: Matthijs Kooijman Date: Thu, 22 Jan 2009 16:37:14 +0000 (+0100) Subject: Make getPortMapEntry accept a PortNameMap. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;ds=sidebyside;h=9741b1a94f02482abdcf4de11cf0d3090012b299;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Make getPortMapEntry accept a PortNameMap. --- diff --git a/Translator.hs b/Translator.hs index 1b2d24b..b18a86f 100644 --- a/Translator.hs +++ b/Translator.hs @@ -82,7 +82,7 @@ findBind lookfor = -- Accepts a port name and an argument to map to it. -- Returns the appropriate line for in the port map -getPortMapEntry binds portname (Var id) = +getPortMapEntry binds (Port portname) (Var id) = (Just (AST.unsafeVHDLBasicId portname)) AST.:=>: (AST.ADName (AST.NSimple (AST.unsafeVHDLBasicId signalname))) where Port signalname = Maybe.fromMaybe @@ -148,7 +148,7 @@ getInstantiations sess args outs binds app@(App expr arg) = (lookup compname (funcs sess)) HWFunction inports outports = hwfunc ports = - zipWith (getPortMapEntry binds) ["portin0", "portin1"] fargs + zipWith (getPortMapEntry binds) [Port "portin0", Port "portin1"] fargs ++ mapOutputPorts outports outs getInstantiations sess args outs binds expr =