Home > Community > Forums > Functional Verification > timescale mismatch

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 timescale mismatch 

Last post Mon, Feb 3 2014 8:19 AM by whiteriver1. 0 replies.
Started by whiteriver1 03 Feb 2014 08:19 AM. Topic has 0 replies and 2817 views
Page 1 of 1 (1 items)
Sort Posts:
  • Mon, Feb 3 2014 8:19 AM

    timescale mismatch Reply
    Hi,

    Does anybody know why the function in the code below is behaving differently when the input is a constant or a variable?
    I understand that time literal is of type 'realtime' and not 'time'. My complain is that the function has a different behavior depending on the return type.
     
    I'm using Incisive version 12.20.020

    code:
    ---

    `timescale 1ns/100ps

    module test;

      time time_var;

      initial begin
        $timeformat(-9, 0, " ns", 6);

        time_var = time_func(1us);
        void_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

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

    endmodule

    ----
    output:
    we are in time_func, in_time = 100 ns
    we are in void_func, in_time = 1000 ns

    • Post Points: 5
Page 1 of 1 (1 items)
Sort Posts:
Started by whiteriver1 at 03 Feb 2014 08:19 AM. Topic has 0 replies.