Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Explain what is 'task' in Verilog

Status
Not open for further replies.

hariharan4000

Junior Member level 1
Joined
Dec 4, 2005
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,422
Hi
what is 'task' in verilog.
R they used only for test benches or can be used in design?
plz explain with simple verilog code eg.. a simple clock generator or sync d- flipflop.


regards
Hari
 

Re: TASK -- Verilog

hi hariharan,
A task in verilog is used to write a sub-routine within a module. Here is an example code which performs 3 bit counter,

module counter(c,clk);
output reg c[0:3];
input clk;
c[0:3]<=3'b000;
count(c);
end

task c;
inout c[0:3];
begin
c=c+1;
end
endtask
endmodule

i did not simulated it. there may be some error. But this example can give you a clear idea of using 'TASK'.

with regards
sathish kumar
 

Re: TASK -- Verilog

Hi hari,
Tasks are used only in testbench. But functions can use in design.
 

Re: TASK -- Verilog

Hi
Task is never used in design
Pnly used in TBs
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top