-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add SESA full adders and parallel prefix adders
- Loading branch information
1 parent
79729f7
commit b798152
Showing
4 changed files
with
225 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package approx.addition | ||
|
||
import chisel3._ | ||
|
||
/** SESA1 approximate full-adder | ||
* | ||
* Implementation from Jha et al. [2023] | ||
*/ | ||
class SESA1 extends FA { | ||
io.s := (io.x ^ io.y ^ io.cin) | (!io.x & !io.y & !io.cin) | ||
io.cout := ((io.x ^ io.y) & io.cin) | (io.x & io.y) | ||
} | ||
|
||
/** SESA2 approximate full-adder | ||
* | ||
* Implementation from Jha et al. [2023] | ||
*/ | ||
class SESA2 extends FA { | ||
io.s := false.B | ||
io.cout := ((io.x ^ io.y) & io.cin) | (io.x & io.y) | ||
} | ||
|
||
/** SESA3 approximate full-adder | ||
* | ||
* Implementation from Jha et al. [2023] | ||
*/ | ||
class SESA3 extends FA { | ||
io.s := true.B | ||
io.cout := ((io.x ^ io.y) & io.cin) | (io.x & io.y) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters