File: label_task.v

package info (click to toggle)
verilog-mode 20161124.fd230e6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 3,764 kB
  • ctags: 5,143
  • sloc: lisp: 12,430; perl: 293; makefile: 146; sh: 35; fortran: 2
file content (51 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download
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 // t0
   
   // empty port-list
   task t1();
      blah1;
   endtask // t1
   
   // non-empty portlist
   task t2(stuff2);
      blah2;
   endtask // t2
   
   // 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 // t4
   
   // test lifetime keywords 'automatic' and 'static'
   task static t7();
   endtask // t7
   
   // test a more complete example
   task automatic  t8(input ports, input ports, output ports);
   endtask // t8
   
   // port-list that doesn't start on the same line as the task declaration
   task automatic t9
     (int a,
      int b);
   endtask // t9
   
   // mismatched keyword
   task t10;
   endfunction // unmatched end(function|task|module|primitive|interface|package|class|clocking)

// make sure even the simplest test works after all the insanity
task t11;
endtask // t11

endmodule // test