Skip to content

analog-system-compiler/asysc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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

Using a Computer Algebra System (CAS), you can write your own components by using algebraic descriptions.

Description example for a resistor:

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