booksim / booksim2

BookSim 2.0
http://nocs.stanford.edu/booksim.html
Other
255 stars 158 forks source link

fix weights between router and node. #31

Open Stfort52 opened 2 years ago

Stfort52 commented 2 years ago

The anynet simulation fails with weighed nodes. For example, the example given in anynet.cpp like the one below fails.

/*
 example 2:
 router 0 node 0 node 1 5 node 2 5

 Router 0 is directly connected to node 0-2. Channel latency is 5cycles for 1 and 2. In 
 this case the latency specification is bidirectional, the injeciton and ejection lat
 for node 1 and 2 are 5-cycle
*/ 

I believe that this is because of the way the original code adds weights to the nodes, as it does not take into account that node directives can be a head in the line.