1
0
mirror of https://github.com/olofk/serv.git synced 2026-05-03 23:08:34 +00:00

Use custom interconnect. Runs on hw

This commit is contained in:
Olof Kindgren
2018-11-21 12:55:44 +01:00
parent 6e034361d4
commit 9df2a0060b
17 changed files with 2407 additions and 261 deletions

View File

@@ -2,18 +2,24 @@
module ser_add
(
input wire clk,
input wire rst,
input wire a,
input wire b,
input wire clr,
output wire q,
output wire o_v);
reg c_r = 1'b0;
reg c_r;
assign o_v = (a&b | a&c_r | b&c_r);
wire axorb = a^b;
assign q = a ^ b ^ c_r;
assign o_v = (axorb & c_r) | (a&b);
assign q = axorb ^ c_r;
always @(posedge clk)
c_r <= !clr & o_v;
if (rst)
c_r <= 1'b0;
else
c_r <= !clr & o_v;
endmodule