SKILL: How to read a file

Discussion in 'Cadence' started by anil Kumar, Aug 21, 2006.

  1. anil Kumar

    anil Kumar Guest

    Hi,

    I have list of cells in a file "cell_list" and I want to update
    schematic of each cells. I am wondering how do I read this file in
    skill and do the operation on each schematic. Here is the content of
    the file "cell_list" looks like
    ---------------------
    an2
    an3
    an4
    an5
    an6
    na2
    _________

    I have tried following without success
    myfile=infile("cell_list") ; didnot work
    foreach(cell myfile
    .... ...
    )
     
    anil Kumar, Aug 21, 2006
    #1
  2. SKILL Language User Guide, Chapter 7, I/O and File Handling
    and
    SKILL Language Reference

    ; reads file
    p_inPort = infile( "cell_list" )

    ;; variable initialisation
    l_lineList = list()

    when( p_inPort
    while( gets( t_line p_inPort )
    ....
    ) ;; close while
    ) ;; close when

    close( p_inPort )

    Bernd
     
    Bernd Fischer, Aug 21, 2006
    #2
  3. anil Kumar

    Jimka Guest

    foreach only works on lists and hash tables... not on ports.
     
    Jimka, Aug 23, 2006
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.