Added error checking to ensure that the system has sufficient virtual
networks when setting latency and weight values.
Change-Id: I1b28144bbe9fefab0c0a6227f1fdf4ea10403061
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32603
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
} else {
for (int v = 0; v < link->mVnets.size(); v++) {
int vnet = link->mVnets[v];
+ fatal_if(vnet >= m_vnets, "Not enough virtual networks "
+ "(setting latency and weight for vnet %d)", vnet);
// Two links connecting same src and destination
// cannot carry same vnets.
fatal_if(vnet_done[vnet], "Two links connecting same src"