Hit Logic

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

Reply to
Vazquez
Loading thread data ...

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

....

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

....

hit

Reply to
Jonathan Bromley

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.