1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#[path = "test_utils/mod.rs"]
#[macro_use]
mod test_utils;
all_backends! {
fn test_array_literal_comb_assignment(sim) {
@case "array_literal::test_array_literal_comb_assignment";
}
fn test_array_literal_default_comb_assignment(sim) {
// Veryl emits `'{8'h12, default: 8'hAA}`, mixing positional items with `default:`,
// which is not legal SV; the SV parser rejects it.
@ignore_on(sv);
@case "array_literal::test_array_literal_default_comb_assignment";
}
fn test_array_literal_nested_default_multidim_assignment(sim) {
// Veryl emits `'{8'h11, default: 8'h22}`, mixing positional items with `default:`,
// which is not legal SV; the SV parser rejects it.
@ignore_on(sv);
@case "array_literal::test_array_literal_nested_default_multidim_assignment";
}
fn test_array_literal_default_fills_param_sized_array(sim) {
@case "array_literal::test_array_literal_default_fills_param_sized_array";
}
fn test_array_literal_single_element_size_one_array(sim) {
@case "array_literal::test_array_literal_single_element_size_one_array";
}
fn test_array_literal_default_fills_2d_array(sim) {
@case "array_literal::test_array_literal_default_fills_2d_array";
}
// '{default: 0} with no explicit elements: must produce exactly target_len elements.
// Regression test for off-by-one where remaining was target_len - (x.len()-1).
fn test_array_literal_default_only(sim) {
@case "array_literal::test_array_literal_default_only";
}
// Two explicit elements + default: remaining slots filled correctly.
fn test_array_literal_two_explicit_plus_default(sim) {
// Veryl emits `'{a, b, default: c}`, mixing positional items with `default:`, which is
// not legal SV; the SV parser rejects it.
@ignore_on(sv);
@case "array_literal::test_array_literal_two_explicit_plus_default";
}
// repeat + default: '{val repeat 2, default: 0} in a size-4 array.
fn test_array_literal_repeat_plus_default(sim) {
// Veryl emits `'{2{a}, default: b}`, mixing positional items with `default:`, which is
// not legal SV; the SV parser rejects it.
@ignore_on(sv);
@case "array_literal::test_array_literal_repeat_plus_default";
}
// '{default: 0} in always_ff if_reset: array reset via default fill.
fn test_array_literal_default_in_ff_reset(sim) {
@case "array_literal::test_array_literal_default_in_ff_reset";
}
}