[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA: gnetlist vs. XNF



Hi,

>ahvezda@seul.org said:
>> As far as pintype attribute, there's nothing really special about it
>> other than it's a new one and none of the netlisters use it yet.
>
>OK, I'll use type= once I gain access to that information. I'm not sure
>why label= even exists.


	It exists because people wanted to attach the label string (like
OE, WE, DATA2, etc...) to the pin as an attribute.   On nets it's used
as the netname attribute.


>ahvezda@seul.org said:
>> Yes, the "1" is the value of the pin#= attribute.  I don't think
>> anybody deals with the # (from pin#=) in any of the netlist backends
>> (which is a good thing since that's nothing more than an placeholder
>> for the slot mechanism).
>
>It works out perfectly for me, it fits nicely with the XNF format and
>the way the unified library is defined. I'm cooking with gas, here.
>Please make it stay this way, I think it makes perfect sense.


	Yeah, it makes sense the way it is.  I won't change it.

>
>All I'm missing is access to the type= attribute on the pins, and I will
>have a functional XNF netlister. Let me know if you check in an update
>to gnetlist that allows me to get at the pin attributes. As soon as you
>do that, I'll get get PIN records coming out right and I'll publish
>what I have.


	Okay, a few hours later, I have finished this needed feature.  I 
now know why I keep putting it off; it was slightly non-trivial, but
obviously doable.

	Nevertheless, please update your cvs tree, including libgeda and
gnetlist.  Make sure you properly rebuild everything.  Here's a session
of one of my debugs (test.sch consists of your test schematic you sent me
as well as misc local symbols which had attributes attached to the pins):

$ gnetlist -i test.sch
THIS IS AN ALPHA RELEASE! version 20000220
Loading schematic [test.sch]
gnetlist> packages
(U5 U4 U1 U2)
gnetlist> (gnetlist:get-package-attribute "U1" "device")
PULLUP
gnetlist> (gnetlist:get-pins "U1")           
(1)
gnetlist> (gnetlist:get-pin-attribute "U1" "1" "type")
pullup
gnetlist> (gnetlist:get-package-attribute "U5" "device")
DB25
gnetlist> (gnetlist:get-pins "U5")
(14 15 16 17 18 19 20 21 22 24 23 25 1 2 3 4 5 6 7 8 9 10 11 12 13)
gnetlist> (gnetlist:get-pin-attribute "U5"  "14" "pinlabel")
/AUTOF
gnetlist> (gnetlist:get-pin-attribute "U5"  "14" "nonexistant_attrib")
unknown
gnetlist> (gnetlist:get-pins "U4")                 <- Multi Slotted component
(4 5 6 1 2 3)
gnetlist> (gnetlist:get-package-attribute "U4" "device")
7400_ales
gnetlist> (gnetlist:get-pin-attribute "U4" "1" "type")	<- Slot #1
pin_type_1
gnetlist> (gnetlist:get-pin-attribute "U4" "2" "type")        
pin_type_2
gnetlist> (gnetlist:get-pin-attribute "U4" "3" "type")
pin_type_3
gnetlist> (gnetlist:get-pin-attribute "U4" "4" "type")  <- Slot #2
pin_type_1
gnetlist> (gnetlist:get-pin-attribute "U4" "5" "type")
pin_type_2
gnetlist> (gnetlist:get-pin-attribute "U4" "6" "type")
pin_type_3


	Ah gotta love that interactive mode. :-)  The new call is:

	(gnetlist:get-pin-attribute "uref" "pin" "wanted_attribute")
	
	pin is the pin#=value like we discussed above.  If gnetlist cannot
find the specified uref or pin or wanted_attribute it returns "unknown".

	Try it and see how it works out.  Let me know if it does something
stupid.  

	Sorry if this backend writing experience has a vertical learning
curve.	It's mainly my fault for not writing better docs. :(

								-Ales