From 88809587f9e02e70e3ae5beda22a0fb834d299c9 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 8 Sep 2006 16:16:30 +0000 Subject: [PATCH] Fix function references under top inlined module. git-svn-id: file://localhost/svn/verilator/trunk/verilator@781 77ca24e4-aefa-0310-84f0-b9a241c72d87 --- Changes | 6 +++++- src/V3LinkDot.cpp | 7 +++++-- test_regress/t/t_func_lib_sub.pl | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100755 test_regress/t/t_func_lib_sub.pl diff --git a/Changes b/Changes index 803491959..1a6773949 100644 --- a/Changes +++ b/Changes @@ -3,7 +3,11 @@ Revision history for Verilator The contributors that suggested a given feature are shown in []. [by ...] indicates the contributor was also the author of the fix; Thanks! -* Verilator 3.601 09/06/2006 +* Verilator 3.602 **** + +**** Fix function references under top inlined module. [David Hewson] + +* Verilator 3.601 09/06/2006 Beta *** Added --inhibit-sim flag for environments using old __Vm_inhibitSim. diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index ede318dcf..7f3975c72 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -546,7 +546,8 @@ private: string baddot; LinkDotBaseVertex* dotVxp = m_cellVxp; // Start search at current scope if (nodep->inlinedDots()!="") { // Correct for current scope - dotVxp = m_statep->findDotted(dotVxp, nodep->inlinedDots(), baddot); + string inl = AstNode::prettyName(nodep->inlinedDots()); + dotVxp = m_statep->findDotted(dotVxp, inl, baddot); if (!dotVxp) nodep->v3fatalSrc("Couldn't resolve inlined scope '"<inlinedDots()); } dotVxp = m_statep->findDotted(dotVxp, nodep->dotted(), baddot); // Maybe NULL @@ -589,7 +590,9 @@ private: string baddot; LinkDotBaseVertex* dotVxp = m_cellVxp; // Start search at current scope if (nodep->inlinedDots()!="") { // Correct for current scope - dotVxp = m_statep->findDotted(dotVxp, nodep->inlinedDots(), baddot); + string inl = AstNode::prettyName(nodep->inlinedDots()); + UINFO(8,"\t\tInlined "<findDotted(dotVxp, inl, baddot); if (!dotVxp) nodep->v3fatalSrc("Couldn't resolve inlined scope '"<inlinedDots()); } dotVxp = m_statep->findDotted(dotVxp, nodep->dotted(), baddot); // Maybe NULL diff --git a/test_regress/t/t_func_lib_sub.pl b/test_regress/t/t_func_lib_sub.pl new file mode 100755 index 000000000..f1d335e09 --- /dev/null +++ b/test_regress/t/t_func_lib_sub.pl @@ -0,0 +1,14 @@ +#!/usr/bin/perl +if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; } +# $Id$ +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# General Public License or the Perl Artistic License. + +compile ( + ); +# No execute +ok(1); +1;