• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Reading and changing CIW input line

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 145
  • Views 19782
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reading and changing CIW input line

PatrikOsgnach
PatrikOsgnach over 8 years ago

Hello,

are there any functions that allows me to know what is currently typed on the input line of CIW and change it, eventually? My goal is to write an autocompletion script.

As an example, if I type 'a' and press Ctrl+Up I want the input line to be substituted with the latest line that begins with an 'a' character.

Best regards,

Patrik

  • Cancel
Parents
  • Amit  Biswas
    Amit Biswas over 8 years ago
    Hi Pratik,

    Here is a small code which might be helpful.
    Have a look

    CDSLOG = "/xxx/xxx/cdslog/CDS.log" ; cds log file path. you can give actual cds.log file path of yours.
    procedure(searchCommand(CDSLOG)
    prog((commandLists inport)
    system(sprintf(nil "cp -rf %s %s_temp" CDSLOG CDSLOG)) ; create a local copy of the cds log file as <old file name _temp>
    CDSLOG = strcat(CDSLOG "_temp")
    inport = infile(CDSLOG)
    while(gets(line inport)
    if(substring( car(parseString(line "\n")) 2 1) == "i" then ; to check the only lines which are typed or called in CIW
    commandLists = append1(commandLists substring( car(parseString(line "\n")) 4))
    );if
    );while
    close(inport)
    return(commandLists)
    );prog
    );procedure

    You can set the bindkey with UP arrow for the function searchCommand(CDSLOG)
    Finally, commandLists will return a list which will have all the commands which were entered in the CIW.
    Now you can play with this list
    1. You can create a gui to pop up the list of the commands
    2. You can limit the length of the list
    3. You can filter some of the commands according to your requirement
    4. You can reverse the list
    .
    .
    .
    Hope it will help you.

    Thanks,
    Amit
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Amit  Biswas
    Amit Biswas over 8 years ago
    Hi Pratik,

    Here is a small code which might be helpful.
    Have a look

    CDSLOG = "/xxx/xxx/cdslog/CDS.log" ; cds log file path. you can give actual cds.log file path of yours.
    procedure(searchCommand(CDSLOG)
    prog((commandLists inport)
    system(sprintf(nil "cp -rf %s %s_temp" CDSLOG CDSLOG)) ; create a local copy of the cds log file as <old file name _temp>
    CDSLOG = strcat(CDSLOG "_temp")
    inport = infile(CDSLOG)
    while(gets(line inport)
    if(substring( car(parseString(line "\n")) 2 1) == "i" then ; to check the only lines which are typed or called in CIW
    commandLists = append1(commandLists substring( car(parseString(line "\n")) 4))
    );if
    );while
    close(inport)
    return(commandLists)
    );prog
    );procedure

    You can set the bindkey with UP arrow for the function searchCommand(CDSLOG)
    Finally, commandLists will return a list which will have all the commands which were entered in the CIW.
    Now you can play with this list
    1. You can create a gui to pop up the list of the commands
    2. You can limit the length of the list
    3. You can filter some of the commands according to your requirement
    4. You can reverse the list
    .
    .
    .
    Hope it will help you.

    Thanks,
    Amit
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information