• 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 Design
  3. Another unique veriloga filename question

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 13723
  • 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

Another unique veriloga filename question

ricez
ricez over 12 years ago

I have a veriloga block that samples some signals and writes them to a text file.  I found in here:

http://www.cadence.com/forums/p/20699/1304920.aspx#1304920

how to modify the filename for each run, very helpful, but it's still not quite what I need.  I would like to have a new file for each iteration in montecarlo, but it appears that the process ID does not change for each iteration, and time doesn't seem to work either as it appears that the simulation is started once, not re-netlisted and re-started as with corners.

 Currently I have:

fp = $fopen("/path/%P.txt");

Which at least gets me past the problem I was having where if I had 4-processors running in parallel, they would all try to write to the same file, now each uses it's own file.

I then add:

@(final_step) $fwrite(fp, "%s\n", "EOF");

With that, I can post-process the text files to seperate out the individual iterations, but it sure would be much cleaner to have something along the lines of:

fp = $fopen(cat("/path/data", MonteCarloIteration#,".txt"))

Does anyone know of a way to do such a thing?

  • Cancel
Parents
  • ricez
    ricez over 12 years ago

    Thanks Andrew,

     I tried using the %A, but regardless of whether I selected "Save Data to Allow Family Plots" or not, the file name is always mc1_tran.

    Somewhat interesting side note, when I first added the %A, only about 10% of my montecarlo iterations would be run.  If I removed the verilogA block, they would all run fine. I found I had to add the tran statement to:

    @(initial_step("tran")) fp= $fopen("path/%A.txt"); , for it to run all of the sims when including %A in the filename.

     I'll live with it as is, and seperate out the iterations with a script.

    Jeremy

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ricez
    ricez over 12 years ago

    Thanks Andrew,

     I tried using the %A, but regardless of whether I selected "Save Data to Allow Family Plots" or not, the file name is always mc1_tran.

    Somewhat interesting side note, when I first added the %A, only about 10% of my montecarlo iterations would be run.  If I removed the verilogA block, they would all run fine. I found I had to add the tran statement to:

    @(initial_step("tran")) fp= $fopen("path/%A.txt"); , for it to run all of the sims when including %A in the filename.

     I'll live with it as is, and seperate out the iterations with a script.

    Jeremy

    • 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