Verilator thinks the first one is an abomination, but the second one is fine. Am I missing the obvious clean way to write this code?pic.twitter.com/cV2cYuoWf1
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
The return value of $signed has the same size as the self-sized argument, which is then sign extended to the expression size.
Verilator does all that correctly. It used to have bugs but I think I've found them all. For example http://www.clifford.at/yosys/vloghammer_bugs/issue_002_verilator.html …
The problem is not that Verilator interprets this code incorrectly. The problem is that it produces a warning for imo perfectly fine code.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.