{ ===================================================== }
{ 74LP298 }
{ ===================================================== }
logicname 74LP298
{ ----------------------------------------------------- }
{ 実効譜 }
{ ----------------------------------------------------- }
entity TTL
input CP;
input SEL;
input A[4];
input B[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 (p.0)
if (SEL)
q=B;
else
q=A;
endif
else
q=q;
endif
Q=q;
TP_p=p.0;
ende
{ ----------------------------------------------------- }
{ 機能実行譜 }
{ ----------------------------------------------------- }
entity sim
output CP;
output SEL;
output A[4];
output B[4];
output Q[4];
output TP_p;
bitr tc[5];
part TTL(CP,SEL,A,B,Q,TP_p)
tc=tc+1;
CP=tc.2;
if ((tc>7)&(tc<11)) A=5; endif
if ((tc>15)&(tc<19)) B=10; endif
if (tc>13) SEL=1; endif
ende
endlogic