• 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. nested for loop and fwrite statement

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 13903
  • 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

nested for loop and fwrite statement

SatendraMaurya
SatendraMaurya over 6 years ago

Hi, 

I have something like this in my veriloga

for(i=in_sig_cnt-1;i>=0;i=i-1) begin
  //rise time for sig
  @(cross(V(sig[i])-(ref_vdd/2), +1)) begin
  if(write_flag&&((maxtime-mintime)<=10e-9)) begin
      $fwrite(fpt, "\n%s %d @t=%Es %s %s ", tag,in_sig_cnt,$abstime, ratio,signal_name);
      for(j=in_sig_cnt-1;j>=0;j=j-1) begin
         $fwrite(fpt, "%d;%e;",sigd[j],sigt[j]);
      end
  end
 end

I see that in the report file, the two fwrite gets overlapped. Is there a way to print first fwrite then next fwrite (with j for loop).

Satendra

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    Hi Satendra,

    It's not clear to me what the actual issue is here. I just started trying to flesh this out to a complete module to stand some chance of understanding this, but there's too much guesswork involved.

    Please provide a complete VerilogA module that shows the problem, please give an example of what is wrong with the resulting report file, and please state what version of Spectre you're using.

    Thanks,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SatendraMaurya
    SatendraMaurya over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    I have updated the testcase to cadence ticketing system. The number 46338908. You can followup from there. Let me know if you need more info.

    Satendra

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • SatendraMaurya
    SatendraMaurya over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    I have updated the testcase to cadence ticketing system. The number 46338908. You can followup from there. Let me know if you need more info.

    Satendra

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to SatendraMaurya

    Hi Satendra,

    Given that you're not in my geography and I'm currently in a hotel in the South of France, I'll leave this for my customer support colleagues to follow up. Thanks for providing a testcase to illustrate the issue.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SatendraMaurya
    SatendraMaurya over 6 years ago in reply to Andrew Beckett

    I would still say if you see anything obvious I should try before your colleagues take a deep dive in fixing the bug will be very helpful.

    • 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