In reply to dave_59:
Hi,
No,because what I want is a general task. Sometimes the signal I will send is a single bit, and in other cases it will be a single bit from an array(that can be either packed or unpacked).In such a case, I cannot assume I know the size of the array in advance.
i.e. I might need :
logic myBit;
logic [7:0] myByte;
logic [31:0] myWord;
…
MyTask(myBit,0); //Argument is the signal
MyTask(MyByte,6); //Argument is bit #6 of the signal
MyTask(MyWord,18); //Argument is bit #18 of the signal
in such a case, what will be the task definition?