Design document open for discussion


To ng-spice <ng-spice@ieee.ing.uniroma1.it>
From Manu Rouat <emmanuel.rouat@wanadoo.fr>
Date Fri, 01 Oct 1999 14:19:15 +0200
Delivered-To mailing list ng-spice@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-help@ieee.ing.uniroma1.it; run by ezmlm
Organization la Guilde
Reply-To ng-spice@ieee.ing.uniroma1.it
Sender rouat@war.wanadoo.com


Here are a few thoughts/corrections/suggestions on Arno's document:


LICENSING
=========

> Currently, the tree is BSD licensed (see COPYING for the whole
> license).  The majority of the contributors to the project wish to
> bring the software under a GPL (compatible) license ASAP.  Due to
> legal incompatibilities between the GPL and BSD licensing, it is not
> possible to link pieces of software statically to each other and
> distribute it.  Dynamically linked pieces don't seem to pose much
> problem.

> Therefore, if we want to move to a GPL license while retaining working
> revisions during the transition, almost all parts need to be made into
> shared libraries that can be loaded at runtime.  Specific parts of the 
> code can than be converted to the GPL.


It seems to me that the best alternative would be to have the 'core' of the 
simulator
licensed under the GPL, with the possibility to link models that are not 
under GPL
(the way the linux kernel allows non-GPL'd modules). 

By 'core' of the simulator, I mean of course front-end, matrix resolution etc.
Having the models put under GPL or LGPL is preferable of course. 



CODING STYLE
============

This project uses the BSD coding style.  It is the prevalent coding
style in use for most of the source code.  It is not advisable to
to force it into some other coding style.




DIRECTORY ORGANIZATION
======================

> This is the proposed directory tree.  To be done: map current
> directories and source files to this new structure.

I suggest the following (slightly different):


ng-spice/               # the interpreter/batch simulator
    contrib/            # contributions
    tests/              # test suite for ngspice 
    src/                # the main source tree
        main.c          # the main program for ngspice and nutmeg             
  
                include/                # ngspice general data structures, 
macro's, defines
                        ngspice.h
                        struct.h
                        macros.h
                        defines.h   

                parser/    (we could call this 'front-end' ? since it does 
both parsing
                                and input )
                        include/        # API for circuit/netlist parser
                        
                analysis/       # modes of analysis
                        include/        # API for analysis
                        tran/
                        ac/
                        dc/
                        sens/
                        noise/
                        ...
                        tests/    # tests for analysis functions
                devices/
                        include/  # generic device interface
                        asrc/ # implementation of asrc device
                        bjt/  # implementation of bjt device
                        bsim1/
                        bsim2/
                        ...
                        tests/    # tests for dynamic device loading, math 
props
                maths/        # math subroutines
                        include/  
                        sparse/
                        fft/
                        ...
                        tests/


Note that the lib/ and bin/ directories disappear, and that there is only one 
main.c
file left (do we really need sconvert, proc2mod etc ? )

We might also need an 'output' directory, for the code that handles the 
output of
log files and rawfiles (unless this goes with parser?)


manu


Partial thread listing: