OpenCores

Subversion Repositories pairing

[/] [pairing/] [trunk/] [rtl/] [f3m.v] - Diff between revs 24 and 28

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 24 Rev 28
Line 206... Line 206...
      end
      end
endmodule
endmodule
 
 
/* out == in^3 mod p(x) */
/* out == in^3 mod p(x) */
/* p(x) == x^97 + x^12 + 2 */
/* p(x) == x^97 + x^12 + 2 */
module f3m_cubic(input [193:0] in, output [193:0] out);
module f3m_cubic(input wire [193:0] in, output wire [193:0] out);
wire [1:0] w0; f3_add a0(in[131:130], in[139:138], w0);
wire [1:0] w0; f3_add a0(in[131:130], in[139:138], w0);
wire [1:0] w1; f3_add a1(in[133:132], in[141:140], w1);
wire [1:0] w1; f3_add a1(in[133:132], in[141:140], w1);
wire [1:0] w2; f3_add a2(in[135:134], in[143:142], w2);
wire [1:0] w2; f3_add a2(in[135:134], in[143:142], w2);
wire [1:0] w3; f3_add a3(in[137:136], in[145:144], w3);
wire [1:0] w3; f3_add a3(in[137:136], in[145:144], w3);
wire [1:0] w4; f3_add a4(in[147:146], in[155:154], w4);
wire [1:0] w4; f3_add a4(in[147:146], in[155:154], w4);
Line 617... Line 617...
    assign C[21:0] = A[23:2];
    assign C[21:0] = A[23:2];
endmodule
endmodule
 
 
/* $C=A*(x^3) mod p(x)$ */
/* $C=A*(x^3) mod p(x)$ */
/* p(x) == x^97 + x^12 + 2 */
/* p(x) == x^97 + x^12 + 2 */
module func7(input [193:0] in, output [193:0] out);
module func7(input wire [193:0] in, output wire [193:0] out);
    assign out[5:0] = in[193:188];
    assign out[5:0] = in[193:188];
    assign out[23:6] = in[17:0];
    assign out[23:6] = in[17:0];
    wire [1:0] w0;
    wire [1:0] w0;
    f3_add a0(in[19:18], {in[188],in[189]}, w0);
    f3_add a0(in[19:18], {in[188],in[189]}, w0);
    assign out[25:24] = w0;
    assign out[25:24] = w0;

powered by: WebSVN 2.1.0

© copyright 1999-2014 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.