hdl.{ast,dst}: directly represent RTLIL default case.

This makes RTLIL mildly nicer:

 casez ({ \$5 , \$3 , \$1  })
   3'bzz1:
       \$next\o  = \$7 ;
   3'bz1z:
       \$next\o  = \$9 ;
   3'b1zz:
       \$next\o  = \$11 ;
-  3'bz:
+  default:
       { \$next\co , \$next\o  } = \$13 ;
 endcase
This commit is contained in:
whitequark 2019-06-25 17:53:09 +00:00
parent f60ceb349b
commit e5e23644a4
4 changed files with 20 additions and 14 deletions

View file

@ -174,7 +174,7 @@ class DSLTestCase(FHDLTestCase):
(switch (cat (sig s1) (sig s2))
(case -1 (eq (sig c1) (const 1'd1)))
(case 1- (eq (sig c2) (const 1'd0)))
(case -- (eq (sig c3) (const 1'd1)))
(default (eq (sig c3) (const 1'd1)))
)
)
""")
@ -234,7 +234,7 @@ class DSLTestCase(FHDLTestCase):
(case 1 (eq (sig c2) (const 1'd1)))
)
)
(case -
(default
(eq (sig c3) (const 1'd1))
)
)