{ ===================================================== }
{ 74LP174 }
{ ===================================================== }
logicname 74LP174
{ ----------------------------------------------------- }
{ 実効譜 }
{ ----------------------------------------------------- }
entity TTL
input CLR;
input CP;
input D[4];
output Q[4];
output TP_p;
bitr q[4];
bitr p[2];
if (CP)
if (p==0)
p=1;
else
if (p==1)
p=2;
else
p=p;
endif
endif
else
p=0;
endif
if (CLR)
if (p.0)
q=D;
else
q=q;
endif
else
q=0;
endif
Q=q;
TP_p=p.0;
ende
{ ----------------------------------------------------- }
{ 機能実行譜 }
{ ----------------------------------------------------- }
entity sim
output CLR;
output CP;
output D[4];
output Q[4];
output TP_p;
bitr tc[5];
part TTL(CLR,CP,D,Q,TP_p)
tc=tc+1;
if ((tc>3)&(tc<12)) CLR=1; else CLR=0; endif
if (tc>9) CP=0; else CP=tc.1; endif
if ((tc>5)&(tc<9)) D=5; endif
ende
endlogic