RegisterLogin  
Update Profile
   
You are here: Forum  
Minimize 
SVUG Community Forum
Subject: Issue with Associative Array's in Questasim and VCS
Prev Next
You are not authorized to post a reply.

Author Messages
VaibhavUser is Offline

Posts:6

02/15/2010 7:04 AM  
Hi,

I have defined associative array using <*> " int array <*> " .

While assigning value to the array I am using int datatype

      int i;
      for (i = 0; i < 7; i++) begin
        array = $urandom;
        $display(" Printing Int Index Array ",array);
      end


Now, when I want to access the above associative array using bit<2:0> data type then questa gives me below warning

# ** Warning: (vsim-3829) assoarray.sv(19): Non-existent associative array entry. Returning default value.
#  Printing bit Index Array          0


This works in VCS!!! (VCS do implicit casting of bit<2:0> to int data type, whereas questa does not.)

So, I am not able to conclude which tool is having problem (Whether questasim OR VCS)?

On top of this I found that questasim works fine if I define associative array as " int array".


?????

Thanks,
Vaibhav

DAVEUser is Offline

Posts:56

02/15/2010 9:43 AM  
Vaibhav,

You are not showing enough code, and this forum is really bad for displaying Verilog code. I suggest contacting Mentor directly, or using another forum.

I will suggest that you do not use the wildcard index '*' and use a specific type instead. The wildcard index does not have a type and cannot be used with many other SV constructs, like foreach. VCS appears to work in some cases, but not all.
You are not authorized to post a reply.
Forums > General Discussion > Main Discussion Area > Issue with Associative Array's in Questasim and VCS



ActiveForums 3.7
  

 Copyright 2008 by SystemVerilog User Group Contact Us    Privacy Statement