From 3af480ab2b43a9e0467a960e6c888c81976c9858 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 23 Jun 2009 16:14:47 +0200 Subject: [PATCH] Make mkConcSm support a = b style bindings. This is meant to provide support for assigning a dataconstructor to a signal (though it will also work for other signals). --- VHDL.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/VHDL.hs b/VHDL.hs index 90fc9dd..72b0a92 100644 --- a/VHDL.hs +++ b/VHDL.hs @@ -269,6 +269,12 @@ mkConcSm :: -- the type works out. mkConcSm (bndr, Cast expr ty) = mkConcSm (bndr, expr) +-- For simple a = b assignments, just generate an unconditional signal +-- assignment. This should only happen for dataconstructors without arguments. +-- TODO: Integrate this with the below code for application (essentially this +-- is an application without arguments) +mkConcSm (bndr, Var v) = return $ [mkUncondAssign (Left bndr) (varToVHDLExpr v)] + mkConcSm (bndr, app@(CoreSyn.App _ _))= do let (CoreSyn.Var f, args) = CoreSyn.collectArgs app let valargs' = filter isValArg args -- 2.30.2