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
base: db960e7c30f7
Choose a base ref
...
head repository: m-labs/nmigen
compare: 706bfaf5e185
Choose a head ref
  • 2 commits
  • 13 files changed
  • 1 contributor

Commits on Oct 11, 2019

  1. hdl.ast: add an explicit Shape class, included in prelude.

    Shapes have long been a part of nMigen, but represented using tuples.
    This commit adds a Shape class (using namedtuple for backwards
    compatibility), and accepts anything castable to Shape (including
    enums, ranges, etc) anywhere a tuple was accepted previously.
    
    In addition, `signed(n)` and `unsigned(n)` are added as aliases for
    `Shape(n, signed=True)` and `Shape(n, signed=False)`, transforming
    code such as `Signal((8, True))` to `Signal(signed(8))`.
    These aliases are also included in prelude.
    
    Preparation for #225.
    whitequark committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    6aabdc0 View commit details
    Browse the repository at this point in the history
  2. hdl.ast: deprecate Signal.{range,enum}.

    Although constructor methods can improve clarity, there are many
    contexts in which it is useful to use range() as a shape: notably
    Layout, but also Const and AnyConst/AnyValue. Instead of duplicating
    these constructor methods everywhere (which is not even easily
    possible for Layout), use casting to Shape, introduced in 6aabdc0.
    
    Fixes #225.
    whitequark committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    706bfaf View commit details
    Browse the repository at this point in the history