1
0
mirror of https://github.com/olofk/serv.git synced 2026-02-08 00:31:17 +00:00
Files
olofk.serv/rtl/ser_add.v
Olof Kindgren d4bbe17e78 jalr, blt
2018-10-31 14:51:28 +01:00

19 lines
263 B
Verilog

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