1
0
mirror of https://github.com/olofk/serv.git synced 2026-02-25 16:00:01 +00:00
Files
olofk.serv/rtl/ser_add.v
2018-11-17 21:30:03 +01:00

20 lines
314 B
Verilog

`default_nettype none
module ser_add
(
input wire clk,
input wire a,
input wire b,
input wire clr,
output wire q,
output wire o_v);
reg c_r = 1'b0;
assign o_v = (a&b | a&c_r | b&c_r);
assign q = a ^ b ^ c_r;
always @(posedge clk)
c_r <= !clr & o_v;
endmodule