Re: gEDA-user: gschem sym files

2010-10-04 Thread Armin Faltl



Karl Hammar wrote:

+1 for nc since ICs have pins that are labeled that way.  Would the DRC just
ignore it, or would the DRC complain if it was connected to anything?


+1

...
Since nc is just a piece of copper attached to the (plastic/ceramic) 
package, why should drc complain?


A nc pin would be like pas, but gives no error if unconnected.
  

The documentation of the Renesas TinyH8 states:
... Do not connect anything to the nc-pins. They might be used as test 
pins under

certain conditions or used for damping purposes, which you don't know.

I would also like to see a pwr_src pin type which would be the output of the
voltage regulator (or source).  That way the DRC would warn you if you
shorted two power sources together or if you forgot to hook one of your
power input pins to the power plane (and only connected it to a capacitor
instead).



+1
  

+1


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-10-04 Thread Andrew Miner
 Since nc is just a piece of copper attached to the (plastic/ceramic) 
 package, why should drc complain?

 A nc pin would be like pas, but gives no error if unconnected.
   
The documentation of the Renesas TinyH8 states:
... Do not connect anything to the nc-pins. They might be used as test 
pins under certain conditions or used for damping purposes, which you don't
,know.

This would imply that a 'nc' should prohibit any connections to it
whatsoever, so there is no chance of a connection, and that another type:
'don't care' or 'ignore' or 'unknown' or 'x' should be made that will not
give an error if unconnected, but will also not give an error IF connected.

 I would also like to see a pwr_src pin type which would be the output of
 the voltage regulator (or source).  That way the DRC would warn you if
 you shorted two power sources together or if you forgot to hook one of
 your power input pins to the power plane (and only connected it to a
 capacitor instead).
 +1
+1
Very useful. 


Andrew Miner




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-10-04 Thread Rick Collins
I have seen this handled in other CAD packages not by making the pin 
an NC in the symbol, but by having a feature in the schematic where 
the pin can be No Connected so that it is not flagged as an error 
if it has no wire.


Or course, it makes some sense to have a special type of NC in a 
symbol if the data sheet says to not connect it.  I have seen 
those.  They often don't even tell you why.  I think typically it is 
a factory use pin and they don't want any noise pickup.  Grounding it 
would upset the operation of the chip so it just needs to float with 
as little copper as feasible.  So either you should not be able to 
connect a wire to it (just make it a graphic pin and not a real pin) 
or flag an error if a connection is made.


Rick


At 12:24 PM 10/4/2010, you wrote:

 Since nc is just a piece of copper attached to the (plastic/ceramic)
 package, why should drc complain?

 A nc pin would be like pas, but gives no error if unconnected.

The documentation of the Renesas TinyH8 states:
... Do not connect anything to the nc-pins. They might be used as test
pins under certain conditions or used for damping purposes, which you don't
,know.

This would imply that a 'nc' should prohibit any connections to it
whatsoever, so there is no chance of a connection, and that another type:
'don't care' or 'ignore' or 'unknown' or 'x' should be made that will not
give an error if unconnected, but will also not give an error IF connected.

 I would also like to see a pwr_src pin type which would be the output of
 the voltage regulator (or source).  That way the DRC would warn you if
 you shorted two power sources together or if you forgot to hook one of
 your power input pins to the power plane (and only connected it to a
 capacitor instead).
 +1
+1
Very useful.


Andrew Miner




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-10-01 Thread Carlos Nieves Ónega
El mar, 28-09-2010 a las 15:36 +0200, Karl Hammar escribió:
 Karl:
 1b, identify the correct meaning of pintype values as used today
  
  Since drc2 is the only user of the pintype value, I looked into it.
 ...
  Note A,
   since drc-matrix is symmetric (connection a - b is the
   same as connection b - a) and it is not directly referenced by 
   anything else than get-drc-matrixelement, I suggest we do it lower 
   triangular and let get-drc-matrix-element swap row/column if
   row  column. As a side effect the drc2:is_simetric-drc-matrix
   check could be elimated.
 ...
 
 Patch attached.
 

Patch applied in git head. I also modified the instructions at the
beginning of the file (lines 135-162) in order to keep the documentation
up to date.

There is a drc2 test bench at gnetlist/tests/drc2, which can be run with
the command make tests executed at that directory.

If you plan to modify this backend, it would be better if you add more
tests to this test bench to cover any new/modified functionality.

Thanks,

Carlos



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-29 Thread Karl Hammar
John Doty:
 On Sep 28, 2010, at 12:39 PM, Karl Hammar wrote:
  In gnet-drc2.scm:
  ;; Example:
  ;; (define dont-check-non-numbered-parts 1)
...
  and there is also descriptions how to alter what is allowed to
  connect to what in the file. The problem seems to get that inside
  
  gnetlist -g drc2 ... 
  
  unless you edit the /usr/share/gEDA/scheme/gnet-drc2.scm (or similar) 
  file.
 You can put the definitions you need into a file in your project,
 and load it with the -l flag to gnetlist. See the gnetlist man page.

