hdl.ast: normalize case values to two's complement, not signed binary.
authorwhitequark <whitequark@whitequark.org>
Sat, 12 Dec 2020 12:42:12 +0000 (12:42 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 15:24:29 +0000 (15:24 +0000)
commit1d8f875b47a7b54abc2ee186391a2a0ad51ceb23
tree4eaffda523a0640ea31398bf388a4d42655e193b
parente9fb4bab414419b2306e6c9cd893cef13bd6c1c5
hdl.ast: normalize case values to two's complement, not signed binary.

This was an especially insidious bug because the minus character is
valid in case values but has a completely different meaning (wildcard
rather than sign).

Fixes #559.
nmigen/hdl/ast.py
tests/test_hdl_ast.py