Dear All,
I want to write the data into a file in the Verilog-A model.
I tried something like below. It is not showing any errors, but the file is still empty. By the way, reading from this file works great.
`include "constants.vams"
`include "disciplines.vams"
integer fd;
real r_file = 0.001;
analog beginfd = $fopen("./my_file.txt", "w");
$fwrite(fd, "%e", r_file);
//outp = $fscanf(fd, "%e", r_file);
$fclose(fd);
end
endmodule
I also tried $fdisplay but the result didn't change.