# Is task or automatic task synthesizable using verilog (not System Verilog)?

**URL:** <https://verificationacademy.com/forums/t/is-task-or-automatic-task-synthesizable-using-verilog-not-system-verilog/42739>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, task\
**Created:** [November 22, 2023, 6:19pm UTC](https://verificationacademy.com/forums/t/is-task-or-automatic-task-synthesizable-using-verilog-not-system-verilog/42739 "2023-11-22T18:19:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayesha1](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@Ayesha1](https://verificationacademy.com/forums/u/Ayesha1)\
**Post date:** [November 22, 2023, 6:19pm UTC](https://verificationacademy.com/forums/t/is-task-or-automatic-task-synthesizable-using-verilog-not-system-verilog/42739/1 "2023-11-22T18:19:32Z")

</div>

Is task or automatic task synthesizable using verilog (not System Verilog)?

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [November 23, 2023, 2:01am UTC](https://verificationacademy.com/forums/t/is-task-or-automatic-task-synthesizable-using-verilog-not-system-verilog/42739/2 "2023-11-23T02:01:19Z")

</div>

_In reply to [Ayesha1](https://verificationacademy.com/forums/t/is-task-or-automatic-task-synthesizable-using-verilog-not-system-verilog/42739):_

It should be as long as all the statements inside the task (its body) are synthesizable as well. Understand that the body of code gets expanded into the always block that calls the task.

---

<div class="post-metadata">

**Author:** ![Ayesha1](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@Ayesha1](https://verificationacademy.com/forums/u/Ayesha1)\
**Post date:** [November 23, 2023, 3:45am UTC](https://verificationacademy.com/forums/t/is-task-or-automatic-task-synthesizable-using-verilog-not-system-verilog/42739/3 "2023-11-23T03:45:01Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/is-task-or-automatic-task-synthesizable-using-verilog-not-system-verilog/42739/2):_

Thank you Dave!  
I am using verilog, not SystemVerilog. This is my code. I am getting error. Do you see any issue here?

module Task (  
input [7:0] a,  
input [7:0] b,  
output reg [7:0] c,  
output reg [7:0] d  
);  
task automatic reverse\_bits\_task;  
input [7:0] in;  
output [7:0] out;  
integer index;  
begin  
for (index=0; index\<8; index=index+1) begin  
out[7-index] = in[index];  
end  
end  
endtask

```
always @(a,b) begin
    reverse_bits_task(.in(a),.out(c));
    reverse_bits_task(.in(b),.out(d));
end    

```

endmodule
