>From your drawing, it looks like Global is a subclass of Design, and it points to a bunch of net instances. (I don't quite recognize your schema drawing formalism -- it looks similar to UML, but it's not. Therefore, I am just guessing.) Anyway, I imagine that your program's job is to read in a .sch file and create this structure. In this case, I guess it makes sense. OTOH, why wouldn't you just make "Global" an attribute of Net (i.e. a part of the Net structure)? On the third hand, I guess that if you want to find all global nets easily, without searching for them, yours is the way to do it.
As for the big picture, I am still confused where your tool will be used. Is it fired up from within gschem? Or is it stand-alone? Stuart > Stuart Brorson wrote: > > >Why not just define an attribute "GLOBAL" which you could attach to a > >net? A global net would then have two attributes: NETNAME and GLOBAL, > >for example: > > > >NETNAME=VCC > >GLOBAL=1 > > > >Then the netlister would know directly what type of net it was > >handling, instead of having to figure it out from the attached > >schematic symbol. In any event, I often just use named nets for power > >instead of attaching a power symbol. Finally, there are other common > >nets which aren't power nets but are also globals, such as RESET. > >Nets like RESET don't always have an accepted device symbol. > > > >Stuart > > > I like the GLOBAL concept. How does this class diagram (schema) look? > I've added a Global class on Design to represent global signals. I > think this will lead to easy manipulation of these things. > > For example, after flattening, I might still have a bunch of small nets > that are all attached to a common global. A global net flatting routing > could replace them all with a single net. Another routine could be used > to thread the global signals through the hierarchy in case a netlist > format doesn't support globals. > > I think POWER device types could also be useful. It's just another way > to do the same thing, but in a way that feels familiar and looks good in > a schematic. > > Bill
