From b252dc0192f0a70103787eaf0ea26b8da5a71003 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 7 Sep 2010 18:01:50 -0700 Subject: [PATCH] Don't elide unconnected module ports. When performing a translation we do not want to elide any module ports. Dropping ports can result in port mismatch issues. --- nodangle.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/nodangle.cc b/nodangle.cc index 5ce442dac..68c2118ee 100644 --- a/nodangle.cc +++ b/nodangle.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -131,14 +131,12 @@ void nodangle_f::signal(Design*des, NetNet*sig) if (sig->get_refs() > 0) return; - /* Cannot delete the ports of tasks or functions. There are - too many places where they are referenced. */ - if ((sig->port_type() != NetNet::NOT_A_PORT) - && (sig->scope()->type() == NetScope::TASK)) - return; - - if ((sig->port_type() != NetNet::NOT_A_PORT) - && (sig->scope()->type() == NetScope::FUNC)) + /* Cannot delete the ports of tasks, functions or modules. There + are too many places where they are referenced. */ + if ((sig->port_type() != NetNet::NOT_A_PORT) && + ((sig->scope()->type() == NetScope::TASK) || + (sig->scope()->type() == NetScope::FUNC) || + (sig->scope()->type() == NetScope::MODULE))) return; /* Can't delete ports of cells. */