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.

Tasks and Functions - Performance

Status
Not open for further replies.

carrot

Full Member level 3
Joined
Feb 23, 2004
Messages
182
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,298
Location
Bangalore, India
Activity points
1,532
Hi,

Which is better in terms of performance - Tasks or functions?
I have observed - Many of them use Functions rather than Tasks? How is it useful in terms of Performance?

Thanks
 

Functions in Verilog disallow storage units. Which means any logic described by functions are fully combinational logic.
Tasks, on the other side, allow bufs. So task can be used to describe both combinational logic and sequential logic.
However, the logic described in tasks, especially when sequential logic is described in these tasks, is not synthesizable, at least for old-fashioned tools.

Put it in a simple way, the performance of a circuit is decided by its structure. Both task and function can be used to described the same structure.
But tasks may not be synthesiable and are normally forbidden in RTL Verilog codes.

Using tasks in testbenches are totally alright and it is the right thing to do.
 
  • Like
Reactions: carrot

    carrot

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top