1
0
mirror of https://github.com/olofk/serv.git synced 2026-01-13 15:17:25 +00:00
olofk.serv/rtl/ser_add.v
2018-10-26 22:52:39 +02:00

16 lines
213 B
Verilog

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