aboutsummaryrefslogtreecommitdiffstats
path: root/tests/svtypes/multirange_array.sv
blob: be0d3dfc2c04f25b91bf78f5472cb2cdc9fbaae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// test for multirange arrays

`define STRINGIFY(x) `"x`"
`define STATIC_ASSERT(x) if(!(x)) $error({"assert failed: ", `STRINGIFY(x)})

module top;

	logic a [3];
	logic b [3][5];
	logic c [3][5][7];

	`STATIC_ASSERT($bits(a) == 3);
	`STATIC_ASSERT($bits(b) == 15);
	`STATIC_ASSERT($bits(c) == 105);

endmodule