From 9d0cdc8ae9f527d94b3848f56aff019c669212b0 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Thu, 10 Jan 2008 18:20:21 -0800 Subject: [PATCH] Hook up output port part select properly. The output part select that is used to match a module port to a long vector connected to it was wired incorrectly. --- elaborate.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/elaborate.cc b/elaborate.cc index d5eefccfe..d93389fa2 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -804,11 +804,12 @@ NetNet*PGModule::resize_net_to_port_(Design*des, NetScope*scope, if (tmp->vector_width() > sig->vector_width()) { node = new NetPartSelect(tmp, 0, sig->vector_width(), NetPartSelect::VP); + connect(node->pin(0), sig->pin(0)); } else { - node = new NetPartSelect(tmp, 0, sig->vector_width(), + node = new NetPartSelect(sig, 0, tmp->vector_width(), NetPartSelect::PV); + connect(node->pin(0), tmp->pin(0)); } - connect(node->pin(0), sig->pin(0)); break; case NetNet::PINPUT: