Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
ankit12345 said:For(i=0,i< 10,i++)
I think this works.....
where as this......
For(i=0,i<k,i++)
where k is a variable.........changes during simulation.....
I dont think it will be synthesisable........
Comments please.....
function [31:0] mask (input [31:0] tap);
integer index;
mask = tap;
for (index = 1; index < 32; index = index * 2) begin
mask = mask | (mask >> index);
end
endfunction
function [31:0] mask (input [31:0] tap);
integer index;
mask[31] = tap[31];
for (index = 30; index >= 0; index = index - 1) begin
mask[index] = tap[index] | mask[index + 1];
end
endfunction