Hello all,
I explored the routeCompute() function in RoutingUnit_d.cc, and printed
out some key values in this function as follows (with the original code):
command :
build/ALPHA/gem5.opt configs/example/ruby_network_test.py
--topology=Mesh --mesh-rows=2 --num-cpus=4 --num-dirs=4 --num-l2caches=4
--garnet-network=fixed
code:
for (int link = 0; link < m_routing_table.size(); link++) {
if (m_weight_table[link] >= min_weight) //min_weight = 10000
continue;
output_link = link;
min_weight = m_weight_table[link];
LOG:
msg_destination: [NetDest (4) 0 0 0 0 - 1 0 0 0 - 0 0 0 0 - - ]
m_weight_table,link0 : 1
m_weight_table,link1 : 1
m_weight_table,link2 : 1
m_weight_table,link3 : 1
m_weight_table,link4 : 2
output link : 1 // I suppose it should choose link 0 as the output
msg_destination: [NetDest (4) 0 0 0 0 - 1 0 0 0 - 0 0 0 0 - - ]
m_weight_table,link0 : 1
m_weight_table,link1 : 1
m_weight_table,link2 : 1
m_weight_table,link3 : 1
m_weight_table,link4 : 2
output link : 3 // the msg_destination is the same as the first one,
but this time it chooses link 3
msg_destination: [NetDest (4) 0 0 0 0 - 1 0 0 0 - 0 0 0 0 - - ]
m_weight_table,link0 : 1
m_weight_table,link1 : 1
m_weight_table,link2 : 1
m_weight_table,link3 : 2
m_weight_table,link4 : 1
output link : 3
output link : 4 // I suppose this should also go to link 0
msg_destination: [NetDest (4) 0 0 0 0 - 1 0 0 0 - 0 0 0 0 - - ]
m_weight_table,link0 : 1
m_weight_table,link1 : 1
m_weight_table,link2 : 1
m_weight_table,link3 : 2
m_weight_table,link4 : 1
output link : 3 // it chooses link 3 with weight 2. Does that mean it
goes to Y first instead of X.
Questions:
What does the msg_destination mean?
I got some answers here :
http://www.mail-archive.com/[email protected]/msg05473.html
But how does it determine the destination in the routing table?
How does the log make sense? I'm very confused.
Actually, I'm trying to implement adaptive routing in garnet. I have
read PerfectSwitch.cc in simple network. It gets the output port status
from void PerfectSwitch::addOutPort(const vector<MessageBuffer*>& out,
const NetDest& routing_table_entry) dynamically. But in garnet network,
I haven't find any places to get the dynamical information about how
logged each link is, all the links are set up before the simulation
start. Does anyone have some specific ideas to implement adaptive
routing in garnet network? I have stuck here for some days. Any ideas
are appreciated.
Thanks,
Yuhang
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users