• 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. Copy text from file to another using SKILL

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 15924
  • 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

Copy text from file to another using SKILL

TaherKotb
TaherKotb over 12 years ago

Hello all,

Is there a way to copy certain text from one file to another using Skill?. It seems that ccpCopy() function only copies library, cell, or view files. Am i missing something?.

Thanks

Taher 

  • Cancel
  • skillUser
    skillUser over 12 years ago

    Hi Taher,

    ccpCopy is for copying cellviews, so if you have just a plain text file, you can just use text manipulation functions for reading and writing to files to do a copy operation (for example, the following functions might be useful to you: infile, outfile, read, lineread, linereadstring, getc, getchar, fprintf) .

    Hope this helps!

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    I was trying to figure out what Taher was actually asking - if Lawrence's response doesn't answer your question, please explain precisely what you're trying to do - otherwise we have to guess.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • TaherKotb
    TaherKotb over 12 years ago

     Lawrence and Andrew, thanks for your reply

    The issue i'm trying to figure out is that i have code which saves results of cadence simulation parameter into a file using outfile() function. what i want to do is to save results from repeatitive attempt to run the code in one file. the problem with outfile() as far i know is that it overwites previously saved data when saving a new data into the same file, so the whole previous data is gone. This is my problem ?. In order for me trying to address the problem, i thought that i can write a code to save the first data in a certain file and save data from the next run in a different file, then write another code to copy the data from the second file to the first file. that's what i was trying to ask, but if there is a direct simple way to do that, i'd be very grateful

    Thanks again

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    The simplest solution to your problem would be to pass "a" as the optional second argument to outfile(). If you do that, it opens the file in append mode. Then it will add to the end of the file, rather than overwriting it. 

    Regards,

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • TaherKotb
    TaherKotb over 12 years ago
    Thanks a lot Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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