Interestingly nobody has offered their own alternative implementations yet. (And nobody seems to like "check_en_ref".) Reply with your code.
https://twitter.com/oe1cxw/status/937515992183222272 …
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Interestingly nobody has offered their own alternative implementations yet. (And nobody seems to like "check_en_ref".) Reply with your code.
https://twitter.com/oe1cxw/status/937515992183222272 …
For ASIC synthesis they yield pretty much the same result because it's such a small circuit logic optimization just sees the whole function, so you say "check_en_alt" is best? (For iCE40 synth with icestorm "check_en" is smallest because in the other cases we get carry logic.)
I wish I knew. with blind ignorance I'd see which took the fewest LUTs
Depending on your target arch that would probably either be "check_en", or it wouldn't matter. But would you know what it does if you read it in someones code? Would you be able to spot an error?
So you are saying for you the only thing important is area after synthesis and other things like readability (or logic depth) are not important? Okay. Just to clarify: I was not asking for advise, I was trying to spur discussion about Verilog coding style and design decisions.
But would you instinctively understand what check_en_alt does if you would encounter that line of code? How long would it take you to convince yourself that it is correct?
I don't understand what you mean by "just an expansion of". They are three independent implementations of the same simple functionality.
I wasn't sure what they did until I wrote a perl one liner based on check_en_alt. That seemed the easiest to test. I'd go with that one and a comment on its purpose.
A comment would certainly help. :) But say you are reviewing someone elses code. Would you trust that the code always does what the comment says? How long would it take you to convince yourself that it is a bug free implementation?
check_en_alt would be the easiest for me, but only because I've seen the (x&(x-1)) == 0 trick before. A comment there would make it obvious for anyone else and IMO it's the easiest to verify.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.