hdl.{ast,dsl}, back.{pysim,rtlil}: allow multiple case values.
authorwhitequark <whitequark@whitequark.org>
Fri, 28 Jun 2019 04:37:08 +0000 (04:37 +0000)
committerwhitequark <whitequark@whitequark.org>
Fri, 28 Jun 2019 04:37:08 +0000 (04:37 +0000)
commit32446831b4a53784874702ebd737b15e8900505a
tree1297dd31415ae9a7693e893daa2abb335ebb156b
parent48d4ee40313d94a90ce93911485c1a13556cdc17
hdl.{ast,dsl}, back.{pysim,rtlil}: allow multiple case values.

This means that instead of:

    with m.Case(0b00):
        <body>
    with m.Case(0b01):
        <body>

it is legal to write:

    with m.Case(0b00, 0b01):
        <body>

with no change in semantics, and slightly nicer RTLIL or Verilog
output.

Fixes #103.
nmigen/back/pysim.py
nmigen/back/rtlil.py
nmigen/compat/fhdl/structure.py
nmigen/hdl/ast.py
nmigen/hdl/dsl.py
nmigen/test/test_hdl_dsl.py