File: autoreset_struct.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 (57 lines) | stat: -rw-r--r-- 1,120 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
52
53
54
55
56
57
//bug906

import gmcupkg::*;

module gminstdecode
  (
   output instClassType instClass
   /*blah blah blah*/);

   always_comb begin
      /*AUTORESET*/

      if (ldBitFromIo | stBitToIo) begin
	 instClass.isBool = 1'b1;
	 instClass.iFunc  = IFUNC_BOOL;
	 instClass.sub.bool = 1'b1;
	 instClass.sub2.sub3.bool = 1'b1;
      end
   end

   always_comb begin
      instClass = '{default:0};     // #1 (see below)
      /*AUTORESET*/

      if (ldBitFromIo | stBitToIo) begin
	 instClass.isBool = 1'b1;
	 instClass.iFunc  = IFUNC_BOOL;
      end
   end

   always_comb begin
      instClass.iFunc = IFUNC_ADD;  // #2
      /*AUTORESET*/

      if (ldBitFromIo | stBitToIo) begin
	 instClass.isBool = 1'b1;
	 instClass.iFunc  = IFUNC_BOOL;
      end
   end

   always_comb begin
      instClass.sub = '0;
      instClass.sub2 = '0;
      /*AUTORESET*/

      if (ldBitFromIo | stBitToIo) begin
	 instClass.sub.bool = 1'b1;
	 instClass.sub2.sub3.bool = 1'b1;
	 instClass.sub3.sub4.bool = 1'b1;
      end
   end
endmodule

// Local Variables:
// verilog-auto-reset-widths: unbased
// verilog-typedef-regexp: "Type$"
// End: