Codebase list adms / 866b0c2
Import upstream version 2.3.7+git20201211.1.2097728 Debian Janitor 2 years ago
9 changed file(s) with 341 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 image: Visual Studio 2019
01 environment:
12 matrix:
23 - MSYSTEM : MINGW64
3334
3435 - bash -lc "exec 0</dev/null && /c/adms-win%MBITS%/bin/admsXml -v"
3536
37 test_script:
38 - bash -lc "cd $APPVEYOR_BUILD_FOLDER/testcases && ./testADMS.sh /c/adms-win%MBITS%/bin/admsXml.exe"
39
3640 after_build:
3741 # artifacts path is always relative to build folder, so put the zip there
3842 - 7z a %APPVEYOR_BUILD_FOLDER%\adms-win%MBITS%.zip %ADMSDIR%
11
22 sudo: required
33 dist: trusty
4 arch:
5 - ppc64le
6 - AMD64
47
58 compiler:
69 - gcc
(New empty file)
0 CLEANFILES = discipline.h .*.va.adms .adms.implicit.xml .interface.xml
0 # 1 "./0000_scale_factor.va"
1
2
3
4
5
6 module scaling();
7 parameter integer itera = 1T;
8 parameter integer igiga = 1G;
9 parameter integer imega = 1M;
10 parameter integer iKilo = 1K;
11 parameter integer ikilo = 1k;
12 parameter integer imili = 1m;
13 parameter integer imicro = 1u;
14 parameter integer inano = 1n;
15 parameter integer ipico = 1p;
16 parameter integer ifemto = 1f;
17 parameter integer iatto = 1a;
18
19 parameter integer iexa = 1E;
20 parameter integer ipeta = 1P;
21 parameter integer ihecto = 1h;
22 parameter integer ideca = 1D;
23 parameter integer ideci = 1d;
24 parameter integer icenti = 1c;
25 parameter integer iamgstron = 1A;
26
27 parameter real tera = 1.0T;
28 parameter real giga = 1.0G;
29 parameter real mega = 1.0M;
30 parameter real Kilo = 1.0K;
31 parameter real kilo = 1.0k;
32 parameter real mili = 1.0m;
33 parameter real micro = 1.0u;
34 parameter real nano = 1.0n;
35 parameter real pico = 1.0p;
36 parameter real femto = 1.0f;
37 parameter real atto = 1.0a;
38
39 parameter real exa = 1.0E;
40 parameter real peta = 1.0P;
41 parameter real hecto = 1.0h;
42 parameter real deca = 1.0D;
43 parameter real deci = 1.0d;
44 parameter real centi = 1.0c;
45 parameter real amgstron = 1.0A;
46
47 endmodule
0 # 1 "./0001_operator.va"
1
2
3 # 1 "discipline.h"
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 # 25 "discipline.h"
27
28
29
30 nature current
31 access = I;
32 units = "A";
33 abstol = 0.001234;
34 endnature
35
36
37 nature voltage
38 access = V;
39 units = "V";
40 abstol = 0.0004321;
41 endnature
42
43
44 nature power
45 access = Pwr;
46 units = "W";
47 abstol = 0.00101010;
48 endnature
49
50
51 nature flux
52 access = Phi;
53 units = "We";
54 endnature
55
56
57 nature temperature
58 access = Temp;
59 units = "K";
60 abstol = 3.14;
61 endnature
62
63
64 discipline thermal
65 potential temperature;
66 flow power;
67 enddiscipline
68
69
70 discipline electrical
71 potential voltage;
72 flow current;
73 enddiscipline
74
75 discipline magnetic
76 potential voltage;
77 flow current;
78 enddiscipline
79
80 discipline rotational_omega
81 potential voltage;
82 flow current;
83 enddiscipline
84
85
86
87 # 4 "./0001_operator.va"
88
89 module sometest(p,n);
90 inout p,n;
91 electrical p,n;
92
93 parameter real c=1e-6 from [0:inf);
94 analog begin
95 begin
96 I(p,n) <+ c*ddt(V(n,p)*9);
97 I(p,n) <+ exp(ddt(V(p,n)));
98 end
99 end
100 endmodule
101
102 module anothertest(p,n);
103 inout p,n;
104 electrical p,n;
105
106 parameter real c=1e-6 from [0:inf);
107 analog begin
108 begin
109 real foo; foo = c*idt(exp(V(p,n)));
110 I(p,n) <+ pow(ddt(foo*V(p,n)),2);
111 end
112 end
113 endmodule
0 # 1 "./0002_transition.va"
1
2 module trans();
3
4 real out1, expr1, td, rt, ft, ttol;
5
6 real out2, expr2;
7
8 analog begin
9 out1 = transition(expr1, td, rt, ft, ttol);
10
11 out2 = transition(expr2 - 1.5, td);
12 end
13
14 endmodule
0 # 1 "./0003_subdev.va"
1
2 # 1 "discipline.h"
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 # 25 "discipline.h"
26
27
28
29 nature current
30 access = I;
31 units = "A";
32 abstol = 0.001234;
33 endnature
34
35
36 nature voltage
37 access = V;
38 units = "V";
39 abstol = 0.0004321;
40 endnature
41
42
43 nature power
44 access = Pwr;
45 units = "W";
46 abstol = 0.00101010;
47 endnature
48
49
50 nature flux
51 access = Phi;
52 units = "We";
53 endnature
54
55
56 nature temperature
57 access = Temp;
58 units = "K";
59 abstol = 3.14;
60 endnature
61
62
63 discipline thermal
64 potential temperature;
65 flow power;
66 enddiscipline
67
68
69 discipline electrical
70 potential voltage;
71 flow current;
72 enddiscipline
73
74 discipline magnetic
75 potential voltage;
76 flow current;
77 enddiscipline
78
79 discipline rotational_omega
80 potential voltage;
81 flow current;
82 enddiscipline
83
84
85
86 # 3 "./0003_subdev.va"
87
88 module net(p, n);
89 inout p, n;
90 electrical p, n;
91
92
93 parameter real dummy=1 from [0:inf);
94
95 analog begin
96 begin
97 V(p, n) <+ 0;
98 end
99 end
100 endmodule
101
102 module RESISTOR(p, n);
103 inout p, n;
104 electrical p, n;
105
106 parameter real r=1 from [0:inf);
107 analog begin
108 begin
109 I(p, n) <+ V(p, n) / r;
110 end
111 end
112 endmodule
113
114 module schematic(pp, nn);
115 inout pp, nn;
116 electrical pp, nn;
117 electrical p_int, n_int;
118
119 net #(.dummy(0)) n1(p, p_int);
120 net #(.dummy(0)) n2(n, n_int);
121 RESISTOR #(.r(1)) r1(pp, nn);
122 endmodule
0 #
1 # Request admsXml as argument
2 #
3 if [ -z "$1" ]
4 then
5 echo " Missing path to admsXml executable."
6 echo " Example: $ sh testADMS.sh /usr/local/admsXml"
7 exit 1
8 else
9 ADMSXML=$1
10 echo " Testing admsXml"
11 echo " Using: $ADMSXML"
12 fi
13
14 #
15 # list of all the tests to be run
16 #
17 arrayTest=(
18 0000_scale_factor
19 0001_operator
20 0002_transition
21 0003_subdev)
22
23 # todo
24 srcdir=.
25 #
26 # run admsXml and check output against reference
27 #
28 for test in "${arrayTest[@]}"
29 do
30 $ADMSXML ${srcdir}/$test.va -e ${srcdir}/$test.xml
31 cmp ${srcdir}/out/.$test.va.adms .$test.va.adms
32 done