Great, thank you for the pointer!

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-29 Thread Karl Hammar
Kai-Martin Knaak:
 Karl Hammar wrote:
  5, add a tutorial on how to adapt the DRC rules to the local needs
 Well documented examples would take me a long way.

Ok, I'll use http://turkos/git/openhw/wascator_c240/styrkort.sch as an
example.

*

   How to tell drc2 which tests to skip:

$ gnetlist -g drc2 -o log styrkort.sch  /dev/null 21 
$ gnetlist -g drc2 -o log2 -c '(define dont-check-unconnected-pins 1)' 
styrkort.sch  /dev/null 21 
$ diff log log2
26,42d25
 Checking unconnected pins...
 ERROR: Unconnected pin U2:11
 ERROR: Unconnected pin U2:12
 ERROR: Unconnected pin U2:13
 ERROR: Unconnected pin U2:14
 ERROR: Unconnected pin U1:28
 ERROR: Unconnected pin U1:19
 ERROR: Unconnected pin U1:20
 ERROR: Unconnected pin U1:22
 ERROR: Unconnected pin Q8:22
 ERROR: Unconnected pin Q8:12
 ERROR: Unconnected pin Q7:22
 ERROR: Unconnected pin Q7:12
 ERROR: Unconnected pin Q6:22
 ERROR: Unconnected pin Q6:12
 ERROR: Unconnected pin Q5:22
 
50c33
 Found 16 errors.
---
 Found 1 errors.
$ echo '(define dont-check-unconnected-pins 1)'  init.scm 
$ gnetlist -g drc2 -o log3 -l init.scm styrkort.sch  /dev/null 21
$ diff log2 log3
$

On the global (i.e. for the whole gschem file) level, one can tell drc2
which test to skip, either via an init file (-l option to gnetlist) or 
directly as an string on the command line (-c option).

*

  Can you give exaples of local needs?
 Some people like consider any not connected pin an error,

Use default.

**

 others would only expect a warning.

  Provide your own drc-matrix (see last example) with #\w in the
  unconnected column and line.

