Board logo

标题: TB源码: [打印本页]

作者: feitiandadao    时间: 2011-12-19 11:32     标题: TB源码:

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;




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0