ghad
New Member
Offline
Posts: 4
|
Hi, I have a problem in VerilogA, and I tried to read the posts in the Forum, and I found out that this might be the closest topic... I need to get the value of a number from a text file, containing only this number. Then take this value, and use it to increase the voltage of a certain circuit.... I 've tried:
analog begin file = $fopen("/home/user/myfile.txt","r"); rr = $fscan(file," %f:\n", real_time); $fclose(file);
But when I do so, it does compile, but doesn't output any waveforms on cadence. I tried replacing $fscan by $fread. It's doesn't even compile.
Is there any easy code, that can get a number from a text file, so that it can be used in the program? Thank you in advance. Best Regards.
|