Skip to content

analog-system-compiler/asysc

Repository files navigation

Introduction

asysc is an analog system compiler based on the lightweight Computer Algebra System lightcas.

With ASysC, you can write your own components by using algebraic descriptions. For instance, consider the resistor declaration:

NAME.CR(@1,@2,R) := { 
    NAME.U=ACROSS(@1,@2); 
    NAME.I=THROUGH(@1,@2); 
    NAME.U=R*NAME.I 
};

For more examples, see the component.rule and examples directories.

The analog system compiler is invoked with the following command (Example with the RLC circuit in AC mode analysis):

cd examples/ac/RLC
../../../lightcas/bin/asysc -i RLC.cir -o RLC.py -t ac

This command generates Python code containing equations for AC simulation.

Requirements

C++ requirement

- g++ or clang
- make

Python requirements

- numpy
- matplotlib

Getting source code

git clone https://github.com/analog-system-compiler/asysc.git
cd asysc
git submodule update --init

Code compilation

make clean
make

Run all tests

make run

Run a specific test

To execute a particular test, type:

cd examples
make
cd examples/<directory>
python3 simulation.py

License

This project is licensed under the GNU General Public License - see the LICENSE file for details.

Examples

Some transient analysis examples

Transient examples

Some AC analysis examples

AC examples

Releases

No releases published

Packages

No packages published