Verilog写入变量值到文件语句

integer signed fid_out1,fid_out2;

initial 

begin

  fid_out1 = $fopen("dataout_i.txt","w");

  fid_out2 = $fopen("dataout_q.txt","w");

end

always @(posedge clk)

begin

  if(out_flag)

  begin

    $fdisplay(fid_out1,"%d",data_I);

    $fdisplay(fid_out2,"%d",data_Q);

  end

end

  

posted on 2019-07-20 12:10  阿长长  阅读(486)  评论(0编辑  收藏  举报

导航