top.v 415 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
module top ( in_data, do );

   input [15:0] in_data;
   output [15:0]  do;
   wire [15:0] out_data;

   assign do = out_data;

   always @ (*)
     begin

    Test_task(in_data, out_data);
         // out_data = in_data; // This works but above task doesn't

     end

   task Test_task;
      input [15:0]  in_d;
      output [15:0] out_data;

      begin
        out_data = in_d;
      end
   endtask

endmodule