From 3cd96cf558c7d16eaffc76f06d0caa8d37069e92 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 16 Mar 2018 19:50:17 -0400 Subject: [PATCH 1/6] Tests: Print error line in summary file. --- test_regress/driver.pl | 7 ++++++- test_regress/t/t_preproc_persist.pl | 2 +- test_regress/t/t_preproc_ttempty.pl | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 61242fb1f..d05c6aa96 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -978,7 +978,12 @@ sub _run { flush STDERR; if (!$param{fails} && $status) { - $self->error("Exec of $param{cmd}[0] failed\n"); + my $firstline = ""; + if (my $fh = IO::File->new("<$param{logfile}")) { + $firstline = $fh->getline; + chomp $firstline; + } + $self->error("Exec of $param{cmd}[0] failed: $firstline\n"); } if ($param{fails} && $status) { print "(Exec expected to fail, and did.)\n"; diff --git a/test_regress/t/t_preproc_persist.pl b/test_regress/t/t_preproc_persist.pl index 2127bc3e9..87fc25f66 100755 --- a/test_regress/t/t_preproc_persist.pl +++ b/test_regress/t/t_preproc_persist.pl @@ -15,7 +15,7 @@ compile ( # Override default flags v_flags => [''], v_other_filenames => ["t_preproc_persist2.v"], - verilator_flags => ["-E -P +incdir+t"], + verilator_flags => ["-E -P +incdir+t -Mdir $Self->{obj_dir}", ], verilator_flags2 => ['',], verilator_flags3 => ['',], verilator_make_gcc => 0, diff --git a/test_regress/t/t_preproc_ttempty.pl b/test_regress/t/t_preproc_ttempty.pl index 8279fbdd1..c76f0a87a 100755 --- a/test_regress/t/t_preproc_ttempty.pl +++ b/test_regress/t/t_preproc_ttempty.pl @@ -14,7 +14,7 @@ my $stdout_filename = "$Self->{obj_dir}/$Self->{name}__test.vpp"; compile ( # Override default flags v_flags => [''], - verilator_flags => ["-E -P +incdir+t"], + verilator_flags => ["-E -P +incdir+t -Mdir $Self->{obj_dir}", ], verilator_flags2 => ['',], verilator_flags3 => ['',], verilator_make_gcc => 0, From e49539fb4ca0107dea6d7f07f4b1ab894dafa8ef Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 17 Mar 2018 08:43:19 -0400 Subject: [PATCH 2/6] Internals: Put cell assigns near cell. No functional change intended except statement order. --- src/V3Inst.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/V3Inst.cpp b/src/V3Inst.cpp index 0fdb11de1..9ed63c0ee 100644 --- a/src/V3Inst.cpp +++ b/src/V3Inst.cpp @@ -49,8 +49,7 @@ private: AstUser1InUse m_inuser1; // STATE - AstNodeModule* m_modp; // Current module - AstCell* m_cellp; // Current cell + AstCell* m_cellp; // Current cell static int debug() { static int level = -1; @@ -60,13 +59,6 @@ private: //int m_debug; int debug() { return m_debug; } // VISITORS - virtual void visit(AstNodeModule* nodep) { - UINFO(4," MOD "<name() == "t_chg") m_debug = 9; else m_debug=0; - m_modp = nodep; - nodep->iterateChildren(*this); - m_modp = NULL; - } virtual void visit(AstCell* nodep) { UINFO(4," CELL "<modVarp()->isOutput()) { AstNode* rhsp = new AstVarXRef (exprp->fileline(), nodep->modVarp(), m_cellp->name(), false); AstAssignW* assp = new AstAssignW (exprp->fileline(), exprp, rhsp); - m_modp->addStmtp(assp); + m_cellp->addNextHere(assp); } else if (nodep->modVarp()->isInput()) { // Don't bother moving constants now, // we'll be pushing the const down to the cell soon enough. @@ -104,7 +96,7 @@ private: (exprp->fileline(), new AstVarXRef(exprp->fileline(), nodep->modVarp(), m_cellp->name(), true), exprp); - m_modp->addStmtp(assp); + m_cellp->addNextHere(assp); if (debug()>=9) assp->dumpTree(cout," _new: "); } else if (nodep->modVarp()->isIfaceRef() || (nodep->modVarp()->subDTypep()->castUnpackArrayDType() @@ -115,7 +107,7 @@ private: AstVarXRef* xrefp = exprp->castVarXRef(); if (!refp && !xrefp) exprp->v3fatalSrc("Interfaces: Pin is not connected to a VarRef or VarXRef"); AstAssignVarScope* assp = new AstAssignVarScope(exprp->fileline(), lhsp, exprp); - m_modp->addStmtp(assp); + m_cellp->addNextHere(assp); } else { nodep->v3error("Assigned pin is neither input nor output"); } @@ -145,7 +137,6 @@ private: public: // CONSTUCTORS explicit InstVisitor(AstNetlist* nodep) { - m_modp=NULL; m_cellp=NULL; // nodep->accept(*this); From 38261ac649d61faf3ba5926f2b9e73f8c6c45ad6 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 17 Mar 2018 09:25:38 -0400 Subject: [PATCH 3/6] Tests: Ignore history file. --- .gitignore | 1 + MANIFEST.SKIP | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0bd013576..0e9b76aa1 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ dddrun* doxygen-doc gdbrun* gmon.out +ncverilog.history internals.txt verilator.txt verilator_bin* diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 43b95e7f3..4e602ed87 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -34,6 +34,7 @@ verilator.pc$ verilator_bin.* verilator_coverage_bin.* .vcsmx_rebuild$ +ncverilog.history autom4te\.cache/ nodist/ /simv$ From 3963fe438467437b6bc34cf8e74cec3aeeba085b Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 17 Mar 2018 11:33:47 -0400 Subject: [PATCH 4/6] Fix GCC-8 compile error. --- src/V3Scope.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/V3Scope.cpp b/src/V3Scope.cpp index 7b89ebd76..f7acea9d2 100644 --- a/src/V3Scope.cpp +++ b/src/V3Scope.cpp @@ -53,8 +53,9 @@ private: // TYPES typedef vl_unordered_map PackageScopeMap; - typedef vl_unordered_map, AstVarScope*> VarScopeMap; - typedef vl_unordered_set > VarRefScopeSet; + // These cannot be unordered unless make a specialized hashing pair (gcc-8) + typedef std::map, AstVarScope*> VarScopeMap; + typedef std::set > VarRefScopeSet; // STATE, inside processing a single module AstNodeModule* m_modp; // Current module From df3d1a4da9c381fb28a86d78d004d3e9bf57949f Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 17 Mar 2018 11:56:37 -0400 Subject: [PATCH 5/6] Version bump --- Changes | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index d0e44651f..0519cb196 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,7 @@ Revision history for Verilator The contributors that suggested a given feature are shown in []. Thanks! -* Verilator 3.921 devel +* Verilator 3.922 2018-03-17 ** Support IEEE 1800-2017 as default language. diff --git a/configure.ac b/configure.ac index f1d74f0d0..21f54e7d5 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ #AC_INIT([Verilator],[#.### YYYY-MM-DD]) #AC_INIT([Verilator],[#.### devel]) -AC_INIT([Verilator],[3.921 devel]) +AC_INIT([Verilator],[3.922 2018-03-17]) # When releasing, also update header of Changes file # and commit using "devel release" or "Version bump" message From e3354a019151f740c1bb38570dc411c85ee9a825 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 17 Mar 2018 12:01:59 -0400 Subject: [PATCH 6/6] devel release --- Changes | 3 +++ configure.ac | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 0519cb196..bb75e3ea9 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,9 @@ Revision history for Verilator The contributors that suggested a given feature are shown in []. Thanks! +* Verilator 3.923 devel + + * Verilator 3.922 2018-03-17 ** Support IEEE 1800-2017 as default language. diff --git a/configure.ac b/configure.ac index 21f54e7d5..861b7b7cc 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ #AC_INIT([Verilator],[#.### YYYY-MM-DD]) #AC_INIT([Verilator],[#.### devel]) -AC_INIT([Verilator],[3.922 2018-03-17]) +AC_INIT([Verilator],[3.923 devel]) # When releasing, also update header of Changes file # and commit using "devel release" or "Version bump" message