[gem5-dev] changeset in gem5: ruby: fix round robin arbiter in garnet2.0

2017-02-12 Thread Tushar Krishna
changeset 3c38d3e74980 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=3c38d3e74980
description:
ruby: fix round robin arbiter in garnet2.0
The rr arbiter pointer in garnet was getting updated on every request,
even if there is no grant. This was leading to a huge variance in wait
time at a router at high injection rates.
This patch corrects it to update upon a grant.

diffstat:

 src/mem/ruby/network/garnet2.0/SwitchAllocator.cc |  22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (53 lines):

diff -r 79c3f6a60392 -r 3c38d3e74980 
src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
--- a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc Sat Feb 11 11:11:48 
2017 -0500
+++ b/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc Sun Feb 12 15:00:03 
2017 -0500
@@ -116,13 +116,6 @@
 for (int inport = 0; inport < m_num_inports; inport++) {
 int invc = m_round_robin_invc[inport];
 
-// Select next round robin vc candidate within valid vnet
-int next_round_robin_invc = invc;
-next_round_robin_invc++;
-if (next_round_robin_invc >= m_num_vcs)
-next_round_robin_invc = 0;
-m_round_robin_invc[inport] = next_round_robin_invc;
-
 for (int invc_iter = 0; invc_iter < m_num_vcs; invc_iter++) {
 
 if (m_input_unit[inport]->need_stage(invc, SA_,
@@ -142,6 +135,12 @@
 m_input_arbiter_activity++;
 m_port_requests[outport][inport] = true;
 m_vc_winners[outport][inport]= invc;
+
+// Update Round Robin pointer
+m_round_robin_invc[inport]++;
+if (m_round_robin_invc[inport] >= m_num_vcs)
+m_round_robin_invc[inport] = 0;
+
 break; // got one vc winner for this port
 }
 }
@@ -175,10 +174,6 @@
 // Independent arbiter at each output port
 for (int outport = 0; outport < m_num_outports; outport++) {
 int inport = m_round_robin_inport[outport];
-m_round_robin_inport[outport]++;
-
-if (m_round_robin_inport[outport] >= m_num_inports)
-m_round_robin_inport[outport] = 0;
 
 for (int inport_iter = 0; inport_iter < m_num_inports;
  inport_iter++) {
@@ -256,6 +251,11 @@
 // remove this request
 m_port_requests[outport][inport] = false;
 
+// Update Round Robin pointer
+m_round_robin_inport[outport]++;
+if (m_round_robin_inport[outport] >= m_num_inports)
+m_round_robin_inport[outport] = 0;
+
 break; // got a input winner for this outport
 }
 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3809: imported patch rr_arbiter_fix

2017-02-11 Thread Tushar Krishna


> On Feb. 12, 2017, 4:50 a.m., Jieming Yin wrote:
> > We also observed long packet delay in heavy-traffic workloads. Just 
> > curious, how much does this fix improve?

I noticed the problem when the deadlock threshold that was added recently 
started getting triggered at very high injection rates (post-saturation) with 
the synthetic network traffic.
It seemed odd to me that a NI could not inject for 1 cycles, however 
congested the network may be, as round-robin should ensure that eventually 
every VC at every input port should get a chance to leave the router (in the 
absence of a true deadlock).

I didn't measure how the overall stats change now, but the deadlock counter 
does not trigger now even if I (try to) inject 1-flit every cycle showing that 
this fix works.


- Tushar


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3809/#review9418
---


On Feb. 12, 2017, 4:36 a.m., Tushar Krishna wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3809/
> ---
> 
> (Updated Feb. 12, 2017, 4:36 a.m.)
> 
> 
> Review request for Default, Brad Beckmann, Jieming Yin, Matthew Poremba, and 
> Onur Kayiran.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> ruby: fix round robin arbiter in garnet2.0
> The rr arbiter pointer in garnet was getting updated on every request,
> even if there is no grant. This was leading to a huge variance in wait
> time at a router at high injection rates.
> This patch corrects it to update upon a grant.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/SwitchAllocator.cc 79c3f6a60392 
> 
> Diff: http://reviews.gem5.org/r/3809/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Tushar Krishna
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] Review Request 3809: imported patch rr_arbiter_fix

2017-02-11 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3809/
---

Review request for Default, Brad Beckmann, Jieming Yin, Matthew Poremba, and 
Onur Kayiran.


Repository: gem5


Description
---

ruby: fix round robin arbiter in garnet2.0
The rr arbiter pointer in garnet was getting updated on every request,
even if there is no grant. This was leading to a huge variance in wait
time at a router at high injection rates.
This patch corrects it to update upon a grant.


Diffs
-

  src/mem/ruby/network/garnet2.0/SwitchAllocator.cc 79c3f6a60392 

Diff: http://reviews.gem5.org/r/3809/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3753: ruby: Check MessageBuffer space in garnet NetworkInterface

2017-01-10 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3753/#review9246
---

Ship it!


Ship It!

- Tushar Krishna


On Jan. 10, 2017, 9:42 p.m., Matthew Poremba wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3753/
> ---
> 
> (Updated Jan. 10, 2017, 9:42 p.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11792:9ee13c6fa290
> ---
> ruby: Check MessageBuffer space in garnet NetworkInterface
> 
> Garnet's NetworkInterface does not consider the size of MessageBuffers when
> ejecting a Message from the network. Add a size check for the MessageBuffer
> and only enqueue if space is available. If space is not available, the
> message if placed in a queue and the credit is held. A callback from the
> MessageBuffer is implemented to wake the NetworkInterface. If there are
> messages in the stalled queue, they are processed first, in a FIFO manner
> and if succesfully ejected, the credit is finally sent back upstream. The
> maximum size of the stall queue is equal to the number of valid VNETs
> with MessageBuffers attached.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/flit.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flitBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flit.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
> 
> Diff: http://reviews.gem5.org/r/3753/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Matthew Poremba
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3753: ruby: Check MessageBuffer space in garnet NetworkInterface

2017-01-10 Thread Tushar Krishna


> On Jan. 10, 2017, 4:43 p.m., Tushar Krishna wrote:
> > src/mem/ruby/network/garnet2.0/NetworkInterface.cc, line 150
> > <http://reviews.gem5.org/r/3753/diff/4/?file=64266#file64266line150>
> >
> > Hey Matt,
> > There is a minor change I have been wanting to push in which you can 
> > add as part of this patch:
> > 
> > We count network_delay as dequeue_time - enqueue_time.
> > 
> > A minor issue is that the "enqueue_time" includes an additional cycle 
> > at the source NIC when the packet was created.
> > 
> > For example:
> > Suppose we have a 1-flit packet that we have to send one hop from Node 
> > 0 to Node 1.
> > We create in Cycle 1.
> > 
> > Cycle 1: flit enqueued by NIC 0
> > Cycle 2: flit in link_NIC0-Router0
> > Cycle 3: flit in Router 0
> > Cycle 4: flit in link_Router0-Router1
> > Cycle 5: flit in Router 1
> > Cycle 6: flit in link_Router1-NIC1
> > Cycle 7: flit dequeued by NIC 1.
> > 
> > Network delay will be calculated as 7-1 = 6 cycles.
> > But the actual "network" delay was 5 cycles (cycle 2 to cycle 6).
> > 
> > The additional 1-cycle in NIC0 is going to be part of the 
> > src_queueing_delay so it is being accounted for.
> > 
> > Does this make sense?
> > 
> > If yes, can you update network delay to 
> > dequeue_time - enqueue_time - 1 ?
> > 
> > And then ship it.
> > 
> > Thanks,
> > Tushar
> 
> Matthew Poremba wrote:
> I think I follow. Just to make sure I understand, the additional cycle 
> comes from the source side, correct? Since flitisizeMessage places the flit 
> in a VC output buffer but it is not injected until the next cycle? If that's 
> correct, I'll fold that change into this patch.

Yes that's correct.

Thanks.


- Tushar


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3753/#review9243
---


On Jan. 6, 2017, 11:59 p.m., Matthew Poremba wrote:
> 
> -------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3753/
> ---
> 
> (Updated Jan. 6, 2017, 11:59 p.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11792:66b31157514e
> ---
> ruby: Check MessageBuffer space in garnet NetworkInterface
> 
> Garnet's NetworkInterface does not consider the size of MessageBuffers when
> ejecting a Message from the network. Add a size check for the MessageBuffer
> and only enqueue if space is available. If space is not available, the
> message if placed in a queue and the credit is held. A callback from the
> MessageBuffer is implemented to wake the NetworkInterface. If there are
> messages in the stalled queue, they are processed first, in a FIFO manner
> and if succesfully ejected, the credit is finally sent back upstream. The
> maximum size of the stall queue is equal to the number of valid VNETs
> with MessageBuffers attached.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/flit.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flit.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flitBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
> 
> Diff: http://reviews.gem5.org/r/3753/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Matthew Poremba
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3753: ruby: Check MessageBuffer space in garnet NetworkInterface

2017-01-10 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3753/#review9243
---



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 150)
<http://reviews.gem5.org/r/3753/#comment7919>

Hey Matt,
There is a minor change I have been wanting to push in which you can add as 
part of this patch:

We count network_delay as dequeue_time - enqueue_time.

A minor issue is that the "enqueue_time" includes an additional cycle at 
the source NIC when the packet was created.

For example:
Suppose we have a 1-flit packet that we have to send one hop from Node 0 to 
Node 1.
We create in Cycle 1.

Cycle 1: flit enqueued by NIC 0
Cycle 2: flit in link_NIC0-Router0
Cycle 3: flit in Router 0
Cycle 4: flit in link_Router0-Router1
Cycle 5: flit in Router 1
Cycle 6: flit in link_Router1-NIC1
Cycle 7: flit dequeued by NIC 1.

Network delay will be calculated as 7-1 = 6 cycles.
But the actual "network" delay was 5 cycles (cycle 2 to cycle 6).

The additional 1-cycle in NIC0 is going to be part of the 
src_queueing_delay so it is being accounted for.

Does this make sense?

If yes, can you update network delay to 
dequeue_time - enqueue_time - 1 ?

And then ship it.

    Thanks,
    Tushar


- Tushar Krishna


On Jan. 6, 2017, 11:59 p.m., Matthew Poremba wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3753/
> ---
> 
> (Updated Jan. 6, 2017, 11:59 p.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11792:66b31157514e
> ---
> ruby: Check MessageBuffer space in garnet NetworkInterface
> 
> Garnet's NetworkInterface does not consider the size of MessageBuffers when
> ejecting a Message from the network. Add a size check for the MessageBuffer
> and only enqueue if space is available. If space is not available, the
> message if placed in a queue and the credit is held. A callback from the
> MessageBuffer is implemented to wake the NetworkInterface. If there are
> messages in the stalled queue, they are processed first, in a FIFO manner
> and if succesfully ejected, the credit is finally sent back upstream. The
> maximum size of the stall queue is equal to the number of valid VNETs
> with MessageBuffers attached.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/flit.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flit.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flitBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
> 
> Diff: http://reviews.gem5.org/r/3753/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Matthew Poremba
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3753: ruby: Check MessageBuffer space in garnet NetworkInterface

2017-01-10 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3753/#review9242
---

Ship it!


Ship It!

- Tushar Krishna


On Jan. 6, 2017, 11:59 p.m., Matthew Poremba wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3753/
> ---
> 
> (Updated Jan. 6, 2017, 11:59 p.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11792:66b31157514e
> ---
> ruby: Check MessageBuffer space in garnet NetworkInterface
> 
> Garnet's NetworkInterface does not consider the size of MessageBuffers when
> ejecting a Message from the network. Add a size check for the MessageBuffer
> and only enqueue if space is available. If space is not available, the
> message if placed in a queue and the credit is held. A callback from the
> MessageBuffer is implemented to wake the NetworkInterface. If there are
> messages in the stalled queue, they are processed first, in a FIFO manner
> and if succesfully ejected, the credit is finally sent back upstream. The
> maximum size of the stall queue is equal to the number of valid VNETs
> with MessageBuffers attached.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/flit.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flit.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/flitBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/MessageBuffer.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> c10c50cb8ac9d6c8dfbaa6437720a07656a3afcf 
> 
> Diff: http://reviews.gem5.org/r/3753/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Matthew Poremba
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3753: ruby: Check MessageBuffer space in garnet NetworkInterface

2016-12-09 Thread Tushar Krishna


> On Dec. 9, 2016, 5:03 a.m., Tushar Krishna wrote:
> > src/mem/ruby/network/garnet2.0/NetworkInterface.cc, line 139
> > <http://reviews.gem5.org/r/3753/diff/2/?file=63961#file63961line139>
> >
> > If a flit is waiting for the output buffer to become free, this will 
> > get counted in its network delay component in the current implementation.
> > It should be counted in its queueing delay component I think ...
> > Queueing delay is the delay at the message buffers and NICs, network 
> > delay is from src NI to dest NI and includes delay in routers and links.
> 
> Matthew Poremba wrote:
> That's true. I think this will need to be changed to account for queueing 
> latency at the source plus time in stall queue. I could add a member/method 
> to flit like get/set_dequeue_time which is set when the link is consumed. 
> Then the calculation becomes `network_delay = t_flit->get_dequeue_time() - 
> t_flit->get_enqueue_time()` and `queueing_delay = t_flit->get_src_delay() + 
> (curCycle() - t_flit->get_dequeue_time())`. Will that suffice? We could also 
> split the source and "destination" delays into two stats if we want. That 
> would still require modifying flit class, though.

Yes this suffices. I don't think we need to break the input queueing delay and 
output queueing delay by default.
But we can show them separately in case someone wants to pring both separately.
How about doing something like this:
int source_queueing_delay = t_flit->get_src_delay();
int destination_queueing_delay = (curCycle() - t_flit->get_dequeue_time());

// source_queueing_delay and destination_queueing_delay can be printed as 
// separate stats if required
queueing_delay = source_queueing_delay + destination_queueing_delay.


> On Dec. 9, 2016, 5:03 a.m., Tushar Krishna wrote:
> > src/mem/ruby/network/garnet2.0/NetworkInterface.cc, line 277
> > <http://reviews.gem5.org/r/3753/diff/2/?file=63961#file63961line277>
> >
> > The name of this variable is a little confusing.
> > 
> > 
> > Hmm I think I can see why you named it like that. If a message that was 
> > stalled gets unstalled, then this variable becomes true.
> > 
> > But if the stall queue is empty, unstalledMessage is returned false, 
> > which means stalledMessage is true .. which is not quite right.
> 
> Matthew Poremba wrote:
> I see. How about messageEnqueued or similar to imply only one message per 
> cycle is enqueued?

yeah ...
messageEnqueuedThisCycle .. ?


- Tushar


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3753/#review9197
---


On Dec. 9, 2016, 1:58 a.m., Matthew Poremba wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3753/
> ---
> 
> (Updated Dec. 9, 2016, 1:58 a.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11761:fd4126ef5e73
> ---
> ruby: Check MessageBuffer space in garnet NetworkInterface
> 
> Garnet's NetworkInterface does not consider the size of MessageBuffers when
> ejecting a Message from the network. Add a size check for the MessageBuffer
> and only enqueue if space is available. If space is not available, the
> message if placed in a queue and the credit is held. A callback from the
> MessageBuffer is implemented to wake the NetworkInterface. If there are
> messages in the stalled queue, they are processed first, in a FIFO manner
> and if succesfully ejected, the credit is finally sent back upstream. The
> maximum size of the stall queue is equal to the number of valid VNETs
> with MessageBuffers attached.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/MessageBuffer.hh 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/MessageBuffer.cc 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> 78ef8daecd81de0c392034809b3bc155396bf983 
> 
> Diff: http://reviews.gem5.org/r/3753/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Matthew Poremba
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3753: ruby: Check MessageBuffer space in garnet NetworkInterface

2016-12-08 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3753/#review9197
---



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 139)
<http://reviews.gem5.org/r/3753/#comment7904>

If a flit is waiting for the output buffer to become free, this will get 
counted in its network delay component in the current implementation.
It should be counted in its queueing delay component I think ...
Queueing delay is the delay at the message buffers and NICs, network delay 
is from src NI to dest NI and includes delay in routers and links.



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 200)
<http://reviews.gem5.org/r/3753/#comment7906>

See my comment below in the function definition regarding the name of this 
variable ...



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 203)
<http://reviews.gem5.org/r/3753/#comment7907>

We should consume the link irrespective of whether the state of the stall 
queue. If we do not consume, effectively we are modeling a quueue inside the 
network link.

I can see why you added this condition though - you don't want more than 
one enqueue into the message buffer in the same cycle.
If the stall queue already enqueued something, you are making the one from 
the link wait.

How about the following:

bool unstalledMessage = checkStallQueue();

if (inNetLink->isReady(curCycle()) {
flit *t_flit = inNetLink->consumeLink();

...
if (outNode_ptr[vnet]->areNSlotsAvailable(1, curTime) && !unstalledMessage) 
{
// enqueue into protocol buffer
}
else {
// enqueue into stall queue
}



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 264)
<http://reviews.gem5.org/r/3753/#comment7905>

The name of this variable is a little confusing.

Hmm I think I can see why you named it like that. If a message that was 
stalled gets unstalled, then this variable becomes true.

But if the stall queue is empty, unstalledMessage is returned false, which 
means stalledMessage is true .. which is not quite right.


- Tushar Krishna


On Dec. 9, 2016, 1:58 a.m., Matthew Poremba wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3753/
> ---
> 
> (Updated Dec. 9, 2016, 1:58 a.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11761:fd4126ef5e73
> ---
> ruby: Check MessageBuffer space in garnet NetworkInterface
> 
> Garnet's NetworkInterface does not consider the size of MessageBuffers when
> ejecting a Message from the network. Add a size check for the MessageBuffer
> and only enqueue if space is available. If space is not available, the
> message if placed in a queue and the credit is held. A callback from the
> MessageBuffer is implemented to wake the NetworkInterface. If there are
> messages in the stalled queue, they are processed first, in a FIFO manner
> and if succesfully ejected, the credit is finally sent back upstream. The
> maximum size of the stall queue is equal to the number of valid VNETs
> with MessageBuffers attached.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/MessageBuffer.hh 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/MessageBuffer.cc 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> 78ef8daecd81de0c392034809b3bc155396bf983 
> 
> Diff: http://reviews.gem5.org/r/3753/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Matthew Poremba
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3753: ruby: Check MessageBuffer space in garnet NetworkInterface

2016-12-08 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3753/#review9195
---


This is an excellent patch! Something that has been long due.
(BTW does the same problem occur in simple network as well?)


src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 139)
<http://reviews.gem5.org/r/3753/#comment7895>

This is a great change! Anyone wanting to add more stats can do that here.



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 200)
<http://reviews.gem5.org/r/3753/#comment7896>

Stylistic comment:
Can we move this piece of code to a new function which returns true/false 
and sets the value of unstalledMessage?

Otherwise the wakeup function is very long now and performs the actual 
action of reading from the link only at the very end.



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 213)
<http://reviews.gem5.org/r/3753/#comment7900>

These three lines should become a new send_credit function.

Credit *credit_flit = new Credit(stallFlit->get_vc(), true, curCycle());

outCreditQueue->insert(credit_flit);
outCreditLink->scheduleEventAbsolute(clockEdge(Cycles(1)));

The function can be called here and later.
Having two pieces of code where credits are being created and sent can lead 
to a lot of bugs whenever anyone makes changes and forgets to make changes at 
both places (have seen that a lot from experience) :)



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 238)
<http://reviews.gem5.org/r/3753/#comment7898>

