"Linh Hoang" <
[email protected]> wrote in message news:
[email protected]..
> Hi anyone,
>
> i'm reading intro. to verilog and am confusing on these two things.
> Aren't they the same? task, module, and function seem to do the same
> thing. Which one should one stick to if the target is to have
> synthesizable verilog design. Thank you for your help.
>
Hi Linh,
A module is a bit different beast than a task or function.
A module defines a 'concurrently' executing model, essentially
directly modeling hardware.
E.g. : Ports on the top-level module become pins on the chip after synthesis.
Tasks and functions execute 'sequentially'. That is, they get called
as specific times (not concurrently) and execute their statements
one-by-one (after each other).
All three are synthesizable.
Rob