forkconfig
Member level 1
- Joined
- Jan 28, 2013
- Messages
- 32
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,655
Let's say there is a task called myTask() that looks something like this:
task myTask;
input a;
input b;
begin
/* STUFF */
end
endtask
Let's say in my module I have two sections of code calling this task
module (
varQ
varW
varE
varR
);
// call this section of code Alpha
always @(...) begin
myTask(varQ, varW);
...
end
// call this section of code Beta
always @(...) begin
myTask(varE, varR);
...
end
Okay now here is my question...
If Alpha calls myTask first, then while it is still running Beta calls myTask, it is my understanding that the variables will be overwritten. Therefore, whatever Alpha calculates will be based off the overwritten values of Beta. How can I avoid this conflict?
Thanks
task myTask;
input a;
input b;
begin
/* STUFF */
end
endtask
Let's say in my module I have two sections of code calling this task
module (
varQ
varW
varE
varR
);
// call this section of code Alpha
always @(...) begin
myTask(varQ, varW);
...
end
// call this section of code Beta
always @(...) begin
myTask(varE, varR);
...
end
Okay now here is my question...
If Alpha calls myTask first, then while it is still running Beta calls myTask, it is my understanding that the variables will be overwritten. Therefore, whatever Alpha calculates will be based off the overwritten values of Beta. How can I avoid this conflict?
Thanks