./…/uvc_components/BitChk_infoBase_c.svh, 18
Error found while trying to resolve cross-module reference.
token ‘bcCompPoints’. Originating package ‘BitChk_components_pkg’.
Source info: bcCompPoints.exists(name)
Error-[XMRE] Cross-module reference resolution error
./…/uvc_components/BitChk_infoBase_c.svh, 32
Error found while trying to resolve cross-module reference.
token ‘bcCompPoints’. Originating package ‘BitChk_components_pkg’.
Source info: bcCompPoints.first(i)
The very first thing i observed is missing in constructor i mean function new()
[c]
function new(string name=“”,uvm_component parent); // here parent is missing as an argument, since this is uvm_component we need to provide the argument.
super.new(name,parent);
endfunction
[/c]
In uvm i guess this is explained like we should provide the both argument for component.
lets try and check.
check whether the same file compiling multiple times!!
I already have new constructor , I guess i forgot to put in the code in the post.
This file is getting compiled only once.
I am assuming some error is related to associative arrays declaration.
Assocative array is being indexed by string which may be causing mismatch with array declaration?Not sure if this is true though.
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.
I tried changing associative array delaration from * wild card to string.
But I am getting some other error saying–>
Error-[SV-ICA] Illegal class assignment
./…/uvc_components/BitChk_infoBase_c.svh, 32
“return this.bcCompPoints.first(i);”
Expression ‘this.bcCompPoints.first(i)’ on rhs is not a class or a
compatible class and hence cannot be assigned to a class handle on lhs.
Please make sure that the lhs and rhs expressions are compatible.
How can i make sure that first,next functions should return class type and not int.
Or what functions can i use which return type class?