Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

compare multiple std_logic_vectors

Hi,

I have several FIFO's and i need to read out, the one with the most data first. I use the byte counter of the fifo to compare.

But what is the best way to compare those vectors?

if A > B and A > C and A > D then

input <= A

elsif B > A ......

You get the point*

Or is there a better way ?

For now i'm using above code but it is getting complex with allot of fifo's.

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sounds excessive logic will be needed. I am not sure about the need to do that in your case (I assume your work is video based from previous posts). Consider waiting until all fifos have some minimum data size then read out all on same clock.