Conversation
|
I think this is a sensible change, thanks. Would you mind expanding the commit message to explain what's going on? It's always easier to understand the history of the repository if it's not dependant on GitHub. With my "maths hat on", I'm always enthusiastic about giving a minimal "proof" of why a commit is the right thing to do. Working out how to write such a commit message sometimes makes me adjust the code as well, which I think is probably a good thing. I'd also be tempted to extend this commit slightly to get rid of the slightly silly loops for replicating the bit. Is that easy? (And does it work? I only suggested this from reading the existing code...) |
|
I think that comparing the PPA of different schemes is an important method for selecting among different options. Therefore, I used Design Compiler to synthesize three implementations (including only clz, ctz, and cpop), using the NanGate45 standard cell library and a 1GHz frequency constraint. All three designs achieved the same timing slack. The original version had an area of 287.546; Scheme 1 (with Interestingly, despite removing redundant logic, Scheme 1 resulted in a larger area. In contrast, Scheme 2 achieved about a 7% area reduction. I added comments in the code to explain why the method makes sense. |
Remove the redundant logic
& ~bitcnt_mask_op, as explained in issue #2294 .