Forum Discussion
Altera_Forum
Honored Contributor
17 years agocompilation for 163 bits
hi to al! the compilation for 163 bits (2 inputs of 163 bits each and the output is also 163 bits) is not exceeding 2% of full compilation and 9% of analysis and synthesis even when the time ha...
Altera_Forum
Honored Contributor
17 years agoThe code for 163 bits is the following one:
module newconv(c,a,b); parameter N=162; input [0:N]a,b; output [0:N]c; reg [0:N]c; reg [0:N]d,e; integer k; reg y; always @(a or b) begin d=a; e=b; for(k=0;k<N+1;k=k+1) begin //$display("d=%b,e=%b",d,e); y=F(d,e); c[k]= y; d=SO(d); e=SO(e); end end function F; input [0:N]u,v; integer k; integer o,p; begin F=0; for (k=1; k<652; k=k+1) begin o=j(k+1); p=j(k); F= F^(u[p]&v[o]); //$display("k=%d, o=%d, p=%d, u=%b, v=%b, f=%b",k,o,p,u[p],v[o],F); end end endfunction function[0:16]j; input [0:16]k; parameter m=163; parameter T=4; parameter U=149; parameter p=653; reg [0:16]J[0:652]; //integer n,w,m,T,U,p; integer n,i,l,w; begin w=1; for (l=0; l<T; l=l+1) begin n=w; for (i=0; i<m; i=i+1) begin J[n]=i; n=(2*n)%p; end w=(U*w)%p; end j=J[k]; end endfunction function [0:N]SO; input [0:N]SI; reg [0:N] tmp; begin tmp = SI; tmp = tmp<<1; tmp[N] = SI[0]; SO = tmp; end endfunction endmodule this the code for 7 bits but with the parameters changed. could u possibly tel me the sol to this compilation prob?