2 Copyright (C) 2009-2010 Parvez Ahmad
3 Written by Parvez Ahmad <parvez_ahmad@yahoo.co.uk>.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 module BUF (input in, output out);
25 module TRIBUF(input in, enable, output out);
27 assign out = enable ? in : 1'bz;
31 module INV(input in, output out);
37 module AND2 #(parameter SIZE = 2) (input [SIZE-1:0] in, output out);
43 module AND3 #(parameter SIZE = 3) (input [SIZE-1:0] in, output out);
49 module AND4 #(parameter SIZE = 4) (input [SIZE-1:0] in, output out);
55 module OR2 #(parameter SIZE = 2) (input [SIZE-1:0] in, output out);
61 module OR3 #(parameter SIZE = 3) (input [SIZE-1:0] in, output out);
67 module OR4 #(parameter SIZE = 4) (input [SIZE-1:0] in, output out);
74 module NAND2 #(parameter SIZE = 2) (input [SIZE-1:0] in, output out);
80 module NAND3 #(parameter SIZE = 3) (input [SIZE-1:0] in, output out);
86 module NAND4 #(parameter SIZE = 4) (input [SIZE-1:0] in, output out);
92 module NOR2 #(parameter SIZE = 2) (input [SIZE-1:0] in, output out);
98 module NOR3 #(parameter SIZE = 3) (input [SIZE-1:0] in, output out);
104 module NOR4 #(parameter SIZE = 4) (input [SIZE-1:0] in, output out);
111 module XOR2 #(parameter SIZE = 2) (input [SIZE-1:0] in, output out);
117 module XOR3 #(parameter SIZE = 3) (input [SIZE-1:0] in, output out);
123 module XOR4 #(parameter SIZE = 4) (input [SIZE-1:0] in, output out);
130 module XNOR2 #(parameter SIZE = 2) (input [SIZE-1:0] in, output out);
136 module XNOR3 #(parameter SIZE = 3) (input [SIZE-1:0] in, output out);
142 module XNOR4 #(parameter SIZE = 4) (input [SIZE-1:0] in, output out);
148 module DEC1 (input in, enable, output reg [1:0] out);
150 always @(in or enable)
161 module DEC2 (input [1:0] in, input enable, output reg [3:0] out);
163 always @(in or enable)
168 2'b00 : out = 4'b0001;
169 2'b01 : out = 4'b0010;
170 2'b10 : out = 4'b0100;
171 2'b11 : out = 4'b1000;
176 module DEC3 (input [2:0] in, input enable, output reg [7:0] out);
178 always @(in or enable)
183 3'b000 : out = 8'b00000001;
184 3'b001 : out = 8'b00000010;
185 3'b010 : out = 8'b00000100;
186 3'b011 : out = 8'b00001000;
187 3'b100 : out = 8'b00010000;
188 3'b101 : out = 8'b00100000;
189 3'b110 : out = 8'b01000000;
190 3'b111 : out = 8'b10000000;
195 module DEC4 (input [3:0] in, input enable, output reg [15:0] out);
197 always @(in or enable)
199 out = 16'b0000000000000000;
202 4'b0000 : out = 16'b0000000000000001;
203 4'b0001 : out = 16'b0000000000000010;
204 4'b0010 : out = 16'b0000000000000100;
205 4'b0011 : out = 16'b0000000000001000;
206 4'b0100 : out = 16'b0000000000010000;
207 4'b0101 : out = 16'b0000000000100000;
208 4'b0110 : out = 16'b0000000001000000;
209 4'b0111 : out = 16'b0000000010000000;
210 4'b1000 : out = 16'b0000000100000000;
211 4'b1001 : out = 16'b0000001000000000;
212 4'b1010 : out = 16'b0000010000000000;
213 4'b1011 : out = 16'b0000100000000000;
214 4'b1100 : out = 16'b0001000000000000;
215 4'b1101 : out = 16'b0010000000000000;
216 4'b1110 : out = 16'b0100000000000000;
217 4'b1111 : out = 16'b1000000000000000;
221 module DEC5 (input [4:0] in, input enable, output reg [31:0] out);
223 always @(in or enable)
225 out = 32'b00000000000000000000000000000000;
228 5'b00000 : out = 32'b00000000000000000000000000000001;
229 5'b00001 : out = 32'b00000000000000000000000000000010;
230 5'b00010 : out = 32'b00000000000000000000000000000100;
231 5'b00011 : out = 32'b00000000000000000000000000001000;
232 5'b00100 : out = 32'b00000000000000000000000000010000;
233 5'b00101 : out = 32'b00000000000000000000000000100000;
234 5'b00110 : out = 32'b00000000000000000000000001000000;
235 5'b00111 : out = 32'b00000000000000000000000010000000;
236 5'b01000 : out = 32'b00000000000000000000000100000000;
237 5'b01001 : out = 32'b00000000000000000000001000000000;
238 5'b01010 : out = 32'b00000000000000000000010000000000;
239 5'b01011 : out = 32'b00000000000000000000100000000000;
240 5'b01100 : out = 32'b00000000000000000001000000000000;
241 5'b01101 : out = 32'b00000000000000000010000000000000;
242 5'b01110 : out = 32'b00000000000000000100000000000000;
243 5'b01111 : out = 32'b00000000000000001000000000000000;
244 5'b10000 : out = 32'b00000000000000010000000000000000;
245 5'b10001 : out = 32'b00000000000000100000000000000000;
246 5'b10010 : out = 32'b00000000000001000000000000000000;
247 5'b10011 : out = 32'b00000000000010000000000000000000;
248 5'b10100 : out = 32'b00000000000100000000000000000000;
249 5'b10101 : out = 32'b00000000001000000000000000000000;
250 5'b10110 : out = 32'b00000000010000000000000000000000;
251 5'b10111 : out = 32'b00000000100000000000000000000000;
252 5'b11000 : out = 32'b00000001000000000000000000000000;
253 5'b11001 : out = 32'b00000010000000000000000000000000;
254 5'b11010 : out = 32'b00000100000000000000000000000000;
255 5'b11011 : out = 32'b00001000000000000000000000000000;
256 5'b11100 : out = 32'b00010000000000000000000000000000;
257 5'b11101 : out = 32'b00100000000000000000000000000000;
258 5'b11110 : out = 32'b01000000000000000000000000000000;
259 5'b11111 : out = 32'b10000000000000000000000000000000;
264 module DEC6 (input [5:0] in, input enable, output reg [63:0] out);
266 always @(in or enable)
268 out = 64'b0000000000000000000000000000000000000000000000000000000000000000;
271 6'b000000 : out = 64'b0000000000000000000000000000000000000000000000000000000000000001;
272 6'b000001 : out = 64'b0000000000000000000000000000000000000000000000000000000000000010;
273 6'b000010 : out = 64'b0000000000000000000000000000000000000000000000000000000000000100;
274 6'b000011 : out = 64'b0000000000000000000000000000000000000000000000000000000000001000;
275 6'b000100 : out = 64'b0000000000000000000000000000000000000000000000000000000000010000;
276 6'b000101 : out = 64'b0000000000000000000000000000000000000000000000000000000000100000;
277 6'b000110 : out = 64'b0000000000000000000000000000000000000000000000000000000001000000;
278 6'b000111 : out = 64'b0000000000000000000000000000000000000000000000000000000010000000;
279 6'b001000 : out = 64'b0000000000000000000000000000000000000000000000000000000100000000;
280 6'b001001 : out = 64'b0000000000000000000000000000000000000000000000000000001000000000;
281 6'b001010 : out = 64'b0000000000000000000000000000000000000000000000000000010000000000;
282 6'b001011 : out = 64'b0000000000000000000000000000000000000000000000000000100000000000;
283 6'b001100 : out = 64'b0000000000000000000000000000000000000000000000000001000000000000;
284 6'b001101 : out = 64'b0000000000000000000000000000000000000000000000000010000000000000;
285 6'b001110 : out = 64'b0000000000000000000000000000000000000000000000000100000000000000;
286 6'b001111 : out = 64'b0000000000000000000000000000000000000000000000001000000000000000;
287 6'b010000 : out = 64'b0000000000000000000000000000000000000000000000010000000000000000;
288 6'b010001 : out = 64'b0000000000000000000000000000000000000000000000100000000000000000;
289 6'b010010 : out = 64'b0000000000000000000000000000000000000000000001000000000000000000;
290 6'b010011 : out = 64'b0000000000000000000000000000000000000000000010000000000000000000;
291 6'b010100 : out = 64'b0000000000000000000000000000000000000000000100000000000000000000;
292 6'b010101 : out = 64'b0000000000000000000000000000000000000000001000000000000000000000;
293 6'b010110 : out = 64'b0000000000000000000000000000000000000000010000000000000000000000;
294 6'b010111 : out = 64'b0000000000000000000000000000000000000000100000000000000000000000;
295 6'b011000 : out = 64'b0000000000000000000000000000000000000001000000000000000000000000;
296 6'b011001 : out = 64'b0000000000000000000000000000000000000010000000000000000000000000;
297 6'b011010 : out = 64'b0000000000000000000000000000000000000100000000000000000000000000;
298 6'b011011 : out = 64'b0000000000000000000000000000000000001000000000000000000000000000;
299 6'b011100 : out = 64'b0000000000000000000000000000000000010000000000000000000000000000;
300 6'b011101 : out = 64'b0000000000000000000000000000000000100000000000000000000000000000;
301 6'b011110 : out = 64'b0000000000000000000000000000000001000000000000000000000000000000;
302 6'b011111 : out = 64'b0000000000000000000000000000000010000000000000000000000000000000;
304 6'b100000 : out = 64'b0000000000000000000000000000000100000000000000000000000000000000;
305 6'b100001 : out = 64'b0000000000000000000000000000001000000000000000000000000000000000;
306 6'b100010 : out = 64'b0000000000000000000000000000010000000000000000000000000000000000;
307 6'b100011 : out = 64'b0000000000000000000000000000100000000000000000000000000000000000;
308 6'b100100 : out = 64'b0000000000000000000000000001000000000000000000000000000000000000;
309 6'b100101 : out = 64'b0000000000000000000000000010000000000000000000000000000000000000;
310 6'b100110 : out = 64'b0000000000000000000000000100000000000000000000000000000000000000;
311 6'b100111 : out = 64'b0000000000000000000000001000000000000000000000000000000000000000;
312 6'b101000 : out = 64'b0000000000000000000000010000000000000000000000000000000000000000;
313 6'b101001 : out = 64'b0000000000000000000000100000000000000000000000000000000000000000;
314 6'b101010 : out = 64'b0000000000000000000001000000000000000000000000000000000000000000;
315 6'b101011 : out = 64'b0000000000000000000010000000000000000000000000000000000000000000;
316 6'b101100 : out = 64'b0000000000000000000100000000000000000000000000000000000000000000;
317 6'b101101 : out = 64'b0000000000000000001000000000000000000000000000000000000000000000;
318 6'b101110 : out = 64'b0000000000000000010000000000000000000000000000000000000000000000;
319 6'b101111 : out = 64'b0000000000000000100000000000000000000000000000000000000000000000;
320 6'b110000 : out = 64'b0000000000000001000000000000000000000000000000000000000000000000;
321 6'b110001 : out = 64'b0000000000000010000000000000000000000000000000000000000000000000;
322 6'b110010 : out = 64'b0000000000000100000000000000000000000000000000000000000000000000;
323 6'b110011 : out = 64'b0000000000001000000000000000000000000000000000000000000000000000;
324 6'b110100 : out = 64'b0000000000010000000000000000000000000000000000000000000000000000;
325 6'b110101 : out = 64'b0000000000100000000000000000000000000000000000000000000000000000;
326 6'b110110 : out = 64'b0000000001000000000000000000000000000000000000000000000000000000;
327 6'b110111 : out = 64'b0000000010000000000000000000000000000000000000000000000000000000;
328 6'b111000 : out = 64'b0000000100000000000000000000000000000000000000000000000000000000;
329 6'b111001 : out = 64'b0000001000000000000000000000000000000000000000000000000000000000;
330 6'b111010 : out = 64'b0000010000000000000000000000000000000000000000000000000000000000;
331 6'b111011 : out = 64'b0000100000000000000000000000000000000000000000000000000000000000;
332 6'b111100 : out = 64'b0001000000000000000000000000000000000000000000000000000000000000;
333 6'b111101 : out = 64'b0010000000000000000000000000000000000000000000000000000000000000;
334 6'b111110 : out = 64'b0100000000000000000000000000000000000000000000000000000000000000;
335 6'b111111 : out = 64'b1000000000000000000000000000000000000000000000000000000000000000;
341 module MUX2(input [1:0] in, input select, output reg out);
343 always @( in or select)
351 module MUX4(input [3:0] in, input [1:0] select, output reg out);
353 always @( in or select)
363 module MUX8(input [7:0] in, input [2:0] select, output reg out);
365 always @( in or select)
378 module MUX16(input [15:0] in, input [3:0] select, output reg out);
380 always @( in or select)
401 module MUX32(input [31:0] in, input [4:0] select, output reg out);
403 always @( in or select)
440 module MUX64(input [63:0] in, input [5:0] select, output reg out);
442 always @( in or select)
511 module ADD1(input in1, in2, cin, output out, cout);
513 assign {cout, out} = in1 + in2 + cin;
517 module ADD2 #(parameter SIZE = 2)(input [SIZE-1:0] in1, in2,
518 input cin, output [SIZE-1:0] out, output cout);
520 assign {cout, out} = in1 + in2 + cin;
524 module ADD4 #(parameter SIZE = 4)(input [SIZE-1:0] in1, in2,
525 input cin, output [SIZE-1:0] out, output cout);
527 assign {cout, out} = in1 + in2 + cin;
531 module ADD8 #(parameter SIZE = 8)(input [SIZE-1:0] in1, in2,
532 input cin, output [SIZE-1:0] out, output cout);
534 assign {cout, out} = in1 + in2 + cin;
538 module ADD16 #(parameter SIZE = 16)(input [SIZE-1:0] in1, in2,
539 input cin, output [SIZE-1:0] out, output cout);
541 assign {cout, out} = in1 + in2 + cin;
545 module ADD32 #(parameter SIZE = 32)(input [SIZE-1:0] in1, in2,
546 input cin, output [SIZE-1:0] out, output cout);
548 assign {cout, out} = in1 + in2 + cin;
551 module ADD64 #(parameter SIZE = 64)(input [SIZE-1:0] in1, in2,
552 input cin, output [SIZE-1:0] out, output cout);
554 assign {cout, out} = in1 + in2 + cin;
558 module SUB1(input in1, in2, cin, output out, cout);
560 assign {cout, out} = in1 - in2 - cin;
564 module SUB2 #(parameter SIZE = 2)(input [SIZE-1:0] in1, in2,
565 input cin, output [SIZE-1:0] out, output cout);
567 assign {cout, out} = in1 - in2 - cin;
571 module SUB4 #(parameter SIZE = 4)(input [SIZE-1:0] in1, in2,
572 input cin, output [SIZE-1:0] out, output cout);
574 assign {cout, out} = in1 - in2 - cin;
578 module SUB8 #(parameter SIZE = 8)(input [SIZE-1:0] in1, in2,
579 input cin, output [SIZE-1:0] out, output cout);
581 assign {cout, out} = in1 - in2 - cin;
585 module SUB16 #(parameter SIZE = 16)(input [SIZE-1:0] in1, in2,
586 input cin, output [SIZE-1:0] out, output cout);
588 assign {cout, out} = in1 - in2 - cin;
592 module SUB32 #(parameter SIZE = 32)(input [SIZE-1:0] in1, in2,
593 input cin, output [SIZE-1:0] out, output cout);
595 assign {cout, out} = in1 - in2 - cin;
598 module SUB64 #(parameter SIZE = 64)(input [SIZE-1:0] in1, in2,
599 input cin, output [SIZE-1:0] out, output cout);
601 assign {cout, out} = in1 - in2 - cin;
605 module MUL1 #(parameter SIZE = 1)(input in1, in2, output [2*SIZE-1:0] out);
607 assign out = in1*in2;
611 module MUL2 #(parameter SIZE = 2)(input [SIZE-1:0] in1, in2, output [2*SIZE-1:0] out);
613 assign out = in1*in2;
617 module MUL4 #(parameter SIZE = 4)(input [SIZE-1:0] in1, in2, output [2*SIZE-1:0] out);
619 assign out = in1*in2;
623 module MUL8 #(parameter SIZE = 8)(input [SIZE-1:0] in1, in2, output [2*SIZE-1:0] out);
625 assign out = in1*in2;
629 module MUL16 #(parameter SIZE = 16)(input [SIZE-1:0] in1, in2, output [2*SIZE-1:0] out);
631 assign out = in1*in2;
635 module MUL32 #(parameter SIZE = 32)(input [SIZE-1:0] in1, in2, output [2*SIZE-1:0] out);
637 assign out = in1*in2;
641 module MUL64 #(parameter SIZE = 64)(input [SIZE-1:0] in1, in2, output [2*SIZE-1:0] out);
643 assign out = in1*in2;
647 module DIV1 #(parameter SIZE = 1)(input in1, in2, output out, rem);
649 assign out = in1/in2;
650 assign rem = in1%in2;
654 module DIV2 #(parameter SIZE = 2)(input [SIZE-1:0] in1, in2,
655 output [SIZE-1:0] out, rem);
657 assign out = in1/in2;
658 assign rem = in1%in2;
662 module DIV4 #(parameter SIZE = 4)(input [SIZE-1:0] in1, in2,
663 output [SIZE-1:0] out, rem);
665 assign out = in1/in2;
666 assign rem = in1%in2;
670 module DIV8 #(parameter SIZE = 8)(input [SIZE-1:0] in1, in2,
671 output [SIZE-1:0] out, rem);
673 assign out = in1/in2;
674 assign rem = in1%in2;
678 module DIV16 #(parameter SIZE = 16)(input [SIZE-1:0] in1, in2,
679 output [SIZE-1:0] out, rem);
681 assign out = in1/in2;
682 assign rem = in1%in2;
686 module DIV32 #(parameter SIZE = 32)(input [SIZE-1:0] in1, in2,
687 output [SIZE-1:0] out, rem);
689 assign out = in1/in2;
690 assign rem = in1%in2;
694 module DIV64 #(parameter SIZE = 64)(input [SIZE-1:0] in1, in2,
695 output [SIZE-1:0] out, rem);
697 assign out = in1/in2;
698 assign rem = in1%in2;
702 module FF (input d, clk, output reg q);
703 always @( posedge clk)
708 module RFF(input d, clk, reset, output reg q);
709 always @(posedge clk or posedge reset)
716 module SFF(input d, clk, set, output reg q);
717 always @(posedge clk or posedge set)
724 module RSFF(input d, clk, set, reset, output reg q);
725 always @(posedge clk or posedge reset or posedge set)
734 module SRFF(input d, clk, set, reset, output reg q);
735 always @(posedge clk or posedge set or posedge reset)
744 module LATCH(input d, enable, output reg q);
745 always @( d or enable)
750 module RLATCH(input d, reset, enable, output reg q);
751 always @( d or enable or reset)
759 module LSHIFT1 #(parameter SIZE = 1)(input in, shift, val, output reg out);
761 always @ (in, shift, val) begin
771 module LSHIFT2 #(parameter SIZE = 2)(input [SIZE-1:0] in,
772 input [SIZE-1:0] shift, input val,
773 output reg [SIZE-1:0] out);
775 always @(in or shift or val) begin
778 out = out | ({SIZE-1 {1'b1} } >> (SIZE-1-shift));
782 module LSHIFT4 #(parameter SIZE = 4)(input [SIZE-1:0] in,
783 input [2:0] shift, input val, output reg [SIZE-1:0] out);
785 always @(in or shift or val) begin
788 out = out | ({SIZE-1 {1'b1} } >> (SIZE-1-shift));
793 module LSHIFT8 #(parameter SIZE = 8)(input [SIZE-1:0] in,
794 input [3:0] shift, input val, output reg [SIZE-1:0] out);
796 always @(in or shift or val) begin
799 out = out | ({SIZE-1 {1'b1} } >> (SIZE-1-shift));
803 module LSHIFT16 #(parameter SIZE = 16)(input [SIZE-1:0] in,
804 input [4:0] shift, input val, output reg [SIZE-1:0] out);
806 always @(in or shift or val) begin
809 out = out | ({SIZE-1 {1'b1} } >> (SIZE-1-shift));
813 module LSHIFT32 #(parameter SIZE = 32)(input [SIZE-1:0] in,
814 input [5:0] shift, input val, output reg [SIZE-1:0] out);
816 always @(in or shift or val) begin
819 out = out | ({SIZE-1 {1'b1} } >> (SIZE-1-shift));
823 module LSHIFT64 #(parameter SIZE = 64)(input [SIZE-1:0] in,
824 input [6:0] shift, input val, output reg [SIZE-1:0] out);
826 always @(in or shift or val) begin
829 out = out | ({SIZE-1 {1'b1} } >> (SIZE-1-shift));
833 module RSHIFT1 #(parameter SIZE = 1)(input in, shift, val, output reg out);
835 always @ (in, shift, val) begin
844 module RSHIFT2 #(parameter SIZE = 2)(input [SIZE-1:0] in,
845 input [SIZE-1:0] shift, input val,
846 output reg [SIZE-1:0] out);
848 always @(in or shift or val) begin
851 out = out | ({SIZE-1 {1'b1} } << (SIZE-1-shift));
857 module RSHIFT4 #(parameter SIZE = 4)(input [SIZE-1:0] in,
858 input [2:0] shift, input val,
859 output reg [SIZE-1:0] out);
861 always @(in or shift or val) begin
864 out = out | ({SIZE-1 {1'b1} } << (SIZE-1-shift));
868 module RSHIFT8 #(parameter SIZE = 8)(input [SIZE-1:0] in,
869 input [3:0] shift, input val,
870 output reg [SIZE-1:0] out);
872 always @(in or shift or val) begin
875 out = out | ({SIZE-1 {1'b1} } << (SIZE-1-shift));
880 module RSHIFT16 #(parameter SIZE = 16)(input [SIZE-1:0] in,
881 input [4:0] shift, input val,
882 output reg [SIZE-1:0] out);
884 always @(in or shift or val) begin
887 out = out | ({SIZE-1 {1'b1} } << (SIZE-1-shift));
892 module RSHIFT32 #(parameter SIZE = 32)(input [SIZE-1:0] in,
893 input [5:0] shift, input val,
894 output reg [SIZE-1:0] out);
896 always @(in or shift or val) begin
899 out = out | ({SIZE-1 {1'b1} } << (SIZE-1-shift));
903 module RSHIFT64 #(parameter SIZE = 64)(input [SIZE-1:0] in,
904 input [6:0] shift, input val,
905 output reg [SIZE-1:0] out);
907 always @(in or shift or val) begin
910 out = out | ({SIZE-1 {1'b1} } << (SIZE-1-shift));
914 module CMP1 #(parameter SIZE = 1) (input in1, in2,
915 output reg equal, unequal, greater, lesser);
917 always @ (in1 or in2) begin
941 module CMP2 #(parameter SIZE = 2) (input [SIZE-1:0] in1, in2,
942 output reg equal, unequal, greater, lesser);
944 always @ (in1 or in2) begin
967 module CMP4 #(parameter SIZE = 4) (input [SIZE-1:0] in1, in2,
968 output reg equal, unequal, greater, lesser);
970 always @ (in1 or in2) begin
993 module CMP8 #(parameter SIZE = 8) (input [SIZE-1:0] in1, in2,
994 output reg equal, unequal, greater, lesser);
996 always @ (in1 or in2) begin
1019 module CMP16 #(parameter SIZE = 16) (input [SIZE-1:0] in1, in2,
1020 output reg equal, unequal, greater, lesser);
1022 always @ (in1 or in2) begin
1023 if(in1 == in2) begin
1045 module CMP32 #(parameter SIZE = 32) (input [SIZE-1:0] in1, in2,
1046 output reg equal, unequal, greater, lesser);
1048 always @ (in1 or in2) begin
1049 if(in1 == in2) begin
1071 module CMP64 #(parameter SIZE = 64) (input [SIZE-1:0] in1, in2,
1072 output reg equal, unequal, greater, lesser);
1074 always @ (in1 or in2) begin
1075 if(in1 == in2) begin
1097 module VCC (output supply1 out);
1100 module GND (output supply0 out);
1104 module INC1 #(parameter SIZE = 1) (input in, output [SIZE:0] out);
1106 assign out = in + 1;
1110 module INC2 #(parameter SIZE = 2) (input [SIZE-1:0] in, output [SIZE:0] out);
1112 assign out = in + 1;
1116 module INC4 #(parameter SIZE = 4) (input [SIZE-1:0] in, output [SIZE:0] out);
1117 assign out = in + 1;
1121 module INC8 #(parameter SIZE = 8) (input [SIZE-1:0] in, output [SIZE:0] out);
1122 assign out = in + 1;
1126 module INC16 #(parameter SIZE = 16) (input [SIZE-1:0] in, output [SIZE:0] out);
1127 assign out = in + 1;
1131 module INC32 #(parameter SIZE = 32) (input [SIZE-1:0] in, output [SIZE:0] out);
1132 assign out = in + 1;
1135 module INC64 #(parameter SIZE = 64) (input [SIZE-1:0] in, output [SIZE:0] out);
1136 assign out = in + 1;