summaryrefslogtreecommitdiffstats
path: root/Bachelor/Digitaltechnik 2/SS07/P6/p6a1.abl
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Bachelor/Digitaltechnik 2/SS07/P6/p6a1.abl
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Bachelor/Digitaltechnik 2/SS07/P6/p6a1.abl')
-rwxr-xr-xBachelor/Digitaltechnik 2/SS07/P6/p6a1.abl95
1 files changed, 95 insertions, 0 deletions
diff --git a/Bachelor/Digitaltechnik 2/SS07/P6/p6a1.abl b/Bachelor/Digitaltechnik 2/SS07/P6/p6a1.abl
new file mode 100755
index 0000000..739e7a5
--- /dev/null
+++ b/Bachelor/Digitaltechnik 2/SS07/P6/p6a1.abl
@@ -0,0 +1,95 @@
+MODULE ampel1
+TITLE 'Ampelsteuerung 1, state diagram'
+DEClARATIONS
+ clk pin 15; " I/O 0, Eingang für den Takt
+ rst pin 16; " I/O 1, Eingang für das Reset Signal
+ ce pin 17; " I/O 2, Eingang für das Enable Signal
+ vg,vy,vr,fg,fr pin 25,26,27,28,29 istype 'reg'; " I/O 8,9,10,11,12
+
+" bus definition, vector, register
+ ampel = [vg,vy,vr,fg,fr];
+
+EQUATIONS
+ ampel.clk = clk;
+
+STATE_DIAGRAM ampel;
+ State 0:
+ if(!rst & ce) then 17; " Bei Erfüllung der Bedingung erfolgt ein Übergang in State 17
+ else 0;
+ State 1:
+ goto 0; " es erfolgt ein bedingungsloser Übergang in State 0
+ State 2:
+ goto 0;
+ State 3:
+ goto 0;
+ State 4:
+ goto 0;
+ State 5:
+ goto 0;
+ State 6:
+ if (rst) then 0;
+ else if (ce) then 13;
+ else 0;
+ State 7:
+ if (rst) then 0;
+ else if (ce) then 8;
+ else 7;
+ State 8:
+ if (rst) then 0;
+ else if (ce) then 9;
+ else 8;
+ State 9:
+ if (rst) then 0;
+ else if (ce) then 6;
+ else 0;
+ State 10:
+ goto 0; " es erfolgt ein bedingungsloser Übergang in State 0
+ State 11:
+ goto 0;
+ State 12:
+ goto 0;
+ State 13:
+ if (rst) then 0;
+ else if (ce) then 17;
+ else 0;
+ State 14:
+ goto 0;
+ State 15:
+ goto 0;
+ State 16:
+ goto 0;
+ State 17:
+ if (rst) then 0;
+ else if (ce) then 9;
+ else 0;
+ State 18:
+ goto 0;
+ State 19:
+ goto 0;
+ State 20:
+ goto 0;
+ State 21:
+ goto 0;
+ State 22:
+ goto 0;
+ State 23:
+ goto 0;
+ State 24:
+ goto 0;
+ State 25:
+ goto 0;
+ State 26:
+ goto 0;
+ State 27:
+ goto 0;
+ State 28:
+ goto 0;
+ State 29:
+ goto 0;
+ State 30:
+ goto 0;
+ State 31:
+ goto 0;
+
+END
+