I’m trying to see how the iterator index querying for arrays but when I compile it flags an error.
int arr[];
int qi[$];
initial begin
arr = {.....};
qi = arr.find with (item == item.index); // Error is pointing at index. It says hierarchical name component lookup failed
end
I’m using Cadence Incisive version 14.10-s032.
Is this a bug on the System Verilog language, or is it just I’m not doing it correctly?
Thanks.
Regards,
Reuben
In reply to Reuben:
You need to use parenthesis () instead of braces {}.
In reply to dave_59:
In reply to Reuben:
You need to use parenthesis () instead of braces {}.
Hi Dave,
Sorry I mistakenly used braces instead of a parenthesis. That code above is actually a parenthesis. The one that is failing on my side actually uses a parenthesis, not braces. I will edit the code above to avoid confusions on the people reading my question.
So the issue hasn’t been resolved yet. I wonder if this is a bug or something is wrong on the way I implement it.
Thanks.
Regards,
Reuben
In reply to Reuben:
Works for me in Questa.
In reply to dave_59:
In reply to Reuben:
Works for me in Questa.
I see. I guess this is a tool problem.
Thanks.
Regards,
Reuben