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.
This commit is contained in:
parent
48d4ee4031
commit
32446831b4
6 changed files with 73 additions and 55 deletions
|
|
@ -297,7 +297,7 @@ class DSLTestCase(FHDLTestCase):
|
|||
(
|
||||
(switch (sig w1)
|
||||
(case 0011 (eq (sig c1) (const 1'd1)))
|
||||
(case ---- (eq (sig c2) (const 1'd1)))
|
||||
(default (eq (sig c2) (const 1'd1)))
|
||||
)
|
||||
)
|
||||
""")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue