Updated formatting in cpp library, added version 1.3 design document

This commit is contained in:
bsdevlin 2019-08-25 23:14:22 +08:00
parent 736b85cff4
commit 1cdbda3adf
4 changed files with 218 additions and 215 deletions

Binary file not shown.

View File

@ -30,7 +30,6 @@
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <fpga_pci.h> #include <fpga_pci.h>
#include <fpga_mgmt.h> #include <fpga_mgmt.h>
#include <utils/lcd.h> #include <utils/lcd.h>
@ -72,7 +71,6 @@ bool string_to_hex(const std::string &inStr, unsigned char *outStr) {
return true; return true;
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
unsigned int slot_id = 0; unsigned int slot_id = 0;
@ -152,12 +150,14 @@ int main(int argc, char **argv) {
failed = true; failed = true;
} }
if (verify_secp256k1_sig_rpl.bm != 0) { if (verify_secp256k1_sig_rpl.bm != 0) {
printf("ERROR: Signature verification failed!\n"); failed = true; printf("ERROR: Signature verification failed!\n");
failed = true;
} }
if (verify_secp256k1_sig_rpl.index != 0xa) { if (verify_secp256k1_sig_rpl.index != 0xa) {
printf("ERROR: Index was wrong!\n"); failed = true; } printf("ERROR: Index was wrong!\n");
failed = true;
}
} }
if ((zfpga.m_command_cap & zcash_fpga::ENB_BLS12_381) != 0) { if ((zfpga.m_command_cap & zcash_fpga::ENB_BLS12_381) != 0) {

View File

@ -220,6 +220,9 @@ class zcash_fpga {
int read_stream(uint8_t* data, unsigned int size); int read_stream(uint8_t* data, unsigned int size);
int write_stream(uint8_t* data, unsigned int len); int write_stream(uint8_t* data, unsigned int len);
/*
* This can be read to check command capability register on the FPGA
*/
command_cap_e m_command_cap; command_cap_e m_command_cap;
private: private:

Binary file not shown.