X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Translator.hs;h=b18a86fd1cd939b6850a246a45f7feec49c2a651;hb=9741b1a94f02482abdcf4de11cf0d3090012b299;hp=1b2d24bf13aac610423c22983bd18373519c36ff;hpb=43f37e2590806f2f1019018dfc7274a428ece743;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git 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 =