⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex6_2_filedemo2.vhd

📁 This is the course for VHDL programming
💻 VHD
字号:
--library IEEE;--use IEEE.std_logic_1164.all;--use IEEE.std_logic_textio.all;use std.textio.all;entity FILEDEMO2 is end FILEDEMO2;architecture arch of FILEDEMO2 is	type MEMORY is array(0 to 31)of bit_vector(7 downto 0);	signal M:memory;	BEGIN  PROCESS	VARIABLE lout,lin: line ;	file DATAFILE:text open READ_MODE is "RAM.TXT";	--variable b:std_logic_vector(7 downto 0);	variable b:bit_vector(7 downto 0);  begin	WRITE(lout, string'(" input"),LEFT,10) ;	WRITE(lout, string'("Data"),LEFT,10) ;   WRITELINE(OUTPUT, lout) ;	for i in M'range loop		if ENDFILE(DATAFILE) then exit;end if;		readline(DATAFILE,lin);read(lin,b);		WRITE(lout, i,LEFT,10) ;WRITE(lout, b,LEFT,10) ;      WRITELINE(OUTPUT, lout) ;      M(i) <= b;	end loop;	wait;  END PROCESS;END arch ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -