surisingh
Member level 1
- Joined
- Jun 14, 2007
- Messages
- 32
- Helped
- 1
- Reputation
- 2
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,499
Hi,
I need to implement one logic in System verilog. Here is the snippet of code:
for(int i=0; i<max_count; i++) begin
if(aid_queue == bid_queue[bid_count] && queue_index != i) begin
queue_index = i;
end
Here initially queue_index is high value, say 32'hFFFFFFFF, I need to search the entire aid_queue for the particular value.
once the value is found, i am setting the queue index to that index, say the matching index is 5.
When next time this loop encountered, I need to search the entire aid_queue EXCEPT the queue index 5. Now if the
value matches and the queue index is 7, next time i have to search the entire queue EXCEPT the queue index 5 AND 7 and so on...
How can I do that in SV using just for and if loop.
Thanks
Suri
I need to implement one logic in System verilog. Here is the snippet of code:
for(int i=0; i<max_count; i++) begin
if(aid_queue == bid_queue[bid_count] && queue_index != i) begin
queue_index = i;
end
Here initially queue_index is high value, say 32'hFFFFFFFF, I need to search the entire aid_queue for the particular value.
once the value is found, i am setting the queue index to that index, say the matching index is 5.
When next time this loop encountered, I need to search the entire aid_queue EXCEPT the queue index 5. Now if the
value matches and the queue index is 7, next time i have to search the entire queue EXCEPT the queue index 5 AND 7 and so on...
How can I do that in SV using just for and if loop.
Thanks
Suri