diff options
Diffstat (limited to 'ecdsa_fpga_model.h')
-rw-r--r-- | ecdsa_fpga_model.h | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/ecdsa_fpga_model.h b/ecdsa_fpga_model.h index ea045b9..5228b9c 100644 --- a/ecdsa_fpga_model.h +++ b/ecdsa_fpga_model.h @@ -47,7 +47,7 @@ // //------------------------------------------------------------------------------ #ifndef USE_CURVE -#define USE_CURVE 2 +#define USE_CURVE 1 #endif //------------------------------------------------------------------------------ #define BAD_CURVE #error USE_CURVE must be either 1 or 2! @@ -74,6 +74,17 @@ //------------------------------------------------------------------------------ +// Debugging Output Control +//------------------------------------------------------------------------------ +/** +define DUMP_CYCLE_STATES // dump R0, R1, S, T after every cycle +/**/ +/** +#define DUMP_UOP_OUTPUTS // dump every micro-operation output (lots of text!) +**/ + + +//------------------------------------------------------------------------------ // Test Vectors Switch //------------------------------------------------------------------------------ #if USE_CURVE == 1 @@ -114,27 +125,35 @@ BAD_CURVE //------------------------------------------------------------------------------ // Prototypes //------------------------------------------------------------------------------ -void print_fpga_buffer (const char *s, - const FPGA_BUFFER *v); +void print_fpga_buffer (const char *s, + const FPGA_BUFFER *v); + +void print_fpga_buffer_nodelim (const char *s, + const FPGA_BUFFER *v); + +bool compare_fpga_buffers (const FPGA_BUFFER *az, + const FPGA_BUFFER *bz); -void print_fpga_buffer_nodelim (const char *s, - const FPGA_BUFFER *v); +bool compare_fpga_buffers (const FPGA_BUFFER *ax, + const FPGA_BUFFER *ay, + const FPGA_BUFFER *bx, + const FPGA_BUFFER *by); -bool compare_fpga_buffers (const FPGA_BUFFER *az, - const FPGA_BUFFER *bz); +bool compare_fpga_buffers (const FPGA_BUFFER *ax, + const FPGA_BUFFER *ay, + const FPGA_BUFFER *az, + const FPGA_BUFFER *bx, + const FPGA_BUFFER *by, + const FPGA_BUFFER *bz); -bool compare_fpga_buffers (const FPGA_BUFFER *ax, - const FPGA_BUFFER *ay, - const FPGA_BUFFER *bx, - const FPGA_BUFFER *by); +void dump_cycle_header (int, int, bool); -bool compare_fpga_buffers (const FPGA_BUFFER *ax, - const FPGA_BUFFER *ay, - const FPGA_BUFFER *az, - const FPGA_BUFFER *bx, - const FPGA_BUFFER *by, - const FPGA_BUFFER *bz); +void dump_cycle_state( const FPGA_BUFFER *, const FPGA_BUFFER *, const FPGA_BUFFER *, + const FPGA_BUFFER *, const FPGA_BUFFER *, const FPGA_BUFFER *, + const FPGA_BUFFER *, const FPGA_BUFFER *, const FPGA_BUFFER *, + const FPGA_BUFFER *, const FPGA_BUFFER *, const FPGA_BUFFER *); +void dump_uop_output(const char *, const FPGA_BUFFER *); //------------------------------------------------------------------------------ // End-of-File |