module FSM03
Title '110 recognizer'

Declarations

  Clock		PIN;
  Reset		PIN;
  SerIn 	PIN;
  SerOut 	PIN istype 'com';
  Q0, Q1	PIN istype 'reg';

Equations
  Q0.CLK = Clock ;
  Q1.CLK = Clock ;
  Q0.AR  = Reset ;
  Q1.AR  = Reset ;

  Q0 := Q1 & SerIn  #  Q0 & SerIn ;
  Q1 := !Q0 & !Q1 & SerIn ;

  SerOut = Q0 & !SerIn ; 

end FSM03
