Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1075

timescale mismatch

$
0
0
Hi,

Does anybody know why the function in the code below is behaving differently when the input is a constant or a variable? It works for IUS8/20 but fails for incisive 12 or 13.
 
Rafael
 
-------
 
`timescale 1ns/100ps

module test;

  time time_var;

  initial begin
    $timeformat(-9, 0, " ns", 6);
    time_var = 1us;

    $display("first with variable");
    time_var = time_func(time_var);

    $display("then with constant");
    time_var = time_func(1us);

    $finish;
  end

  function time time_func (input time in_time);
    $display("we are in time_func, in_time = %0t",in_time);
    return in_time;
  endfunction

endmodule 
 



Viewing all articles
Browse latest Browse all 1075

Trending Articles



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