amaranth/nmigen/hdl
whitequark 6aabdc0a73 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.
2019-10-11 12:52:41 +00:00
..
__init__.py hdl.ast: add an explicit Shape class, included in prelude. 2019-10-11 12:52:41 +00:00
ast.py hdl.ast: add an explicit Shape class, included in prelude. 2019-10-11 12:52:41 +00:00
cd.py hdl.cd: add negedge clock domains. 2019-08-31 22:05:48 +00:00
dsl.py Consistently use {!r}, not '{!r}' in diagnostics. 2019-10-11 11:47:42 +00:00
ir.py Consistently use {!r}, not '{!r}' in diagnostics. 2019-10-11 11:47:42 +00:00
mem.py Consistently use {!r}, not '{!r}' in diagnostics. 2019-10-11 11:47:42 +00:00
rec.py hdl.ast: add an explicit Shape class, included in prelude. 2019-10-11 12:52:41 +00:00
xfrm.py Consistently use {!r}, not '{!r}' in diagnostics. 2019-10-11 11:47:42 +00:00