aboutsummaryrefslogtreecommitdiffstats
path: root/tests/svtypes/typedef_scopes.sv
blob: 340defbbb14e4d8b67aa7c20b293b331cb249fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
typedef logic [3:0] outer_uint4_t;

module top;

	outer_uint4_t u4_i = 8'hA5;
	always @(*) assert(u4_i == 4'h5);

	typedef logic [3:0] inner_type;
	inner_type inner_i1 = 8'h5A;
	always @(*) assert(inner_i1 == 4'hA);

	if (1) begin: genblock
		typedef logic [7:0] inner_type;
		inner_type inner_gb_i = 8'hA5;
		always @(*) assert(inner_gb_i == 8'hA5);
	end

	inner_type inner_i2 = 8'h42;
	always @(*) assert(inner_i2 == 4'h2);


endmodule