{ ===================================================== }
{ 74LP390 }
{ ===================================================== }
logicname 74LP390
{ ----------------------------------------------------- }
{ 実効譜 }
{ ----------------------------------------------------- }
entity TTL
input CLR;
input CP;
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)
if (q==9)
q=0;
else
q=q+1;
endif
else
q=q;
endif
endif
Q=q;
TP_p=p.0;
ende
{ ----------------------------------------------------- }
{ 機能実行譜 }
{ ----------------------------------------------------- }
entity sim
output CLR;
output CP;
output Q[4];
output TP_p;
bitn q[4];
bitr tc[8];
part TTL(CLR,CP,q,TP_p)
tc=tc+1;
CP=tc.2;
if (tc>3) CLR=0; else CLR=1; endif
Q=q;
ende
endlogic