 |
|
|
|
|
|
|
|
|
|
|
|
|
SVUG Community Forum
|
|
| Author |
Messages |
|
Vaibhav
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
|
|
|
|
|
DAVE
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. |
|
|
|
ActiveForums 3.7
|
|
|

|
|
|
|
|
|
|
|
|
|
 |
|