Error message here!

Hide Error message here!

忘记密码?

Error message here!

请输入正确邮箱

Hide Error message here!

密码丢失?请输入您的电子邮件地址。您将收到一个重设密码链接。

Error message here!

返回登录

Close

FPGA writes testbench data to file

by_ Xiao Qin 2022-01-23 13:10:15 阅读数:10 评论数:0 点赞数:0 收藏数:0

FPGA take testbench Write data to file


integer dout_file;
initial begin
dout_file=$fopen("F:/FPGA/fractional_differential_calculation/test_data_byFPGA_square_512_2.txt"); // Define file location and name
if(dout_file == 0) begin
$display ("can not open the file!"); // If the folder cannot be opened, it displays not open the file!
$stop;
end
end
always @(posedge clk) begin
if(test_data_valid) begin // Write data enable ,
$fdisplay(dout_file,"%d",test_data_D); // Written data
while(!rst_n) $fclose(dout_file);// Close file on reset
end
end
Copyright statement
In this paper,the author:[by_ Xiao Qin],Reprint please bring the original link, thank you