Determining if a number is power of two, is very old design problem. Various solutions to this already exists but performance of these solutions is evaluated based on software requirements only. But normally efficiency of algorithm depends on means to deliver it, Hardware performance is evaluated here for three such algorithms and shown that there is stark gap between software performance and hardware performance. Hardware evaluation parameters are also briefly discussed (from ASIC design Flow point of view). Towards the end, a noble method is proposed & evaluated to determine if number is power of 2.
Original Article can be read at Designing hardware with C-based languages
By Venkat Krishnaswamy, co-founder and engineering director at Calypto Design Systems, California. Published on 11/14/2005 in EETimes
With increasing design complexity and shortening time-to-market, hardware designers have sought to use higher levels of abstraction for both verification and design. For many hardware engineers, C-based languages (C/C++ or SystemC) have become a means to specify designs for verification, in addition to offering a starting point for implementation.