DLTcollab / dcurl

Hardware-accelerated Multi-threaded IOTA PoW, drop-in replacement for ccurl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow de10 nano to build dcurl with libtuv code included

marktwtn opened this issue · comments

The building steps of dcurl would include libtuv code only if the CPU platform is enabled.

Based on the previous experience #105 and the requirement of #107,
the de10 nano board should be able to build dcurl + libtuv
with other hardware devices (like FPGA) enabled.

To solve the issue, dcurl and libtuv both need to be modified.

The modification includes:

dcurl

  • The detected hardware machine name of de10 nano is armv7l,
    it should be treated as arm.
  • Have a new build option BUILD_BOARD for assigning the the board name.

libtuv

  • If the board is de10 nano, add the CFLAGS of -mcpu=cortex-a9 -mfloat-abi=hard.

After the modification is done, @ajblane would test it on the de10 nano board.

$ make BUILD_BOARD=de10nano BUILD_FPGA_ACCEL=1 BUILD_DEBUG=1 check

  CC    build/curl.o                                                                                                         
  CC    build/constants.o                                                                                                    
  CC    build/trinary.o                                                                                                      
  CC    build/dcurl.o                                                                                                        
  CC    build/implcontext.o                                                                                                  
  CC    build/common.o                                                                                                       
  CC    build/pow_fpga_accel.o                                                                                               
  CC    build/test-trinary.o                                                                                                 
  LD    build/test-trinary                                                                                                   
*** Validating build/test-trinary ***                                                                                        
        [ Verified ]                                                                                                         
  CC    build/test-curl.o                                                                                                    
  LD    build/test-curl                                                                                                      
*** Validating build/test-curl ***                                                                                           
        [ Verified ]                                                                                                         
  CC    build/test-dcurl.o                                                                                                   
  LD    build/test-dcurl                                                                                                     
*** Validating build/test-dcurl ***                                                                                          
[dcurl] Implementation FPGA is initialized successfully[  518.131995] Get interrupt                                          
                                                                                                                             
[dcurl] Implementation FPGA is initialized successfully[  518.197962] Get interrupt                                          
                                                                                                                             
[dcurl] Implementation FPGA is initialized successfully[  518.264670] Get interrupt                                          
                                                                                                                             
[dcurl] Implementation FPGA is initialized successfully[  518.329472] Get interrupt                                          
                                                                                                                             
[dcurl] Implementation FPGA is initialized successfully[  518.395739] Get interrupt                                          
                                                                                                                             
        [ Verified ]                                                                                                         
  CC    build/test-pow.o                                                                                                     
  LD    build/test-pow                                                                                                       
*** Validating build/test-pow ***                                                                                            
FPGA                                                                                                                         
[dcurl] Implementation FPGA is initialized successfully                                                                      
[  519.492361] Get interrupt                                                                                                 
PoW execution times: 1 times.                                                                                                
Success.                                                                                                                     
        [ Verified ]                                                                                                                                                                 
rm build/test-trinary.o build/test-curl.o build/test-pow.o build/test-dcurl.o