Tests for future concat select (#2721)

This commit is contained in:
Wilson Snyder 2021-02-17 22:57:52 -05:00
parent c5e5be8e99
commit d559190e9e
3 changed files with 66 additions and 3 deletions

View File

@ -0,0 +1,43 @@
%Error-UNSUPPORTED: t/t_concat_sel.v:22:28: Unsupported: Select of concatenation
22 | wire [3:0] out1 = {a,b}[2 +: 4];
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:23:28: Unsupported: Select of concatenation
23 | wire [3:0] out2 = {a,b}[5 -: 4];
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:24:28: Unsupported: Select of concatenation
24 | wire [3:0] out3 = {a,b}[5 : 2];
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:25:28: Unsupported: Select of concatenation
25 | wire [0:0] out4 = {a,b}[2];
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:31:21: Unsupported: Select of concatenation
31 | if ({16'h1234}[0] != 1'b0) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:32:21: Unsupported: Select of concatenation
32 | if ({16'h1234}[2] != 1'b1) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:33:21: Unsupported: Select of concatenation
33 | if ({16'h1234}[11:4] != 8'h23) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:34:21: Unsupported: Select of concatenation
34 | if ({16'h1234}[4+:8] != 8'h23) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:35:21: Unsupported: Select of concatenation
35 | if ({16'h1234}[11-:8] != 8'h23) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:36:25: Unsupported: Select of concatenation
36 | if ({8'h12, 8'h34}[0] != 1'b0) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:37:25: Unsupported: Select of concatenation
37 | if ({8'h12, 8'h34}[2] != 1'b1) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:38:25: Unsupported: Select of concatenation
38 | if ({8'h12, 8'h34}[11:4] != 8'h23) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:39:25: Unsupported: Select of concatenation
39 | if ({8'h12, 8'h34}[4+:8] != 8'h23) $stop;
| ^
%Error-UNSUPPORTED: t/t_concat_sel.v:40:25: Unsupported: Select of concatenation
40 | if ({8'h12, 8'h34}[11-:8] != 8'h23) $stop;
| ^
%Error: Exiting due to

View File

@ -8,11 +8,16 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(linter => 1);
scenarios(simulator => 1);
lint(
fails => 1,
compile(
fails => $Self->{vlt_all},
expect_filename => $Self->{golden_filename},
);
execute(
check_finished => 1,
) if !$Self->{vlt_all};
ok(1);
1;

View File

@ -27,6 +27,21 @@ module t (/*AUTOARG*/
// Aggregate outputs into a single result vector
wire [63:0] result = {51'h0, out4, out3, out2, out1};
initial begin
if ({16'h1234}[0] != 1'b0) $stop;
if ({16'h1234}[2] != 1'b1) $stop;
if ({16'h1234}[11:4] != 8'h23) $stop;
if ({16'h1234}[4+:8] != 8'h23) $stop;
if ({16'h1234}[11-:8] != 8'h23) $stop;
if ({8'h12, 8'h34}[0] != 1'b0) $stop;
if ({8'h12, 8'h34}[2] != 1'b1) $stop;
if ({8'h12, 8'h34}[11:4] != 8'h23) $stop;
if ({8'h12, 8'h34}[4+:8] != 8'h23) $stop;
if ({8'h12, 8'h34}[11-:8] != 8'h23) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
// Test loop
always @ (posedge clk) begin
`ifdef TEST_VERBOSE