[qflow] 08/16: Corrected missing tagging of flop and latch output with an appropriate flag; otherwise, clock source searches don't stop at flop outputs and can get into infinite loops.

Ruben Undheim rubund-guest at moszumanska.debian.org
Thu Jul 23 08:22:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to tag upstream/1.1.7
in repository qflow.

commit 6427ddc523601fa6981a27dfd33d56d658602265
Author: Tim Edwards <tim at opencircuitdesign.com>
Date:   Tue Jun 2 11:51:08 2015 -0400

    Corrected missing tagging of flop and latch output with an appropriate
    flag;  otherwise, clock source searches don't stop at flop outputs and
    can get into infinite loops.
---
 src/vesta.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/vesta.c b/src/vesta.c
index f4dbb81..bac0c7f 100644
--- a/src/vesta.c
+++ b/src/vesta.c
@@ -96,6 +96,7 @@ int fileCurrentLine;
 #define DFFRST		0x40	// Flop reset (clear)
 #define LATCHIN		0x80	// Latch input
 #define LATCHEN		0x100	// Latch enable
+#define LATCHOUT	0x200	// Latch output
 
 // Timing type (for tables)
 
@@ -939,6 +940,7 @@ find_clock_source(connptr testlink, btptr *clocklist, short dir)
 
     if (iupstream == NULL) return;		/* Not supposed to happen? */
     if (driver->refpin->type & DFFOUT) return;	/* Reached a flop output */
+    if (driver->refpin->type & LATCHOUT) return; /* Reached a latch output */
 
     for (iinput = iupstream->in_connects; iinput; iinput = iinput->next) {
 	newdir = calc_dir(iinput->refpin, dir);
@@ -2130,8 +2132,12 @@ libertyRead(FILE *flib, lutable **tablelist, cell **celllist)
 			newcell->function = strdup(token);
 		    }
 		    token = advancetoken(flib, 0);
-		    if (strcmp(token, ";"))
-			fprintf(stderr, "Expected end-of-statement.\n");
+		    if (strcmp(token, ";")) {
+		        if (!strcmp(token, "}"))
+			    section = CELLDEF;		// End of pin def
+			else
+			    fprintf(stderr, "Expected end-of-statement.\n");
+		    }
 		}
 		else if (!strcasecmp(token, "direction")) {
 		    token = advancetoken(flib, 0);	// Colon
@@ -2141,6 +2147,8 @@ libertyRead(FILE *flib, lutable **tablelist, cell **celllist)
 		    }
 		    else if (!strcasecmp(token, "output")) {
 			newpin->type |= OUTPUT;
+			if (newcell->type & DFF) newpin->type |= DFFOUT;
+		        if (newcell->type & LATCH) newpin->type |= LATCHOUT;
 		    }
 		}
 		else if (!strcasecmp(token, "max_transition")) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/qflow.git



More information about the debian-science-commits mailing list