Resolve implicit-width-truncation warnings - #92
Conversation
firtool-1.154.0 and later warn on all implicit width truncations. These width truncations were flagged in stock Chipyard builds. For all width truncations, use the equivalent `Connectable` operator (`:<=`), along with `.squeeze`. This has the same behavior as the original `:=` connections, since those truncate when the producer in a connection is wider than the consumer.
nibrunieAtSi5
left a comment
There was a problem hiding this comment.
LGTM
@tynan-jdwk, did you verify on a few configurations that the emitted verilog was indeed identical? (and more generally, besides checking that the warning were removed, how was this PR tested?)
|
Thanks for taking a look @nibrunieAtSi5! I tested on two configurations from Chipyard: For the RV64 build, only these files were different:
For the RV32 build, only these files were different:
I'm attaching an archive which has those files built from the existing hardfloat-width-truncation.tar.gz Annoyingly, some signals get renamed due to these changes, but if you reverse the renaming, the new files are text-identical to the old ones. |
|
Well, the |
|
CI is failing because |
|
I would drop 3.5.6 support (and thus use of the old Scala FIRRTL Compiler). Because it's only 7 lines I think it is also fine to just use explicit bit extraction if you prefer to keep the old Chisel around. |
I think this is the better choice, since we don't know who else is using this repo, and we should favor reducing disruption given the ease of doing so in this case. See #93. |
Addresses #92 without backwards incompatibility. Signed-off-by: Andrew Waterman <andrew@sifive.com>
|
Superseded by #93 |
firtool-1.154.0 and later warn on all implicit width truncations (llvm/circt#10621). These width truncations were flagged in stock Chipyard builds.
For all width truncations, use the equivalent
Connectableoperator (:<=), along with.squeeze. This has the same behavior as the original:=connections, since those truncate when the producer in a connection is wider than the consumer.