tests/sim: test_enums works!
All checks were successful
/ deps (push) Successful in 17s
/ test (push) Successful in 5m18s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m20s

This commit is contained in:
Jacob Lifshay 2024-12-11 00:01:04 -08:00
parent 5087f16099
commit 8616ee4737
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
3 changed files with 1733 additions and 1 deletions

View file

@ -363,7 +363,6 @@ pub fn enums() {
}
}
#[cfg(todo)] // FIXME: enum lowering currently broken
#[hdl]
#[test]
fn test_enums() {

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,94 @@
$timescale 1 ps $end
$scope module enums $end
$scope struct cd $end
$var wire 1 ! clk $end
$var wire 1 " rst $end
$upscope $end
$var wire 1 # en $end
$var wire 2 $ which_in $end
$var wire 4 % data_in $end
$var wire 2 & which_out $end
$var wire 4 ' data_out $end
$scope struct the_reg $end
$var string 1 ( \$tag $end
$scope struct B $end
$var reg 1 ) \0 $end
$var reg 1 * \1 $end
$upscope $end
$scope struct C $end
$scope struct a $end
$var reg 1 + \[0] $end
$var reg 1 , \[1] $end
$upscope $end
$var reg 2 - b $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
$dumpvars
0!
1"
0#
b0 $
b0 %
b0 &
b0 '
sA\x20(0) (
0)
0*
0+
0,
b0 -
$end
#1000000
1!
#1100000
0"
#2000000
0!
#3000000
1!
#4000000
1#
b1 $
0!
#5000000
1!
b1 &
sB\x20(1) (
#6000000
0#
b0 $
0!
#7000000
1!
#8000000
1#
b1 $
b1111 %
0!
#9000000
1!
b11 '
1)
1*
1+
1,
#10000000
0!
#11000000
1!
#12000000
b10 $
0!
#13000000
1!
b10 &
b1111 '
sC\x20(2) (
b11 -
#14000000
0!
#15000000
1!
#16000000