Quantcast
Channel: Cadence Custom IC Design Forum
Viewing all articles
Browse latest Browse all 4917

nested for loop and fwrite statement

$
0
0

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


Viewing all articles
Browse latest Browse all 4917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>