MODULE ABEL-Beispiel
TITLE ' ABEL-Quelle als Beispiel
Autoren : xyz, abc
Matrikel : ID 92
Datum : 30.2.1792
'
DECLARATIONS
beispiel DEVICE 'p16v8';
" Festlegung der Schaltkreisanschlussbelegung
I0, I1, I2, I3, I4, I5, I6, I7, I8, GND
PIN 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
OEI9, IO0, IO1, IO2, IO3, IO4, IO5, IO6, IO7, VCC
PIN 11 , 12, 13, 14, 15, 16, 17, 18, 19, 20;
" Zuordnung von Signalnamen
clk = I0; " Taktsignal
x0 = I7; " kombinatorische Eingaenge
x1 = I8;
y1 = IO1; " kombinatorische Ausgaenge
y2 = IO0;
q0 = IO7; " sequentielle Ausgaenge
q1 = IO6;
EQUATIONS
" Beispiel fuer kombinatorische Programmierung: y1=(0,3)
y1 = !x0 & !x1
# x0 & x1;
" weiteres kombinatorisches Beispiel: y2=(1,2):
y2 = x0 & !x1
# !x0 & x1;
" 2-Bit Zaehler als Beispiel fuer sequentielle Programmierung
!q0 := q0;
!q1 := q0 & q1
# !q0 & !q1;
q0.clk = clk;
q1.clk = clk;
END ABEL-Beispiel