Make application names unique.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 16 Feb 2009 12:05:18 +0000 (13:05 +0100)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 16 Feb 2009 12:05:18 +0000 (13:05 +0100)
VHDL.hs

diff --git a/VHDL.hs b/VHDL.hs
index 38a3bd6f185fad3267a4050b7cfc8b77902aec2e..9c130d4b93cdf4db6ec1c55f2353ba2a5f60ff0d 100644 (file)
--- a/VHDL.hs
+++ b/VHDL.hs
@@ -140,9 +140,9 @@ mkCompInsSm app = do
         (error $ "Using function '" ++ (prettyShow hsfunc) ++ "' without entity declaration? This should not happen!")
         (funcEntity fdata)
   let entity_id = ent_id entity
-  return $ AST.CompInsSm label (AST.IUEntity (AST.NSimple entity_id)) (AST.PMapAspect portmaps)
+  label <- uniqueName (AST.fromVHDLId entity_id)
+  return $ AST.CompInsSm (mkVHDLId label) (AST.IUEntity (AST.NSimple entity_id)) (AST.PMapAspect portmaps)
   where
-    label     = mkVHDLId "app"
     portmaps  = []
 
 -- | Extracts the generated entity id from the given funcdata