Blame | Last modification | View Log | Download | RSS feed
% PENTAGON-1024SL ver 2.2*** Main CPLD design ***ATM 1991Alone Coder 2005-2006King Of Evil 2004-2006%Title "P1024SL";Subdesign P1024SL(f14, mreq, iorq, rfsh, rd, port1, port2,d[7..0], a14, a15, ram[7..0], res, dos : input;sync, r, g, b, bright, av[15..0], cas, ras, we, hl,clk, wait, busrq, int, x2, csos, mem[3..0], y0, y1: output;)Variabletrig[6..0], count1[3..0], count2[3..0], count3[3..0],count4[3..0], countstr, bordtrg, inttrg, penttrg1, penttrg2,memtrg, porteff7[4..0], port7ffd[7..0], ramq[7..0],ramo[7..0], raml[7..0], shift[7..0], portfe[2..0], flash[4..0],brgout[3..0],delay:dff;f7, f35, z, of7, ocas, oras, turbo, x18, stba, stbv,var1, var2, var3, L, 4trb, perenos1, perenos2, ssi, k,x2, x3, c3, bordi, bordo, x9, x17, 16col, 384av14,x15, x16, ksi, x1516, bord, dsp, rf1, 1a, ptg,v, stb, ef0, gonki, 7ffd, eff7, wrfe,y2, 128k, romram, 384x304, rubilnik, zero, x10, x11,q[7..0], o[7..0], ll[7..0], stba1, c31, vms1, vms,vvms, br2, flsh, br, bg, bb, 16av13, 16av14, vb, vr,vg, brg, ob, orr, og, obrg, a1415, portwait :node;Begin% ╘юЁьшЁєхь юёэютэ√х ёшэїЁюёшуэры√ (т ЄюўэюёЄш ъръ т яхэЄруюэ-128, эшўхую эютюую) %trig[0].clk=f14;of7=trig[0].q;f7=not(of7);trig[0].d=f7;trig[1].clk=(f7);z=trig[1].q;f35=not(z);trig[1].d=f35;var1=not(f14);trig[2].clk=var1; % ╧хэЄруюэ, тёх Єръш :) %trig[2].d=f35;oras=trig[2].q; ras=not(oras);trig[3].clk=var1; trig[3].d=oras;ocas=trig[3].q; cas=not(ocas);%trbtrg.d=not(turbo or (dos and not(romram)));trbtrg.clk=not(rfsh);%trig[4].d=(turbo or (dos and not(rfsh)));% ┬ ─╬╤х ЄєЁєсє т√ъы■ўрхь, эю эх ёЁрчє, р фюцфрт°шё№ чртхЁ°хэш ЄръЄют юцшфрэш %trig[4].clk=of7; var2=trig[4].q;% WAIT сєфхЄ ёЇюЁьшЁютрэ яЁш юсЁр∙хэшш т ярь Є№ тэх ╧╟╙ шышяЁш юсЁр∙хэшш т 0-■ ёЄЁрэшЎє, хёыш Єрь тъы■ўхэю ╬╟╙ тьхёЄю ╧╟╙ %l=(mreq nor ((a14 or a15) nor romram));4trb=hl nand ocas;trig[5].clrn=(4trb and res);trig[5].clk=l; trig[5].d=RFSH;we=(1a or (rd nand l));% єфышэ хь IORQ ё яюью∙№■ WAIT т ЄєЁсх %delay.clk = clk;delay.d=iorq or not(delay.q);portwait = delay.q;var3=not(trig[5].q);IF var2 THEN wait=vcc; trig[6].d=f35;ELSE wait=var3 and portwait; trig[6].d=of7;END IF;trig[6].clk = f14;clk = trig[6].q;count1[].clk=z;count1[].d=count1[].q+1;perenos1 = count1[0].q and count1[1].q and count1[2].q and count1[3].q;perenos2 = count2[0].q and count2[1].q and count2[2].q and count2[3].q;count2[].clk=(not perenos2) xor perenos1;if perenos2 thencount2[].d=1;elsecount2[].d=count2[].q+1;end if;ssi=not(count2[0].q or count2[1].q or count2[3].q);countstr.clk=ssi; x18=not(countstr.q); countstr.d=x18;count3[].clk=countstr.q; count3[].d=count3[].q+1;av0=count1[2].q; av1=count1[3].q; av2=count2[0].q; av3=count2[1].q;av4=count2[2].q; av5=count3[2].q; av6=count3[3].q; av7=count4[0].q;x10=count3[0].q; x11=count3[1].q;count4[].clk=not(AV6);if count4[].q==B"101x" thencount4[].clrn=count4[3].q nand count4[1].q;else count4[].clrn=vcc; count4[].d=count4[].q+1;end if;x9=count2[3].q; x15=count4[1].q; x16=count4[2].q; x17=count4[3].q;x1516=x15 and x16; ksi=av6 and av7 and x1516;inttrg.clk=ksi; inttrg.d=gnd; inttrg.prn=((not av2) nand av3);int=inttrg.q;384av14=x1516 nor x17; bordi=384av14 nand x9;bordtrg.clk=av0; bordtrg.d=bordo;bord=(bordtrg.q or (bordo and 16col));memtrg.d=not(bordo); memtrg.clk=hl; memtrg.clrn=x2 nand x3;rf1=not(memtrg.q);hl=penttrg1.q; 1a=not(hl);penttrg1.clk=cas; penttrg1.clrn=rfsh;%penttrg1.prn = trig[9].q;%penttrg1.d=1a and l and rf1;penttrg2.clk=cas; ptg=penttrg2.q;penttrg2.d=1a xor ptg;v=(not (ptg) or 16col); stb=oras and 1a;stba=((ef0 and ptg) nand stb);stbv=v nand stb;av12=(v nand (not (x16)));% "─х°шЇЁрЎш " °шЇЁютрээюую ёшуэрыр юсЁр∙хэш ъ яюЁЄрь¤Єю тёх юЄ схфэюЄ√... %gonki=clk or iorq;if port1==vcc and port2==vcc and gonki==gnd then 7ffd=gnd;else 7ffd=vcc;end if;if port1==gnd and port2==gnd and gonki==gnd then eff7=vcc;else eff7=gnd;end if;if port1==gnd and port2==vcc then wrfe=vcc;else wrfe=gnd;end if;porteff7[].clrn=res; porteff7[].clk=eff7;porteff7[0].d=d0; 16col=porteff7[0].q;porteff7[1].d=d2; 128k=porteff7[1].q;porteff7[2].d=d3; romram=porteff7[2].q;porteff7[3].d=d4; turbo=porteff7[3].q;porteff7[4].d=d6; 384x304=porteff7[4].q;port7ffd[].clrn=res; port7ffd[].d=d[]; rubilnik=port7ffd[5].q;port7ffd[].clk=((rubilnik and 128k) nor 7ffd);% ----------- %av15=port7ffd[3].q; csos=port7ffd[4].q;if a14==gnd or a15==gnd or 128k==vcc then zero=gnd;else zero=vcc;end if;mem[0]=rubilnik and zero;mem[2]=port7ffd[6].q and zero;mem[3]=port7ffd[7].q and zero;mem[1]=1a nor y2;a1415=a14 nand a15;if a1415 then y0=a14; y1=a15; y2=a14;else y0=port7ffd[0].q; y1=port7ffd[1].q; y2=port7ffd[2].q;end if;portfe[].clrn=vcc; portfe[].clk=wrfe; portfe[2..0].d=d[2..0];bg=portfe[2].q; br=portfe[1].q; bb=portfe[0].q;x2=count1[0].q; x3=count1[1].q; c3=not(x3);k=x2 and x3 and f35;flash[].clk=ksi;flash[].d=flash[].q+1;flsh=flash[4].q;dsp=(((av3 nor x9) and av4) xnor ksi);if v then av8=x18;av9=x10;av10=x11;av11=x15;else av8=x15;av9=x16;av10=gnd;av11=384av14;end if;ramq[].d=ram[]; q[]=ramq[].q;ramq[].clk=stbv; % чр∙хыъэєыш Ёрч %ramo[].d=ram[]; o[]=ramo[].q;ramo[].clk=stba1; % чр∙хыъэєыш фтр %raml[].d=o[]; ll[]=raml[].q;raml[].clk=c31; % чр∙хыъэєыш ЄЁш %if 16col then vms1=f35; br2=ll[7]; stba1=oras; c31=z;else vms1=vms; br2=ll6; stba1=stba; c31=c3;end if;16av13=16col and x3; ef0=not(16col); 16av14=ef0 or x2;busrq=ef0 or bordo;if 384x304 then bordo=gnd; av13=x9; av14=384av14;else bordo=bordi; av13=16av13; av14=16av14;end if;shift[].clk=f7;if k then shift[].d=q[];else shift[7..1].d=shift[6..0].q; shift[0].d=gnd;end if;vvms=shift[7].q;vms=((flsh nand ll7) xor vvms);if vms1 then vb=ll3; vr=ll4; vg=ll5; brg=br2;else vb=ll0; vr=ll1; vg=ll2; brg=ll6;end if;if bord then ob=bb; orr=br; og=bg; obrg=gnd;else ob=vb; orr=vr; og=vg; obrg=brg;end if;brgout[].clrn=dsp; brgout[].clk=f7;brgout[0].d=ob; b=brgout[0].q;brgout[1].d=orr; r=brgout[1].q;brgout[2].d=og; g=brgout[2].q;brgout[3].d=obrg; bright=brgout[3].q;sync=ssi xnor ksi;end;