Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/nmigen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 834fe3c700e4
Choose a base ref
...
head repository: m-labs/nmigen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7c322e562a8e
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 18, 2019

  1. back.rtlil: extend shorter operand of a binop when matching sign.

    This is necessary because converting a large unsigned value to
    a signed value of the same width may change its sign.
    
    Fixes #271.
    whitequark committed Nov 18, 2019
    Copy the full SHA
    7c322e5 View commit details
Showing with 1 addition and 0 deletions.
  1. +1 −0 nmigen/back/rtlil.py
1 change: 1 addition & 0 deletions nmigen/back/rtlil.py
Original file line number Diff line number Diff line change
@@ -490,6 +490,7 @@ def on_Operator_binary(self, value):
rhs_wire = self(rhs)
else:
lhs_sign = rhs_sign = True
lhs_bits = rhs_bits = max(lhs_bits, rhs_bits)
lhs_wire = self.match_shape(lhs, lhs_bits, lhs_sign)
rhs_wire = self.match_shape(rhs, rhs_bits, rhs_sign)
res_bits, res_sign = value.shape()