The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> How to read a number from a file in Verilog-a? https://designers-guide.org/forum/YaBB.pl?num=1188564567 Message started by jiji666666 on Aug 31st, 2007, 5:49am |
Title: How to read a number from a file in Verilog-a? Post by jiji666666 on Aug 31st, 2007, 5:49am Dear Masters: In verilog-a, I need to read a number from a file, but I just find how to write a number into a file, but no read. I wrote a code like this: analog begin file = $fopen("/home/user/myfile.txt"); rr = $fscanf(file, " %f", real_time); $fclose(file); end The number in myfile.txt is 100, but real_time=0. Could you tell me what's wrong in my code. Many Regards! Zhichen |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |