File: autoinst_width.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 (32 lines) | stat: -rw-r--r-- 669 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
module ex;

   /* subwidth AUTO_TEMPLATE (
    .bus1a(@"vl-width"'b0),
    .bus1b(@"vl-width"'b0),
    .bus4a(@"vl-width"'b0),
    .bus4b(@"vl-width"'b0),
    .busdef(@"vl-width"'b0),
    );*/

   subwidth u_a2(/*AUTOINST*/
		 // Outputs
		 .bus4a			(4'b0),			 // Templated
		 .bus4b			(4'b0),			 // Templated
		 .bus1a			(1'b0),			 // Templated
		 .bus1b			(1'b0),			 // Templated
		 .busdef		((1+(`defa)-(`defb))'b0)); // Templated

endmodule

module subwidth (/*AUTOARG*/
   // Outputs
   bus4a, bus4b, bus1a, bus1b, busdef
   );

   output [0:3] bus4a;
   output [7:4] bus4b;
   output       bus1a;
   output [0:0] bus1b;
   output [`defa:`defb] busdef;

endmodule