Skip to content

Commit

Permalink
Update readme and remove dependency on bls package for the adder
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdevlin authored and bsdevlin committed Nov 30, 2019
1 parent 00b3295 commit d560d34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ We also gave a presentation at the Taipei Ethereum Meetup [here](https://www.you
[Here](Blockchain_Acceleration_Using_FPGAs_Elliptic_curves_zkSNARKs_and_VDFs_presentation.pdf) is a copy of the presentation slides.

While mainly developed for Equihash verification and elliptic curve operations on the secp256k1 and bls12-381 curves, the code (ip_cores) used in this repo can also be applied to other curves by
changing parameters / minimum modification to equations.
changing parameters / minimum modification to equations. Currently a FPGA accelerator for Ethereum 2.0 SNARKs is being developed [here](https://github.com/bsdevlin/fpga_snark_prover) (underlying core modules are all reused as a submodule
from this Zcash repo).


# Getting started

Expand Down
6 changes: 3 additions & 3 deletions ip_cores/util/src/rtl/adder_pipe.sv
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

module adder_pipe # (
parameter P = bls12_381_pkg::P,
parameter P,
parameter BITS = $clog2(P),
parameter CTL_BITS = 8,
parameter LEVEL = 1 // If LEVEL == 1 this is just an add with registered output
Expand Down Expand Up @@ -54,14 +54,14 @@ always_comb begin
b[0] = 0;
b[0] = i_add.dat[BITS +: BITS];
sop_eop[0][0] = i_add.sop;
sop_eop[0][1] = i_add.eop;
sop_eop[0][1] = i_add.eop;
result0[0] = 0;
result1[0] = 0;
rdy[LEVEL] = o_add.rdy;
i_add.rdy = rdy[0];
o_add.copy_if_comb(carry_neg[LEVEL] ? result0[LEVEL] : result1[LEVEL], val[LEVEL], 1, 1, 0, 0, ctl[LEVEL]);
o_add.sop = sop_eop[LEVEL][0];
o_add.eop = sop_eop[LEVEL][1];
o_add.eop = sop_eop[LEVEL][1];
end

generate
Expand Down

0 comments on commit d560d34

Please sign in to comment.