Crossposted from geda-user... On Sunday 26 February 2006 22:48, Carlos Nieves Ãnega wrote: > El dom, 26-02-2006 a las 20:27 +0100, Holger Oehm escribiÃ: > > Hi, > > > > I just fiddled a bit around with the gnet-drc2.scm to get a more > > detailed error message. I succeeded to convince it to say > > ERROR: Pin(s) with pintype 'unknown': U105:14 U102:20 U101:24 > > are connected by net '+5V' to pin(s) with pintype 'unknown': U105:14 U102:20 U101:24 > > > > instead of: > > ERROR: Pin(s) with pintype 'unknown': U105:14 U102:20 U101:24 > > are connected to pin(s) with pintype 'unknown': U105:14 U102:20 U101:24 > > > > That is, I included the net name into the error message. > > The patch is rather trivial, should I submit it somewhere? > > > > Best, > > Holger. > > > Hi Holger, > just post it to the list (geda-dev is the right place) and I will commit > the changes into CVS. If you are not subscribed to the developers > mailing list, then post it to geda-user. > > Thanks for your work! > > Carlos > Hi Carlos, I am glad you appreciate it! I attached the patch (produced against release 20060123 in the geda-gnetlist/scheme directory with diff -U4 gnet-drc2.scm.orig gnet-drc2.scm > gnet-drc2.scm.patch). I didnt test it much, is there some test procedure I could do to verify it wont break anything? Best regards, Holger. -- /"\ Holger Oehm <holger.oehm@xxxxxxxxxxxxxx> \ / KeyID: B50E51A9, 1024bit at http://www.holger-oehm.de/public-key.asc X Fingerprint: E92A 5C2C 497A 44ED 23C0 DB66 1DD9 3EF7 B50E 51A9 / \ ASCII Ribbon Campaign against HTML email
--- gnet-drc2.scm.orig 2006-02-26 20:01:12.000000000 +0100
+++ gnet-drc2.scm 2006-02-26 20:16:14.000000000 +0100
@@ -639,9 +639,9 @@
;;
;; type1,type2: number of the position of the type in the vector.
;; connections: ((U100 1) (U101 1)), for example.
(define drc2:check-connection-of-two-pintypes
- (lambda (port type1 type2 connections)
+ (lambda (port type1 type2 connections netname)
(let* (( drc-matrix-value (drc2:get-drc-matrix-element type1 type2)))
(cond
((eqv? drc-matrix-value #\c) 1)
(else (if (and (not (eqv? drc-matrix-value #\e)) (not (eqv? drc-matrix-value #\w)))
@@ -666,9 +666,10 @@
(display (drc2:get-full-name-of-pintype-by-number type1) port)
(display "': " port)
(display (drc2:display-pins-of-type port type1
connections) port)
- (display "\n\tare connected to pin(s) with pintype '" port)
+ (display (string-append "\n\tare connected by net '" netname))
+ (display "' to pin(s) with pintype '" port)
(display (drc2:get-full-name-of-pintype-by-number type2) port)
(display "': " port)
(display (drc2:display-pins-of-type port type2
connections) port)
@@ -683,51 +684,51 @@
;; connections: ((U100 1) (U101 1)), for example.
;; pintype-count: vector with the number of pins connected to a single net, by pintype.
;; (1 2 3 4 ... 10), for example.
(define drc2:check-pintypes-of-single-net
- (lambda (port connections pintypes pintype-count type1 type2)
+ (lambda (port connections pintypes pintype-count type1 type2 netname)
(define type1-count (list-ref pintype-count type1))
(define type2-count (list-ref pintype-count type2))
(define next-type1
- (lambda (port connections pintypes pintype-count type1 type2)
+ (lambda (port connections pintypes pintype-count type1 type2 netname)
(if (< type1 (- (length pintype-names) 2))
(drc2:check-pintypes-of-single-net port connections pintypes pintype-count
- (+ type1 1) (+ type1 1))
+ (+ type1 1) (+ type1 1) netname)
)
))
(define next-type2
- (lambda (port connections pintypes pintype-count type1 type2)
+ (lambda (port connections pintypes pintype-count type1 type2 netname)
(if (< type2 (- (length pintype-names) 2))
(drc2:check-pintypes-of-single-net port connections pintypes pintype-count
- type1 (+ type2 1))
- (next-type1 port connections pintypes pintype-count type1 type1)
+ type1 (+ type2 1) netname)
+ (next-type1 port connections pintypes pintype-count type1 type1 netname)
)))
; Check type1 with type1 first
(if (= type1-count 0)
; if no pins of type1 connected, then continue with (+ type1 1)
(begin
- (next-type1 port connections pintypes pintype-count type1 type2))
+ (next-type1 port connections pintypes pintype-count type1 type2 netname))
(if (= type1 type2)
(if (> type1-count 1)
(begin
- (drc2:check-connection-of-two-pintypes port type1 type1 connections)
- (next-type2 port connections pintypes pintype-count type1 type2)
+ (drc2:check-connection-of-two-pintypes port type1 type1 connections netname)
+ (next-type2 port connections pintypes pintype-count type1 type2 netname)
)
- (next-type2 port connections pintypes pintype-count type1 type2))
+ (next-type2 port connections pintypes pintype-count type1 type2 netname))
(begin
(if (= type2-count 0)
; if no pins of type2 connected, then continue with (+ type2 1)
- (next-type2 port connections pintypes pintype-count type1 type2)
+ (next-type2 port connections pintypes pintype-count type1 type2 netname)
)
(if (and (> type1-count 0) (> type2-count 0))
(begin
; Check connections between type1 and type2.
- (drc2:check-connection-of-two-pintypes port type1 type2 connections)
+ (drc2:check-connection-of-two-pintypes port type1 type2 connections netname)
; and continue with the next type2 if within the limits
- (next-type2 port connections pintypes pintype-count type1 type2)
+ (next-type2 port connections pintypes pintype-count type1 type2 netname)
))
)
))))
@@ -760,9 +761,9 @@
connections
'()))
(pintype-count (drc2:count-pintypes-of-net pintypes port))
)
- (drc2:check-pintypes-of-single-net port connections pintypes pintype-count 0 0)
+ (drc2:check-pintypes-of-single-net port connections pintypes pintype-count 0 0 netname)
(if (not (defined? 'dont-check-not-driven-nets))
(begin
(if (not (string-ci=? netname "NoConnection"))
(if (eqv? (drc2:check-if-net-is-driven pintype-count 0) #f)
Attachment:
pgpESKvJFiLIN.pgp
Description: PGP signature