mem-garnet: Allow empty vnet list for garnet network links
authorSrikant Bharadwaj <srikant.bharadwaj@amd.com>
Thu, 10 Sep 2020 06:33:51 +0000 (02:33 -0400)
committerSrikant Bharadwaj <srikant.bharadwaj@amd.com>
Fri, 11 Sep 2020 02:00:13 +0000 (02:00 +0000)
An empty supporting_vnet list is the default and implies that
all vnets are supported. This removes the assert which requires
the list to have a minimum list size of 1.

Change-Id: I6710ba06041164bbd597d98e75374a26a1aa5655
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34258
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/ruby/network/garnet2.0/NetworkLink.cc

index 61baed4538e3652f7e96d67ec0e3e21e5fc257df..e947781e9200bf0e8cf24d1b61396492991b2193 100644 (file)
@@ -44,7 +44,6 @@ NetworkLink::NetworkLink(const Params *p)
       link_consumer(nullptr), link_srcQueue(nullptr)
 {
     int num_vnets = (p->supported_vnets).size();
-    assert(num_vnets > 0);
     mVnets.resize(num_vnets);
     bitWidth = p->width;
     for (int i = 0; i < num_vnets; i++) {