View Single Post
  #1 (permalink)  
Old 12-25-2003, 02:56 PM
Newhand
Guest
 
Posts: n/a
Default How to get first bit '0' position in certain register?

Dear all,

For certain register, say stream = 16'b1111010011111111;
the position of first bit '0' is: 8 (from LSB);
if stream = 16'b1111000100010011, then the position is 2;

what I need is to get the position.

Since it should be done in one clock cycle, combination logic in
Verilog might be a better choice.

Could anybody give me some pieces of suggestion? Thanks in advance.

Newhand
Reply With Quote