Looks like only HEAD_TAIL and TAIL_ flits set extLinkAvail to false and are 
consumed here, while other flits are consumed later in the code. It will be a 
little confusing for a newbie looking at the code.



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 245)
<http://reviews.gem5.org/r/3753/#comment7897>

Adding to the point above - 

My worry is that someone new looking at the code might get a little 
confused about the fact that the consumeLink happens twice. And that the HEAD 
and HEAD_TAIL are sometimes consumed here, and sometimes later in the code.

See my suggestion below on some code restructuring.



src/mem/ruby/network/garnet2.0/NetworkInterface.cc (line 257)
<http://reviews.gem5.org/r/3753/#comment7899>

Looks like the link not consumed if there are stalled messages.
But this would mean that the router will keep inserting flits into the link 
which may not get consumed, effectively modeling a large queue inside the link 
which is incorrect.
The NI always consumes the link. This is because the router checked for 
credits before sending to the NI.

Here is my suggestion for this piece of code:
if (inNetLink->isReady(curCycle()) {
flit *t_flit = inNetLink->consumeLink();

// Now check if message buffer has slots.
// If it does, then { (i) insert msg into msg buffer, (ii) call send_credit 
function. }
// else { insert msg into stall queue.}

// Implement a send_credit function that can be called from here or when 
the stall queue is read.

...

The extLinkAvail piece of code is not needed. It gets subsumed here.


- Tushar Krishna


On Dec. 8, 2016, 11:34 p.m., Matthew Poremba wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3753/
> ---
> 
> (Updated Dec. 8, 2016, 11:34 p.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11761:e47a6baba2f2
> ---
> ruby: Check MessageBuffer space in garnet NetworkInterface
> 
> Garnet's NetworkInterface does not consider the size of MessageBuffers when
> ejecting a Message from the network. Add a size check for the MessageBuffer
> and only enqueue if space is available. If space is not available, the
> message if placed in a queue and the credit is held. A callback from the
> MessageBuffer is implemented to wake the NetworkInterface. If there are
> messages in the stalled queue, they are processed first, in a FIFO manner
> and if succesfully ejected, the credit is finally sent back upstream. The
> maximum size of the stall queue is equal to the number of valid VNETs
> with MessageBuffers attached.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/MessageBuffer.hh 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/MessageBuffer.cc 
> 78ef8daecd81de0c392034809b3bc155396bf983 
>   src/mem/ruby/network/garnet2.0/Networ

Re: [gem5-dev] Review Request 3751: ruby: Check all VNETs for injection in garnet NetworkInterface

2016-12-08 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3751/#review9194
---

Ship it!


Ship It!

- Tushar Krishna


On Dec. 8, 2016, 11:32 p.m., Matthew Poremba wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3751/
> ---
> 
> (Updated Dec. 8, 2016, 11:32 p.m.)
> 
> 
> Review request for Default and Tushar Krishna.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11758:a3f355233ef0
> ---
> ruby: Check all VNETs for injection in garnet NetworkInterface
> 
> The NetworkInterface wakeup currently iterates over all VNETs and breaks the
> loop if a VNET is unable to allocate a VC. This can cause a deadlock if a
> lower numbered VNET is unable to allocate a VC while a higher numbered VNET
> has idle VCs. This seems like a bug as Garnet 1.0 uses a while loop over an
> if-statement, suggesting the break was intended for this while loop. This
> patch removes the break statement, which allows up to one message to be
> dequeued from a VNET and injected into the network.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> 78ef8daecd81de0c392034809b3bc155396bf983 
> 
> Diff: http://reviews.gem5.org/r/3751/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Matthew Poremba
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3711: ruby: Detect garnet network-level deadlock.

2016-12-01 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3711/#review9180
---

Ship it!


Ship It!

- Tushar Krishna


On Dec. 1, 2016, 11:37 p.m., Jieming Yin wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3711/
> ---
> 
> (Updated Dec. 1, 2016, 11:37 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11706:c2eb8893beb5
> ---
> ruby: Detect garnet network-level deadlock.
> 
> This patch detects garnet network deadlock by monitoring
> network interfaces. If a network interface continuously
> fails to allocate virtual channels for a message, a
> possible deadlock is detected.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
>   configs/network/Network.py c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
>   src/mem/ruby/network/garnet2.0/GarnetNetwork.py 
> c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
> 
> Diff: http://reviews.gem5.org/r/3711/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jieming Yin
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3711: ruby: Detect garnet network-level deadlock.

2016-11-27 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3711/#review9174
---



configs/network/Network.py (line 74)
<http://reviews.gem5.org/r/3711/#comment7888>

500,000 seems like a pretty large threshold value in my opinion, whatever 
be the size of the network.
It means no packet left the router connected to the NI for 500K cycles.
I think we can make it 50,000.


- Tushar Krishna


On Nov. 17, 2016, 6:37 p.m., Jieming Yin wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3711/
> ---
> 
> (Updated Nov. 17, 2016, 6:37 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11706:527f77b1d6df
> ---
> ruby: Detect garnet network-level deadlock.
> 
> This patch detects garnet network deadlock by monitoring
> network interfaces. If a network interface continuously
> fails to allocate virtual channels for a message, a
> possible deadlock is detected.
> 
> 
> Diffs
> -
> 
>   configs/network/Network.py c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
>   src/mem/ruby/network/garnet2.0/GarnetNetwork.py 
> c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh 
> c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc 
> c38fcdaa5fe508dbb18cc084e758ad0ce8e2e2f4 
> 
> Diff: http://reviews.gem5.org/r/3711/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jieming Yin
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] changeset in gem5: config: fix typo in cluster topology.

2016-10-07 Thread Tushar Krishna
changeset 220fa4099b9a in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=220fa4099b9a
description:
config: fix typo in cluster topology.

diffstat:

 configs/topologies/Cluster.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 380375085863 -r 220fa4099b9a configs/topologies/Cluster.py
--- a/configs/topologies/Cluster.py Fri Oct 07 14:14:44 2016 +0100
+++ b/configs/topologies/Cluster.py Fri Oct 07 23:56:48 2016 -0400
@@ -87,9 +87,9 @@
 
 # connect this cluster to the router
 link_out = IntLink(link_id=self.num_int_links(), 
src_node=self.router,
-   dst_node_=node.router)
+   dst_node=node.router)
 link_in = IntLink(link_id=self.num_int_links(), 
src_node=node.router,
-  dst_node_=self.router)
+  dst_node=self.router)
 
 if node.extBW:
 link_out.bandwidth_factor = node.extBW
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] changeset in gem5: ruby: Add M5_VAR_USED before variables used o...