$ cat init3.scm
; DRC matrix
;
; #\e: error#\w: warning   #\c: correct
(if (not (defined? 'drc-matrix))
(define drc-matrix (list
;  Order is important !
; unknown inout   ioocoepas   tptri   clk   pwr 
unconnected
;unknown
  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c 
  #\w )
;in
  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c 
  #\w )
;out
  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\c   #\e 
  #\w )
;io
  '(#\c   #\c   #\w   #\c   #\w   #\w   #\c   #\w   #\c   #\c   #\w 
  #\w )
;oc
  '(#\c   #\c   #\e   #\w   #\e   #\c   #\c   #\e   #\c   #\c   #\e 
  #\w )
;oe
  '(#\c   #\c   #\e   #\w   #\c   #\e   #\c   #\e   #\c   #\c   #\e 
  #\w )
;pas
  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c 
  #\w )
;tp
  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\c   #\e 
  #\w )
;tri
  '(#\c   #\c   #\e   #\c   #\c   #\c   #\c   #\e   #\c   #\c   #\e 
  #\w )
;clk
  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\e 
  #\w )
;pwr
  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\e   #\c 
  #\w )
;unconnected
  '(#\w   #\w   #\w   #\w   #\w   #\w   #\w   #\w   #\w   #\w   #\w 
  #\w )
)))
$ gnetlist -g drc2 -o log5 -l init3.scm styrkort.sch  /dev/null 21
$ diff log log5
27,41c27,41
 ERROR: Unconnected pin U2:11
 ERROR: Unconnected pin U2:12
 ERROR: Unconnected pin U2:13
 ERROR: Unconnected pin U2:14
 ERROR: Unconnected pin U1:28
 ERROR: Unconnected pin U1:19
 ERROR: Unconnected pin U1:20
 ERROR: Unconnected pin U1:22
 ERROR: Unconnected pin Q8:22
 ERROR: Unconnected pin Q8:12
 ERROR: Unconnected pin Q7:22
 ERROR: Unconnected pin Q7:12
 ERROR: Unconnected pin Q6:22
 ERROR: Unconnected pin Q6:12
 ERROR: Unconnected pin Q5:22
---
 WARNING: Unconnected pin U2:11
 WARNING: Unconnected pin U2:12
 WARNING: Unconnected pin U2:13
 WARNING: Unconnected pin U2:14
 WARNING: Unconnected pin U1:28
 WARNING: Unconnected pin U1:19
 WARNING: Unconnected pin U1:20
 WARNING: Unconnected pin U1:22
 WARNING: Unconnected pin Q8:22
 WARNING: Unconnected pin Q8:12
 WARNING: Unconnected pin Q7:22
 WARNING: Unconnected pin Q7:12
 WARNING: Unconnected pin Q6:22
 WARNING: Unconnected pin Q6:12
 WARNING: Unconnected pin Q5:22
49,50c49,50
 Found 4 warnings.
 Found 16 errors.
---
 Found 19 warnings.
 Found 1 errors.
$

**

 Some might find not connected pins completely acceptable and
 consequently find errors and warnings annoying.

Use:
 gnetlist -g drc2 -o log file -c '(define dont-check-unconnected-pins 1)' 
sch file

**

 Digital enthusiasts may add special pin types for different signal
 levels.

Like ECL, TTL, 3.3V, 5V etc.
That is a big TODO.

**

 Analog designers might find it perfectly acceptable to connect pwr
 to in pins.

  drc2 already accepts that, but consider the pwr - io instead
  as an exercise.

  To change warning level for a connection you have to modify/supply
  your version of the drc-matrix. The defaul drc-matrix is defined in
  gnet-drc2.scm. To find that file and get a templete to edit, do

$ locate gnet-drc2.scm
/usr/share/gEDA/scheme/gnet-drc2.scm
$ grep '^; DRC matrix' -A31  /usr/share/gEDA/scheme/gnet-drc2.scm  init.scm
$ cat 

Re: gEDA-user: gschem sym files

2010-09-29 Thread Karl Hammar
Kai-Martin Knaak:
 Karl Hammar wrote:
  4, add explicit documentation on the rules in the wiki
  I'm not the wiki man. I could read the code (I assume you mean drc2)
  and try to describe it in text, but someone else has to enter it 
  into the wiki.
 Ok, if you describe the rules here on the list, I'd volunteer to infuse 
 it at an appropriate place in the wiki. 
...

  The drc2 code resides in gnet-drc2.scm.

  It is probably installed in /usr/share/gEDA/scheme/gnet-drc2.scm or
  a similar place. In the git repository it in the file
  ./gnetlist/scheme/gnet-drc2.scm (relative where you put it when you
  did git clone).

  Line 61 to 159 of that file contains the usage documentation for
  drc2, so my writings below is just my comments upon that.

*** Parameter ***

  You can supply a parameter to drc2: ignore-warnings-in-return-value.
  But I must be calling it in the wrong way becauce I cannot make it
  make any differnce:

$ gnetlist -g drc2 -O ignore-warnings-in-return-value -o lg1 styrkort.sch  lo1 
21
$ echo $?
0
$ gnetlist -g drc2 -o lg2 styrkort.sch  lo2 21
$ echo $?
0
$ diff lg1 lg2
$ diff lo1 lo2
$

  Its supposed use is remove the error return (echo $? would return 
  something != 0) when there is only warnings and no errors. So maybe
  gnetlist have evolved removing any error return altogether.

*** Output ***

  As usual with the -o log file option to gnetlist, see gnetlist
  documentation. The statement that you can use - for log file is
  correct, the output do come to stdout, but so does a bonus
  backtrace:

$ gnetlist -g drc2 -o - styrkort.sch   
gEDA/gnetlist version 1.4.0.20080127
...
Found 3 warnings.
Found 15 errors.
Backtrace:
In current input:
   1: 0* [drc2 -]
In /usr/share/gEDA/scheme/gnet-drc2.scm:
 902: 1  (let* ((port #)) (begin (if # #) (if # #) (if # #) ...))
   ...
1016: 2  (begin (display DRC errors found. See output file.) (newline))
1016: 3* [display DRC errors found. See output file.]

/usr/share/gEDA/scheme/gnet-drc2.scm:1016:21: In procedure display in 
expression (display DRC errors found. See output file.):
/usr/share/gEDA/scheme/gnet-drc2.scm:1016:21: Wrong type argument in position 
2: #closed: file 0
$

*** Configuration ***

  ** How to disable some tests.

  You can disable a few of the checks that drc2 does. I think the text
  in gnet-drc2.scm (line 79-111) is to be consulted about that.

  Use gnetlist's -l or -c option, see first example in
  http://www.seul.org/pipermail/geda-user/2010-September/049378.html

  ** Check for not driven nets.

  You can provide your own version of pintype-can-drive (via
  gnetlist's -l or -c option). Currently it warns if you dont have any
  one of: out, io, oc, oe, pas, tp, tri, or pwr in a net.

  I.e. if you have a net of only ins and a clk, and don't want drc2
  to complain about it do:

$ gnetlist -g drc2 -o log file -c '(define pintype-can-drive (list 0 0 1 1 1 
1 1 1 1 1 1 0 ))' gschem file

  ** The drc-matrix

  See last example of
  http://www.seul.org/pipermail/geda-user/2010-September/049378.html

***

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-29 Thread Karl Hammar
Kai-Martin Knaak:
 Karl Hammar wrote:
...
  6, add some kind of GUI control to activate/deactivate rules
  Gui things are for others to contribute with, but maybe if we could 
  make drc2 react on some attributes?
 How about an attribute to the connecting net to silence drc2 at this 
 specific place?
 
  7, add a way to ignore to ignore specific violations
...
 I meant, specific instances within the circuit. Sometimes I 
 deliberately connect power nets to input pins. There should 
 be a way to tell drc2 that this it should not complain in 
 this special instance. But it should still alert me about
 power-input violations everywhere else. 

Thoose two could go under the same proposal:

A, make drcX react on what's on the attached net,
   like a attached nc.sym.

B, put an attribute somewhere else in the gschem file, e.g. at a 
   similar place like the refdes of the symbol: don't complain about my 
   pin no. xx.

Since that would be something for a future drc, let's start a new 
thread for that and proposals like
http://www.seul.org/pipermail/geda-user/2010-September/049364.html

  BTW, your job could be to test the patches and see to that they gets 
  applied!
 
 I'll put them to a test on friday. (No much free cycles until then)

 I have currently theese:
http://www.seul.org/pipermail/geda-user/2010-September/049342.html
http://www.seul.org/pipermail/geda-user/2010-September/049354.html

 This message's:

http://www.seul.org/pipermail/geda-user/2010-September/049351.html

 attachment appearantly didn't made it through, but
 you can use the supplied code to generate it yourself:

find . -type f -name \*.sym | xargs perl -i -ne 'if (m/^numslots\=0/) { 
undef($old); } else { print $old if $old; undef($old); if (m/^T /) {  $old = 
$_; } else { print; }}'

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Karl Hammar
Kai-Martin Knaak:
 Karl Hammar wrote:
  Shall we update the distributed sym files so they pass gsymcheck ?
 Yes, please.
..
  Should a missing numslots=0 really be a warning?
...
 ack. It has been quite some time that numslots=0 is not necessary 
 anymore.

Ok, a first step would then be:

 1, add/correct pintype to the sym files
  1a, which programs use pintype
  1b, identify the correct meaning of pintype values as used today
  1c, add missing pintypes (eg. should we have one for nc)
 2, remove numslots=0 warning from gsymcheck

Anything else?

Regards,
/Karl




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Karl Hammar
Karl:
 Kai-Martin Knaak:
  Karl Hammar wrote:
   Shall we update the distributed sym files so they pass gsymcheck ?
  Yes, please.
 ..
   Should a missing numslots=0 really be a warning?
 ...
  ack. It has been quite some time that numslots=0 is not necessary 
  anymore.
 
 Ok, a first step would then be:
 
  1, add/correct pintype to the sym files
   1a, which programs use pintype
...

  By doing:

$ find . -type f | grep -v '\.sym$' | grep -v '\.o$' | grep -v '^./docs/' | 
xargs grep pintype | grep -v ^Binary | cut -f1 -d: | sort -u | cut -f2 -d/ | 
sort -u
gnetlist
gschem
gsymcheck
symbols
utils

I see that the word pintype is used somewhere in the directories 
above.

gnetlist:
 drc2 seems to be the only user here
gchem:
 gschem/lib/system-gschemrc.in, can be ignored for this discussion
gsymcheck:
 gsymcheck/src/s_check.c only checks valid values, but don't use them
symbols:
 just a changelog
utils:
 in utils I find pintype in:

 ./utils/scripts/gsymfix.pl
just sets pintype=io if none exists, which is in conflict
with system-sschemrc.in which says that the default pintype
is unknown

 ./utils/scripts/gsymupdate
just converts from pre 2002 file format

 ./utils/scripts/sarlacc_sym
is an orcad text lib to sym converter

 ./utils/scripts/tragesym
makes sym files, not a user

 ./utils/src/convert_sym.c
viewlogic to sym converter

 ./utils/src/geda_sym_format.h
used by olib.c

 ./utils/src/gmk_sym.c
sym file creator

 ./utils/src/olib.c
 ./utils/src/olib.l
orcad to sym converter

***

Soo, from what I can see,
 drc2 is the only user of the pintype
 gsymcheck checks for valid pintype values

and that means that drc2 defines the semantic of the values.

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Andrew Miner


-Original Message-
 Karl Hammar wrote 
 Ok, a first step would then be:

 1, add/correct pintype to the sym files
  1a, which programs use pintype
  1b, identify the correct meaning of pintype values as used today
  1c, add missing pintypes (eg. should we have one for nc)
 2, remove numslots=0 warning from gsymcheck

 Anything else?

+1 for nc since ICs have pins that are labeled that way.  Would the DRC just
ignore it, or would the DRC complain if it was connected to anything?  I
could see people still wanting to connect a nc pin to a test point or a
header because they want to check for shorts, or if there is a chip rev that
adds extra functionality to that pin in a package.   

I would also like to see a pwr_src pin type which would be the output of the
voltage regulator (or source).  That way the DRC would warn you if you
shorted two power sources together or if you forgot to hook one of your
power input pins to the power plane (and only connected it to a capacitor
instead).

Andy Miner




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Karl Hammar
 Kai-Martin Knaak:
  Karl Hammar wrote:
   Shall we update the distributed sym files so they pass gsymcheck ?
  Yes, please.
 ..
   Should a missing numslots=0 really be a warning?
 ...
  ack. It has been quite some time that numslots=0 is not necessary 
  anymore.
 
 Ok, a first step would then be:
 
  1, add/correct pintype to the sym files
   1a, which programs use pintype
   1b, identify the correct meaning of pintype values as used today

Since drc2 is the only user of the pintype value, I looked into it.
There is no semantic definitions there, only what can be connected to
what and that is defined by

 pintype-can-drive: which pintypes can drive a net
 drc-matrix: which pintypes that can connect to each other

Note A,
 since drc-matrix is symmetric (connection a - b is the
 same as connection b - a) and it is not directly referenced by 
 anything else than get-drc-matrixelement, I suggest we do it lower 
 triangular and let get-drc-matrix-element swap row/column if
 row  column. As a side effect the drc2:is_simetric-drc-matrix
 check could be elimated.

Note B,
 unknown, in and pas rows/columns has the same content.
 out and tp has the same content.
 Do we really need multiple pintypes to say the same thing?

Note C, since pintype is only used to test for allowed connections
 then maybe pintype is the wrong name for it.

Note D, since unconnected seems to be for internal use only,
 drc2 should reject it on input.

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Karl Hammar
Andrew Miner:
  Karl Hammar wrote 
...
   1c, add missing pintypes (eg. should we have one for nc)
...
 +1 for nc since ICs have pins that are labeled that way.  Would the DRC just
 ignore it, or would the DRC complain if it was connected to anything?
...
Since nc is just a piece of copper attached to the (plastic/ceramic) 
package, why should drc complain?

A nc pin would be like pas, but gives no error if unconnected.

 I would also like to see a pwr_src pin type which would be the output of the
 voltage regulator (or source).  That way the DRC would warn you if you
 shorted two power sources together or if you forgot to hook one of your
 power input pins to the power plane (and only connected it to a capacitor
 instead).

+1

That would translate to:
 max one pwr_src per net

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Karl Hammar
Karl:
1b, identify the correct meaning of pintype values as used today
 
 Since drc2 is the only user of the pintype value, I looked into it.
...
 Note A,
  since drc-matrix is symmetric (connection a - b is the
  same as connection b - a) and it is not directly referenced by 
  anything else than get-drc-matrixelement, I suggest we do it lower 
  triangular and let get-drc-matrix-element swap row/column if
  row  column. As a side effect the drc2:is_simetric-drc-matrix
  check could be elimated.
...

Patch attached.

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57

diff --git a/gnetlist/scheme/gnet-drc2.scm b/gnetlist/scheme/gnet-drc2.scm
index a72f2a4..62e9fdc 100644
--- a/gnetlist/scheme/gnet-drc2.scm
+++ b/gnetlist/scheme/gnet-drc2.scm
@@ -219,27 +219,27 @@
 ;  Order is important !
 ; unknown inout   ioocoepas   tptri   clk   pwr unconnected
 ;unknown
-  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\e )
+  '(#\c )
 ;in
-  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\e )
+  '(#\c   #\c   )
 ;out
-  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\c   #\e   #\e )
+  '(#\c   #\c   #\e   )
 ;io
-  '(#\c   #\c   #\w   #\c   #\w   #\w   #\c   #\w   #\c   #\c   #\w   #\e )
+  '(#\c   #\c   #\w   #\c   )
 ;oc
-  '(#\c   #\c   #\e   #\w   #\e   #\c   #\c   #\e   #\c   #\c   #\e   #\e )
+  '(#\c   #\c   #\e   #\w   #\e   )
 ;oe
-  '(#\c   #\c   #\e   #\w   #\c   #\e   #\c   #\e   #\c   #\c   #\e   #\e )
+  '(#\c   #\c   #\e   #\w   #\c   #\e   )
 ;pas
-  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\e )
+  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   )
 ;tp
