discuss-gnu-electric
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: busses on icons (simulation): patch


From: Tuukka Toivonen
Subject: Re: busses on icons (simulation): patch
Date: Thu, 14 Jun 2001 23:41:25 +0300 (EEST)

On Thu, 14 Jun 2001, Tuukka Toivonen wrote:

> says:
>   Converting layout in facet tmp{sch}, writing VHDL to facet tmp{vhdl}
>   ERROR on line 10, Instance has different number of ports that component:
>   node3: A_NOR8 port map(inp_0_7_, outNV); 

After a long debugging session I was able to produce a patch that fixes
this problem. It works now, but it is likely that the patch breaks
something else. Anyhow, it works for me but I'd be honored if Steven or
somebody else would comment the patch: what it breaks, how could it be
improved. Or if I just have missed something and this wasn't a bug in
Electric at all in the first place, I'd like to hear what did I wrong.

(by the way: that book Electric Internals Manual interests me, but 
it seems a bit pricey for a book. Anyone who has bought it and could
comment? How many pages it has?)

Patch follows:

--- src/vhdl/vhdl.c.orig2       Thu Jun 14 21:19:27 2001
+++ src/vhdl/vhdl.c     Thu Jun 14 23:27:38 2001
@@ -1544,7 +1544,22 @@
                                        }
 
                                        net = ai->network;
-                                       if (net->namecount > 0) 
vhdl_addstring(net->netname); else
+                                       if (net->namecount > 0)
+                                       {
+                                               char **strings; /* 
********************* */
+                                               int i;
+                                               char before[10];
+                                               int count = 
net_evalbusname(APBUS, net->netname, &strings, NOARCINST, net->parent, 0);
+                                               strcpy(before, "");
+                                               for(i=0; i<count; i++)
+                                               {
+                                                       
(void)addstringtoinfstr(before);
+                                                       (void)strcpy(before, ", 
");
+                                                       
vhdl_addstring(strings[i]);
+                                                       /* didsome++; */
+                                               }
+                                               /* 
vhdl_addstring(net->netname);  */
+                                       } else
                                                
(void)addstringtoinfstr(describenetwork(net));
                                        continue;
                                }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]