home *** CD-ROM | disk | FTP | other *** search
- module _flipflop
- title 'Simulation of an asynchronous flip flop'
-
- flipflop device 'P16L8';
-
- A,B,Y1,Y2 pin 1,2,13,14;
-
- equations
-
- Y1 = !(A & Y2); "Cross coupled flip flop
- Y2 = !(B & Y1);
-
- test_vectors
- ([A,B] -> [Y1,Y2])
- [1,0] -> [ 0, 1];
- [1,1] -> [ 0, 1];
- [0,1] -> [ 1, 0];
- [1,1] -> [ 1, 0];
-
- test_vectors
- ([A,B,Y1,Y2] -> [Y1,Y2])
- [1,0, 0, 1] -> [ 0, 1];
- [1,1, 0, 1] -> [ 0, 1];
- [0,1, 1, 0] -> [ 1, 0];
- [1,1, 1, 0] -> [ 1, 0];
- end
-