UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Visitor yzw1603
Visitor
143 次查看
注册日期: ‎11-25-2018

VIVADO文件输出,仿真过程中有数据存入,仿真结束后文档清空。但是从仿真图里是有数据的,valiad也拉高了。为什么?

用的$fwrite输出FFT核的输出到txt,文件中。

仿真过程中文件中有正确数据,仿真结束后文件内容清空

initial
begin
outputfile1 =$fopen("F:/fft1024222/xreal.txt","w");
outputfile2 = $fopen("F:/fft1024222/ximag.txt","w");
end

  always@(posedge clk)
  begin
    if(m_axis_data_tvalid)
    begin 
    $fwrite(outputfile1,"%h\n",xreal);
    $fwrite(outputfile2,"%h\n",ximag);
    end
  end
 

0 项奖励
1 条回复
Xilinx Employee
Xilinx Employee
108 次查看
注册日期: ‎07-17-2008

回复: VIVADO文件输出,仿真过程中有数据存入,仿真结束后文档清空。但是从仿真图里是有数据的,valiad也拉高了。为什么?

建议加上$fclose以防止信息丢失。

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 项奖励