Cross-module reference resolution error (associative arrays)

In reply to ruchi_puri2001:

Ruchi,
Your assoc array indexing is done using wildcard - not a good idea and it is the source of the error you saw from VCS. Though the compiler could have given better messaging (talk to your support @ synopsys).

7.9.4 First()
The syntax for the first() method is as follows:
function int first( ref index );
where index is an index of the appropriate type for the array in question. Associative arrays that specify a
wildcard index type shall not be allowed.

FWIW, here is another compiler’s error message on this code:

ERROR VCP5306 “Method ‘first’ for an associative array that specifies a wildcard index type cannot be used.” “…/assoc_arr_xmr_issue.sv” 18 41

Change it to string type as in:


// Change this line: BitChk_compPoint_info_c bcCompPoints[*];
BitChk_compPoint_info_c bcCompPoints[string];

Your usage of methods like first, next also requires change (they return int), see LRM for details or send me an email via www.cvcblr.com (About us page), will send a working code.

Good Luck
Ajeetha, CVC