home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s199 / 1.img / FLIPFLOP.ABL < prev    next >
Encoding:
Text File  |  1986-02-04  |  480 b   |  27 lines

  1. module _flipflop
  2. title 'Simulation of an asynchronous flip flop'
  3.  
  4.     flipflop    device 'P16L8';
  5.  
  6.     A,B,Y1,Y2    pin 1,2,13,14;
  7.  
  8. equations
  9.  
  10.     Y1    = !(A & Y2);     "Cross coupled flip flop
  11.     Y2    = !(B & Y1); 
  12.  
  13. test_vectors
  14.     ([A,B] -> [Y1,Y2])
  15.      [1,0] -> [ 0, 1];
  16.      [1,1] -> [ 0, 1];
  17.      [0,1] -> [ 1, 0];
  18.      [1,1] -> [ 1, 0];
  19.  
  20. test_vectors
  21.     ([A,B,Y1,Y2] -> [Y1,Y2])
  22.      [1,0, 0, 1] -> [ 0, 1];
  23.      [1,1, 0, 1] -> [ 0, 1];
  24.      [0,1, 1, 0] -> [ 1, 0];
  25.      [1,1, 1, 0] -> [ 1, 0];
  26. end
  27.