Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate FPGA-accelerated PoW #50

Merged
merged 50 commits into from
Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d8f0073
Begin at code of Lampa Lab
ajblane Jul 4, 2018
2154f76
Implement related functions for using the accelerator
ajblane Jul 4, 2018
d2bf35d
Add the BUILD_FPGA_LAMPALAB option into Makefile
ajblane Jul 4, 2018
6c3f646
Add the accelerator function into dcurl
ajblane Aug 7, 2018
c47bd82
Test FPGA PoW of Lampa Lab
ajblane Jul 13, 2018
14dea4b
Fix the bug of returning local variable of function
ajblane Jul 13, 2018
aea24e3
Fix the bug by adding type translation
ajblane Jul 26, 2018
01ab815
Typo for comments
ajblane Jul 26, 2018
60503e9
Use clang-format for h files and c files
ajblane Aug 4, 2018
98af4d4
Rename the functions but do it not well
ajblane Jul 26, 2018
79ccfe3
Do not show print info when doing PoW
ajblane Jul 26, 2018
269700f
Rewrite name scheme
ajblane Jul 26, 2018
a370a98
Add information of building FPGA accelerator to README
ajblane Jul 26, 2018
48f419c
Use existing functions and remove useless files
ajblane Jul 26, 2018
2eef531
Type consistency for all implemented PoW functions
ajblane Jul 26, 2018
a12c471
Correct spelling errors
ajblane Jul 26, 2018
71a016f
Skip kernel message
ajblane Jul 27, 2018
1e83b29
Make them with static
ajblane Aug 4, 2018
38b346f
Drop the useless message
ajblane Aug 4, 2018
5674857
Typo for the comment
ajblane Aug 4, 2018
1da48e7
Rewrite consistent naming
ajblane Aug 4, 2018
5b67f55
Drop extra blank lines
ajblane Aug 4, 2018
1d5dc44
Advoid terminating program when fail PoW init
ajblane Aug 4, 2018
4587adb
Declare it with type consistency and rename it
ajblane Aug 5, 2018
2433b9c
Modify README
ajblane Aug 5, 2018
252c1f1
Make it naming consistency
ajblane Aug 5, 2018
1086c5a
Drop unnecessary header files included
ajblane Aug 5, 2018
0537f5c
Modify copyright notice and remove blank line
ajblane Aug 7, 2018
4f33b60
Change i = i + 1 to i++
ajblane Aug 7, 2018
9f44c8a
Rename the file and set CFLAGS in Makefile
ajblane Aug 7, 2018
31240dc
Advoid terminating the program when destroy
ajblane Aug 4, 2018
cd99478
Use malloc for output memory of PoW
ajblane Aug 8, 2018
913afa0
Move the unnecessary global variable
ajblane Aug 8, 2018
c7bbf07
Validate resources for the outputs
ajblane Aug 8, 2018
02a9780
Do not terminate the program when destroy fails
ajblane Aug 9, 2018
3b4f93a
Move header inclusions to proper regions
ajblane Aug 9, 2018
df8eedf
Set FPGA configuration for device files
ajblane Aug 9, 2018
f60c26a
Use macros from constants.h
ajblane Aug 10, 2018
2837ed9
Use goto to handle exception
ajblane Aug 13, 2018
43a865f
Rename macros
ajblane Aug 13, 2018
97be9ec
Maintain the coding style
ajblane Aug 13, 2018
a0f78de
Use low-level I/O
ajblane Aug 17, 2018
20949ae
Use memcpy and remove not useful code
ajblane Aug 17, 2018
2002c1e
Rename labels and use clang-format
ajblane Aug 17, 2018
19ea794
Use assert
ajblane Aug 17, 2018
6c98c16
Solve conflicts
ajblane Aug 20, 2018
119e67d
Modify it to the new interface #59
ajblane Aug 20, 2018
fafa723
Drop fpga-accel.mk
ajblane Aug 22, 2018
f220b24
Modify README and add FPGA-ACCEL.md
ajblane Aug 22, 2018
00711c8
Modify FPGA-ACCEL.md
ajblane Aug 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Hardware-accelerated implementation for IOTA PearlDiver, which utilizes multi-th
# Introduction
dcurl exploits SIMD instructions on CPU and OpenCL on GPU. Both CPU and GPU accelerations can be
enabled in multi-threaded execuction fashion, resulting in much faster proof-of-work (PoW) for IOTA
Reference Implementation (IRI).
Reference Implementation (IRI). Additionally, dcurl also supports the FPGA-accelerated solution further described in docs/FPGA-ACCEL.md

