]> permondes.de Git - Analog_Engine.git/blob - Radioactive Decay.AESL
34b3acfa3331191a3598de34b6b64bac6aa31830
[Analog_Engine.git] / Radioactive Decay.AESL
1 IDENTIFICATION DIVISION
2 PROGRAM-ID Radioactive_Decay
3
4 ENVIRONMENT DIVISION
5 ENGINE Anabrid-THAT
6 REQUIRES Coefficient 2
7 REQUIRES Integrator 1
8 REQUIRES Inverter 1
9
10 DATA DIVISION
11 OUTPUT OUT.X N
12 ALIAS COEFFICIENT.1 InitialValue
13 ALIAS COEFFICIENT.2 Decay
14
15 PROGRAM DIVISION
16 +1 -> InitialValue -> N0
17 N’, IC:N0 -> Integrator.1 -> -N
18 -N -> Decay -> -lambda*N=N’
19 -N -> Inverter.1 -> N
20
21 OPERATION DIVISION
22 MODE REPEAT
23 OP-TIME 20ms