PadWidths: generates illegal widths for Dshl
See original GitHub issueThis line in PadWidths
ensures that the argument e
width of a dshl
is the same as its result width:
https://github.com/freechipsproject/firrtl/blob/master/src/main/scala/firrtl/passes/PadWidths.scala#L46
case Dshl =>
// special case as args aren't all same width
ex copy (op = Dshlw, args = Seq(fixup(width(ex.tpe))(ex.args.head), ex.args(1)))
(i.e. Result Width == w_e
instead of Result Width == w_e + 2^(w_n) - 1
)
This is incorrect according to the firrtl spec:
I would suggest just removing this case altogether. However, I am not sure why it was added in the first place.
@donggyukim and @jackkoenig, maybe you can comment on this.
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Lateral Flow Immunochromatography Assay for Detection of ...
Although no positive sample was found in this survey due to the sample size and strict supervision in Guangzhou, the results still indicate...
Read more >7 mistakes EVERY new camper makes with their SLEEP ...
Use coupon code 'BECKER15' at Backcountry to get 15% off your first purchase on backcountry.com (exclusions may apply)Thermarest Neo Air ...
Read more >Small Form-Factor Pluggable (SFP) Transceiver Multisource ...
Adopting a common industry size simplifies the integration of small drives (2. 1/2" or less) into such systems. Board-board connectors carrying power and....
Read more >On the Launch Pad: A Counting Book About Rockets
In award-winning author Michael Dahl's, On the Launch Pad: A Counting Book About ... Product dimensions: 11.00(w) x 9.00(h) x 0.12(d).
Read more >A Review of Road Traffic-Derived Non-Exhaust Particles
Overview of reported mode diameters of size distributions based on different measurement methods for (a) brake wear particle number distribution ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
IMO we just need to move the dshlw injection into the Verilog emitter
The problem is that after we extend
e
to be the same width as the result (i.e.,e_w == Result Width
) the equation given in the spec (Result Width == w_e + 2^(w_n) - 1
) is no longer true.In other words, once we extend
w
such thatw_e
is equivalent to theResult Width
,w_n
must be1
in order for the equation from the spec to hold true. Of coursew_n
is not always1
, thus we get an ill-typed expression for anyn
that is wider than1
.