nand2/02_Boolean_Arithmetic/Inc16.v

19 lines
316 B
Coq
Raw Normal View History

2023-01-11 10:13:09 +00:00
/**
* 16-bit incrementer:
* out = in + 1 (arithmetic addition)
*/
`default_nettype none
module Inc16(
input [15:0] in,
output [15:0] out
2023-01-11 10:13:09 +00:00
);
// Put your code here:
wire [15:0] incr;
assign incr[15:0] = 16'b1;
Add16 ADD(in, incr, out);
// or just:
//assign out = in + 1;
2023-01-11 10:13:09 +00:00
endmodule