Add another test

Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
This commit is contained in:
Ryszard Rozak 2026-02-12 15:33:07 +01:00
parent 621a42f976
commit e3c6515bbd
1 changed files with 11 additions and 0 deletions

View File

@ -19,6 +19,7 @@ module t (
typedef struct {
int x;
logic y;
int arr[5];
} struct_t;
struct_t s_array[3];
@ -29,38 +30,48 @@ module t (
cyc <= cyc + 1;
if (cyc == 0) begin
s_array[1].x = 1;
s_array[1].arr[2] = 1;
my_struct.x <= 1;
end
else if (cyc == 1) begin
`checkh(s_array[1].x, 1);
`checkh(s_array[1].arr[2], 1);
`checkh(my_struct.x, 1);
end
else if (cyc == 2) begin
force s_array[1].x = 0;
force s_array[1].arr[2] = 2;
force my_struct.x = 0;
end
else if (cyc == 3) begin
`checkh(s_array[1].x, 0);
s_array[1].x = 1;
`checkh(s_array[1].arr[2], 2);
s_array[1].arr[2] = 3;
`checkh(my_struct.x, 0);
my_struct.x <= 1;
end
else if (cyc == 4) begin
`checkh(s_array[1].x, 0);
`checkh(s_array[1].arr[2], 2);
`checkh(my_struct.x, 0);
end
else if (cyc == 5) begin
release s_array[1].x;
release s_array[1].arr[2];
release my_struct.x;
end
else if (cyc == 6) begin
`checkh(s_array[1].x, 0);
s_array[1].x = 1;
`checkh(s_array[1].arr[2], 2);
s_array[1].arr[2] = 4;
`checkh(my_struct.x, 0);
my_struct.x <= 1;
end
else if (cyc == 7) begin
`checkh(s_array[1].x, 1);
`checkh(s_array[1].arr[2], 4);
`checkh(my_struct.x, 1);
end
else if (cyc == 8) begin