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: amaranth-lang/amaranth
base: 438edf4112ef
Choose a base ref
...
head repository: amaranth-lang/amaranth
compare: 200af07f9f74
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 26, 2020

  1. sim._pyrtl: optimize uses of reflexive operators.

    When a literal is used on the left-hand side of a numeric operator,
    Python is able to constant-fold some expressions:
    
        >>> dis.dis(lambda x: 0 + 0 + x)
          1           0 LOAD_CONST               1 (0)
                      2 LOAD_FAST                0 (x)
                      4 BINARY_ADD
                      6 RETURN_VALUE
    
    If a literal is used on the right-hand side such that the left-hand
    side is variable, this doesn't happen:
    
        >>> dis.dis(lambda x: x + 0 + 0)
          1           0 LOAD_FAST                0 (x)
                      2 LOAD_CONST               1 (0)
                      4 BINARY_ADD
                      6 LOAD_CONST               1 (0)
                      8 BINARY_ADD
                     10 RETURN_VALUE
    
    PyRTL generates fairly redundant code due to the pervasive masking,
    and because of that, transforming expressions into the former form,
    where possible, improves runtime by about 10% on Minerva SRAM SoC.
    whitequark committed Aug 26, 2020
    Copy the full SHA
    8c6c364 View commit details
    Browse the repository at this point in the history
  2. vendor.xilinx_7series: unbreak.

    This commit fixes a series of typos introduced in commit 4e208b0.
    whitequark committed Aug 26, 2020
    Copy the full SHA
    abaa909 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    200af07 View commit details
    Browse the repository at this point in the history