# Warning
* You need to configure paths and flags of OpenCL installation in ```mk/opencl.mk```
* dcurl will automatically configure all the GPU divices on your platform.
* Check JDK installation and set JAVA_HOME if you wish to specify.
* If your platform doesn't support Intel SSE, dcurl would be compiled with naive implementation.
* For the IOTA hardware accelerator, we integrate [Lampa Lab's Cyclone V FPGA PoW](https://github.com/LampaLab/iota_fpga) into dcurl. Lampa Lab supports soc_system.rbf only for DE10-nano board. You need to synthesize to get soc_system.rbf for using Arrow SoCKit board.
* For the IOTA hardware accelerator, we integrate [Lampa Lab's Cyclone V FPGA PoW](https://github.com/LampaLab/iota_fpga) into dcurl. Lampa Lab provides soc_system.rbf only for DE10-nano board. You need to synthesize to get soc_system.rbf for using Arrow SoCKit board and [this RBF file](https://github.com/ajblane/dcurl/releases/tag/v1.0-SoCKit) can be downloaded from our release. Moreover, you need to download [Lampa Lab-provided Linux image](https://github.com/LampaLab/iota_fpga/releases/tag/v0.1) to flash into the micro-SD card and root password is 123456. Finally, you also need to download dcurl into root directory.

# Build Instructions
* dcurl allows various combinations of build configurations to fit final use scenarios.
Expand Down Expand Up @@ -70,7 +70,7 @@ $ make BUILD_AVX=1 check
[ Verified ]
```

* Test with Arrow SoCKit board with [Download](https://github.com/LampaLab/iota_fpga/releases/tag/v0.1) Linux sd-card image, root password is 123456 and you need to download dcurl into root directory.
* Test with Arrow SoCKit board
```shell
root@lampa:~# sh init_curl_pow.sh
root@lampa:~# cd dcurl
Expand Down
22 changes: 22 additions & 0 deletions docs/FPGA-ACCEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

IOTA FPGA-accelerated solution for Dcurl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use # IOTA FPGA-accelerated solution for dcurl for consistent Markdown style.

----------------------------------------

Dcurl supports IOTA FPGA-accelerated solutions to improve PoW performance. PoW calculation time for MWM=14 is between 0.001 and 0.8 second and 0.14 second in average and The time for MWM=15 is between 0.01 and 2 second and 0.42 second in average. Currently, it is experimented and verfied on Arrow Sockit board and Intel FPGA DE10-Nano board. We reuse the Lampa Lab-provied FPGA-accelerated solution.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually call it dcurl in lowercase.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "verfied"


Here is a brief summary of the tasks Lampa Lab have done:
* Use Verilog to implement Curl & POW accelerators
* Use System Verilog and UVM to verify the accelerators
* Synthesize Curl & POW hardware accelerators for Intel FPGA DE10-Nano board and flash it into the board
* Write Linux drivers in Gloden System Reference Design for Curl & POW hardware accelerators and verify them
You want to known it much more and further look at [LampaLab/iota_fpga](https://github.com/LampaLab/iota_fpga)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace "You want to known it much more and further look at" with "More information: ".


Here is a brief summary of the tasks we have done:
* Resynthesize the POW hardware accelerator for Arrow Sockit board and flash it into the board
* Integrate the IOTA PoW hardware accelerator into dcurl's implementation interface
* Test and verify it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't append trailing space lines.