Hit Logic

Oct 30, 2003 1 Replies

Hi,



I have a question concerning a possibility to find out whether there is a hit or not (cache).



How can I check with few ressources need (Altera Cyclone device) if there is one or more positions with '1' within a 32bit-vector (in this case a signal hit='1' should be the result)?



Thank you very much for your help.


Kind regards Andrés Vázquez G&D System Development


It should be OK simply to write the obvious VHDL or Verilog:

....

reg [31:0] hits; wire hit; assign hit = (hits != 0);

....

hit

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required