blob: 5fc9e288189e31ff064528a415702fcb30154101 (
plain)
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
|
module macro_arg_spaces_top(
input wire [31:0] i,
output wire [31:0] x, y, z
);
`define BAR(a) a
`define FOO(a = function automatic [31:0] f) a
`BAR(function automatic [31:0] a);
input [31:0] i;
a = i * 2;
endfunction
`FOO();
input [31:0] i;
f = i * 3;
endfunction
`FOO(function automatic [31:0] b);
input [31:0] i;
b = i * 5;
endfunction
assign x = a(i);
assign y = f(i);
assign z = b(i);
endmodule
|