Index: trunk/doc/developer/mods3/after.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/after.png =================================================================== --- trunk/doc/developer/mods3/after.png (nonexistent) +++ trunk/doc/developer/mods3/after.png (revision 8859) Property changes on: trunk/doc/developer/mods3/after.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/doc/developer/mods3/deps.svg =================================================================== --- trunk/doc/developer/mods3/deps.svg (nonexistent) +++ trunk/doc/developer/mods3/deps.svg (revision 8859) @@ -0,0 +1,685 @@ + + + + + + +plugin_deps + + + +user + +user + + + +act_draw + +act_draw + + + +user->act_draw + + + + + +act_read + +act_read + + + +user->act_read + + + + + +backann + +backann + + + +user->backann + + + + + +construct + +construct + + + +user->construct + + + + + +diag + +diag + + + +user->diag + + + + + +export_abst + +export_abst + + + +user->export_abst + + + + + +export_bom + +export_bom + + + +user->export_bom + + + + + +export_lpr + +export_lpr + + + +user->export_lpr + + + + + +export_ps + +export_ps + + + +user->export_ps + + + + + +export_png + +export_png + + + +user->export_png + + + + + +export_spice + +export_spice + + + +user->export_spice + + + + + +lib_netlist_exp + +lib_netlist_exp + + + +user->lib_netlist_exp + + + + + +export_svg + +export_svg + + + +user->export_svg + + + + + +export_tedax + +export_tedax + + + +user->export_tedax + + + + + +gui + +gui + + + +user->gui + + + + + +io_altium + +io_altium + + + +user->io_altium + + + + + +lib_alien + +lib_alien + + + +user->lib_alien + + + + + +io_geda + +io_geda + + + +user->io_geda + + + + + +io_lihata + +io_lihata + + + +user->io_lihata + + + + + +io_ngrp_fawk + +io_ngrp_fawk + + + +user->io_ngrp_fawk + + + + + +lib_ngrp + +lib_ngrp + + + +user->lib_ngrp + + + + + +io_ngrp_tedax + +io_ngrp_tedax + + + +user->io_ngrp_tedax + + + + + +io_tinycad + +io_tinycad + + + +user->io_tinycad + + + + + +query + +query + + + +user->query + + + + + +lib_plot + +lib_plot + + + +user->lib_plot + + + + + +lib_target + +lib_target + + + +user->lib_target + + + + + +place + +place + + + +user->place + + + + + +propedit + +propedit + + + +user->propedit + + + + + +renumber + +renumber + + + +user->renumber + + + + + +sch_dialogs + +sch_dialogs + + + +user->sch_dialogs + + + + + +sim + +sim + + + +user->sim + + + + + +sim_gui + +sim_gui + + + +user->sim_gui + + + + + +sim_ngspice + +sim_ngspice + + + +user->sim_ngspice + + + + + +target_spice + +target_spice + + + +user->target_spice + + + + + +std_cschem + +std_cschem + + + +user->std_cschem + + + + + +std_devmap + +std_devmap + + + +user->std_devmap + + + + + +std_forge + +std_forge + + + +user->std_forge + + + + + +std_tools + +std_tools + + + +user->std_tools + + + + + +symlib_fs + +symlib_fs + + + +user->symlib_fs + + + + + +symlib_local + +symlib_local + + + +user->symlib_local + + + + + +target_none + +target_none + + + +user->target_none + + + + + +target_pcb + +target_pcb + + + +user->target_pcb + + + + + +export_lpr->export_ps + + + + + +lib_exp_text + +lib_exp_text + + + +export_ps->lib_exp_text + + + + + +lib_exp_pixmap + +lib_exp_pixmap + + + +export_png->lib_exp_pixmap + + + + + +export_spice->lib_netlist_exp + + + + + +export_svg->lib_exp_text + + + + + +export_tedax->lib_netlist_exp + + + + + +lib_hid_common + +lib_hid_common + + + +gui->lib_hid_common + + + + + +io_altium->lib_alien + + + + + +lib_alien->query + + + + + +io_geda->lib_alien + + + + + +io_ngrp_fawk->lib_ngrp + + + + + +script + +script + + + +io_ngrp_fawk->script + + + + + +io_ngrp_tedax->lib_ngrp + + + + + +io_tinycad->lib_alien + + + + + +lib_plot->query + + + + + +sch_dialogs->lib_hid_common + + + + + +sim_gui->lib_plot + + + + + +sim_gui->sch_dialogs + + + + + +sim_gui->sim + + + + + +sim_ngspice->sim + + + + + +sim_ngspice->target_spice + + + + + +target_spice->lib_target + + + + + +target_pcb->lib_target + + + + + Index: trunk/doc/developer/mods3/engine.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/engine.png =================================================================== --- trunk/doc/developer/mods3/engine.png (nonexistent) +++ trunk/doc/developer/mods3/engine.png (revision 8859) Property changes on: trunk/doc/developer/mods3/engine.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/doc/developer/mods3/export.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/export.png =================================================================== --- trunk/doc/developer/mods3/export.png (nonexistent) +++ trunk/doc/developer/mods3/export.png (revision 8859) Property changes on: trunk/doc/developer/mods3/export.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/doc/developer/mods3/feature.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/feature.png =================================================================== --- trunk/doc/developer/mods3/feature.png (nonexistent) +++ trunk/doc/developer/mods3/feature.png (revision 8859) Property changes on: trunk/doc/developer/mods3/feature.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/doc/developer/mods3/gen.sh =================================================================== --- trunk/doc/developer/mods3/gen.sh (nonexistent) +++ trunk/doc/developer/mods3/gen.sh (revision 8859) @@ -0,0 +1,192 @@ +#!/bin/sh + +path=../../../src/plugins + +sloc() +{ + (cd "$1" && sloccount .) | awk '/^Total Phys/ { size=$9; sub(",", "", size); print size }' +} + +gen_pie() +{ + local bn="$1" code_size="$2" color="$3" + echo "" + echo "@slice" + echo "$code_size" + echo "@label" + echo "$bn ($code_size)" + if test ! -z "$color" + then + echo "@color" + echo "$color" + fi +} + +rm -f *.pie *.lines + +echo "#autogenerated by gen.sh" > mods.pie +echo "#autogenerated by gen.sh" > after.pie + +echo After... >&2 +#tmp=/tmp/sch-mods-stat +#mkdir $tmp +#cp -r ../../../src/sch-rnd/*.c ../../../src/sch-rnd/*.h ../../../src/sch-rnd/Makefile* $tmp +echo " sch-rnd..." >&2 +sch_rnd_size=`sloc ../../../src/sch-rnd/` +echo " lib..." >&2 +lib_size=`sloc ../../../src/libcschem/` +echo " 3rd..." >&2 +mini_size=`sloc ../../../src_3rd/` + +gen_pie "sch-rnd app" $sch_rnd_size "#00ff88" >> after.pie +gen_pie "libcschem" $lib_size "#88ff00" >> after.pie +gen_pie "3rd minilibs" $mini_size "#8800ff" >> after.pie + +echo "" > classes +echo ' +digraph plugin_deps { +overlap=scale +'> deps.dot + +( +cat pre.html +for n in $path/* +do + if test -d "$n" + then + echo $n >&2 + bn=`basename $n` + code_size=`sloc $n` + total=$(($total + $code_size)) + class=`cat $n/*.pup | sed ' + /^$class/ { + s/$class *// + s/[()]//g + p + } + { d } + ' ` + echo "$class" >> classes + + echo "$code_size" >> $class.lines + gen_pie $bn $code_size >> $class.pie + +# case $bn in +# gpmi) echo "@pull" >> mods.pie; echo "0.1" >> mods.pie;; +# esac + + echo "$bn$code_size" + cat $n/*.pup | awk -v "plugin=$n" ' + BEGIN { + q = "\"" + dep="/dev/fd/3" + sub(".*/", "", plugin) + } + /^[$]/ { + key=$1 + sub("[$]", "", key) + $1="" + DB[key]=$0 + next + } + + /^dep/ { + print q plugin q "->" q $2 q >> dep + } + + /^[A-Za-z]/ { + key=$1 + $1="" + DB[key]=$0 + next + } + + function strip(s) { + sub("^[ \t]*", "", s) + sub("[ \t]*$", "", s) + return s + } + + END { + st = DB["state"] + if (st ~ "partial") + clr = "bgcolor=\"yellow\"" + else if (st ~ "works") + clr = "bgcolor=\"lightgreen\"" + else if ((st ~ "fail") || (st ~ "disable")) + clr = "bgcolor=\"red\"" + else + clr="" + + clr2 = clr + if (clr2 != "") { + sub("bgcolor=\"", "", clr2) + sub("\"", "", clr2) + print "@color" >> "mods.pie" + print clr2 >> "mods.pie" + } + + print "" st + if (DB["lstate"] != "") + print "
(" strip(DB["lstate"]) ")" + + dfl = DB["default"] + if (dfl ~ "buildin") + clr = "bgcolor=\"lightgreen\"" + else if (dfl ~ "plugin") + clr = "bgcolor=\"yellow\"" + else if ((dfl ~ "disable-all") || (dfl ~ "disable")) + clr = "bgcolor=\"red\"" + else + clr="" + + print "" dfl + if (DB["ldefault"] != "") + print "
(" strip(DB["ldefault"]) ")" + print "" DB["class"] + print "" DB["long"] + if (int(DB["autoload"])) + print q "user" q "->" q plugin q " [color=\"#a0a0a0\"]" >> dep + + class = DB["class"] + if (class ~ "io") + clr = "fillcolor=\"#ffa0a0\"" + else if (class ~ "import") + clr = "fillcolor=\"#a0ffff\"" + else if (class ~ "export") + clr = "fillcolor=\"#a0ffff\"" + else if (class ~ "lib") + clr = "fillcolor=\"#a0a0a0\"" + else if (class ~ "hid") + clr = "fillcolor=\"#a0a0ff\"" + print q plugin q " [style=filled " clr "]" >> dep + } + ' + fi +done +cat post.html +gen_pie "plugins" "$total" "#0088ff" >> after.pie +) > index.html 3>>deps.dot +echo "}" >>deps.dot + +twopi -Tsvg deps.dot > deps.svg + +for n in *.lines +do + lines=`awk '{ sum += $1 } END { print sum }' < $n` + bn=${n%%.lines} + gen_pie $bn $lines >> mods.pie +done + + +classes=`sort < classes | uniq` + +for n in $classes after mods +do + animpie < $n.pie | animator -H -d $n + pngtopnm ${n}0000.png | pnmcrop | pnmtopng > $n.png + rm ${n}0000.png +done + + +rm classes Property changes on: trunk/doc/developer/mods3/gen.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/doc/developer/mods3/gui.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/gui.png =================================================================== --- trunk/doc/developer/mods3/gui.png (nonexistent) +++ trunk/doc/developer/mods3/gui.png (revision 8859) Property changes on: trunk/doc/developer/mods3/gui.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/doc/developer/mods3/index.html =================================================================== --- trunk/doc/developer/mods3/index.html (nonexistent) +++ trunk/doc/developer/mods3/index.html (revision 8859) @@ -0,0 +1,311 @@ + + + sch-rnd modularization + + +

