hulk789
Junior Member level 3
Code:
integer i;
reg [7:0] test=0;
always @ (xyz) begin
for(i=7;i>=0;i=i-1) begin
if(some condition) begin
test[i]=1;
end
end
end
for example the condition is true only for i=5 then instead of output 8'h20 the output is 8'h01