File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 3
3
4
4
** asysc** is an analog system compiler based on the lightweight Computer Algebra System ** lightcas** .
5
5
6
- Using a Computer Algebra System (CAS), you can write your own components by using algebraic descriptions.
7
-
8
- Description example for a resistor:
6
+ With ASysC, you can write your own components by using algebraic descriptions. For instance, consider the resistor declaration:
9
7
10
8
NAME.CR(@1,@2,R) := {
11
9
NAME.U=ACROSS(@1,@2);
Original file line number Diff line number Diff line change 3
3
SHELL = /bin/bash
4
4
CIRCUITS_SRC = $(shell find -name "* .cir")
5
5
CIRCUITS_PY = $(CIRCUITS_SRC:.cir=.py )
6
- SIMULATION_PY = $(shell find -name simulation.py )
6
+ EXAMPLE_DIRS = $(dir $( CIRCUITS_SRC ) )
7
7
BIN_DIR = ../lightcas/bin
8
8
9
9
all : $(CIRCUITS_PY )
10
10
11
- % .py : % .cir circuit_base.py
12
- cp -f circuit_base.py $(@D )
11
+ % .py : % .cir circuit_base.py
13
12
-if [[ " $^" == * " ac/" * ]]; \
14
13
then \
15
14
ANALYSIS_MODE=" ac" ; \
@@ -25,12 +24,13 @@ endif
25
24
-[ -f debug.log ] && mv debug.log $(@D)
26
25
27
26
clean :
28
- -rm -f $(CIRCUITS_PY )
27
+ -rm -f $(CIRCUITS_PY ) $( addsuffix "circuit_base.py", $( EXAMPLE_DIRS ) )
29
28
30
29
run : all
31
- for SIM_FILE in $( SIMULATION_PY) ; do \
32
- pushd $$(dirname $$SIM_FILE ) > /dev/null; \
33
- echo Executing $$(dirname $$SIM_FILE ) /simulation.py; \
30
+ for EXAMPLE_DIR in $( EXAMPLE_DIRS) ; do \
31
+ cp -fu circuit_base.py $$ EXAMPLE_DIR; \
32
+ pushd $$ EXAMPLE_DIR > /dev/null; \
33
+ echo Executing $$ EXAMPLE_DIR/simulation.py; \
34
34
python3 simulation.py; \
35
35
popd > /dev/null; \
36
36
done
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ def add_plot( axs, element ):
29
29
30
30
my_circuit = circuit ()
31
31
my_circuit .NOT1_Uin .init ( 5 )
32
+
32
33
my_circuit .simulate_t (0.01 , 512 )
33
34
34
35
fig , axs = plt .subplots (1 , 1 , layout = 'constrained' )
You can’t perform that action at this time.
0 commit comments