Board logo

标题: modelsim的textio问题求助 [打印本页]

作者: cooking12    时间: 2008-5-20 11:42     标题: modelsim的textio问题求助

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。期待!!


作者: cooking12    时间: 2008-5-24 08:40

这个论坛太沉默了。自己顶一下,问题也自己解决了,也挺简单的。






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