Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1074

$fscanf: reading a file and extracting a particular word or string or args

$
0
0

Hi All,

I am trying to read irun.log and if particular match found, I need to write to the new file. 

Getting compilation error when using $scanf;

fp      = $fopen("irun.log", "r");  //open file in read mode

fp_wr = $fopen(" automation.log", "w+");  //open file for update

eof = $feof(fp);

while (! $feof (fp) ) begin

a = $fgets(line, fp)   //line string type

b = $fscanf(line, "%s", my_string)  //my_string is string_type

....

end

*E, invalid type of mcd argument

the object of this program is to: after reading irun.log, I am interested in particular string/args/word, once found I will write this into the new file. I am not able to do this. 

Kindly adivde. 

Thank You,

Mahesh


Viewing all articles
Browse latest Browse all 1074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>