2016-10-06 Thread Tushar Krishna
changeset ebf2acd02fc5 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=ebf2acd02fc5
description:
ruby: Add M5_VAR_USED before variables used only inside assert in 
garnet2.0.
This removes errors when building gem5.fast

diffstat:

 src/mem/ruby/network/garnet2.0/RoutingUnit.cc |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 10d59d546ea2 -r ebf2acd02fc5 
src/mem/ruby/network/garnet2.0/RoutingUnit.cc
--- a/src/mem/ruby/network/garnet2.0/RoutingUnit.cc Thu Oct 06 14:35:22 
2016 -0400
+++ b/src/mem/ruby/network/garnet2.0/RoutingUnit.cc Thu Oct 06 21:06:00 
2016 -0400
@@ -181,7 +181,7 @@
 {
 PortDirection outport_dirn = "Unknown";
 
-int num_rows = m_router->get_net_ptr()->getNumRows();
+int M5_VAR_USED num_rows = m_router->get_net_ptr()->getNumRows();
 int num_cols = m_router->get_net_ptr()->getNumCols();
 assert(num_rows > 0 && num_cols > 0);
 
@@ -238,4 +238,5 @@
  PortDirection inport_dirn)
 {
 assert(0);
+return -1;
 }
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] changeset in gem5: ruby: garnet2.0

2016-10-06 Thread Tushar Krishna
changeset 10d59d546ea2 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=10d59d546ea2
description:
ruby: garnet2.0
Revamped version of garnet with more optimized single-cycle routers,
more configurability, and cleaner code.

diffstat:

 configs/network/Network.py |   55 +-
 configs/topologies/Crossbar.py |   15 +-
 configs/topologies/MeshDirCorners_XY.py|   41 +-
 configs/topologies/Mesh_XY.py  |   21 +-
 configs/topologies/Mesh_westfirst.py   |   20 +-
 configs/topologies/Pt2Pt.py|   20 +-
 src/base/statistics.cc |4 +-
 src/mem/ruby/network/BasicRouter.py|2 +
 src/mem/ruby/network/garnet2.0/CommonTypes.hh  |   65 ++
 src/mem/ruby/network/garnet2.0/Credit.cc   |   46 ++
 src/mem/ruby/network/garnet2.0/Credit.hh   |   60 ++
 src/mem/ruby/network/garnet2.0/CreditLink.hh   |   47 ++
 src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc   |  112 +
 src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh   |   72 +++
 src/mem/ruby/network/garnet2.0/GarnetLink.cc   |   94 
 src/mem/ruby/network/garnet2.0/GarnetLink.hh   |   97 
 src/mem/ruby/network/garnet2.0/GarnetLink.py   |   79 +++
 src/mem/ruby/network/garnet2.0/GarnetNetwork.cc|  460 +
 src/mem/ruby/network/garnet2.0/GarnetNetwork.hh|  208 +
 src/mem/ruby/network/garnet2.0/GarnetNetwork.py|   68 +++
 src/mem/ruby/network/garnet2.0/InputUnit.cc|  171 +++
 src/mem/ruby/network/garnet2.0/InputUnit.hh|  170 +++
 src/mem/ruby/network/garnet2.0/NetworkInterface.cc |  443 
 src/mem/ruby/network/garnet2.0/NetworkInterface.hh |  108 
 src/mem/ruby/network/garnet2.0/NetworkLink.cc  |   94 
 src/mem/ruby/network/garnet2.0/NetworkLink.hh  |   88 
 src/mem/ruby/network/garnet2.0/OutVcState.cc   |   65 ++
 src/mem/ruby/network/garnet2.0/OutVcState.hh   |   70 +++
 src/mem/ruby/network/garnet2.0/OutputUnit.cc   |  168 +++
 src/mem/ruby/network/garnet2.0/OutputUnit.hh   |  113 +
 src/mem/ruby/network/garnet2.0/README.txt  |   71 +++
 src/mem/ruby/network/garnet2.0/Router.cc   |  296 +
 src/mem/ruby/network/garnet2.0/Router.hh   |  140 ++
 src/mem/ruby/network/garnet2.0/RoutingUnit.cc  |  241 +++
 src/mem/ruby/network/garnet2.0/RoutingUnit.hh  |   89 
 src/mem/ruby/network/garnet2.0/SConscript  |   53 ++
 src/mem/ruby/network/garnet2.0/SwitchAllocator.cc  |  389 +
 src/mem/ruby/network/garnet2.0/SwitchAllocator.hh  |   88 
 src/mem/ruby/network/garnet2.0/VirtualChannel.cc   |   85 +++
 src/mem/ruby/network/garnet2.0/VirtualChannel.hh   |  101 
 src/mem/ruby/network/garnet2.0/flit.cc |   85 +++
 src/mem/ruby/network/garnet2.0/flit.hh |  122 +
 src/mem/ruby/network/garnet2.0/flitBuffer.cc   |   93 
 src/mem/ruby/network/garnet2.0/flitBuffer.hh   |   93 
 44 files changed, 4982 insertions(+), 40 deletions(-)

diffs (truncated from 5453 to 300 lines):

diff -r db895719c482 -r 10d59d546ea2 configs/network/Network.py
--- a/configs/network/Network.pyThu Oct 06 14:35:21 2016 -0400
+++ b/configs/network/Network.pyThu Oct 06 14:35:22 2016 -0400
@@ -38,25 +38,44 @@
 
 parser.add_option("--topology", type="string", default="Crossbar",
   help="check configs/topologies for complete set")
