From b14a0b885a046efb311f0043cd8615ed5f493952 Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 14 Apr 2002 02:51:37 +0000 Subject: [PATCH] Fix bug removing pairs of ones in XOR. --- cprop.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cprop.cc b/cprop.cc index 811e0a80da..d3dd4cd97c 100644 --- a/cprop.cc +++ b/cprop.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: cprop.cc,v 1.32 2002/02/03 00:06:28 steve Exp $" +#ident "$Id: cprop.cc,v 1.33 2002/04/14 02:51:37 steve Exp $" #endif # include "config.h" @@ -631,6 +631,8 @@ void cprop_functor::lpm_logic(Design*des, NetLogic*obj) continue; } + /* Here we found two constant V1 + inputs. Unlink both. */ obj->pin(idx).unlink(); top -= 1; if (idx < top) { @@ -645,8 +647,11 @@ void cprop_functor::lpm_logic(Design*des, NetLogic*obj) obj->pin(top).unlink(); } + /* Reset ones counter and one index, + start looking for the next pair. */ assert(ones == 1); ones = 0; + one = 0; continue; } @@ -944,6 +949,9 @@ void cprop(Design*des) /* * $Log: cprop.cc,v $ + * Revision 1.33 2002/04/14 02:51:37 steve + * Fix bug removing pairs of ones in XOR. + * * Revision 1.32 2002/02/03 00:06:28 steve * Comments about xor evaluation. *