03.11.2014 Views

VHDL 프로그래밍

VHDL 프로그래밍

VHDL 프로그래밍

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

영상 파일의 입출력<br />

• color.ppm 파일 내용 및 결과 영상<br />

P3<br />

3 3<br />

255<br />

0 0 0<br />

128 128 128<br />

255 255 255<br />

255 0 0<br />

0 255 0<br />

0 0 255<br />

0 255 255<br />

255 0 255<br />

255 255 0<br />

21/55<br />

영상 파일의 입출력<br />

• 영상 파일의 입력<br />

library ieee;<br />

use ieee.std_logic_1164.all i ll ;<br />

use ieee.std_logic_arith.all ;<br />

use ieee.std_logic_unsigned.all;<br />

use std.textio.all;<br />

architecture simulation of ppm_image_read is<br />

constant BLACK_INT : integer := 16 ;<br />

constant BV : std_logic_vector (7 downto 0) := "00001000";<br />

begin<br />

process (dispclk, reset_disp_n)<br />

file INFILE_IMG : text open read_mode is "buildings.txt";<br />

variable img_val : line;<br />

variable rvalue, gvalue, bvalue : integer range 0 to 255;<br />

begin<br />

-- 중략<br />

22/55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!