aboutsummaryrefslogtreecommitdiffstats
path: root/tests/verilog/port_int_types.sv
blob: 40e2cf14add89658f2f89240abe0334797213d1d (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
`define INITS \
    assign a = -1; \
    assign b = -2; \
    assign c = -3; \
    assign d = -4; \
    assign a_ext = a; \
    assign b_ext = b; \
    assign c_ext = c; \
    assign d_ext = d;

module gate_a(
    output byte a,
    output byte unsigned b,
    output shortint c,
    output shortint unsigned d,
    output [31:0] a_ext,
    output [31:0] b_ext,
    output [31:0] c_ext,
    output [31:0] d_ext
);
    `INITS
endmodule

module gate_b(
    a, b, c, d,
    a_ext, b_ext, c_ext, d_ext
);
    output byte a;
    output byte unsigned b;
    output shortint c;
    output shortint unsigned d;
    output [31:0] a_ext;
    output [31:0] b_ext;
    output [31:0] c_ext;
    output [31:0] d_ext;
    `INITS
endmodule

module gold(
    output signed [7:0] a,
    output unsigned [7:0] b,
    output signed [15:0] c,
    output unsigned [15:0] d,
    output [31:0] a_ext,
    output [31:0] b_ext,
    output [31:0] c_ext,
    output [31:0] d_ext
);
    `INITS
endmodule