logicname sample { -------------------------------------- } { 実効譜 } { -------------------------------------- } entity sp input a; output q; bitr rq[2]; switch(rq) case 0: if (a) rq = 1; endif case 1: rq = 2; case 2: if (a) rq = rq; else rq = 0; endif endswitch q = rq.0; ende { -------------------------------------- } { 機能実行譜 } { -------------------------------------- } entity sim output a; output q; bitr tc[5]; part sp(a,q) tc=tc+1; if ((tc>3)&(tc<8)) a=1; endif if (tc==13) a=1; endif ende endlogic |