From 33c032737b6c84ff5075567d90f4dd2d830dafd6 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 22 Jan 2009 17:40:04 +0100 Subject: [PATCH] Lookup input port names for instantiations in the session. This replaces the previously hardcoded portnames. --- Translator.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Translator.hs b/Translator.hs index b18a86f..f16f40f 100644 --- a/Translator.hs +++ b/Translator.hs @@ -146,10 +146,10 @@ getInstantiations sess args outs binds app@(App expr arg) = hwfunc = Maybe.fromMaybe (error $ "Function " ++ compname ++ "is unknown") (lookup compname (funcs sess)) - HWFunction inports outports = hwfunc + HWFunction (Args inports) outport = hwfunc ports = - zipWith (getPortMapEntry binds) [Port "portin0", Port "portin1"] fargs - ++ mapOutputPorts outports outs + zipWith (getPortMapEntry binds) inports fargs + ++ mapOutputPorts outport outs getInstantiations sess args outs binds expr = error $ "Unsupported expression" ++ (showSDoc $ ppr $ expr) -- 2.30.2