Using Symbolic State Descriptions
a,b,clock pin; " inputs
a_reset,s_reset pin; " reset inputs
x,y pin istype 'com'; " simple outputs
sreg1 state_register;
S0..S3 state;
equations
sreg1.clk = clock;
state_diagram sreg1
state S0:
goto S1 with {x = a & b;
y = 0; };
state S1: if (a & b)
then S2 with {x = 0;
y = 1; };
state S2: x = a & b;
y = 1;
if (a) then S1 else S2;
state S3:
goto S0 with {x = 1;
y = 0; };
async_reset S0: a_reset;
sync_reset S0: s_reset;
end