Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

task vs always

Altera_Forum
Honored Contributor II
1,081 Views

Hello, i know that always executes always when some parameter in the sensitivity list changes. 

in what cases task executes? 

if i have a task block and always block one after the other' which one executes first? 

 

Thanks
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
118 Views

A task has to be called. Hence it needs to be called from inside an always or initial block. 

A task block on it's own will be called as an implicit always. 

You cannot guarantee which will be called first, as it is down to what order the compiler decides to order them. So you shouldnt be assigning the same variable in both.
Altera_Forum
Honored Contributor II
118 Views

 

--- Quote Start ---  

A task has to be called. Hence it needs to be called from inside an always or initial block. 

A task block on it's own will be called as an implicit always. 

 

--- Quote End ---  

 

What do you mean by this? A task is a procedure that must be called by from a running process. 

 

An always block is a continuously running process.
Altera_Forum
Honored Contributor II
118 Views

 

--- Quote Start ---  

What do you mean by this? A task is a procedure that must be called by from a running process. 

 

An always block is a continuously running process. 

--- Quote End ---  

 

 

Maybe Im getting myself confused. In VHDL a procedure can be called outside of a process and in doing so you have an implicit process. I thought the same could be done in verilog - mistaken.
Altera_Forum
Honored Contributor II
118 Views

Thanks i understand :-)

Reply