Administrator approval is now required for registering new accounts. If you are registering a new account, and are external to the University, please ask the repository owner to contact ServiceLine to request your account be approved. Repository owners must include the newly registered email address, and specific repository in the request for approval.

Verified Commit 79ae3d38 authored by Minyong Li's avatar Minyong Li 💬
Browse files

core.Adder: fix timing by using Z_{2^{32}} arithmetics

An addition is trivially synthesized to a ripple-carry adder. With
512b + 512b the carry chain is super long and delay becomes super
high. Although the results are same, now just use 16 32b ripple-
carry adders, which is also what the standards specify. Later a
faster adder may be considered.
parent 5bd73e7e
......@@ -10,5 +10,10 @@ class Adder extends MultiIOModule {
val rhs = IO(Input(UInt(512.W)))
val out = IO(Output(UInt(512.W)))
out := lhs + rhs
private val _lhs = lhs.asTypeOf(Vec(16, UInt(32.W)))
private val _rhs = rhs.asTypeOf(Vec(16, UInt(32.W)))
private val _out = Wire(Vec(16, UInt(32.W)))
out := _out.asUInt() { case ((l, r), o) => o := l + r }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment