tasks can take, drive and source global variables, when no local variables are used.The order of declaration within the task defines how the variables passed to the task by the caller are used. The variables declared within the task are local to that task.tasks can have any number of inputs and outputs.tasks can include timing delays, like posedge, negedge, # delay and wait.It is possible to define a task in a separate file and use the compile directive 'include to include the task in the file which instantiates the task. tasks are defined in the module in which they are used.Included in the main body of code, they can be called many times, reducing code repetition. They have to be specifically called, with data ins and outs, rather than just wired in to the general netlist. Data is passed to the task, the processing done, and the result returned. The lines of code are enclosed in task.end task brackets. Tasks are used in all programming languages, generally known as procedures or subroutines.
0 Comments
Leave a Reply. |