use std.textio.all; entity formatted_io is end formatted_io; architecture behavioral of formatted_io is begin process is file outfile:text; variable fstatus:file_open_status; variable count:integer:=5; variable value:bit_vector(3 downto 0):=x"6"; variable buf:line; begin file_open(fstatus,outfile,"myfile.dat",write_mode); L1:write(buf,string'("this is an example of formatted I/0")); L2:writeline(outfile,buf); L3:write(buf,string'("the first parameter is =")); L4:write(buf,count); L5:write(buf,' '); L6:write(buf,string'("the second parameter is =")); L7:write(buf,value); L8:writeline(outfile,buf); L9:write(buf,string'("...and so on")); L10:writeline(outfile,buf); L11:file_close(outfile); wait; end process; end behavioral; #************************************************ 请问高手,这段代码是产生文件的,到底产生的文件在哪儿。我只是在modelsim中编译了一下能不能产生该文件?要想产生需要什么操作。急盼答复,如果有高手可以直接加我的qq 229788053。期待!! |