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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
module test();
// task with no lifetime, return-type, or port-list
task t0;
blah0;
endtask
// empty port-list
task t1();
blah1;
endtask
// non-empty portlist
task t2(stuff2);
blah2;
endtask
// test that ": task_identifier" remains unscathed
task t3;
endtask : t3
// check that stale auto-label is overwritten
task t4(input port1, output port2, inout port3);
begin
blah blah blah;
end
endtask // tX
// test lifetime keywords 'automatic' and 'static'
task static t7();
endtask
// test a more complete example
task automatic t8(input ports, input ports, output ports);
endtask
// port-list that doesn't start on the same line as the task declaration
task automatic t9
(int a,
int b);
endtask
// mismatched keyword
task t10;
endfunction
// make sure even the simplest test works after all the insanity
task t11;
endtask
endmodule
|