aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simple/signed_full_slice.v
blob: f8a3315788529028ce5172fb962d17abbe568909 (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
module pass_through_a(
    input wire [31:0] inp,
    output wire [31:0] out
);
    assign out[31:0] = inp[31:0];
endmodule

module top_a(
    input wire signed [31:0] inp,
    output wire signed [31:0] out
);
    pass_through_a pt(inp[31:0], out[31:0]);
endmodule

// tests both module declaration orderings

module top_b(
    input wire signed [31:0] inp,
    output wire signed [31:0] out
);
    pass_through_b pt(inp[31:0], out[31:0]);
endmodule

module pass_through_b(
    input wire [31:0] inp,
    output wire [31:0] out
);
    assign out[31:0] = inp[31:0];
endmodule