T
Thomas Jones
Guest
Hello,
I have a wrapper task that calls a task within an instance array of a
subblock.
task wrapper (
input int instanceNumber);
instanceArrayElement[instanceNumber].instanceTask();
endtask//wrapper
However, instanceNumber must be constant by the LRM. Modelsim
complains
Nonconstant index into instance array 'InstanceNumber'.
I spoke with an FAE and they showed me the line in the LRM where it
says it must be 'constant'.
But what if, say, I set the range of the instance array by a parameter
to the sim such that it may scale? Is there any way within SV itself
to get my task to scale with it? In the past I have used a Perl
preprocessor - just wondering if there is a way to do it within the
language itself.
I have a wrapper task that calls a task within an instance array of a
subblock.
task wrapper (
input int instanceNumber);
instanceArrayElement[instanceNumber].instanceTask();
endtask//wrapper
However, instanceNumber must be constant by the LRM. Modelsim
complains
Nonconstant index into instance array 'InstanceNumber'.
I spoke with an FAE and they showed me the line in the LRM where it
says it must be 'constant'.
But what if, say, I set the range of the instance array by a parameter
to the sim such that it may scale? Is there any way within SV itself
to get my task to scale with it? In the past I have used a Perl
preprocessor - just wondering if there is a way to do it within the
language itself.