Текст программной части на VHDL, страница 4

tempy(i*2+1+offset) := tempy(i+offset)*CONV_UNSIGNED(INTEGER(factor),8);

end if;

end if;

end loop;

end loop;   

for i in 0 downto 65535 loop                                                                                                                 --{Copy to Pic}

RRStore(i) := tempy(i);

end loop;   

--+++++++++++++++++++++ обработка сигнала GREEN +++++++++++++++++++++                                                   elsif    (IND = 2) then      

for i in 0 downto SZ-1 loop

for j in 0 downto (SZ/2)-1 loop

if (WG(i+(j+(SZ/2))*256) /= 0) or ( j = ((SZ/2)-1)) or (j = 0) or (SZ < 4) then

tempy(i+j*512) := (WG(i+j*256)+WG(i+(j+(SZ/2))*256))*CONV_UNSIGNED(INTEGER(factor),8);  -{LOWPASS}

tempy(i+(j*2+1)*256):=(WG(i+j*256)-WG(i+(j+(SZ/2))*256))*CONV_UNSIGNED(INTEGER(factor),8);                                             else --{!UPDATED}

if (WG(i+(j-1+(SZ/2))*256) = 0) and (WG(i+(j+1)*265) /= WG(i+j*256))

and ((j = ((SZ/2)-2)) or (WG(i+(j+1)*256) /= WG(i+(j+2)*256))) then

tempy(i+j*512) := (WG(i+j*256)+WG(i+(j-1)*256))*CONV_UNSIGNED(INTEGER(factor),8);                              --{LOW-PASS}

else

tempy(i+j*512) := WG(i+j*256)*CONV_UNSIGNED(INTEGER(factor),8);

end if;

if (WG(i+(j+1+(SZ/2))*256) = 0) and (WG(i+(j-1)*265) /= WG(i+j*256)) and

((j = 1) or (WG(i+(j-1)*256) /= WG(i+(j-2)*256))) then

tempy(i+(j*2+1)*256) := (WG(i+j*256)+WG(i+(j+1)*256))*CONV_UNSIGNED(INTEGER(factor),8);           --{HIGH-PASS}

else

tempy(i+(j*2+1)*256) := WG(i+j*256)*CONV_UNSIGNED(INTEGER(factor),8);

end if;

end if;

end loop;

end loop;

for j in 0 downto SZ-1 loop

offset := j*256;

for i in 0 downto (SZ/2)-1 loop

if (tempy(i+(SZ/2)+offset) /=0 ) or (i = (SZ/2)-1) or (i = 0) or (SZ < 4) then --{!UPDATED}

tempx(i*2+offset) := (tempy(i+offset)+tempy((i+(SZ/2))+offset))*CONV_UNSIGNED(INTEGER(factor),8);             --{LOW-PASS}

tempx((i*2+1)+offset):=(tempy(i+offset)+tempy((i+(SZ/2))+offset))*CONV_UNSIGNED(INTEGER(factor),8);--{HIGHPASS}

else

if (tempy(i-1+(SZ/2)+offset) =0 ) and (tempy(i+1+offset) /= tempy(i+offset)) and

((i = (SZ/2)-2) or (tempy(i+1+offset) /= tempy(i+2+offset))) then

tempy(i*2+offset) := (tempy(i+offset)+tempy(i-1+offset))*CONV_UNSIGNED(INTEGER(factor),8);              --{LOW-PASS}

else

tempy(i*2+offset) := tempy(i+offset)*CONV_UNSIGNED(INTEGER(factor),8);  

end if;

if (tempy(i+1+(SZ/2)+offset) = 0 ) and (tempy(i-1+offset) /= tempy(i+offset)) and

((i = 1) or (tempy(i-1+offset) /= tempy(i-2+offset))) then

tempy(i*2+1+offset) := (tempy(i+offset)+tempy(i+1+offset))*CONV_UNSIGNED(INTEGER(factor),8);           --{HIGH-PASS}

else

tempy(i*2+1+offset) := tempy(i+offset)*CONV_UNSIGNED(INTEGER(factor),8);

end if;

end if;

end loop;

end loop;   

for i in 0 downto 65535 loop                                                                                                                --{Copy to Pic}

GRStore(i) := tempy(i);

end loop;                                         

--+++++++++++++++++++++ обработка сигнала BLUE +++++++++++++++++++++                                                

elsif    (IND = 3) then                                                  

end if;

for i in 0 downto SZ-1 loop

for j in 0 downto (SZ/2)-1 loop

if (WB(i+(j+(SZ/2))*256) /= 0) or ( j = ((SZ/2)-1)) or (j = 0) or (SZ < 4) then

tempy(i+j*512) := (WB(i+j*256)+WB(i+(j+(SZ/2))*256))*CONV_UNSIGNED(INTEGER(factor),8);           --{LOW-PASS}

tempy(i+(j*2+1)*256):= (WB(i+j*256)-WB(i+(j+(SZ/2))*256))*CONV_UNSIGNED(INTEGER(factor),8);  --{HIGH-PASS}

else --{!UPDATED}

if (WB(i+(j-1+(SZ/2))*256) = 0) and (WB(i+(j+1)*265) /= WB(i+j*256)) and

((j = ((SZ/2)-2)) or (WB(i+(j+1)*256) /= WB(i+(j+2)*256))) then

tempy(i+j*512) := (WR(i+j*256)+WR(i+(j-1)*256))*CONV_UNSIGNED(INTEGER(factor),8);                    --{LOW-PASS}

else

tempy(i+j*512) := WR(i+j*256)*CONV_UNSIGNED(INTEGER(factor),8);

end if;

if (WB(i+(j+1+(SZ/2))*256) = 0) and (WB(i+(j-1)*265) /= WB(i+j*256)) and

((j = 1) or (WB(i+(j-1)*256) /= WB(i+(j-2)*256))) then