-  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\c   #\e   #\e )
+  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   )
 ;tri
-  '(#\c   #\c   #\e   #\c   #\c   #\c   #\c   #\e   #\c   #\c   #\e   #\e )
+  '(#\c   #\c   #\e   #\c   #\c   #\c   #\c   #\e   #\c   )
 ;clk
-  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\e   #\e )
+  '(#\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   #\c   )
 ;pwr
-  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\e   #\c   #\e )
+  '(#\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\e   #\c  )
 ;unconnected
   '(#\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e )
 )))
@@ -284,7 +284,9 @@
 ; Get value x y from matrix
 (define drc2:get-drc-matrix-element
   (lambda (row column)
-	  (list-ref (list-ref drc-matrix row) column)))
+(if ( row column)
+	(list-ref (list-ref drc-matrix column) row)
+	(list-ref (list-ref drc-matrix row) column
   
 ; Check if all elements of the DRC matrix are characters
 (define drc2:drc-matrix-elements-are-correct?
@@ -306,27 +308,6 @@
   
 ))
 
-; Check if the DRC matrix is simetric.
-(define drc2:is-simetric-drc-matrix
-  (lambda ()
-(let check-row ((row 1))
-  (if (let check-column ((column 0))
-	(if (not (eqv? (drc2:get-drc-matrix-element row column)
-			   (drc2:get-drc-matrix-element column row)))
-		#f
-		(if ( column (- row 1))
-		(check-column (+ column 1)) 		
-		#t)
-		)
-	)
-	  (if ( row (- (length pintype-names) 1))
-	  (check-row (+ row 1)) 
-	  #t)	  
-	 #f)
-  )
-  
-))
-	  
 ;
 ; End of DRC matrix functions
 ;---
@@ -924,12 +905,6 @@
  (begin
 		
 	;; Perform DRC-matrix sanity checks.
-	; See if the matrix is simetric.
-	(if (not (drc2:is-simetric-drc-matrix))
-		(begin (display INTERNAL ERROR: DRC matrix is NOT simetric. port)
-		   (newline port)
-		   (newline port)
-		   (error INTERNAL ERROR. DRC matrix is NOT simetric)))
 	; See if all elements of the matrix are chars
 	(if (not (drc2:drc-matrix-elements-are-correct?))
 		(begin (display INTERNAL ERROR: DRC matrix elements are NOT all chars. port)

___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Kai-Martin Knaak
Karl Hammar wrote:

  1, add/correct pintype to the sym files
   1a, which programs use pintype
   1b, identify the correct meaning of pintype values as used today
   1c, add missing pintypes (eg. should we have one for nc)
  2, remove numslots=0 warning from gsymcheck
 
 Anything else?

3, remove numslots=0 from all symbols in the default library

4, add explicit documentation on the rules in the wiki

5, add a tutorial on how to adapt the DRC rules to the local needs

6, add some kind of GUI control to activate/deactivate rules

7, add a way to ignore to ignore specific violations

You asked for it :-)

---)kaimrtin(---
-- 
Kai-Martin Knaak  tel: +49-511-762-2895
Universität Hannover, Inst. für Quantenoptik  fax: +49-511-762-2211 
Welfengarten 1, 30167 Hannover   http://www.iqo.uni-hannover.de
GPG key:http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmkop=get



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread John Doty

On Sep 28, 2010, at 12:39 PM, Karl Hammar wrote:

 In gnet-drc2.scm:
 
 ;; Example:
 ;; (define dont-check-non-numbered-parts 1)
 ;; (define dont-check-duplicated-references 1)
 ;; (define dont-check-one-connection-nets 1)
 ;; (define dont-report-unknown-pintypes 1)
 ;; (define dont-check-pintypes-of-nets 1)
 ;; (define dont-check-not-driven-nets 1)
 ;; (define dont-check-unconnected-pins 1)
 ;; (define dont-check-duplicated-slots 1)
 ;; (define dont-check-unused-slots 1)
 ;; (define action-unused-slots #\w)
 ;; (define case_insensitive 1)
 
 and there is also descriptions how to alter what is allowed to
 connect to what in the file. The problem seems to get that inside
 
 gnetlist -g drc2 ... 
 
 unless you edit the /usr/share/gEDA/scheme/gnet-drc2.scm (or similar) 
 file.

You can put the definitions you need into a file in your project, and load it 
with the -l flag to gnetlist. See the gnetlist man page.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Karl Hammar
 Kai-Martin Knaak:
  Karl Hammar wrote:
...
   Should a missing numslots=0 really be a warning?
  ack. It has been quite some time that numslots=0 is not necessary 
  anymore.
...
  2, remove numslots=0 warning from gsymcheck

Attached patch does that.

Regards,
/Karl Hammar

-
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57

diff --git a/gsymcheck/src/s_check.c b/gsymcheck/src/s_check.c
index d66106f..fd78ca7 100644
--- a/gsymcheck/src/s_check.c
+++ b/gsymcheck/src/s_check.c
@@ -793,10 +793,12 @@ s_check_slotdef (const GList *obj_list, SYMCHECK *s_current)
   value = o_attrib_search_floating_attribs_by_name (obj_list, numslots, 0);
 
   if (!value) {
+/*
 message = g_strdup (Did not find numslots= attribute, not checking slotting\n);
 s_current-warning_messages = g_list_append(s_current-warning_messages,
 message);
 s_current-warning_count++;
+*/
 message = g_strdup (If this symbol does not need slotting, set numslots to zero (numslots=0)\n);
 s_current-info_messages = g_list_append(s_current-info_messages,
  message);

___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Steven Michalske

On Sep 28, 2010, at 6:00 AM, Andrew Miner wrote:

  would also like to see a pwr_src pin type which would be the output of the
 voltage regulator (or source).  That way the DRC would warn you if you
 shorted two power sources together or if you forgot to hook one of your
 power input pins to the power plane (and only connected it to a capacitor
 instead).


This might be made more general

if a pin type has _src appended then it is a source
and if _load is appended it is a consumer.


it might be good to have some other attributes concerining power pins

Side note:
A capabilities attribute that might get a string like 'Current_RMS_supply=1A; 
current_peak_supply=1...@0.5s'




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Steven Michalske

On Sep 28, 2010, at 6:32 AM, Karl Hammar wrote:

 Since nc is just a piece of copper attached to the (plastic/ceramic) 
 package, why should drc complain?
 
 A nc pin would be like pas, but gives no error if unconnected.

This is not a true statement, some packages there are Do not connect,  some 
packages these are not internally connected.

Big difference.  (the NC pins that are do not connect are sometimes programming 
or fuse blowing pins that only the chip manufacture uses.

Steve


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Edward Hennessy
On Sep 28, 2010, at 12:59 PM, Steven Michalske smichal...@gmail.com wrote:

 
 On Sep 28, 2010, at 6:00 AM, Andrew Miner wrote:
 
 would also like to see a pwr_src pin type which would be the output of the
 voltage regulator (or source).  That way the DRC would warn you if you
 shorted two power sources together or if you forgot to hook one of your
 power input pins to the power plane (and only connected it to a capacitor
 instead).
 
 
 This might be made more general
 
 if a pin type has _src appended then it is a source
 and if _load is appended it is a consumer.
 
 
 it might be good to have some other attributes concerining power pins
 
 Side note:
 A capabilities attribute that might get a string like 'Current_RMS_supply=1A; 
 current_peak_supply=1...@0.5s'

It would be nice to have an attribute to check if a power pin is connected to 
the proper supply voltage.

Ed


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread Steven Michalske

On Sep 28, 2010, at 2:30 PM, Edward Hennessy wrote:

 Side note:
 A capabilities attribute that might get a string like 
 'Current_RMS_supply=1A; current_peak_supply=1...@0.5s'
 
 It would be nice to have an attribute to check if a power pin is connected to 
 the proper supply voltage.


The intent was that capabilities would be a set of key value pairs that could 
be processed, and that almost anything would go there.

The symbol would be a good place to put the tolerance of inputs,  like a 3.3 
volt part with 5 Volt tolerant inputs, default on the logic levels of the 
symbol, but overrides could exist on pins,  some parts have pins that are 5 
volt tolerant and others that are isolated for 1000's of volts.

Steve


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread kai-martin knaak
Karl Hammar wrote:

 4, add explicit documentation on the rules in the wiki
 
 I'm not the wiki man. I could read the code (I assume you mean drc2)
 and try to describe it in text, but someone else has to enter it 
 into the wiki.

Ok, if you describe the rules here on the list, I'd volunteer to infuse 
it at an appropriate place in the wiki. 

 
 5, add a tutorial on how to adapt the DRC rules to the local needs
 
 From what I can see you have to learn scheme for that.

Well documented examples would take me a long way.


 Can you give exaples of local needs?

Some people like consider any not connected pin an error, others would 
only expect a warning. Some might find not connected pins completely 
acceptable and consequently find errors and warnings annoying. Digital 
enthusiasts may add special pin types for different signal levels. 
Analog designers might find it perfectly acceptable to connect pwr to 
in pins.

 
 6, add some kind of GUI control to activate/deactivate rules
 
 Gui things are for others to contribute with, but maybe if we could 
 make drc2 react on some attributes?

How about an attribute to the connecting net to silence drc2 at this 
specific place?


 7, add a way to ignore to ignore specific violations
 
 In gnet-drc2.scm:
 
 ;; Example:
 ;; (define dont-check-non-numbered-parts 1)

I meant, specific instances within the circuit. Sometimes I 
deliberately connect power nets to input pins. There should 
be a way to tell drc2 that this it should not complain in 
this special instance. But it should still alert me about
power-input violations everywhere else. 


 BTW, your job could be to test the patches and see to that they gets 
 applied!

I'll put them to a test on friday. (No much free cycles until then)

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-28 Thread kai-martin knaak
Karl Hammar wrote:

 That way the DRC would warn you if you
 shorted two power sources together or if you forgot to hook one of 
your
 power input pins to the power plane (and only connected it to a 
capacitor
 instead).
 
 +1
 
+1 
Just today I had a student stumble on an accidental connection of two 
power nets while doing the layout. Had he been less alert or just fired 
the auto router, there would have been an incidence of magic smoke...

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: gschem sym files

2010-09-26 Thread Karl Hammar
Shall we update the distributed sym files so they pass gsymcheck ?

Should gsymcheck really complain about a missing numslots=0
and report error for a net=GND:2 attribute?

***

When doing pcb import schematic, I get the message:

 Remember to check that your schematic has no errors using the drc2 backend.
 You can do it running 'gnetlist -g drc2 your_schematic.sch -o drc_output.txt'
 and seeing the contents of the file drc_output.txt.

gnetlist -g drc2 gives:

...
  Checking pins without the 'pintype' attribute...
  NOTE: Found pins without the 'pintype' attribute: U3:1 U3:3 U3:2 
...

The U3 is the lm7805-1.sym from gschem and it does not contain any
pintype attribute.

It is easy enought to correct:

  $ diff `locate lm7805-1.sym`
  1c1
   v 20080127 1
  ---
   v 20031231 1
  19,20d18
   T 300 600 5 10 0 0 0 0 1
   pintype=in
  28,29d25
   T 800 0 5 10 0 0 0 0 1
   pintype=pwr
  37,38d32
   T 1300 600 5 10 0 0 0 0 1
   pintype=out

It also fails gsymcheck:

  $ gsymcheck -vv lm7805-1.sym 
  gEDA/gsymcheck version 1.4.0.20080127
  gEDA/symcheck comes with ABSOLUTELY NO WARRANTY; see COPYING for more details.
  This is free software, and you are welcome to redistribute it under certain
  conditions; please see the COPYING file for more details.


  Checking: /var/home/karl/Net/git/gaf/symbols/linear/lm7805-1.sym
  Warning: Missing pinlabel= attribute
  Warning: Missing pintype= attribute
  Warning: Missing pinlabel= attribute
  Warning: Missing pintype= attribute
  Warning: Missing pinlabel= attribute
  Warning: Missing pintype= attribute
  Warning: Missing footprint= attribute
  Warning: Did not find numslots= attribute, not checking slotting
  ERROR: Found duplicate pinnumber=2 attribute in the symbol
  ERROR: Found duplicate pinnumber=2 attribute in the symbol
  8 warnings found 
  2 ERRORS found 

***

Should a missing numslots=0 really be a warning?
It is annoying to include it in most sym files just to make gsymcheck
to shut up.

The ERROR is due to the:

 T 1600 900 5 10 0 0 0 0 1
 net=GND:2

Should that really be an error?

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-26 Thread John Doty

On Sep 26, 2010, at 2:31 AM, Karl Hammar wrote:

 The U3 is the lm7805-1.sym from gschem and it does not contain any
 pintype attribute.
 
 It is easy enought to correct:
 
  $ diff `locate lm7805-1.sym`
  1c1
   v 20080127 1
  ---
 v 20031231 1
  19,20d18
   T 300 600 5 10 0 0 0 0 1
   pintype=in
  28,29d25
   T 800 0 5 10 0 0 0 0 1
   pintype=pwr
  37,38d32
   T 1300 600 5 10 0 0 0 0 1
   pintype=out

Except that the drc2 rules implicitly assume that input and output mean 
*digital* signals. To match the drc2 model of reality, these should all be pwr.

 It also fails gsymcheck:
 
  $ gsymcheck -vv lm7805-1.sym 
  gEDA/gsymcheck version 1.4.0.20080127
  gEDA/symcheck comes with ABSOLUTELY NO WARRANTY; see COPYING for more 
 details.
  This is free software, and you are welcome to redistribute it under certain
  conditions; please see the COPYING file for more details.
 
 
  Checking: /var/home/karl/Net/git/gaf/symbols/linear/lm7805-1.sym
  Warning: Missing pinlabel= attribute
  Warning: Missing pintype= attribute
  Warning: Missing pinlabel= attribute
  Warning: Missing pintype= attribute
  Warning: Missing pinlabel= attribute
  Warning: Missing pintype= attribute
  Warning: Missing footprint= attribute
  Warning: Did not find numslots= attribute, not checking slotting
  ERROR: Found duplicate pinnumber=2 attribute in the symbol
  ERROR: Found duplicate pinnumber=2 attribute in the symbol
  8 warnings found 
  2 ERRORS found 
 
 ***
 
 Should a missing numslots=0 really be a warning?
 It is annoying to include it in most sym files just to make gsymcheck
 to shut up.
 
 The ERROR is due to the:
 
 T 1600 900 5 10 0 0 0 0 1
 net=GND:2
 
 Should that really be an error?

All of these errors by various utilities require interpretation. gEDA's 
application space is much broader than originally conceived.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: gschem sym files

2010-09-26 Thread kai-martin knaak
Karl Hammar wrote:

 Shall we update the distributed sym files so they pass gsymcheck ?

Yes, please.
I gave up on gsymcheck because it caused more work due to false alarms 
than it saved by pointing to real errors.


 Should a missing numslots=0 really be a warning?
 It is annoying to include it in most sym files just to make gsymcheck
 to shut up.

ack. It has been quite some time that numslots=0 is not necessary 
anymore.

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user