10:1 frequencedivider

MODULE FQT
TITLE 'FQT'
"Author: Lunetikk 
"Zweck: 10:1 Frequenzteiler
 
declarations
FF0 node istype 'buffer,reg';
FF1 node istype 'buffer,reg';
FF2 node istype 'buffer,reg';
FF3 node istype 'buffer,reg';
takt pin 11;
GT pin 3 ISTYPE 'BUFFER,COM';
 
equations
FF3.clk   = takt; //Takt wird zugewiesen
FF2.clk   = takt; // "
FF1.clk  = takt;  // "
FF0.clk = takt;   // "
 
Truth_Table
([FF3, FF2, FF1, FF0] :> [FF3, FF2, FF1, FF0])
[0,0,0,0]:>[0,0,0,1]; "0-1
[0,0,0,1]:>[0,0,1,0]; "1-2
[0,0,1,0]:>[0,0,1,1]; "2-3
[0,0,1,1]:>[0,1,0,0]; "3-4
[0,1,0,0]:>[0,1,0,1]; "4-5
[0,1,0,1]:>[0,1,1,0]; "5-6
[0,1,1,0]:>[0,1,1,1]; "6-7
[0,1,1,1]:>[1,0,0,0]; "7-8
[1,0,0,0]:>[1,0,0,1]; "8-9
[1,0,0,1]:>[0,0,0,0]; "9-0
 
truth_table
([FF3.q, FF2.q, FF1.q, FF0.q] -> [GT])
[0,0,0,0]->[0];
[0,0,0,1]->[0];
[0,0,1,0]->[0];
[0,0,1,1]->[0];
[0,1,0,0]->[0];
[0,1,0,1]->[0];
[0,1,1,0]->[0];
[0,1,1,1]->[0];
[1,0,0,0]->[0];
[1,0,0,1]->[1];
 
END