I'm new to Verilog and would really appreciate it if someone could help me with this.
I have a task written in a separate file - "task.v" :
module task_create();
task assign_inp;
reg a,b,c,d;
//details
endtask
endmodule
I have a module that is calling this task:
module tb();
`include "task.v"
assign_inp(a,b,c,d);
endmodule
When I execute this, I get this error:
Module definition task_create cannot nest into module tb
When I remove the module and endmodule in task.v, I get this error:
Task must be contained inside a module
Where am I going wrong? Thank you so much!