verilog task

Guest
Hi,

is there a way to determine whether a task is being run?

Thanks,
e.
 
Hi,

I have verilog tasks which handle ring bus access to components.
I don't want to rewrite them, but to call them from C testbench.

Thanks,
Dominique

eascheiber@yahoo.com wrote:
Hi,

is there a way to determine whether a task is being run?

Thanks,
e.

--
+------------------------------------------------------------+
| Dluong META SYSTEMS|
| LP 853 |
| Tel: 33-(0)1.64.86.61.43 Batiment SIGMA|
| Fax: 33-(0)1.64.86.61.61 3, Ave du Canada|
| E-mail: Dominique_LUONG@mentor.com 91075 COURTABOEUF CEDEX|
+------------------------------------------------------------+
 
Oups sorry, wrong subject ..

Dominique LUONG wrote:
Hi,

I have verilog tasks which handle ring bus access to components.
I don't want to rewrite them, but to call them from C testbench.

Thanks,
Dominique

eascheiber@yahoo.com wrote:

Hi,

is there a way to determine whether a task is being run?

Thanks,
e.

--
+------------------------------------------------------------+
| Dluong META SYSTEMS|
| LP 853 |
| Tel: 33-(0)1.64.86.61.43 Batiment SIGMA|
| Fax: 33-(0)1.64.86.61.61 3, Ave du Canada|
| E-mail: Dominique_LUONG@mentor.com 91075 COURTABOEUF CEDEX|
+------------------------------------------------------------+
 
eascheiber@yahoo.com wrote:
Hi,

is there a way to determine whether a task is being run?
I am not sure exactly what you are asking. Are you trying to find out
whether a task has been called because your simulation does not seem to
be behaving correctly?

You can put a $display into the task to print something whenever it
executes. In an interactive debugging session in your simulator, you
should also be able to put a breakpoint in the task to see if it
executes.
 
Hi,

actually what I wanted is to chek whether the task is running and
depending on that to run some different code or not.

Regards,
e

sharp@cadence.com wrote:
eascheiber@yahoo.com wrote:
Hi,

is there a way to determine whether a task is being run?

I am not sure exactly what you are asking. Are you trying to find out
whether a task has been called because your simulation does not seem to
be behaving correctly?

You can put a $display into the task to print something whenever it
executes. In an interactive debugging session in your simulator, you
should also be able to put a breakpoint in the task to see if it
executes.
 
eascheiber@yahoo.com wrote:
Hi,

actually what I wanted is to chek whether the task is running and
depending on that to run some different code or not.

Regards,
e
Use external-to-task register to achieve this:

reg my_task_running = 0;


task my_task;
.....
begin
my_task_running = 1;

......

my_task_running = 0;
end
endtask

Then, observe my_task_running register for your calculations.

-
Alex



sharp@cadence.com wrote:
eascheiber@yahoo.com wrote:
Hi,

is there a way to determine whether a task is being run?

I am not sure exactly what you are asking. Are you trying to find out
whether a task has been called because your simulation does not seem to
be behaving correctly?

You can put a $display into the task to print something whenever it
executes. In an interactive debugging session in your simulator, you
should also be able to put a breakpoint in the task to see if it
executes.
 
Supposing this task is running as a testbench element, you can define
identifiers of type "event":

event task_active_flag;
...

task my_task;
begin
-> task_active_flag;
end

....

then

always @(task_active_flag)
<do some jobs>;

Utku.

Alex wrote:
eascheiber@yahoo.com wrote:
Hi,

actually what I wanted is to chek whether the task is running and
depending on that to run some different code or not.

Regards,
e

Use external-to-task register to achieve this:

reg my_task_running = 0;


task my_task;
....
begin
my_task_running = 1;

.....

my_task_running = 0;
end
endtask

Then, observe my_task_running register for your calculations.

-
Alex



sharp@cadence.com wrote:
eascheiber@yahoo.com wrote:
Hi,

is there a way to determine whether a task is being run?

I am not sure exactly what you are asking. Are you trying to find out
whether a task has been called because your simulation does not seem to
be behaving correctly?

You can put a $display into the task to print something whenever it
executes. In an interactive debugging session in your simulator, you
should also be able to put a breakpoint in the task to see if it
executes.
 

Welcome to EDABoard.com

Sponsor

Back
Top