想用$fopen打开一个txt,并往里面写数,没成功,下面是代码,请帮我看看哪里出了问题呀,下面是代码,但是仿真完后控制台能显示,但是希望打开的txt文件却看不见在哪
module top_test;
reg clk;
reg XRSn;
reg [6:0] FbIn;
wire [6:0] FbOut;
integer txt_file;
initial
begin
clk = 0;
XRSn = 0;
FbIn = 0;
txt_file = $fopen("D:\Xilinx\yyy.txt");
#100;
XRSn = 1;
repeat(30)
begin
#10 clk <= ~clk;
$display("cont=%d",FbOut);
$fdisplay(txt_file,"cont=%d",FbOut);
end
end
top aat(
.clk(clk),
.XRSn(XRSn),
.FbOut(FbOut),
.FbIn(FbIn)
);
endmodule |