Index: non-graphical/index.html =================================================================== --- non-graphical/index.html (revision 7483) +++ non-graphical/index.html (nonexistent) @@ -1,116 +0,0 @@ - - - -

Non-graphical sheets - proposals

-

- This is a proposal at this stage - any detail may change any time. This -feature is not yet implemented. -

-Sometimes a design is easier specified by text than drawing. Typical examples: -

-

-Non-graphical sheets are implemented in plugins and provide different -methods and syntax for specifying abstract components, abstract networks -and their relations. The cschem compiler can use this as an input on the same -level as a graphical sheet. That means, it can be an Nth sheet in -a multisheet project. For example draw the power and analog parts on graphical -sheets and have the 28 pin parallel bus connections to the CPU, ram, I/O chips -and connectors specified in one more more non-graphical sheet in the same -project. -

-Below are different methods and syntax to describe non-graphical sheets. - -

tEDAx (declarative)

-

-tEDAx is very easy to parse, well specified, and is relatively easy to -read and write as human. -

-Here are a few small examples, all describing the same "7805 with 2 bypass -caps" circuit using different approaches: -

-

-These are not different sets of syntax, but they are all just different usage -and combination of the same few blocks that are all available. As a proper -declarative description, order of blocks or order of attributes/connections -within a block doesn't matter. -

-The verbose versions are perhaps more practical if there are a lot of attributes -to specify. The compact version is more practical for listing a lot of -connections and few attributes. -

-Another way of mixing different blocks is big32.tdx, -which is an imaginary CPU board with 2 SRAM chips, an I/O chip and an extension -port. It uses the verbose component description for the chips and capacitors, -also connects power and gnd there and then uses the compact, table-like -description for the address/data/control networks. It's also an example -of combining graphical and non-graphical sheets: U5 is a network of gates -that controls chip-select; it's better drawn for clarity. - -

fawk (Turing-complete)

-

-In some cases parts of the design can be specified using repetitive patterns. -An easy way to handle this is to write a script that generates a graphical -sheet or a non-graphical sheet using a declarative sytnax. -

-If that script is written in fawk, sch-rnd can run it without having to -generate and parse the declarative intermediate. This feature is limited -to fawk because: -

-

-A simple example script, r2r.fawk generates -5 bits of the classic R2R DAC. It can be configured by changing the values -in main(). -

-The script doesn't emit a netlist or declarative tEDAx non-graphical sheet. -The result can be observed in sch-rnd by loading only the fawk script -as a sheet and using the abstract model dialog. -

-(An alternative is implementing the cschem functions locally, as vararg -fawk functions and make them print to stdout using fawk_print(). Then the -script can be ran and debugged independently of cschem, using the example -libfawk command line interpreter.) -

-Functions provided by sch-rnd: - -
function description -
acomp_attr(name, key, val, ...); - create a component by name, or add to existing component by that name; - add key=val pairs of attributes; this is a vararg function. - -
anet_attr(name, key, val, ...); - create a network by name, or add to existing network by that name; - add key=val pairs of attributes; this is a vararg function. - -
aconn(netname, compname, termname, ...); - create a network by netname, or extend existing network by that name; - connect terminal(s) addressed by (compname-termname); this is a vararg function. - -
- - - - - -