Bug in VHDL generation (6.08) with candidate patch
[email protected] Thu, 17 Jul 2003 16:14:34 +0100 (BST)
| Newsgroups | gmane.comp.cad.electric.bugs |
|---|---|
| Message-ID | <[email protected]> |
Electric 6.08 generates incorrect VHDL for XNOR2. I later discovered that the CMOS library doesn't have a pattern for XNOR, so this is probably something of a non-issue to most people. But I attach a patch for this anyway... Cheers, /.J _______________________________________________ Bug-gnu-electric mailing list [email protected] http://mail.gnu.org/mailman/listinfo/bug-gnu-electric
electric-6.08-xnor.patch
(text/plain, 772 B)
diff -r -u electric-6.08.orig/src/vhdl/vhdl.c electric-6.08/src/vhdl/vhdl.c
--- electric-6.08.orig/src/vhdl/vhdl.c 2003-05-22 19:35:47.000000000 +0100
+++ electric-6.08/src/vhdl/vhdl.c 2003-06-20 21:58:13.000000000 +0100
@@ -1185,7 +1185,7 @@
}
if (special == BLOCKXNOR)
{
- i = eatoi(&pt[3]);
+ i = eatoi(&pt[4]);
if (i <= MAXINPUTS) gotxnor[i]++; else
ttyputerr(x_("Cannot handle %ld-input XNOR, limit is %d"), i, MAXINPUTS);
continue;
@@ -1883,7 +1883,7 @@
for(ptr = str; *ptr != 0; ptr++) if (*ptr == '/') break;
if (*ptr == '/') (void)esnprintf(pt, 30, &ptr[1], inport); else
(void)esnprintf(pt, 30, str, inport);
- *special = BLOCKNOR;
+ *special = BLOCKXNOR;
ai->temp1 = 0;
} else
{