sch-rnd modularization

+

Why bother...

+I believe good software should be modular. This is especially important in +the context of large software, such as CAD applications. There should be +a thin core that can model the world and provide the basic operations defined +on it but anything else should go in separate modules. +

+Sch-rnd is built up from scratch with modularity in mind. +

+I believe such modularization has benefits on multiple levels: +

+ +

Code size in charts

+ +

Overall distribution

+All numbers are in SLOC +and are acquired running sloccount on the given directory. While lines of +code alone is not a true measure of complexity, it's a good estimation. The +slices of pie charts are the major components of the sch-rnd executable. +

+
Main components
+

+The main components are: +

+ +

Zooming on to the plugins

+

+ + + +
total size per class
+
IO plugins
+
+ + + + +
feature plugins
+
export plugins
+
+ + + +
GUI plugins
+
engine plugins
+
+ +

+(Red means the plugin doesn't really work). + +

Progress in numbers

+Below is a table with the summary of core plugins. + +
module size [sloc] status configure
default
class description + + +
act_draw278 + works + buildin + feature + Actions for drawing objects on a graphical sheet or symbol +
act_read333 + works + buildin + feature + Data access related API as actions +
backann1128 + works + buildin + feature + interactive back annotation +
construct465 + works + buildin + feature + construct complex objects from atoms, break up groups +
diag71 + works + buildin + feature + Actions for sch-rnd core diagnostics, intended for developers. These are not in core because end users normally don't need these. As a plugin, due to dynamic loading, it can be dropped on an existing sch-rnd installation with minimal risk of scaring away a reproducible bug. +
export_abst194 + works + buildin + export + export project's abstract model to text +
export_bom254 + works + buildin + export + export a BoM based on the components of the abstract model, using configurable templates +
export_lpr14 + works + buildin + export + Export to lpr (using export_ps to generate postscript) +
export_png267 + works + buildin + export + png, jpeg and gif render +
export_ps576 + works + buildin + export + PostScript, Encapsulated PostScript exporter +
export_spice474 + WIP + buildin + export + SPICE netlist exporter for circuit simulation +
export_svg219 + works + buildin + export + Scalable Vector Graphics exporter +
export_tedax259 + works + buildin + export + export netlist as a tEDAx netlist block +
gui1415 + works + buildin + gui + sch-rnd-specific GUI elements +
io_altium2444 + works + buildin + io + Load schematics from altium schdoc +
io_geda1236 + works + buildin + io + Load schematics and symbols from gEDA format. +
io_lihata1576 + works + buildin + io + Load and save the schematics and symbols in the native lihata format. +
io_ngrp_fawk259 + WIP + buildin + io + non-graphical schematic sheets in form of fawk scripts. +
io_ngrp_tedax393 + works + buildin + io + Load non-graphical schematic sheets in tEDAx format. +
io_tinycad1511 + works + buildin + io + Load schematics from TinyCAD .dsn xml format. +
lib_alien623 + works + buildin + io + Format-independent helper functions for reading alien files +
lib_netlist_exp62 + works + buildin + export + Helper functions for exporting netlists +
lib_ngrp241 + works + buildin + io + Helper functions for handling non-graphical sheets +
lib_plot639 + works + disable-all + gui + subdialog for plotting and navigating graphs +
lib_target133 + works + buildin + export + Helper functions for implementing target plugins +
place137 + works + buildin + feature + place complex objects such as terminals from template +
propedit2203 + works + buildin + feature + List and edit properties of a group of objects. +
query4245 + works + buildin + feature + sch-rnd query language: execute expressions on objects and rules for the programmed drc. +
renumber333 + works + buildin + feature + Systematically change the name of selected symbols +
sch_dialogs6545 + works + buildin + gui + Standard schematics editor dialog boxes +
sim1695 + works + buildin + feature + abstract differences of circuit simiulation implementations, provide an unified interface (infrastructure, CLI and actions) +
sim_gui2138 + works + buildin + feature + GUI for the the a unified high level simulation interface +
sim_ngspice438 + works + buildin + feature + ngspice specific execution glue (for the GUI) +
std_cschem342 + works + buildin + engine + Handles: component connect +
std_devmap1007 + works + buildin + engine + Handles slotting, device mapping and port mapping +
std_forge2088 + works + buildin + engine + Handles: attribute forging +
std_tools1461 + works + buildin + feature + Tools for drawing standard cschem concrete primitives +
symlib_fs119 + works + buildin + symlib + access symbol libraries stored on the local file system +
symlib_local696 + works + buildin + symlib + access symbol library stored within the sheet +
target_none46 + works + buildin + engine + Display original names +
target_pcb176 + works + buildin + engine + Attribute transformations for the PCB workflow +
target_spice1096 + works + buildin + engine + Attribute transformations for the SPICE workflow +
+ +

Classes

+

+Each plugin implements a class (rarely a set of classes). Classes are: + +
name description +
feature random features directly accessible for the user, usually actions +
lib support code library for other plugins (core doesn't depend on these); functionality not directly accessible for the user but other plugins may depend on it +
import load alien formats into the design space +
export save (parts of) the design space in alien formats +
io native file format (save & load) implementation +
+ +

Status

+

+Common status column values mean: + +
name description +
works production quality code - configures, compiles, tested +
WIP work in progress: the plugin may be avaialble for testing but is not yet production quality +
abandoned unmaintained plugin; may be in working condition but there is no developer supporting it +
deprecated legacy plugin scheduled for removal; may still work but will soon be removed; if your workflow depends on it, please report ASAP +
+ +

Plugin dependency map

+

+sch-rnd plugin dependency graph + + + Index: trunk/doc/developer/mods3/io.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/io.png =================================================================== --- trunk/doc/developer/mods3/io.png (nonexistent) +++ trunk/doc/developer/mods3/io.png (revision 8859) Property changes on: trunk/doc/developer/mods3/io.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/doc/developer/mods3/mods.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/mods.png =================================================================== --- trunk/doc/developer/mods3/mods.png (nonexistent) +++ trunk/doc/developer/mods3/mods.png (revision 8859) Property changes on: trunk/doc/developer/mods3/mods.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/doc/developer/mods3/post.html =================================================================== --- trunk/doc/developer/mods3/post.html (nonexistent) +++ trunk/doc/developer/mods3/post.html (revision 8859) @@ -0,0 +1,31 @@ + + +

Classes

+

+Each plugin implements a class (rarely a set of classes). Classes are: + +
name description +
feature random features directly accessible for the user, usually actions +
lib support code library for other plugins (core doesn't depend on these); functionality not directly accessible for the user but other plugins may depend on it +
import load alien formats into the design space +
export save (parts of) the design space in alien formats +
io native file format (save & load) implementation +
+ +

Status

+

+Common status column values mean: + +
name description +
works production quality code - configures, compiles, tested +
WIP work in progress: the plugin may be avaialble for testing but is not yet production quality +
abandoned unmaintained plugin; may be in working condition but there is no developer supporting it +
deprecated legacy plugin scheduled for removal; may still work but will soon be removed; if your workflow depends on it, please report ASAP +
+ +

Plugin dependency map

+

+sch-rnd plugin dependency graph + + + Index: trunk/doc/developer/mods3/pre.html =================================================================== --- trunk/doc/developer/mods3/pre.html (nonexistent) +++ trunk/doc/developer/mods3/pre.html (revision 8859) @@ -0,0 +1,70 @@ + + + sch-rnd modularization + + +

sch-rnd modularization

+

Why bother...

+I believe good software should be modular. This is especially important in +the context of large software, such as CAD applications. There should be +a thin core that can model the world and provide the basic operations defined +on it but anything else should go in separate modules. +

+Sch-rnd is built up from scratch with modularity in mind. +

+I believe such modularization has benefits on multiple levels: +

+ +

Code size in charts

+ +

Overall distribution

+All numbers are in SLOC +and are acquired running sloccount on the given directory. While lines of +code alone is not a true measure of complexity, it's a good estimation. The +slices of pie charts are the major components of the sch-rnd executable. +

+
Main components
+

+The main components are: +

+ +

Zooming on to the plugins

+

+ + + +
total size per class
+
IO plugins
+
+ + + + +
feature plugins
+
export plugins
+
+ + + +
GUI plugins
+
engine plugins
+
+ +

+(Red means the plugin doesn't really work). + +

Progress in numbers

+Below is a table with the summary of core plugins. + +
module size [sloc] status configure
default
class description + + Index: trunk/doc/developer/mods3/symlib.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/doc/developer/mods3/symlib.png =================================================================== --- trunk/doc/developer/mods3/symlib.png (nonexistent) +++ trunk/doc/developer/mods3/symlib.png (revision 8859) Property changes on: trunk/doc/developer/mods3/symlib.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property