[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: gnet-drc2.scm



  User: sdb     
  Date: 06/01/04 09:36:25

  Modified:    .        gnet-drc2.scm gnet-systemc.scm gnet-vams.scm
                        gnet-verilog.scm gnet-vhdl.scm gnetlist.scm
  Log:
  Modified code to emit
  
  "unconnected_pin-<number>" to fix bug noticed by John Doty.
  
  Besides modifying s_net.c to achieve this, I had to change
  
  the strcmp fcn in many files to a strncmp fcn to compare only
  
  the first 15 chars against "unconnected_pin".  Added strncmp?
  
  to scheme/gnetlist.scm to do this for Scheme backends.
  
  
  
  
  
  
  Revision  Changes    Path
  1.8       +1 -1      eda/geda/devel/gnetlist/scheme/gnet-drc2.scm
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnet-drc2.scm
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnet-drc2.scm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- gnet-drc2.scm	11 Feb 2005 20:34:29 -0000	1.7
  +++ gnet-drc2.scm	4 Jan 2006 14:36:25 -0000	1.8
  @@ -793,7 +793,7 @@
   		      (connection (cdr pair))
   		      )
   		(begin
  -		  (if (string-ci=? connection "unconnected_pin")
  +		  (if (strncmp? connection "unconnected_pin" 15)
   		      (begin
   			(let* ((position (drc2:position-of-pintype 
   					  (gnetlist:get-attribute-by-pinnumber ref pin "pintype")))
  
  
  
  1.3       +2 -2      eda/geda/devel/gnetlist/scheme/gnet-systemc.scm
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnet-systemc.scm
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnet-systemc.scm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- gnet-systemc.scm	3 Feb 2005 12:49:36 -0000	1.2
  +++ gnet-systemc.scm	4 Jan 2006 14:36:25 -0000	1.3
  @@ -1,4 +1,4 @@
  -;;; $Id: gnet-systemc.scm,v 1.2 2005/02/03 12:49:36 danmc Exp $
  +;;; $Id: gnet-systemc.scm,v 1.3 2006/01/04 14:36:25 sdb Exp $
   ;;;
   ;;; gEDA - GNU Electronic Design Automation
   ;;; gnetlist - GNU Netlist
  @@ -634,7 +634,7 @@
    	    (begin
   	      (newline port)
    	      (for-each (lambda (pin)
  - 			  (if (not (string=? "unconnected_pin" (cdr pin)))
  + 			  (if (not  (strncmp? (cdr pin) "unconnected_pin" 15) )
   			      (begin 
    			        (display "    " port)(systemc:display-escaped-identifier package port) 
   				(systemc:display-pin pin positional port)
  
  
  
  1.9       +2 -2      eda/geda/devel/gnetlist/scheme/gnet-vams.scm
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnet-vams.scm
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnet-vams.scm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- gnet-vams.scm	3 Feb 2005 12:49:36 -0000	1.8
  +++ gnet-vams.scm	4 Jan 2006 14:36:25 -0000	1.9
  @@ -1,4 +1,4 @@
  -;;; $Id: gnet-vams.scm,v 1.8 2005/02/03 12:49:36 danmc Exp $
  +;;; $Id: gnet-vams.scm,v 1.9 2006/01/04 14:36:25 sdb Exp $
   ;;;
   ;;; gEDA - GNU Electronic Design Automation
   ;;; gnetlist - GNU Netlist
  @@ -763,7 +763,7 @@
       (begin
         (display (car pin) p)
         (display " => " p)
  -      (if (string=? "unconnected_pin" (cdr pin))
  +      (if (strncmp? (cdr pin) "unconnected_pin" 15)
   	  (display "OPEN" p)
   	  (display (vams:port-test pin) p)))))
   
  
  
  
  1.15      +5 -5      eda/geda/devel/gnetlist/scheme/gnet-verilog.scm
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnet-verilog.scm
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnet-verilog.scm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- gnet-verilog.scm	3 Feb 2005 12:49:36 -0000	1.14
  +++ gnet-verilog.scm	4 Jan 2006 14:36:25 -0000	1.15
  @@ -1,4 +1,4 @@
  -;;; $Id: gnet-verilog.scm,v 1.14 2005/02/03 12:49:36 danmc Exp $
  +;;; $Id: gnet-verilog.scm,v 1.15 2006/01/04 14:36:25 sdb Exp $
   ;;;
   ;;; gEDA - GNU Electronic Design Automation
   ;;; gnetlist - GNU Netlist
  @@ -180,10 +180,10 @@
   	      (display "/* WARNING: This is a generated file, edits */\n" p)
   	      (display "/*        made here will be lost next time  */\n" p)
   	      (display "/*        you run gnetlist!                 */\n" p)
  -	      (display "/* Id ..........$Id: gnet-verilog.scm,v 1.14 2005/02/03 12:49:36 danmc Exp $ */\n" p)
  +	      (display "/* Id ..........$Id: gnet-verilog.scm,v 1.15 2006/01/04 14:36:25 sdb Exp $ */\n" p)
   	      (display "/* Source.......$Source: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnet-verilog.scm,v $ */\n" p)
  -	      (display "/* Revision.....$Revision: 1.14 $ */\n" p)
  -	      (display "/* Author.......$Author: danmc $ */\n" p)
  +	      (display "/* Revision.....$Revision: 1.15 $ */\n" p)
  +	      (display "/* Author.......$Author: sdb $ */\n" p)
   	      (newline p)
   	      (verilog:write-module-declaration verilog:get-module-name
   						port-list p)
  @@ -575,7 +575,7 @@
    	    (begin
   	      (newline port)
    	      (for-each (lambda (pin)
  - 			  (if (not (string=? "unconnected_pin" (cdr pin)))
  + 			  (if (not (strncmp? "unconnected_pin" (cdr pin) 15))
   			      (begin
   				;; handle commas after the first pin
   				(if comma_pending 
  
  
  
  1.14      +2 -2      eda/geda/devel/gnetlist/scheme/gnet-vhdl.scm
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnet-vhdl.scm
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnet-vhdl.scm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- gnet-vhdl.scm	3 Feb 2005 12:49:36 -0000	1.13
  +++ gnet-vhdl.scm	4 Jan 2006 14:36:25 -0000	1.14
  @@ -1,4 +1,4 @@
  -;;; $Id: gnet-vhdl.scm,v 1.13 2005/02/03 12:49:36 danmc Exp $
  +;;; $Id: gnet-vhdl.scm,v 1.14 2006/01/04 14:36:25 sdb Exp $
   ;;;
   ;;; gEDA - GNU Electronic Design Automation
   ;;; gnetlist - GNU Netlist
  @@ -776,7 +776,7 @@
       (begin
         (display (car pin) p)
         (display " => " p)
  -      (if (string=? "unconnected_pin" (cdr pin))
  +      (if (strncmp? "unconnected_pin" (cdr pin) 15)
   	  (display "OPEN" p)
   	  (display (cdr pin) p)))))
   
  
  
  
  1.27      +21 -1     eda/geda/devel/gnetlist/scheme/gnetlist.scm
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnetlist.scm
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/scheme/gnetlist.scm,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- gnetlist.scm	28 Jan 2005 12:09:14 -0000	1.26
  +++ gnetlist.scm	4 Jan 2006 14:36:25 -0000	1.27
  @@ -1,4 +1,4 @@
  -;;; $Id: gnetlist.scm,v 1.26 2005/01/28 12:09:14 danmc Exp $
  +;;; $Id: gnetlist.scm,v 1.27 2006/01/04 14:36:25 sdb Exp $
   ;;;
   ;;; gEDA - GNU Electronic Design Automation
   ;;; gnetlist - GNU Netlist
  @@ -66,6 +66,26 @@
   
   ;; Support functions
   
  +;;  This fcn should behave exactly the same as C's strncmp fcn.
  +;;  It compares two strings from the start up to a user-defined end
  +;;  char count.  It also checks that the string compare was successful through
  +;;  the end char count (i.e. that both strings are >= "end").  This
  +;;  guards against returning #t when comparing "unconnected_pin-23" to "unc"
  +;;  (over 15 chars).
  +;;  I needed to write this because substring chokes when the string arg is
  +;;  shorter than the end arg.
  +;;  1.4.2006 -- SDB.
  +(define strncmp?
  +  (lambda (string1 string2 end)
  +    (and 
  +     (string-ci=? (substring string1 0 (min end (string-length string1)))
  +		  (substring string2 0 (min end (string-length string2))))
  +     (>= (min (string-length string1) (string-length string2)) end)
  +    )
  +  )
  +)
  +
  +
   ;; get all packages for a particular schematic page 
   ;; eventually placeholder will be either the hierarchical level or something 
   ;; of the sort