From 22e299e78e82b01206980fd8bd4c7722b89ee97f Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 17 Feb 2021 23:03:47 -0500 Subject: [PATCH] Support concat selection (#2721). --- Changes | 2 ++ src/V3LinkResolve.cpp | 6 ++--- test_regress/t/t_concat_sel.out | 43 --------------------------------- test_regress/t/t_concat_sel.pl | 4 +-- 4 files changed, 5 insertions(+), 50 deletions(-) delete mode 100644 test_regress/t/t_concat_sel.out diff --git a/Changes b/Changes index b4dff84d3..b3fa6ab1d 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,8 @@ The contributors that suggested a given feature are shown in []. Thanks! * Verilator 4.109 devel +**** Support concat selection (#2721). + **** Fix TIMESCALE warnings on primitives (#2763). [Xuanqi] **** Fix $fread extra semicolon inside statements. [Leendert van Doorn] diff --git a/src/V3LinkResolve.cpp b/src/V3LinkResolve.cpp index f2d1dbb6a..976d2768d 100644 --- a/src/V3LinkResolve.cpp +++ b/src/V3LinkResolve.cpp @@ -235,11 +235,9 @@ private: fromp->cloneTree(false))); } else if (VN_IS(basefromp, Replicate)) { // From {...}[...] syntax in IEEE 2017 - if (basefromp) { UINFO(1, " Related node: " << basefromp << endl); } - nodep->v3warn(E_UNSUPPORTED, "Unsupported: Select of concatenation"); - nodep = nullptr; + if (basefromp) UINFO(1, " Related node: " << basefromp << endl); } else { - if (basefromp) { UINFO(1, " Related node: " << basefromp << endl); } + if (basefromp) UINFO(1, " Related node: " << basefromp << endl); nodep->v3fatalSrc("Illegal bit select; no signal/member being extracted from"); } } diff --git a/test_regress/t/t_concat_sel.out b/test_regress/t/t_concat_sel.out deleted file mode 100644 index 8df3350c0..000000000 --- a/test_regress/t/t_concat_sel.out +++ /dev/null @@ -1,43 +0,0 @@ -%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 diff --git a/test_regress/t/t_concat_sel.pl b/test_regress/t/t_concat_sel.pl index 40f69d41d..9a15dd2cc 100755 --- a/test_regress/t/t_concat_sel.pl +++ b/test_regress/t/t_concat_sel.pl @@ -11,13 +11,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - fails => $Self->{vlt_all}, - expect_filename => $Self->{golden_filename}, ); execute( check_finished => 1, - ) if !$Self->{vlt_all}; + ); ok(1); 1;