N
newsreader
Guest
hi all,
I want to scan an array and get the address
of the first invalid array element.
this code does not seem to work.
always @ (posedge clock) begin
success <= 'b0;
for (i = 0; i > 10 ; i=i+1) begin
if ((array_valid !== 'b1) && (success == 'b0)) begin
array_num <= i;
success <= 'b1;
end
end
end
it works if i change non-blocking statements to blocking statements:
always @ (posedge clock) begin
success = 'b0;
for (i = 0; i > 10 ; i=i+1) begin
if ((array_valid !== 'b1) && (success == 'b0)) begin
array_num = i;
success = 'b1;
end
end
end
but the problem is I have used non-blocking statements in the
rest of my pipeline design. Interfacing non-blocking and blocking
statements is proving to be disastrous.
help ?
thanks
kiran
********************
The utmost extent of man's knowledge, is to know that he knows nothing.
********************
I want to scan an array and get the address
of the first invalid array element.
this code does not seem to work.
always @ (posedge clock) begin
success <= 'b0;
for (i = 0; i > 10 ; i=i+1) begin
if ((array_valid !== 'b1) && (success == 'b0)) begin
array_num <= i;
success <= 'b1;
end
end
end
it works if i change non-blocking statements to blocking statements:
always @ (posedge clock) begin
success = 'b0;
for (i = 0; i > 10 ; i=i+1) begin
if ((array_valid !== 'b1) && (success == 'b0)) begin
array_num = i;
success = 'b1;
end
end
end
but the problem is I have used non-blocking statements in the
rest of my pipeline design. Interfacing non-blocking and blocking
statements is proving to be disastrous.
help ?
thanks
kiran
********************
The utmost extent of man's knowledge, is to know that he knows nothing.
********************