本帖最后由 edacsoft 于 2011-12-15 16:51 编辑
TB源码:
process
file input_file: text open read_mode is "E:\median_filter_test\raw_data.raw";
file output_file: text open write_mode is "E:\median_filter_test\output_tb.dat";
variable inline, outline : line;
variable input : std_logic_vector(7 downto 0);
variable output : std_logic_vector(7 downto 0);
begin
while not endfile(input_file) loop
if (reset = '1') then
data_in <= (others => '0');
else
readline(input_file, inline);
read(inline, input);
data_in <= input;
--data_valid <= '1';
output := data_out;
write(outline, output);
writeline(output_file, outline);
end if;
wait until clk = '1';
end loop;
end process;
raw_data.raw是一幅1600*1200 Bayer图像(用photoshop可看),我将它上传到附件
raw_data.rar
(1.02 MB)
|