gsbkbharath
Newbie
- Joined
- Sep 9, 2013
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,317
This is the part of my code for histogram segmentation. It has to read data from in[j] into a temporary variable n which is the intensity of that pixel.Then it has to increment the nth bit of the hist vector by 1 so that at the end the vector hist has the requires histogram values.But the loop is RUNNING FOREVER.Can someone help with this please?
always@(posedge clk)
begin
for (i=0;i<=2;i=i+1)
begin
for (j=0;j<=2;j=j+1)
begin
n = in[j];
hist[n] = hist[n]+1'b1;
end
end
end
always@(posedge clk)
begin
for (i=0;i<=2;i=i+1)
begin
for (j=0;j<=2;j=j+1)
begin
n = in[j];
hist[n] = hist[n]+1'b1;
end
end
end