-parser.add_option("--mesh-rows", type="int", default=1,
+parser.add_option("--mesh-rows", type="int", default=0,
   help="the number of rows in the mesh topology")
-parser.add_option("--garnet-network", type="choice",
-  choices=['fixed', 'flexible'], help="'fixed'|'flexible'")
-parser.add_option("--network-fault-model", action="store_true", 
default=False,
-  help="enable network fault model: see 
src/mem/ruby/network/fault_model/")
+parser.add_option("--network", type="choice", default="simple",
+  choices=['simple', 'garnet2.0'],
+  help="'simple'|'garnet2.0'")
+parser.add_option("--router-latency", action="store", type="int",
+  default=1,
+  help="""number of pipeline stages in the garnet router.
+Has to be >= 1.
+Can be over-ridden on a per router basis
+in the topology file.""")
+parser.add_option("--link-latency", action="store", type="int", default=1,
+  help="""latency of each link the simple/garnet networks.
+Has to be >= 1.
+Can be over-ridden on a per link basis
+in the topology file.""")
+

[gem5-dev] changeset in gem5: ruby: remove the original garnet code.

2016-10-06 Thread Tushar Krishna
changeset db895719c482 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=db895719c482
description:
ruby: remove the original garnet code.
Only garnet2.0 will be supported henceforth.

diffstat:

 src/mem/ruby/network/garnet/BaseGarnetNetwork.cc  |  123 --
 src/mem/ruby/network/garnet/BaseGarnetNetwork.hh  |   94 --
 src/mem/ruby/network/garnet/BaseGarnetNetwork.py  |   41 -
 src/mem/ruby/network/garnet/NetworkHeader.hh  |   41 -
 src/mem/ruby/network/garnet/SConscript|   39 -
 src/mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh|   44 -
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.cc|   83 -
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh|   92 --
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.py|   90 --
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc |  260 -
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh |  111 --
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py |   61 -
 src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc |  122 --
 src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh |  182 
 src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc  |  394 

 src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh  |  102 --
 src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc   |   89 -
 src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh   |   82 -
 src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc|   47 -
 src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh|   72 -
 src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.cc|  116 --
 src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh|  103 --
 src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc|  277 --
 src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh|  134 --
 src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc   |   90 --
 src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh   |   57 -
 src/mem/ruby/network/garnet/fixed-pipeline/SConscript |   53 -
 src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc   |  241 -
 src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh   |   84 -
 src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc|  111 --
 src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh|   70 -
 src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc   |  265 -
 src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh   |   94 --
 src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc|   80 -
 src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh|  100 --
 src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.cc|   90 --
 src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh|   90 --
 src/mem/ruby/network/garnet/fixed-pipeline/flit_d.cc  |   83 -
 src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh  |  115 --
 src/mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh |   49 -
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.cc   |   78 -
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh   |   89 -
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py   |   72 -
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc|  240 -
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh|  104 --
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py|   62 -
 src/mem/ruby/network/garnet/flexible-pipeline/InVcState.cc|   76 -
 src/mem/ruby/network/garnet/flexible-pipeline/InVcState.hh|   57 -
 src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc |  384 

 src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh |  106 --
 src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc  |  151 ---
 src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh  |   96 --
 src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.cc   |   58 -
 src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh   |   52 -
 src/mem/ruby/network/garnet/flexible-pipeline/Router.cc   |  448 
--
 src/mem/ruby/network/garnet/flexible-pipeline/Router.hh   |  110 --
 src/mem/ruby/network/garnet/flexible-pipeline/SConscript  |   48 -
 src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.cc|   45 -
 src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh|   54 -
 src/mem/ruby/network/garnet/flexible-pipeline/flit.cc |   75 -
 src/mem/ruby/network/garnet/flexible-pipeline/flit.hh |   93 --
 

[gem5-dev] changeset in gem5: ruby: rename ALPHA_Network_test protocol to G...

2016-10-06 Thread Tushar Krishna
changeset cfa97c37117a in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=cfa97c37117a
description:
ruby: rename ALPHA_Network_test protocol to Garnet_standalone.
Over the past 6 years, we realized that the protocol is essentially used
to run the garnet network in a standalone manner, and feed standard 
synthetic
traffic patterns through it.

diffstat:

 build_opts/ALPHA_Network_test   |3 -
 build_opts/Garnet_standalone|4 +
 configs/ruby/Garnet_standalone.py   |  130 
 configs/ruby/Network_test.py|  130 
 src/mem/protocol/Garnet_standalone-cache.sm |  217 
 src/mem/protocol/Garnet_standalone-dir.sm   |  153 +++
 src/mem/protocol/Garnet_standalone-msg.sm   |   51 ++
 src/mem/protocol/Garnet_standalone.slicc|5 +
 src/mem/protocol/Network_test-cache.sm  |  213 ---
 src/mem/protocol/Network_test-dir.sm|  153 ---
 src/mem/protocol/Network_test-msg.sm|   51 --
 src/mem/protocol/Network_test.slicc |5 -
 src/mem/protocol/SConsopts  |2 +-
 src/mem/ruby/system/GPUCoalescer.cc |6 +-
 src/mem/ruby/system/GPUCoalescer.hh |2 +-
 src/mem/ruby/system/Sequencer.cc|6 +-
 src/mem/ruby/system/Sequencer.hh|2 +-
 src/mem/ruby/system/Sequencer.py|2 +-
 18 files changed, 570 insertions(+), 565 deletions(-)

diffs (truncated from 1261 to 300 lines):

diff -r b29aca3fcb75 -r cfa97c37117a build_opts/ALPHA_Network_test
--- a/build_opts/ALPHA_Network_test Tue Oct 04 13:06:05 2016 -0400
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,3 +0,0 @@
-SS_COMPATIBLE_FP = 1
-CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,MinorCPU'
-PROTOCOL = 'Network_test'
diff -r b29aca3fcb75 -r cfa97c37117a build_opts/Garnet_standalone
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/build_opts/Garnet_standalone  Thu Oct 06 14:35:14 2016 -0400
@@ -0,0 +1,4 @@
+TARGET_ISA = 'alpha'
+SS_COMPATIBLE_FP = 1
+CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,MinorCPU'
+PROTOCOL = 'Garnet_standalone'
diff -r b29aca3fcb75 -r cfa97c37117a configs/ruby/Garnet_standalone.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/configs/ruby/Garnet_standalone.py Thu Oct 06 14:35:14 2016 -0400
@@ -0,0 +1,130 @@
+# Copyright (c) 2009 Advanced Micro Devices, Inc.
+# Copyright (c) 2016 Georgia Institute of Technology
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Brad Beckmann
+#      Tushar Krishna
+
+import m5
+from m5.objects import *
+from m5.defines import buildEnv
+from m5.util import addToPath
+from Ruby import create_topology
+
+#
+# Declare caches used by the protocol
+#
+class L1Cache(RubyCache): pass
+
+def define_options(parser):
+return
+
+def create_system(options, full_system, system, dma_ports, ruby_system):
+if buildEnv['PROTOCOL'] != 'Garnet_standalone':
+panic("This script requires Garnet_standalone protocol to be built.")
+
+cpu_sequencers = []
+
+#
+# The Garnet_standalone protocol does not support fs nor dma
+#
+assert(dma_ports == [])
+
+#
+# The ruby network creation expects the list of nodes in the system to be
+# consistent with the NetDest list.
+# Therefore the l1 controller nodes must be listed before
+# the directory nodes and direct

[gem5-dev] changeset in gem5: config: make internal links in network topolo...

2016-10-06 Thread Tushar Krishna
 CrossbarGarnet.py
 
 routers = [Router(router_id=i) for i in range(len(self.nodes)+1)]
 xbar = routers[len(self.nodes)] # the crossbar router is the last 
router created
@@ -49,7 +50,18 @@
 network.ext_links = ext_links
 
 link_count = len(self.nodes)
-int_links = [IntLink(link_id=(link_count+i),
- node_a=routers[i], node_b=xbar)
-for i in range(len(self.nodes))]
+
+int_links = []
+for i in range(len(self.nodes)):
+int_links.append(IntLink(link_id=(link_count+i),
+ src_node=routers[i],
+ dst_node=xbar))
+
+link_count += len(self.nodes)
+
+for i in range(len(self.nodes)):
+int_links.append(IntLink(link_id=(link_count+i),
+ src_node=xbar,
+ dst_node=routers[i]))
+
 network.int_links = int_links
diff -r 004d34b65092 -r cf870cd20cfc configs/topologies/CrossbarGarnet.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/configs/topologies/CrossbarGarnet.py  Thu Oct 06 14:35:18 2016 -0400
@@ -0,0 +1,50 @@
+# Copyright (c) 2016 Georgia Institute of Technology
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Tushar Krishna
+
+from m5.params import *
+from m5.objects import *
+
+from BaseTopology import SimpleTopology
+
+class CrossbarGarnet(SimpleTopology):
+description='CrossbarGarnet'
+
+def makeTopology(self, options, network, IntLink, ExtLink, Router):
+# Create one router in Garnet. Internally models a crossbar and
+# the associated allocator.
+# For simple network, use Crossbar.py
+
+xbar = Router(router_id=0)
+network.routers = xbar
+
+ext_links = [ExtLink(link_id=i, ext_node=n, int_node=xbar)
+for (i, n) in enumerate(self.nodes)]
+network.ext_links = ext_links
+
+int_links = []
+network.int_links = int_links
diff -r 004d34b65092 -r cf870cd20cfc configs/topologies/Mesh.py
--- a/configs/topologies/Mesh.pyThu Oct 06 14:35:17 2016 -0400
+++ /dev/null   Thu Jan 01 00:00:00 1970 +
@@ -1,117 +0,0 @@
-# Copyright (c) 2010 Advanced Micro Devices, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met: redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer;
-# redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution;
-# neither the name of the copyright holders nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

[gem5-dev] changeset in gem5: ruby: rename networktest to garnet_synthetic_...

2016-10-06 Thread Tushar Krishna
changeset 2bc3962f59fe in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=2bc3962f59fe
description:
ruby: rename networktest to garnet_synthetic_traffic.
networktest is essentially a collection of synthetic traffic patterns
for the network. The protocol name and the tester having the same name
led to multiple python configuration files with the same name, adding
confusion. This patch renames networktest to garnet_synthetic_traffic,
and also adds more synthetic traffic patterns.

diffstat:

 configs/example/garnet_synth_traffic.py|  157 
 configs/example/ruby_network_test.py   |  145 
 src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc |  358 
++
 src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.hh |  165 
 src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.py |   57 +
 src/cpu/testers/garnet_synthetic_traffic/SConscript|   37 +
 src/cpu/testers/networktest/NetworkTest.py |   46 -
 src/cpu/testers/networktest/SConscript |   37 -
 src/cpu/testers/networktest/networktest.cc |  289 

 src/cpu/testers/networktest/networktest.hh |  144 
 10 files changed, 774 insertions(+), 661 deletions(-)

diffs (truncated from 1475 to 300 lines):

diff -r cfa97c37117a -r 2bc3962f59fe configs/example/garnet_synth_traffic.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/configs/example/garnet_synth_traffic.py   Thu Oct 06 14:35:16 2016 -0400
@@ -0,0 +1,157 @@
+# Copyright (c) 2016 Georgia Institute of Technology
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Author: Tushar Krishna
+
+import m5
+from m5.objects import *
+from m5.defines import buildEnv
+from m5.util import addToPath
+import os, optparse, sys
+addToPath('../common')
+addToPath('../ruby')
+addToPath('../topologies')
+
+import Options
+import Ruby
+
+# Get paths we might need.  It's expected this file is in m5/configs/example.
+config_path = os.path.dirname(os.path.abspath(__file__))
+config_root = os.path.dirname(config_path)
+m5_root = os.path.dirname(config_root)
+
+parser = optparse.OptionParser()
+Options.addCommonOptions(parser)
+
+parser.add_option("--synthetic", type="choice", default="uniform_random",
+  choices=['uniform_random', 'tornado', 'bit_complement', \
+   'bit_reverse', 'bit_rotation', 'neighbor', \
+'shuffle', 'transpose'])
+
+parser.add_option("-i", "--injectionrate", type="float", default=0.1,
+  metavar="I",
+  help="Injection rate in packets per cycle per node. \
+Takes decimal value between 0 to 1 (eg. 0.225). \
+Number of digits after 0 depends upon --precision.")
+
+parser.add_option("--precision", type="int", default=3,
+  help="Number of digits of precision after decimal point\
+for injection rate")
+
+parser.add_option("--sim-cycles", type="int", default=1000,
+   help="Number of simulation cycles")
+
+parser.add_option("--num-packets-max", type="int", default=-1,
+  help="Stop injecting aft

[gem5-dev] changeset in gem5: config: add port directions and per-router de...

2016-10-06 Thread Tushar Krishna
changeset 2365e9e396f7 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=2365e9e396f7
description:
config: add port directions and per-router delay in topology.
This patch adds port direction names to the links during topology
creation, which can be used for better printed names for the links
or for users to code up their own adaptive routing algorithms.
It also adds support for every router to have an independent latency
value to support heterogeneous topologies with the subsequent
garnet2.0 patch.

diffstat:

 configs/topologies/Mesh_XY.py  |   8 +
 src/mem/ruby/network/BasicLink.py  |   8 -
 src/mem/ruby/network/BasicRouter.cc|   1 +
 src/mem/ruby/network/BasicRouter.hh|   1 +
 src/mem/ruby/network/BasicRouter.py|   1 +
 src/mem/ruby/network/Network.hh|   4 ++-
 src/mem/ruby/network/Topology.cc   |  15 --
 src/mem/ruby/network/Topology.hh   |   7 -
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc  |   4 ++-
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh  |   4 ++-
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc |   4 ++-
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh |   4 ++-
 src/mem/ruby/network/simple/SimpleNetwork.cc   |   4 ++-
 src/mem/ruby/network/simple/SimpleNetwork.hh   |   4 ++-
 14 files changed, 57 insertions(+), 12 deletions(-)

diffs (271 lines):

diff -r cf870cd20cfc -r 2365e9e396f7 configs/topologies/Mesh_XY.py
--- a/configs/topologies/Mesh_XY.py Thu Oct 06 14:35:18 2016 -0400
+++ b/configs/topologies/Mesh_XY.py Thu Oct 06 14:35:20 2016 -0400
@@ -109,6 +109,8 @@
 int_links.append(IntLink(link_id=link_count,
  src_node=routers[east_out],
  dst_node=routers[west_in],
+ src_outport="East",
+ dst_inport="West",
  weight=1))
 link_count += 1
 
@@ -121,6 +123,8 @@
 int_links.append(IntLink(link_id=link_count,
  src_node=routers[west_out],
  dst_node=routers[east_in],
+ src_outport="West",
+ dst_inport="East",
  weight=1))
 link_count += 1
 
@@ -133,6 +137,8 @@
 int_links.append(IntLink(link_id=link_count,
  src_node=routers[north_out],
  dst_node=routers[south_in],
+ src_outport="North",
+ dst_inport="South",
  weight=2))
 link_count += 1
 
@@ -145,6 +151,8 @@
 int_links.append(IntLink(link_id=link_count,
  src_node=routers[south_out],
  dst_node=routers[north_in],
+ src_outport="South",
+ dst_inport="North",
  weight=2))
 link_count += 1
 
diff -r cf870cd20cfc -r 2365e9e396f7 src/mem/ruby/network/BasicLink.py
--- a/src/mem/ruby/network/BasicLink.py Thu Oct 06 14:35:18 2016 -0400
+++ b/src/mem/ruby/network/BasicLink.py Thu Oct 06 14:35:20 2016 -0400
@@ -46,11 +46,17 @@
 cxx_header = "mem/ruby/network/BasicLink.hh"
 ext_node = Param.RubyController("External node")
 int_node = Param.BasicRouter("ID of internal node")
-bandwidth_factor = 16
+bandwidth_factor = 16 # only used by simple network
 
 class BasicIntLink(BasicLink):
 type = 'BasicIntLink'
 cxx_header = "mem/ruby/network/BasicLink.hh"
 src_node = Param.BasicRouter("Router on src end")
 dst_node = Param.BasicRouter("Router on dst end")
+
+# only used by Garnet.
+src_outport = Param.String("", "Outport direction at src router")
+dst_inport = Param.String("", "Inport direction at dst router")
+
+# only used by simple network
 bandwidth_factor = 16
diff -r cf870cd20cfc -r 2365e9e396f7 src/mem/ruby/network/BasicRouter.cc
--- a/src/mem/ruby/network/BasicRouter.cc   Thu Oct 06 14:35:18 2016 -0400
+++ b/src/mem/ruby/network/BasicRouter.cc   Thu Oct 06 14:35:20 2016 -0400
@@ -32,6 +32,7 @@
 : ClockedObject(p)
 {
 m_id = 

[gem5-dev] changeset in gem5: config: add a separate config file for the ne...

2016-10-06 Thread Tushar Krishna
y specific and protocol specific options
 #
 Ruby.define_options(parser)
+Network.define_options(parser)
 
 execfile(os.path.join(config_root, "common", "Options.py"))
 
diff -r 2bc3962f59fe -r 004d34b65092 configs/example/ruby_random_test.py
--- a/configs/example/ruby_random_test.py   Thu Oct 06 14:35:16 2016 -0400
+++ b/configs/example/ruby_random_test.py   Thu Oct 06 14:35:17 2016 -0400
@@ -35,10 +35,12 @@
 import os, optparse, sys
 addToPath('../common')
 addToPath('../ruby')
+addToPath('../network')
 addToPath('../topologies')
 
 import Options
 import Ruby
+import Network
 
 # Get paths we might need.  It's expected this file is in m5/configs/example.
 config_path = os.path.dirname(os.path.abspath(__file__))
@@ -57,6 +59,7 @@
 # Add the ruby specific and protocol specific options
 #
 Ruby.define_options(parser)
+Network.define_options(parser)
 
 execfile(os.path.join(config_root, "common", "Options.py"))
 
diff -r 2bc3962f59fe -r 004d34b65092 configs/example/se.py
--- a/configs/example/se.py Thu Oct 06 14:35:16 2016 -0400
+++ b/configs/example/se.py Thu Oct 06 14:35:17 2016 -0400
@@ -53,9 +53,11 @@
 
 addToPath('../common')
 addToPath('../ruby')
+addToPath('../network')
 
 import Options
 import Ruby
+import Network
 import Simulation
 import CacheConfig
 import CpuConfig
@@ -127,6 +129,7 @@
 
 if '--ruby' in sys.argv:
 Ruby.define_options(parser)
+Network.define_options(parser)
 
 (options, args) = parser.parse_args()
 
diff -r 2bc3962f59fe -r 004d34b65092 configs/network/Network.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/configs/network/Network.pyThu Oct 06 14:35:17 2016 -0400
@@ -0,0 +1,93 @@
+# Copyright (c) 2016 Georgia Institute of Technology
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Tushar Krishna
+
+import math
+import m5
+from m5.objects import *
+from m5.defines import buildEnv
+from m5.util import addToPath, fatal
+
+def define_options(parser):
+# By default, ruby uses the simple timing cpu
+parser.set_defaults(cpu_type="timing")
+
+parser.add_option("--topology", type="string", default="Crossbar",
+  help="check configs/topologies for complete set")
+parser.add_option("--mesh-rows", type="int", default=1,
+  help="the number of rows in the mesh topology")
+parser.add_option("--garnet-network", type="choice",
+  choices=['fixed', 'flexible'], help="'fixed'|'flexible'")
+parser.add_option("--network-fault-model", action="store_true", 
default=False,
+  help="enable network fault model: see 
src/mem/ruby/network/fault_model/")
+
+
+def create_network(options, ruby):
+
+# Set the network classes based on the command line options
+if options.garnet_network == "fixed":
+NetworkClass = GarnetNetwork_d
+IntLinkClass = GarnetIntLink_d
+ExtLinkClass = GarnetExtLink_d
+RouterClass = GarnetRouter_d
+InterfaceClass = GarnetNetworkInterface_d
+
+elif options.garnet_network == "flexible":
+NetworkClass = GarnetNetwork
+IntLinkClass = GarnetIntLink
+ExtLinkClass = GarnetExtLink
+RouterClass = GarnetRouter
+InterfaceClass = GarnetNetworkInterface
+
+else:
+NetworkClass = SimpleNetwork
+IntLinkClass =

Re: [gem5-dev] Review Request 3558: ruby: garnet2.0

2016-09-23 Thread Tushar Krishna


> On Sept. 23, 2016, 5:47 a.m., Zicong Wang wrote:
> > Missing src_outport & dst_inport when create the mesh links in 
> > MeshDirCorners_XY.py, which will cause segmentation fault(tested in 
> > X86_MESI_Two_Level)

Hi Zicong,
Thanks for testing the patch on your end. Can you send me the command you used 
that gave you the segmentation fault?
src_outport and dst_inport are supposed to be optional parameters.
I can add them in to MeshDirCorners_XY but want to find out why they gave an 
error.

Thanks,
Tushar


- Tushar


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3558/#review8734
---


On Aug. 24, 2016, 3:24 p.m., Tushar Krishna wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3558/
> ---
> 
> (Updated Aug. 24, 2016, 3:24 p.m.)
> 
> 
> Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
> Matthew Poremba.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> ruby: garnet2.0
> Revamped version of garnet with more optimized single-cycle routers,
> more configurability, and cleaner code.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/garnet2.0/GarnetLink.py PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/GarnetNetwork.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/GarnetNetwork.cc PRE-CREATION 
>   configs/topologies/Crossbar.py d726d0cea027 
>   configs/topologies/MeshDirCorners_XY.py PRE-CREATION 
>   configs/topologies/Mesh_XY.py PRE-CREATION 
>   configs/topologies/Mesh_westfirst.py PRE-CREATION 
>   configs/topologies/Pt2Pt.py d726d0cea027 
>   src/base/statistics.cc d726d0cea027 
>   src/mem/ruby/network/BasicRouter.py d726d0cea027 
>   src/mem/ruby/network/garnet2.0/CommonTypes.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/Credit.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/Credit.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/CreditLink.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/GarnetLink.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/GarnetLink.cc PRE-CREATION 
>   configs/network/Network.py PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/Router.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/RoutingUnit.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/RoutingUnit.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/SConscript PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/SwitchAllocator.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/SwitchAllocator.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/VirtualChannel.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/VirtualChannel.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/flit.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/flit.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/flitBuffer.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/flitBuffer.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/OutputUnit.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/OutputUnit.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/README.txt PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/Router.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/NetworkLink.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/OutVcState.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/OutVcState.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/NetworkLink.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/GarnetNetwork.py PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/InputUnit.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/InputUnit.cc PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.hh PRE-CREATION 
>   src/mem/ruby/network/garnet2.0/NetworkInterface.cc PRE-CREATION 
> 
> Diff: http://reviews.gem5.org/r/3558/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Tushar Krishna
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3555: config: make internal links in network topology unidirectional.

2016-08-24 Thread Tushar Krishna


> On July 22, 2016, 11 p.m., Matthew Poremba wrote:
> > configs/topologies/Mesh_westfirst.py, lines 125-128
> > <http://reviews.gem5.org/r/3555/diff/1/?file=57035#file57035line125>
> >
> > Minor nitpick, but this seems like east-first to me, since the links 
> > with weight 1 send from west to east. But this all depends how you look at 
> > the map :)

These are actually links going from the west output port of the source to the 
east input port of the dest. So it is West-first. You always try to use the 
west output port as that has the lowest weight.

I have made this clearer in the new patch by renaming "west_id" to "west_out" 
and "east_id" to "east_in".


- Tushar


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3555/#review8504
-----------


On Aug. 24, 2016, 3:22 p.m., Tushar Krishna wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3555/
> ---
> 
> (Updated Aug. 24, 2016, 3:22 p.m.)
> 
> 
> Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
> Matthew Poremba.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> config: make internal links in network topology unidirectional.
> This patch makes the internal links within the network topology
> unidirectional, thus allowing any deadlock-free routing algorithms to
> be specified from the topology itself using weights.
> This patch also renames Mesh.py and MeshDirCorners.py to
> Mesh_XY.py and MeshDirCorners_XY.py (Mesh with XY routing).
> It also adds a Mesh_westfirst.py and CrossbarGarnet.py topologies.
> 
> 
> Diffs
> -
> 
>   src/mem/ruby/network/simple/SimpleNetwork.cc d726d0cea027 
>   src/mem/ruby/network/simple/SimpleNetwork.py d726d0cea027 
>   src/mem/ruby/network/BasicLink.py d726d0cea027 
>   src/mem/ruby/network/Network.hh d726d0cea027 
>   src/mem/ruby/network/Topology.hh d726d0cea027 
>   src/mem/ruby/network/Topology.cc d726d0cea027 
>   src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh d726d0cea027 
>   src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc d726d0cea027 
>   src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh d726d0cea027 
>   src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc d726d0cea027 
>   src/mem/ruby/network/simple/SimpleNetwork.hh d726d0cea027 
>   configs/topologies/Cluster.py d726d0cea027 
>   configs/topologies/Crossbar.py d726d0cea027 
>   configs/topologies/CrossbarGarnet.py PRE-CREATION 
>   configs/topologies/Mesh.py d726d0cea027 
>   configs/topologies/MeshDirCorners.py d726d0cea027 
>   configs/topologies/MeshDirCorners_XY.py PRE-CREATION 
>   configs/topologies/Mesh_XY.py PRE-CREATION 
>   configs/topologies/Mesh_westfirst.py PRE-CREATION 
>   configs/topologies/Pt2Pt.py d726d0cea027 
>   configs/topologies/Torus.py d726d0cea027 
>   src/mem/ruby/network/BasicLink.hh d726d0cea027 
>   src/mem/ruby/network/BasicLink.cc d726d0cea027 
> 
> Diff: http://reviews.gem5.org/r/3555/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Tushar Krishna
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3558: ruby: garnet2.0

2016-08-24 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3558/
---

(Updated Aug. 24, 2016, 3:24 p.m.)


Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
Matthew Poremba.


Summary (updated)
-

ruby: garnet2.0


Repository: gem5


Description (updated)
---

ruby: garnet2.0
Revamped version of garnet with more optimized single-cycle routers,
more configurability, and cleaner code.


Diffs (updated)
-

  src/mem/ruby/network/garnet2.0/GarnetLink.py PRE-CREATION 
  src/mem/ruby/network/garnet2.0/GarnetNetwork.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/GarnetNetwork.cc PRE-CREATION 
  configs/topologies/Crossbar.py d726d0cea027 
  configs/topologies/MeshDirCorners_XY.py PRE-CREATION 
  configs/topologies/Mesh_XY.py PRE-CREATION 
  configs/topologies/Mesh_westfirst.py PRE-CREATION 
  configs/topologies/Pt2Pt.py d726d0cea027 
  src/base/statistics.cc d726d0cea027 
  src/mem/ruby/network/BasicRouter.py d726d0cea027 
  src/mem/ruby/network/garnet2.0/CommonTypes.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/Credit.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/Credit.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/CreditLink.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/CrossbarSwitch.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/CrossbarSwitch.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/GarnetLink.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/GarnetLink.cc PRE-CREATION 
  configs/network/Network.py PRE-CREATION 
  src/mem/ruby/network/garnet2.0/Router.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/RoutingUnit.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/RoutingUnit.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/SConscript PRE-CREATION 
  src/mem/ruby/network/garnet2.0/SwitchAllocator.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/SwitchAllocator.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/VirtualChannel.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/VirtualChannel.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/flit.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/flit.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/flitBuffer.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/flitBuffer.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/OutputUnit.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/OutputUnit.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/README.txt PRE-CREATION 
  src/mem/ruby/network/garnet2.0/Router.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/NetworkLink.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/OutVcState.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/OutVcState.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/NetworkLink.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/GarnetNetwork.py PRE-CREATION 
  src/mem/ruby/network/garnet2.0/InputUnit.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/InputUnit.cc PRE-CREATION 
  src/mem/ruby/network/garnet2.0/NetworkInterface.hh PRE-CREATION 
  src/mem/ruby/network/garnet2.0/NetworkInterface.cc PRE-CREATION 

Diff: http://reviews.gem5.org/r/3558/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3557: ruby: remove the original garnet code.

2016-08-24 Thread Tushar Krishna
/fixed-pipeline/GarnetNetwork_d.hh d726d0cea027 
  src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc d726d0cea027 
  src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py d726d0cea027 
  src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh d726d0cea027 

Diff: http://reviews.gem5.org/r/3557/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3555: config: make internal links in network topology unidirectional.

2016-08-24 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3555/
---

(Updated Aug. 24, 2016, 3:22 p.m.)


Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
Matthew Poremba.


Summary (updated)
-

config: make internal links in network topology unidirectional.


Repository: gem5


Description (updated)
---

config: make internal links in network topology unidirectional.
This patch makes the internal links within the network topology
unidirectional, thus allowing any deadlock-free routing algorithms to
be specified from the topology itself using weights.
This patch also renames Mesh.py and MeshDirCorners.py to
Mesh_XY.py and MeshDirCorners_XY.py (Mesh with XY routing).
It also adds a Mesh_westfirst.py and CrossbarGarnet.py topologies.


Diffs (updated)
-

  src/mem/ruby/network/simple/SimpleNetwork.cc d726d0cea027 
  src/mem/ruby/network/simple/SimpleNetwork.py d726d0cea027 
  src/mem/ruby/network/BasicLink.py d726d0cea027 
  src/mem/ruby/network/Network.hh d726d0cea027 
  src/mem/ruby/network/Topology.hh d726d0cea027 
  src/mem/ruby/network/Topology.cc d726d0cea027 
  src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh d726d0cea027 
  src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc d726d0cea027 
  src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh d726d0cea027 
  src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc d726d0cea027 
  src/mem/ruby/network/simple/SimpleNetwork.hh d726d0cea027 
  configs/topologies/Cluster.py d726d0cea027 
  configs/topologies/Crossbar.py d726d0cea027 
  configs/topologies/CrossbarGarnet.py PRE-CREATION 
  configs/topologies/Mesh.py d726d0cea027 
  configs/topologies/MeshDirCorners.py d726d0cea027 
  configs/topologies/MeshDirCorners_XY.py PRE-CREATION 
  configs/topologies/Mesh_XY.py PRE-CREATION 
  configs/topologies/Mesh_westfirst.py PRE-CREATION 
  configs/topologies/Pt2Pt.py d726d0cea027 
  configs/topologies/Torus.py d726d0cea027 
  src/mem/ruby/network/BasicLink.hh d726d0cea027 
  src/mem/ruby/network/BasicLink.cc d726d0cea027 

Diff: http://reviews.gem5.org/r/3555/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3556: config: add port directions and per-router delay in topology.

2016-08-24 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3556/
---

(Updated Aug. 24, 2016, 3:23 p.m.)


Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
Matthew Poremba.


Summary (updated)
-

config: add port directions and per-router delay in topology.


Repository: gem5


Description (updated)
---

config: add port directions and per-router delay in topology.
This patch adds port direction names to the links during topology
creation, which can be used for better printed names for the links
or for users to code up their own adaptive routing algorithms.
It also adds support for every router to have an independent latency
value to support heterogeneous topologies with the subsequent
garnet2.0 patch.


Diffs (updated)
-

  src/mem/ruby/network/BasicRouter.py d726d0cea027 
  src/mem/ruby/network/Network.hh d726d0cea027 
  src/mem/ruby/network/Topology.hh d726d0cea027 
  src/mem/ruby/network/Topology.cc d726d0cea027 
  src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh d726d0cea027 
  src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc d726d0cea027 
  src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh d726d0cea027 
  src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc d726d0cea027 
  src/mem/ruby/network/simple/SimpleNetwork.hh d726d0cea027 
  src/mem/ruby/network/simple/SimpleNetwork.cc d726d0cea027 
  configs/topologies/Mesh_XY.py PRE-CREATION 
  src/mem/ruby/network/BasicLink.py d726d0cea027 
  src/mem/ruby/network/BasicRouter.hh d726d0cea027 
  src/mem/ruby/network/BasicRouter.cc d726d0cea027 

Diff: http://reviews.gem5.org/r/3556/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3554: config: add a separate config file for the network.

2016-08-24 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3554/
---

(Updated Aug. 24, 2016, 3:22 p.m.)


Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
Matthew Poremba.


Summary (updated)
-

config: add a separate config file for the network.


Repository: gem5


Description (updated)
---

config: add a separate config file for the network.
This patch adds a new file configs/network/Network.py to setup the network,
instead of doing that within Ruby.py.


Diffs (updated)
-

  configs/example/ruby_gpu_random_test.py d726d0cea027 
  configs/example/ruby_mem_test.py d726d0cea027 
  configs/example/ruby_random_test.py d726d0cea027 
  configs/example/se.py d726d0cea027 
  configs/network/Network.py PRE-CREATION 
  configs/ruby/Ruby.py d726d0cea027 
  configs/example/apu_se.py d726d0cea027 
  configs/example/fs.py d726d0cea027 
  configs/example/garnet_synth_traffic.py PRE-CREATION 
  configs/example/ruby_direct_test.py d726d0cea027 

Diff: http://reviews.gem5.org/r/3554/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3550: ruby: rename networktest to garnet_synthetic_traffic.

2016-08-24 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3550/
---

(Updated Aug. 24, 2016, 3:20 p.m.)


Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
Matthew Poremba.


Summary (updated)
-

ruby: rename networktest to garnet_synthetic_traffic.


Repository: gem5


Description (updated)
---

ruby: rename networktest to garnet_synthetic_traffic.
networktest is essentially a collection of synthetic traffic patterns
for the network. The protocol name and the tester having the same name
led to multiple python configuration files with the same name, adding
confusion. This patch renames networktest to garnet_synthetic_traffic,
and also adds more synthetic traffic patterns.


Diffs (updated)
-

  src/cpu/testers/networktest/SConscript d726d0cea027 
  src/cpu/testers/networktest/networktest.hh d726d0cea027 
  src/cpu/testers/networktest/networktest.cc d726d0cea027 
  configs/example/garnet_synth_traffic.py PRE-CREATION 
  configs/example/ruby_network_test.py d726d0cea027 
  src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.hh 
PRE-CREATION 
  src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.cc 
PRE-CREATION 
  src/cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.py 
PRE-CREATION 
  src/cpu/testers/garnet_synthetic_traffic/SConscript PRE-CREATION 
  src/cpu/testers/networktest/NetworkTest.py d726d0cea027 

Diff: http://reviews.gem5.org/r/3550/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3549: ruby: rename ALPHA_Network_test protocol to Garnet_standalone.

2016-08-24 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3549/
---

(Updated Aug. 24, 2016, 3:17 p.m.)


Review request for Default, Andreas Hansson, Brad Beckmann, Jieming Yin, and 
Matthew Poremba.


Summary (updated)
-

ruby: rename ALPHA_Network_test protocol to Garnet_standalone.


Repository: gem5


Description (updated)
---

ruby: rename ALPHA_Network_test protocol to Garnet_standalone.
Over the past 6 years, we realized that the protocol is essentially used
to run the garnet network in a standalone manner, and feed standard synthetic
traffic patterns through it.


Diffs (updated)
-

  src/mem/protocol/Garnet_standalone-msg.sm PRE-CREATION 
  src/mem/protocol/Garnet_standalone.slicc PRE-CREATION 
  src/mem/protocol/Network_test-cache.sm d726d0cea027 
  src/mem/protocol/Network_test-dir.sm d726d0cea027 
  src/mem/protocol/Network_test-msg.sm d726d0cea027 
  src/mem/protocol/Network_test.slicc d726d0cea027 
  src/mem/protocol/SConsopts d726d0cea027 
  src/mem/ruby/system/GPUCoalescer.hh d726d0cea027 
  src/mem/ruby/system/GPUCoalescer.cc d726d0cea027 
  src/mem/ruby/system/Sequencer.hh d726d0cea027 
  src/mem/ruby/system/Sequencer.cc d726d0cea027 
  src/mem/ruby/system/Sequencer.py d726d0cea027 
  build_opts/ALPHA_Network_test d726d0cea027 
  build_opts/Garnet_standalone PRE-CREATION 
  configs/ruby/Garnet_standalone.py PRE-CREATION 
  configs/ruby/Network_test.py d726d0cea027 
  src/mem/protocol/Garnet_standalone-cache.sm PRE-CREATION 
  src/mem/protocol/Garnet_standalone-dir.sm PRE-CREATION 

Diff: http://reviews.gem5.org/r/3549/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] Review Request: Topology: Set default value of mesh_rows to sqrt(num_routers)

2012-08-02 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/1337/
---

Review request for Default and Brad Beckmann.


Description
---

Topology: Set default value of mesh_rows to sqrt(num_routers)


Diffs
-

  configs/ruby/Ruby.py b4d0bdb52694 
  configs/topologies/Mesh.py b4d0bdb52694 
  configs/topologies/MeshDirCorners.py b4d0bdb52694 

Diff: http://reviews.gem5.org/r/1337/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] Review Request: NetworkTest: remove unnecessary memory allocation

2012-04-05 Thread Tushar Krishna

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/1136/
---

Review request for Default and Nilay Vaish.


Description
---

NetworkTest: remove unnecessary memory allocation


Diffs
-

  src/cpu/testers/networktest/networktest.cc 4148f9af0b70 

Diff: http://reviews.gem5.org/r/1136/diff/


Testing
---


Thanks,

Tushar Krishna

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] changeset in gem5: Garnet: Stats at vnet granularity + code cleanup

2012-03-19 Thread Tushar Krishna
changeset c739a3a829f5 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=c739a3a829f5
description:
Garnet: Stats at vnet granularity + code cleanup

This patch
(1) Moves redundant code from fixed and flexible networks to 
BaseGarnetNetwork.
(2) Prints network stats at vnet granularity.

diffstat:

 src/mem/ruby/network/garnet/BaseGarnetNetwork.cc  |  96 
+-
 src/mem/ruby/network/garnet/BaseGarnetNetwork.hh  |  42 +++-
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc |  56 +
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh |  30 +--
 src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc  |   9 +-
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc|  72 ++-
 src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh|  38 +---
 src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc |   9 +-
 8 files changed, 179 insertions(+), 173 deletions(-)

diffs (truncated from 573 to 300 lines):

diff -r 75b524b64c28 -r c739a3a829f5 
src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
--- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc  Mon Mar 19 06:36:09 
2012 -0400
+++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc  Mon Mar 19 17:34:17 
2012 -0400
@@ -43,10 +43,6 @@
 fault_model = p-fault_model;
 
 m_ruby_start = 0;
-m_flits_received = 0;
-m_flits_injected = 0;
-m_network_latency = 0.0;
-m_queueing_latency = 0.0;
 
 // Currently Garnet only supports uniform bandwidth for all
 // links and network interfaces.
@@ -77,9 +73,17 @@
 
 m_in_use.resize(m_virtual_networks);
 m_ordered.resize(m_virtual_networks);
+m_flits_received.resize(m_virtual_networks);
+m_flits_injected.resize(m_virtual_networks);
+m_network_latency.resize(m_virtual_networks);
+m_queueing_latency.resize(m_virtual_networks);
 for (int i = 0; i  m_virtual_networks; i++) {
 m_in_use[i] = false;
 m_ordered[i] = false;
+m_flits_received[i] = 0;
+m_flits_injected[i] = 0;
+m_network_latency[i] = 0.0;
+m_queueing_latency[i] = 0.0;
 }
 
 for (int node = 0; node  m_nodes; node++) {
@@ -101,3 +105,87 @@
 {
 Network::init();
 }
+
+MessageBuffer*
+BaseGarnetNetwork::getToNetQueue(NodeID id, bool ordered, int network_num,
+ string vnet_type)
+{
+checkNetworkAllocation(id, ordered, network_num, vnet_type);
+return m_toNetQueues[id][network_num];
+}
+
+MessageBuffer*
+BaseGarnetNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num,  
+   string vnet_type)
+{
+checkNetworkAllocation(id, ordered, network_num, vnet_type);
+return m_fromNetQueues[id][network_num];
+}
+
+void
+BaseGarnetNetwork::clearStats()
+{
+m_ruby_start = g_eventQueue_ptr-getTime();
+}
+
+Time
+BaseGarnetNetwork::getRubyStartTime()
+{
+return m_ruby_start;
+}
+
+void
+BaseGarnetNetwork::printStats(ostream out) const
+{
+out  endl;
+out  Network Stats  endl;
+out  -  endl;
+out  endl;
+printPerformanceStats(out);
+printLinkStats(out);
+printPowerStats(out);
+m_topology_ptr-printStats(out);
+}
+
+void
+BaseGarnetNetwork::printPerformanceStats(ostream out) const
+{
+int total_flits_injected = 0;
+int total_flits_received = 0;
+int total_network_latency = 0.0;
+int total_queueing_latency = 0.0;
+
+for (int i = 0; i  m_virtual_networks; i++) {
+if (!m_in_use[i])
+continue;
+
+out  [Vnet   i  ]: flits injected = 
+ m_flits_injected[i]  endl;
+out  [Vnet   i  ]: flits received = 
+ m_flits_received[i]  endl;
+out  [Vnet   i  ]: average network latency = 
+ ((double) m_network_latency[i] / (double) m_flits_received[i])
+ endl;
+out  [Vnet   i  ]: average queueing (at source NI) latency = 
+ ((double) m_queueing_latency[i] / (double) m_flits_received[i])
+ endl;
+
+out  endl;
+total_flits_injected += m_flits_injected[i];
+total_flits_received += m_flits_received[i];
+total_network_latency += m_network_latency[i];
+total_queueing_latency += m_queueing_latency[i];
+}
+out  Total flits injected =   total_flits_injected  endl;
+out  Total flits received =   total_flits_received  endl;
+out  Average network latency = 
+ ((double) total_network_latency/ (double) total_flits_received)  
endl;
+out  Average queueing (at source NI) latency = 
+ ((double) total_queueing_latency/ (double) total_flits_received)  
endl;
+out  Average latency = 
+ ((double)  (total_queueing_latency + total_network_latency) /
+(double) total_flits_received) endl;
+out  -  endl;
+out  endl;
+}
+
diff -r 75b524b64c28 -r c739a3a829f5 

[gem5-dev] changeset in gem5: GARNET: adding a fault model for resilient on...

2011-11-04 Thread Tushar Krishna
changeset df3b7a1e883f in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=df3b7a1e883f
description:
GARNET: adding a fault model for resilient on-chip network research.

This patch adds a fault model, which provides the probability of a 
number of
architectural faults in the interconnection network (e.g., data 
corruption,
misrouting). These probabilities can be used to realistically inject 
faults
in GARNET and faithfully evaluate the effectiveness of novel resilient 
NoC
architectures.

diffstat:

 configs/ruby/Ruby.py  |   10 +-
 src/mem/ruby/network/fault_model/FaultModel.cc|  278 +
 src/mem/ruby/network/fault_model/FaultModel.hh|  142 
 src/mem/ruby/network/fault_model/FaultModel.py|  302 ++
 src/mem/ruby/network/fault_model/SConscript   |   43 +
 src/mem/ruby/network/garnet/BaseGarnetNetwork.cc  |3 +
 src/mem/ruby/network/garnet/BaseGarnetNetwork.hh  |4 +
 src/mem/ruby/network/garnet/BaseGarnetNetwork.py  |2 +
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc |   17 +
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh |1 +
 src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc|   29 +
 src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh|   12 +
 12 files changed, 842 insertions(+), 1 deletions(-)

diffs (truncated from 968 to 300 lines):

diff -r d9c61e6f1848 -r df3b7a1e883f configs/ruby/Ruby.py
--- a/configs/ruby/Ruby.py  Fri Nov 04 11:26:12 2011 -0500
+++ b/configs/ruby/Ruby.py  Fri Nov 04 18:40:22 2011 -0400
@@ -40,6 +40,8 @@
   help=the number of rows in the mesh topology)
 parser.add_option(--garnet-network, type=string, default=None,
   help='fixed'|'flexible')
+parser.add_option(--network-fault-model, action=store_true, 
default=False,
+  help=enable network fault model: see 
src/mem/ruby/network/fault_model/)
 
 # ruby mapping options
 parser.add_option(--numa-high-bit, type=int, default=0,
@@ -109,7 +111,13 @@
 print Error: could not create topology %s % options.topology
 raise
 
-network = NetworkClass(ruby_system = ruby, topology = net_topology)
+if options.network_fault_model:
+assert(options.garnet_network == fixed)
+fault_model = FaultModel()
+network = NetworkClass(ruby_system = ruby, topology = net_topology,\
+   enable_fault_model=True, fault_model = 
fault_model)
+else:
+network = NetworkClass(ruby_system = ruby, topology = net_topology)
 
 #
 # Loop through the directory controlers.
diff -r d9c61e6f1848 -r df3b7a1e883f 
src/mem/ruby/network/fault_model/FaultModel.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/src/mem/ruby/network/fault_model/FaultModel.ccFri Nov 04 18:40:22 
2011 -0400
@@ -0,0 +1,278 @@
+/*
+ * Copyright (c) 2011 Massachusetts Institute of Technology
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Konstantinos Aisopos
+ */
+
+/*
+ * Official Tool Website: www.mit.edu/~kaisopos/FaultModel
+ *
+ * If you use our tool for academic research, we request that you cite: 
+ * Konstantinos Aisopos, Chia-Hsin Owen Chen, and Li-Shiuan Peh. Enabling
+ * System-Level Modeling of Variation-Induced Faults in Networks-on-Chip.
+ * 

Re: [gem5-dev] About OrionLink and wire

2011-10-25 Thread Tushar Krishna

These discussions might be better on the gem5-users list ...
Can you re-send this email on that? I'll explain how you can separate 
out the power for different routers and ports ...



On 10/25/2011 06:21 AM, lyh wrote:

In a NoC, there are many routers. In general, some with more ports, some with fewer ones. 
Does total router power in simulation results indicate the power of a single 
router, or the sum of that for all the routers? How to distinguish power differnce for 
different routers that maybe with different number of ports?

lyh

At 2011-10-24 13:45:04,Tushar Krishnatus...@csail.mit.edu  wrote:

Hi Lyh,
The orion parameters are defined here: src/mem/ruby/network/orion/router.cfg
LINK_LENGTH is the length of each link.

For orion, an important file to look at is:
src/mem/ruby/network/orion/NetworkPower.cc

OrionLink has no direct relationship with BasicLink.
BasicLink is the base class for links in garnet and simple network.

When the garnet simulation completes, each link in garnet calls the
calculate_power() function.
This function creates objects of the class OrionLink which are used to
estimate power for the links based on activity and link model.

There is no direct provision to specify different wire spacings for
different links in the network since all links use the spacing specified
in router.cfg.
[The init() function in OrionLink.cc does the following: const string
width_spacing_model_str =
m_orion_cfg_ptr-getstring(WIRE_WIDTH_SPACING);]
If you want to model different spacings, I suggest modifying this
function to set different spacing models for different links.

- Tushar


On 10/24/2011 1:27 AM, lyh wrote:

Hi,
How do i set len of OrionLink ?
What's the relationship between OrionLink and BasicLink?
Now there are four width_spacing_models for wire,i.e.  
SWIDTH_SSPACE,SWIDTH_DSPACE,DWIDTH_SSPACE,DWIDTH_DSPACE. If i want to set each 
link a different width_spacing_model for a network, what should I do? In other 
words, where should i do configuration?

lyh
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] About OrionLink and wire

2011-10-24 Thread Tushar Krishna

They affect the capacitance.

larger width -- larger cap
larger spacing -- smaller cap


What configuration did you run?
I'll take a look ...


On 10/24/2011 02:45 AM, lyh wrote:

Thks for your quick answer.
In the code, i have found that WIRE_WIDTH_SPACING has no effect on the static or 
dynamic power of a link. So, what's the useness of WIRE_WIDTH_SPACING in the simulator?

lyh




At 2011-10-24 13:45:04,Tushar Krishnatus...@csail.mit.edu  wrote:

Hi Lyh,
The orion parameters are defined here: src/mem/ruby/network/orion/router.cfg
LINK_LENGTH is the length of each link.

For orion, an important file to look at is:
src/mem/ruby/network/orion/NetworkPower.cc

OrionLink has no direct relationship with BasicLink.
BasicLink is the base class for links in garnet and simple network.

When the garnet simulation completes, each link in garnet calls the
calculate_power() function.
This function creates objects of the class OrionLink which are used to
estimate power for the links based on activity and link model.

There is no direct provision to specify different wire spacings for
different links in the network since all links use the spacing specified
in router.cfg.
[The init() function in OrionLink.cc does the following: const string
width_spacing_model_str =
m_orion_cfg_ptr-getstring(WIRE_WIDTH_SPACING);]
If you want to model different spacings, I suggest modifying this
function to set different spacing models for different links.

- Tushar


On 10/24/2011 1:27 AM, lyh wrote:

Hi,
How do i set len of OrionLink ?
What's the relationship between OrionLink and BasicLink?
Now there are four width_spacing_models for wire,i.e.  
SWIDTH_SSPACE,SWIDTH_DSPACE,DWIDTH_SSPACE,DWIDTH_DSPACE. If i want to set each 
link a different width_spacing_model for a network, what should I do? In other 
words, where should i do configuration?

lyh
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] modeling variable link bandwidth for garnet fixed-pipeline network

2011-10-21 Thread Tushar Krishna

Hi Lyh,
Garnet requires the ni_flit_size to be same as bandwidth_factor which 
means you cannot use different bandwidth factors for different links .. 
However, if you specify different link latencies, you can mimic 
different bandwidths since flits will take more cycles on some links and 
fewer on others.


Tushar


On 10/21/2011 10:41 AM, lyh wrote:

Hi,
For Garnet fixed-pipeline network, does it  support modeling variable link 
bandwidth?
Athttp://gem5.org/Interconnection_Network, it is said that Links which have low 
bandwidth can be modeled by specifying a longer latency across them in the topology 
file, what's the real mean? can it be modeled by specifying bandwidth_factor for 
each link directly?

lyh
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: GARNET: adding a fault model for resilient on-chip network research.

2011-07-08 Thread Tushar Krishna
Hi all,
I have already gone through the patch with Konstantinos and found it to be 
fine. We have made sure it integrates cleanly, and that gem5's style is 
followed.
I look forward to hearing your comments.

Thanks,
Tushar


On Jul 9, 2011, at 8:46 AM, Konstantinos Aisopos kaisopos.g...@gmail.com 
wrote:

 This is an automatically generated e-mail. To reply, visit: 
 http://reviews.m5sim.org/r/776/
 
 Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, Nathan 
 Binkert, Brad Beckmann, and Tushar Krishna.
 By Konstantinos Aisopos.
 Description
 
 GARNET: adding a fault model for resilient on-chip network research.
 
 This patch adds a fault model, which provides the probability for a number of
 architectural faults in the interconnection network (e.g., data corruption,
 misrouting). These probabilities can be used to realistically inject faults
 in GARNET and faithfully evaluate the effectiveness of novel resilient NoC
 architectures.
 Diffs
 
 src/mem/ruby/network/fault_model/DB.conf.txt (PRE-CREATION)
 src/mem/ruby/network/fault_model/DB.temp.txt (PRE-CREATION)
 src/mem/ruby/network/fault_model/FaultModel.hh (PRE-CREATION)
 src/mem/ruby/network/fault_model/FaultModel.cc (PRE-CREATION)
 src/mem/ruby/network/fault_model/README (PRE-CREATION)
 src/mem/ruby/network/fault_model/SConscript (PRE-CREATION)
 src/mem/ruby/network/garnet/BaseGarnetNetwork.hh (7907b19fbe80)
 src/mem/ruby/network/garnet/BaseGarnetNetwork.cc (7907b19fbe80)
 src/mem/ruby/network/garnet/BaseGarnetNetwork.py (7907b19fbe80)
 src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc (7907b19fbe80)
 src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh (7907b19fbe80)
 src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc (7907b19fbe80)
 View Diff
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev