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

Re: gEDA-user: A few questions about gschem, gnetlist, and gspiceui/ngspice



> 1. The first thing I want to understand how the gnetlist scheme works for
> the spice scheme (gnetlist -g spice). When I run this command, what scheme
> backend files are processed? Only gnet-spice.scm? Or is any other scheme
> processed along with it? The reason why I ask is because when I take a look
> at gnet-spice.scm it seems to be getting some variables from somewhere else,
> as in the file doesnt seem self-contained.

To my knowledge only gnet-spice.scm is processed, some variables are
obtained from the gnetlist program.

> The reason why I ask is because I was interested in editing the way the
> netlister works. I created a 3 terminal nmos and pmos symbol and I want to
> either hardcore a implicit bulk connection into the netlister scheme or
> create a symbol attribute that specifies the bulk connection in it, maybe
> using the net= attribute. When looking at the gnet-spice.scm file, it doesnt
> show where its getting the number of pins for mosfet devices. The way I was

Look at the function spice:write-mos-transistor for this line:
line (spice:write-one-component package port). This function writes the
uref, pin/node-numbers and value for the mosfet.

This line writes the pin/node-numbers:
(spice:write-net-name-of-component package (length (gnetlist:get-pins
package)) port)

This part (gnetlist:get-pins package) gets the number of pins for the
device.

Give your nmos and pmos symbols a unique device=<something> attribute
and write your modified scheme code.

> going to go about it was change the number of pins to 3, then print the last
> net (the bulk) as a netname thats hardcored.

Have you copied the gnet-spice.scm code to a local project directory? 
Then you can generate a netlist using your modfied version:
gnetlist -g spice -m<your-spice-netlister> in.sch -o out.cir

I hope this helps,

 Bas
-- 


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