[sv-bc] query regarding $bits function

From: Sarani Roy <sarani_at_.....>
Date: Tue Feb 05 2008 - 04:22:21 PST
Hi,

Some query regarding $bits function :

According to LRM:
It shall be an error to use the $bits system function directly with a
dynamically sized data type identifier.

Is this valid :

module top( input  [10:0] in1, input clk);
 int bit_count;
 string str1;

 function string my_func(input bit [10:0] in1);
    begin
       str1 = string'(in1);
      return str1;
    end
 endfunction

always@(clk)
  bit_count = $bits(my_func(in1));
endmodule

Some standard simulators are passing.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Feb 5 04:29:10 2008

This archive was generated by hypermail 2.1.8 : Tue Feb 05 2008 - 04:29:40 PST