quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bulllet_4dots_orange.gif task

Tasks are identical to functions except they do not return a value.

   

space.gif

task task_name (argument_list) {
  statements;
}
   

space.gif

By default, tasks declared at the top level have a global scope. The local keyword is used to reduce the scope of a task to the file in which the task is declared.

   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif Example : task
   

space.gif


 1 program function_ex {
 2   print_data(random(),random());
 3   print_data(random(),random());
 4 }
 5 
 6 // Some random task 
 7 task print_data (bit [7:0] d1, bit [7:0] d2) {
 8   printf("Value 1 %x, Value 2 %x\n",d1,d2);
 9 }
You could download file task_ex.vr here
   

space.gif

  ../images/main/bullet_star_pink.gif Simulation : task
   

space.gif

 Value 1 ac, Value 2 1d
 Value 1 bf, Value 2 c9
   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com