← Back to team overview

kicad-developers team mailing list archive

Re: SWEET: multisheet schematic concerns

 

Hi,

I'd like to mention my little 2d cad editor.  It's called PD-piglet and
it is a clone of HP's internal IC/PC design system circa 1982 or so. 
The entire source fits on a floppy disk. 

    http://omnisterra.com/walker/linux/piglet/intro.htm


It's just plain C/Xlib code that focuses on the simplest possible
presentation of the core algorithms. 

The main thing to recommend it is that it is a minimal implementation of
a fully hierarchical drawing system.  

Any drawing can be later reused in any other drawing by reference.

When used as a circuit design system, every schematic element had both a
component level drawing and a module drawing.  The module representation
is basically just a bunch of named ports that correspond to nodes in the
component schematic.  The component representation may include both
primitive components + modules. 

For instance, if I wanted to build an op-amp from transistors, I would
have a file named "opamp.sch" which would have my transistor, wire, and
resistor symbols all connected together.  Some of the nodes would have
special port symbols and be called things like VCC, IN, OUT, GND. 

As part of the design, I would also create another drawing called
"opamp.mod" which would basically be just a big rectangle with port
symbols, a name, and possible attribute tags.

Later on, I could create another file called "opamp.art" which would be
the actual CMOS IC layout for the opamp. 

The rest of the system is a framework of scripts which take one
or more representations and uses them to generate or check
against other representations.

So, my module is represented basically a subdirectory with
multiple representations (reps) in subdirectories like:

    opamp/sch	; component level circuit diagram
    opamp/mod	; block diagram with ports
    opamp/art	; IC layout
    opamp/sim	; extracted SPICE model
    opamp/net	; extracted net
    opamp/pcb	; pcb macro

The various reps are generated as needed by scripts.  

Not all reps are needed for any given project.  For instance, A PCB
design won't need the IC layout reps. 

Once you have a block like "opamp", you can reuse it in any higher level
block as a component.  If I make a block called "instamps.sch" I can use
the "opamp.mod" symbols as part of my schematic. 

If I later modify "opamp.sch" the circuit changes will hierarchically
pass through to "instamp" next time I run the verilog or spice
generation scripts.

This kind of reuse is pretty much required for any kind of IC
design.  There is no reason not to make the PCB design system
just as flexible, and for the basic framework to handle
verilog/IC/PCB/schematic/SPICE representations all at the same 
time.

Pigle is just a toy snapshot of an old HP program, but it does
include a full and concise implementation of a hierarchical database
structure (basically a linked-list cell library and an ability for
recursive non-looping references).  As a drawing editor it allows all
sub-cells to be added with any affine transformation (scaling, shearing,
rotation, translation) to arbitrary depth. 

Just deciding to bite off the hierarchical part of the problem
basically defines the entire structure of piglet.  I fully agree
that this feature could not be easily added to a non-hierarchical
program.  It would be nearly a total rewrite.  The good thing
about piglet is that it is a working example of a hierarchical
editor that is a feature clone of a system that HP used for a
decade or so to build lots of PCBs and ICs.    The core system is
quite parsimonious and is pretty close to a minimum feature set.

Later on, HP wrote a new tool for advanced IC design called
"chipbuster" that expanded on piglet (added scripting) but kept
the same basic structure.

kind regards,
--
Rick Walker