Unification of Methods and Functions

Corey Coughlin corey.coughlin at attbi.com
Wed May 19 15:00:06 EDT 2004


Well yeah, my code would be proprietary, but you can probably
reconstruct most of it from the description above.  Just start with a
basic outline, add some interface functions on the front end to read
and write spice or verilog netlists, and see how it goes.  (Starting
with spice would be a lot easier, it's a much easier format to parse.)
 Maybe some of the other EE savvy people here would be willing to help
out.  The only real problem with using it as an example is that it
isn't heavily object oriented.  It uses some simple inheritance, some
classes, and some operator overloading, but if you want to get into
these complex ideas, it may not be the way to go.

If you're looking to make a functional system of some kind, a basic
netlist hierarchy would definitely be a good example.  Given your
descriptions of current analysis, it sounds like you might be doing
something for power analysis.  In the basic hierarchy I described, you
can imagine having extra power attributes attached to each cell, and
to get the total power you could easily write a little recursive
instance power summation method.  If you want to do something more
complicated, like roll in table driven power data or state dependent
power, you'll need to overlay some sort of simulation state on top of
it, which sounds like it would involve adding state to each net. 
Hmm.... if everything inherited from some timescale object, and some
basic functionality was added for transistor primitives, I suppose it
could work.  But starting with a good netlist container would be a
great first step.  So start with a netlist class that holds a list of
cells, a cell class that holds lists (or dicts) of nets, instances,
and ports, then fill in the instance, net and port classes, and you
should be well on your way.


David MacQuigg <dmq at gain.com> wrote in message news:<oeoja0hq6patmb6cjjqe2fvqms1h23ukku at 4ax.com>...
> 
> This is the kind of thinking I like.  90% of what we need to do can be
> done with the simplest of programming constructs.  I know your company
> probably considers what you develop proprietary, but would it be
> possible for you to contribute an example suitable for teaching OOP to
> EE students?
> 
> I will probably still keep the Animals example in the intro, since it
> shows almost everything we will ever need in the simplest possible
> structure.  A netlister would be a great example, however, especially
> since my students are studying EDA tools.
> 
> -- Dave



More information about the Python-list mailing list