From 52675d5fa64a1157fe85e041914179309eb2ed9e Mon Sep 17 00:00:00 2001 From: "Pavel V. Shatov (Meister)" Date: Tue, 27 Jun 2017 13:49:39 +0300 Subject: Added test vectors, use scripts from the C model to (re-)generate them. --- src/tb/modexp_fpga_model_vectors.v | 68 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/tb/modexp_fpga_model_vectors.v (limited to 'src/tb') diff --git a/src/tb/modexp_fpga_model_vectors.v b/src/tb/modexp_fpga_model_vectors.v new file mode 100644 index 0000000..7a2b8e9 --- /dev/null +++ b/src/tb/modexp_fpga_model_vectors.v @@ -0,0 +1,68 @@ +/* Generated automatically, do not edit. */ + +localparam [383:0] M_384 = + {32'h00d1bda6, 32'h6c3babf4, 32'he418ec5b, 32'h18435414, + 32'h5ed5b8aa, 32'h0b62f138, 32'h84551519, 32'h1e94e625, + 32'h0901814a, 32'h138eda05, 32'h56b54f83, 32'h1cd7605d}; + +localparam [383:0] N_384 = + {32'hb06b4de3, 32'h1006214f, 32'haa3c8cae, 32'h6c568477, + 32'hb8c8d8b2, 32'h08684070, 32'h3b9ba674, 32'h739e0eec, + 32'h950a0d8a, 32'hb6b7443d, 32'hfebe690c, 32'he2810099}; + +localparam [383:0] N_COEFF_384 = + {32'hd4511719, 32'h4d546bb2, 32'hdf614d49, 32'h81e00324, + 32'h07b0ccd5, 32'h44ccffdc, 32'h1d37c210, 32'h1733fb82, + 32'h35cf01cb, 32'hf7bf10e9, 32'h4238c3df, 32'h2712ac57}; + +localparam [383:0] FACTOR_384 = + {32'h7643f0e6, 32'h7057fffc, 32'h92e27890, 32'h66a30c4a, + 32'ha6e3ef37, 32'h97d72f8a, 32'h0d4a5392, 32'heb5ad4a1, + 32'h0aa57383, 32'h1e3a5028, 32'h0cbaa40e, 32'hb17a468b}; + +localparam [383:0] COEFF_384 = + {32'h9250be5e, 32'hc1e19afe, 32'h99341b1b, 32'hda823ac7, + 32'hcc46fbd2, 32'he7da1ff3, 32'he36e49fd, 32'hd593b36c, + 32'h09ae9f5e, 32'h7f44805d, 32'hf77c6019, 32'h45563ab6}; + +localparam [383:0] M_FACTOR_384 = + {32'h8166125d, 32'h30aece3d, 32'h30d77d7e, 32'h8b0791ba, + 32'h91e92683, 32'hc483bb6c, 32'h0ee1571d, 32'h6e28c2f5, + 32'hff5e6b61, 32'h65fb6164, 32'hd3651e5a, 32'h746b8ca0}; + +localparam [511:0] M_512 = + {32'h005536b6, 32'h43ea651f, 32'h2fd3c70a, 32'ha83659cb, + 32'hd0c1f47b, 32'ha8033730, 32'h29c6b082, 32'h6db48613, + 32'h6b4f769c, 32'h6bf531ff, 32'h247d6d76, 32'hea4ad050, + 32'hdc0e82cc, 32'hedf5fd1c, 32'he07abb51, 32'h92204551}; + +localparam [511:0] N_512 = + {32'hef78b4ed, 32'haee1cc78, 32'h659b9935, 32'h39d5f5e1, + 32'ha47c2b29, 32'h5a38e8c4, 32'h85e2b846, 32'ha354614f, + 32'hde1f94ee, 32'h7462ba8f, 32'h991ffec3, 32'h6172bc7a, + 32'h11784156, 32'h572b6e41, 32'ha23fa8d0, 32'h257ae8f7}; + +localparam [511:0] N_COEFF_512 = + {32'he20d94ee, 32'hee497b57, 32'h13d83f00, 32'h7445c269, + 32'h7258393f, 32'h5a725633, 32'hf7349437, 32'h83681b0a, + 32'h5a4be08f, 32'h7f49b1eb, 32'h09221d14, 32'h5bb82985, + 32'h2599e229, 32'h1a15218d, 32'h62f8803c, 32'haa5fa739}; + +localparam [511:0] FACTOR_512 = + {32'h220ef9ff, 32'h55989a78, 32'h722c5c1e, 32'ha466c81c, + 32'h6e6e0423, 32'h1242da6d, 32'h1482351e, 32'h5d14212e, + 32'h8fc70923, 32'hb24cad26, 32'h3f3538a9, 32'h4f0a6bdf, + 32'h14ca36b9, 32'h819a72fc, 32'h9b5ea0ea, 32'h8b4fe28b}; + +localparam [511:0] COEFF_512 = + {32'hd375442c, 32'h4e2dcb0d, 32'hcfd2f151, 32'hc694c180, + 32'h3781078f, 32'hf2647315, 32'hc5f685c2, 32'ha75c0e9d, + 32'h545f18cb, 32'hec66027f, 32'h229cb16f, 32'hc8613357, + 32'h8f92a4c4, 32'h50de0908, 32'h6d8a8d78, 32'h7011f42d}; + +localparam [511:0] M_FACTOR_512 = + {32'h099cc6e8, 32'h778f03a1, 32'h329890e9, 32'ha0a86dd2, + 32'hd7354e49, 32'h00a2d28a, 32'h2b0848c6, 32'hb08915dc, + 32'h663032a3, 32'h70734b62, 32'h2d30c132, 32'hefa75cc6, + 32'h9f18b32a, 32'h97d6ddf8, 32'h2f6df2d0, 32'he9098874}; + -- cgit v1.2.3