Search code examples
layoutcadence

Is there a way to write SKILL script where LVS report file (generated in .lvs.report ) can be written to .csv file


Is there a way to write SKILL script where LVS report file (generated in .lvs.report ) can be written to .csv file ?

I am trying to write a SKILL script wherein I can copy the lvs.report file data to .csv file I want to firstly read the file and then copy the data to a .csv file

I tried using inPort to read the file but it doesnt seem to work.


Solution

  • To read a file you can do something like this:

    inPort = infile( "filename" )
    while( gets( nextLine inPort )
        printf("%s" nextLine)
    )
    close(inPort)
    

    To write a file you can do:

    op=outfile("filename" "w")
    fprintf(op "%s %s\n" net1 net2)
    close(op)