summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-08-27 01:00:55 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-08-27 01:00:55 -0500
commit9190940511b5783811bc6288dd4f22f8d18c9d26 (patch)
tree72a07f80a772d7c6f2a6f0255cee173ac631cb35 /src/mem/ruby/network
parent7122b83d8f92d77bccae432b4e90ba12f1babad5 (diff)
downloadgem5-9190940511b5783811bc6288dd4f22f8d18c9d26.tar.xz
Ruby: Remove RubyEventQueue
This patch removes RubyEventQueue. Consumer objects now rely on RubySystem or themselves for scheduling events.
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r--src/mem/ruby/network/garnet/BaseGarnetNetwork.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc26
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh6
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc8
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/flit_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh6
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc4
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc30
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc4
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/Router.cc55
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/flit.cc4
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.cc4
-rw-r--r--src/mem/ruby/network/orion/NetworkPower.cc4
-rw-r--r--src/mem/ruby/network/simple/PerfectSwitch.cc2
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc8
27 files changed, 105 insertions, 106 deletions
diff --git a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
index 69d513329..78b4b2d42 100644
--- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc
@@ -127,7 +127,7 @@ BaseGarnetNetwork::getFromNetQueue(NodeID id, bool ordered, int network_num,
void
BaseGarnetNetwork::clearStats()
{
- m_ruby_start = g_eventQueue_ptr->getTime();
+ m_ruby_start = g_system_ptr->getTime();
}
Time
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
index b861b6a4e..c7ac85ad3 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
@@ -272,7 +272,7 @@ GarnetNetwork_d::printLinkStats(ostream& out) const
for (int i = 0; i < m_link_ptr_vector.size(); i++) {
average_link_utilization +=
(double(m_link_ptr_vector[i]->getLinkUtilization())) /
- (double(g_eventQueue_ptr->getTime()-m_ruby_start));
+ (double(g_system_ptr->getTime()-m_ruby_start));
vector<int> vc_load = m_link_ptr_vector[i]->getVcLoad();
for (int j = 0; j < vc_load.size(); j++) {
@@ -291,7 +291,7 @@ GarnetNetwork_d::printLinkStats(ostream& out) const
continue;
average_vc_load[i] = (double(average_vc_load[i]) /
- (double(g_eventQueue_ptr->getTime()) - m_ruby_start));
+ (double(g_system_ptr->getTime()) - m_ruby_start));
out << "Average VC Load [" << i << "] = " << average_vc_load[i]
<< " flits/cycle " << endl;
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc
index 3e3584bd8..adafa4d24 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc
@@ -79,7 +79,7 @@ InputUnit_d::wakeup()
// Do the route computation for this vc
m_router->route_req(t_flit, this, vc);
- m_vcs[vc]->set_enqueue_time(g_eventQueue_ptr->getTime());
+ m_vcs[vc]->set_enqueue_time(g_system_ptr->getTime());
} else {
t_flit->advance_stage(SA_);
m_router->swarb_req();
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh
index 79158d56d..544c4271b 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh
@@ -90,7 +90,7 @@ class InputUnit_d : public Consumer
{
flit_d *t_flit = new flit_d(in_vc, free_signal);
creditQueue->insert(t_flit);
- g_eventQueue_ptr->scheduleEvent(m_credit_link, 1);
+ m_credit_link->scheduleEvent(1);
}
inline int
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
index 4a2c9e26a..4bdce2a34 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
@@ -70,7 +70,7 @@ NetworkInterface_d::NetworkInterface_d(int id, int virtual_networks,
for (int i = 0; i < m_num_vcs; i++) {
m_out_vc_state.push_back(new OutVcState_d(i, m_net_ptr));
- m_out_vc_state[i]->setState(IDLE_, g_eventQueue_ptr->getTime());
+ m_out_vc_state[i]->setState(IDLE_, g_system_ptr->getTime());
}
}
@@ -169,11 +169,11 @@ NetworkInterface_d::flitisizeMessage(MsgPtr msg_ptr, int vnet)
for (int i = 0; i < num_flits; i++) {
m_net_ptr->increment_injected_flits(vnet);
flit_d *fl = new flit_d(i, vc, vnet, num_flits, new_msg_ptr);
- fl->set_delay(g_eventQueue_ptr->getTime() - msg_ptr->getTime());
+ fl->set_delay(g_system_ptr->getTime() - msg_ptr->getTime());
m_ni_buffers[vc]->insert(fl);
}
- m_ni_enqueue_time[vc] = g_eventQueue_ptr->getTime();
- m_out_vc_state[vc]->setState(ACTIVE_, g_eventQueue_ptr->getTime());
+ m_ni_enqueue_time[vc] = g_system_ptr->getTime();
+ m_out_vc_state[vc]->setState(ACTIVE_, g_system_ptr->getTime());
}
return true ;
}
@@ -189,7 +189,7 @@ NetworkInterface_d::calculateVC(int vnet)
m_vc_allocator[vnet] = 0;
if (m_out_vc_state[(vnet*m_vc_per_vnet) + delta]->isInState(
- IDLE_, g_eventQueue_ptr->getTime())) {
+ IDLE_, g_system_ptr->getTime())) {
return ((vnet*m_vc_per_vnet) + delta);
}
}
@@ -210,7 +210,7 @@ void
NetworkInterface_d::wakeup()
{
DPRINTF(RubyNetwork, "m_id: %d woke up at time: %lld",
- m_id, g_eventQueue_ptr->getTime());
+ m_id, g_system_ptr->getTime());
MsgPtr msg_ptr;
@@ -245,11 +245,11 @@ NetworkInterface_d::wakeup()
// this flit in the NI
flit_d *credit_flit = new flit_d(t_flit->get_vc(), free_signal);
creditQueue->insert(credit_flit);
- g_eventQueue_ptr->scheduleEvent(m_ni_credit_link, 1);
+ m_ni_credit_link->scheduleEvent(1);
int vnet = t_flit->get_vnet();
m_net_ptr->increment_received_flits(vnet);
- int network_delay = g_eventQueue_ptr->getTime() -
+ int network_delay = g_system_ptr->getTime() -
t_flit->get_enqueue_time();
int queueing_delay = t_flit->get_delay();
m_net_ptr->increment_network_latency(network_delay, vnet);
@@ -264,7 +264,7 @@ NetworkInterface_d::wakeup()
m_out_vc_state[t_flit->get_vc()]->increment_credit();
if (t_flit->is_free_signal()) {
m_out_vc_state[t_flit->get_vc()]->setState(IDLE_,
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
}
delete t_flit;
}
@@ -313,10 +313,10 @@ NetworkInterface_d::scheduleOutputLink()
m_out_vc_state[vc]->decrement_credit();
// Just removing the flit
flit_d *t_flit = m_ni_buffers[vc]->getTopFlit();
- t_flit->set_time(g_eventQueue_ptr->getTime() + 1);
+ t_flit->set_time(g_system_ptr->getTime() + 1);
outSrcQueue->insert(t_flit);
// schedule the out link
- g_eventQueue_ptr->scheduleEvent(outNetLink, 1);
+ outNetLink->scheduleEvent(1);
if (t_flit->get_type() == TAIL_ ||
t_flit->get_type() == HEAD_TAIL_) {
@@ -343,13 +343,13 @@ NetworkInterface_d::checkReschedule()
{
for (int vnet = 0; vnet < m_virtual_networks; vnet++) {
if (inNode_ptr[vnet]->isReady()) { // Is there a message waiting
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
return;
}
}
for (int vc = 0; vc < m_num_vcs; vc++) {
if (m_ni_buffers[vc]->isReadyForNext()) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
return;
}
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc
index cc6ec6abf..ac41263e3 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc
@@ -68,9 +68,9 @@ NetworkLink_d::wakeup()
{
if (link_srcQueue->isReady()) {
flit_d *t_flit = link_srcQueue->getTopFlit();
- t_flit->set_time(g_eventQueue_ptr->getTime() + m_latency);
+ t_flit->set_time(g_system_ptr->getTime() + m_latency);
linkBuffer->insert(t_flit);
- g_eventQueue_ptr->scheduleEvent(link_consumer, m_latency);
+ link_consumer->scheduleEvent(m_latency);
m_link_utilized++;
m_vc_load[t_flit->get_vc()]++;
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc
index 8a83fcca2..5aa60d754 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc
@@ -29,15 +29,15 @@
*/
#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/eventqueue/RubyEventQueue.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh"
+#include "mem/ruby/system/System.hh"
OutVcState_d::OutVcState_d(int id, GarnetNetwork_d *network_ptr)
{
m_network_ptr = network_ptr;
m_id = id;
m_vc_state = IDLE_;
- m_time = g_eventQueue_ptr->getTime();
+ m_time = g_system_ptr->getTime();
if (m_network_ptr->get_vnet_type(id) == DATA_VNET_)
m_credit_count = m_network_ptr->getBuffersPerDataVC();
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.cc
index 159e02731..429ff4d91 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.cc
@@ -101,7 +101,7 @@ OutputUnit_d::set_credit_link(CreditLink_d *credit_link)
void
OutputUnit_d::update_vc(int vc, int in_port, int in_vc)
{
- m_outvc_state[vc]->setState(ACTIVE_, g_eventQueue_ptr->getTime() + 1);
+ m_outvc_state[vc]->setState(ACTIVE_, g_system_ptr->getTime() + 1);
m_outvc_state[vc]->set_inport(in_port);
m_outvc_state[vc]->set_invc(in_vc);
m_router->update_incredit(in_port, in_vc,
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh
index eada61554..750c71b32 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh
@@ -71,21 +71,21 @@ class OutputUnit_d : public Consumer
inline void
set_vc_state(VC_state_type state, int vc)
{
- m_outvc_state[vc]->setState(state, g_eventQueue_ptr->getTime() + 1);
+ m_outvc_state[vc]->setState(state, g_system_ptr->getTime() + 1);
}
inline bool
is_vc_idle(int vc)
{
return (m_outvc_state[vc]->isInState(IDLE_,
- g_eventQueue_ptr->getTime()));
+ g_system_ptr->getTime()));
}
inline void
insert_flit(flit_d *t_flit)
{
m_out_buffer->insert(t_flit);
- g_eventQueue_ptr->scheduleEvent(m_out_link, 1);
+ m_out_link->scheduleEvent(1);
}
private:
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc
index ce36dd753..2a759eb87 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc
@@ -135,13 +135,13 @@ Router_d::route_req(flit_d *t_flit, InputUnit_d *in_unit, int invc)
void
Router_d::vcarb_req()
{
- g_eventQueue_ptr->scheduleEvent(m_vc_alloc, 1);
+ m_vc_alloc->scheduleEvent(1);
}
void
Router_d::swarb_req()
{
- g_eventQueue_ptr->scheduleEvent(m_sw_alloc, 1);
+ m_sw_alloc->scheduleEvent(1);
}
void
@@ -154,7 +154,7 @@ void
Router_d::update_sw_winner(int inport, flit_d *t_flit)
{
m_switch->update_sw_winner(inport, t_flit);
- g_eventQueue_ptr->scheduleEvent(m_switch, 1);
+ m_switch->scheduleEvent(1);
}
void
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
index afed4b205..530e8f1b2 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
@@ -177,7 +177,7 @@ SWallocator_d::arbitrate_outports()
t_flit->advance_stage(ST_);
t_flit->set_vc(outvc);
t_flit->set_outport(outport);
- t_flit->set_time(g_eventQueue_ptr->getTime() + 1);
+ t_flit->set_time(g_system_ptr->getTime() + 1);
m_output_unit[outport]->decrement_credit(outvc);
m_router->update_sw_winner(inport, t_flit);
m_global_arbiter_activity++;
@@ -209,7 +209,7 @@ SWallocator_d::check_for_wakeup()
for (int i = 0; i < m_num_inports; i++) {
for (int j = 0; j < m_num_vcs; j++) {
if (m_input_unit[i]->need_stage_nextcycle(j, ACTIVE_, SA_)) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
return;
}
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
index c656b43cc..12c00d9d0 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
@@ -64,7 +64,7 @@ void
Switch_d::wakeup()
{
DPRINTF(RubyNetwork, "Switch woke up at time: %lld\n",
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
for (int inport = 0; inport < m_num_inports; inport++) {
if (!m_switch_buffer[inport]->isReady())
@@ -73,7 +73,7 @@ Switch_d::wakeup()
if (t_flit->is_stage(ST_)) {
int outport = t_flit->get_outport();
t_flit->advance_stage(LT_);
- t_flit->set_time(g_eventQueue_ptr->getTime() + 1);
+ t_flit->set_time(g_system_ptr->getTime() + 1);
// This will take care of waking up the Network Link
m_output_unit[outport]->insert_flit(t_flit);
@@ -89,7 +89,7 @@ Switch_d::check_for_wakeup()
{
for (int inport = 0; inport < m_num_inports; inport++) {
if (m_switch_buffer[inport]->isReadyForNext()) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
break;
}
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc
index 03eed6ce2..3940e1d6a 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc
@@ -256,7 +256,7 @@ VCallocator_d::check_for_wakeup()
for (int i = 0; i < m_num_inports; i++) {
for (int j = 0; j < m_num_vcs; j++) {
if (m_input_unit[i]->need_stage_nextcycle(j, VC_AB_, VA_)) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
return;
}
}
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc
index a36e58771..96d873009 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.cc
@@ -35,7 +35,7 @@ VirtualChannel_d::VirtualChannel_d(int id)
m_id = id;
m_input_buffer = new flitBuffer_d();
m_vc_state.first = IDLE_;
- m_vc_state.second = g_eventQueue_ptr->getTime();
+ m_vc_state.second = g_system_ptr->getTime();
m_enqueue_time = INFINITE_;
}
@@ -55,7 +55,7 @@ VirtualChannel_d::grant_vc(int out_vc)
{
m_output_vc = out_vc;
m_vc_state.first = ACTIVE_;
- m_vc_state.second = g_eventQueue_ptr->getTime() + 1;
+ m_vc_state.second = g_system_ptr->getTime() + 1;
flit_d *t_flit = m_input_buffer->peekTopFlit();
t_flit->advance_stage(SA_);
}
@@ -64,7 +64,7 @@ bool
VirtualChannel_d::need_stage(VC_state_type state, flit_stage stage)
{
if ((m_vc_state.first == state) &&
- (g_eventQueue_ptr->getTime() >= m_vc_state.second)) {
+ (g_system_ptr->getTime() >= m_vc_state.second)) {
if (m_input_buffer->isReady()) {
flit_d *t_flit = m_input_buffer->peekTopFlit();
return(t_flit->is_stage(stage)) ;
@@ -78,7 +78,7 @@ bool
VirtualChannel_d::need_stage_nextcycle(VC_state_type state, flit_stage stage)
{
if ((m_vc_state.first == state) &&
- ((g_eventQueue_ptr->getTime()+1) >= m_vc_state.second)) {
+ ((g_system_ptr->getTime()+1) >= m_vc_state.second)) {
if (m_input_buffer->isReadyForNext()) {
flit_d *t_flit = m_input_buffer->peekTopFlit();
return(t_flit->is_next_stage(stage)) ;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh
index 3f5c02f84..18553fe2b 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh
@@ -68,7 +68,7 @@ class VirtualChannel_d
set_state(VC_state_type m_state)
{
m_vc_state.first = m_state;
- m_vc_state.second = g_eventQueue_ptr->getTime() + 1;
+ m_vc_state.second = g_system_ptr->getTime() + 1;
}
inline flit_d*
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.cc
index bba917597..2c4f4e09e 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.cc
@@ -51,7 +51,7 @@ flitBuffer_d::isReady()
{
if (m_buffer.size() != 0 ) {
flit_d *t_flit = peekTopFlit();
- if (t_flit->get_time() <= g_eventQueue_ptr->getTime())
+ if (t_flit->get_time() <= g_system_ptr->getTime())
return true;
}
return false;
@@ -62,7 +62,7 @@ flitBuffer_d::isReadyForNext()
{
if (m_buffer.size() != 0 ) {
flit_d *t_flit = peekTopFlit();
- if (t_flit->get_time() <= (g_eventQueue_ptr->getTime() + 1))
+ if (t_flit->get_time() <= (g_system_ptr->getTime() + 1))
return true;
}
return false;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.cc
index 774b1bc62..93364348e 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.cc
@@ -34,8 +34,8 @@ flit_d::flit_d(int id, int vc, int vnet, int size, MsgPtr msg_ptr)
{
m_size = size;
m_msg_ptr = msg_ptr;
- m_enqueue_time = g_eventQueue_ptr->getTime();
- m_time = g_eventQueue_ptr->getTime();
+ m_enqueue_time = g_system_ptr->getTime();
+ m_time = g_system_ptr->getTime();
m_id = id;
m_vnet = vnet;
m_vc = vc;
@@ -59,7 +59,7 @@ flit_d::flit_d(int vc, bool is_free_signal)
m_id = 0;
m_vc = vc;
m_is_free_signal = is_free_signal;
- m_time = g_eventQueue_ptr->getTime();
+ m_time = g_system_ptr->getTime();
}
void
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
index f928e04f6..4295cbf6b 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh
@@ -61,21 +61,21 @@ class flit_d
is_stage(flit_stage t_stage)
{
return (m_stage.first == t_stage &&
- g_eventQueue_ptr->getTime() >= m_stage.second);
+ g_system_ptr->getTime() >= m_stage.second);
}
bool
is_next_stage(flit_stage t_stage)
{
return (m_stage.first == t_stage &&
- (g_eventQueue_ptr->getTime() + 1) >= m_stage.second);
+ (g_system_ptr->getTime() + 1) >= m_stage.second);
}
void
advance_stage(flit_stage t_stage)
{
m_stage.first = t_stage;
- m_stage.second = g_eventQueue_ptr->getTime() + 1;
+ m_stage.second = g_system_ptr->getTime() + 1;
}
std::pair<flit_stage, Time>
get_stage()
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
index a167f5df0..e8aca533a 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
@@ -207,7 +207,7 @@ GarnetNetwork::printLinkStats(ostream& out) const
for (int i = 0; i < m_link_ptr_vector.size(); i++) {
average_link_utilization +=
(double(m_link_ptr_vector[i]->getLinkUtilization())) /
- (double(g_eventQueue_ptr->getTime()-m_ruby_start));
+ (double(g_system_ptr->getTime()-m_ruby_start));
vector<int> vc_load = m_link_ptr_vector[i]->getVcLoad();
for (int j = 0; j < vc_load.size(); j++) {
@@ -226,7 +226,7 @@ GarnetNetwork::printLinkStats(ostream& out) const
continue;
average_vc_load[i] = (double(average_vc_load[i]) /
- (double(g_eventQueue_ptr->getTime()) - m_ruby_start));
+ (double(g_system_ptr->getTime()) - m_ruby_start));
out << "Average VC Load [" << i << "] = " << average_vc_load[i]
<< " flits/cycle " << endl;
}
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
index 73425802b..cc7dd7146 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
@@ -67,7 +67,7 @@ NetworkInterface::NetworkInterface(int id, int virtual_networks,
for (int i = 0; i < m_num_vcs; i++) {
m_out_vc_state.push_back(new OutVcState(i));
- m_out_vc_state[i]->setState(IDLE_, g_eventQueue_ptr->getTime());
+ m_out_vc_state[i]->setState(IDLE_, g_system_ptr->getTime());
}
}
@@ -166,18 +166,18 @@ NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet)
for (int i = 0; i < num_flits; i++) {
m_net_ptr->increment_injected_flits(vnet);
flit *fl = new flit(i, vc, vnet, num_flits, new_msg_ptr);
- fl->set_delay(g_eventQueue_ptr->getTime() - msg_ptr->getTime());
+ fl->set_delay(g_system_ptr->getTime() - msg_ptr->getTime());
m_ni_buffers[vc]->insert(fl);
}
- m_out_vc_state[vc]->setState(VC_AB_, g_eventQueue_ptr->getTime());
+ m_out_vc_state[vc]->setState(VC_AB_, g_system_ptr->getTime());
// setting an output vc request for the next hop.
// This flit will be ready to traverse the link and into the next hop
// only when an output vc is acquired at the next hop
outNetLink->request_vc_link(vc,
new_net_msg_ptr->getInternalDestination(),
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
}
return true ;
@@ -190,7 +190,7 @@ NetworkInterface::grant_vc(int out_port, int vc, Time grant_time)
{
assert(m_out_vc_state[vc]->isInState(VC_AB_, grant_time));
m_out_vc_state[vc]->grant_vc(grant_time);
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
}
// The tail flit corresponding to this vc has been buffered at the next hop
@@ -200,7 +200,7 @@ NetworkInterface::release_vc(int out_port, int vc, Time release_time)
{
assert(m_out_vc_state[vc]->isInState(ACTIVE_, release_time));
m_out_vc_state[vc]->setState(IDLE_, release_time);
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
}
// Looking for a free output vc
@@ -220,7 +220,7 @@ NetworkInterface::calculateVC(int vnet)
m_vc_allocator[vnet] = 0;
if (m_out_vc_state[(vnet*m_vc_per_vnet) + delta]->isInState(IDLE_,
- g_eventQueue_ptr->getTime())) {
+ g_system_ptr->getTime())) {
return ((vnet*m_vc_per_vnet) + delta);
}
}
@@ -264,18 +264,18 @@ NetworkInterface::wakeup()
flit *t_flit = inNetLink->consumeLink();
if (t_flit->get_type() == TAIL_ || t_flit->get_type() == HEAD_TAIL_) {
DPRINTF(RubyNetwork, "m_id: %d, Message delivered at time: %lld\n",
- m_id, g_eventQueue_ptr->getTime());
+ m_id, g_system_ptr->getTime());
outNode_ptr[t_flit->get_vnet()]->enqueue(
t_flit->get_msg_ptr(), 1);
// signal the upstream router that this vc can be freed now
inNetLink->release_vc_link(t_flit->get_vc(),
- g_eventQueue_ptr->getTime() + 1);
+ g_system_ptr->getTime() + 1);
}
int vnet = t_flit->get_vnet();
m_net_ptr->increment_received_flits(vnet);
- int network_delay = g_eventQueue_ptr->getTime() -
+ int network_delay = g_system_ptr->getTime() -
t_flit->get_enqueue_time();
int queueing_delay = t_flit->get_delay();
m_net_ptr->increment_network_latency(network_delay, vnet);
@@ -304,16 +304,16 @@ NetworkInterface::scheduleOutputLink()
vc = 0;
if (m_ni_buffers[vc]->isReady()) {
if (m_out_vc_state[vc]->isInState(ACTIVE_,
- g_eventQueue_ptr->getTime()) &&
+ g_system_ptr->getTime()) &&
outNetLink->isBufferNotFull_link(vc)) { // buffer backpressure
// Just removing the flit
flit *t_flit = m_ni_buffers[vc]->getTopFlit();
- t_flit->set_time(g_eventQueue_ptr->getTime() + 1);
+ t_flit->set_time(g_system_ptr->getTime() + 1);
outSrcQueue->insert(t_flit);
// schedule the out link
- g_eventQueue_ptr->scheduleEvent(outNetLink, 1);
+ outNetLink->scheduleEvent(1);
return;
}
}
@@ -325,13 +325,13 @@ NetworkInterface::checkReschedule()
{
for (int vnet = 0; vnet < m_virtual_networks; vnet++) {
if (inNode_ptr[vnet]->isReady()) { // Is there a message waiting
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
return;
}
}
for (int vc = 0; vc < m_num_vcs; vc++) {
if (m_ni_buffers[vc]->isReadyForNext()) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
return;
}
}
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc
index 7da87e077..fb7c9bd44 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc
@@ -138,9 +138,9 @@ NetworkLink::wakeup()
return;
flit *t_flit = link_srcQueue->getTopFlit();
- t_flit->set_time(g_eventQueue_ptr->getTime() + m_latency);
+ t_flit->set_time(g_system_ptr->getTime() + m_latency);
linkBuffer->insert(t_flit);
- g_eventQueue_ptr->scheduleEvent(link_consumer, m_latency);
+ link_consumer->scheduleEvent(this, m_latency);
m_link_utilized++;
m_vc_load[t_flit->get_vc()]++;
}
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
index 791c0cffc..28e9fc497 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
@@ -72,7 +72,7 @@ Router::addInPort(NetworkLink *in_link)
vector<InVcState *> in_vc_vector;
for (int i = 0; i < m_num_vcs; i++) {
in_vc_vector.push_back(new InVcState(i));
- in_vc_vector[i]->setState(IDLE_, g_eventQueue_ptr->getTime());
+ in_vc_vector[i]->setState(IDLE_, g_system_ptr->getTime());
}
m_in_vc_state.push_back(in_vc_vector);
m_in_link.push_back(in_link);
@@ -112,7 +112,7 @@ Router::addOutPort(NetworkLink *out_link, const NetDest& routing_table_entry,
vector<OutVcState *> out_vc_vector;
for (int i = 0; i < m_num_vcs; i++) {
out_vc_vector.push_back(new OutVcState(i));
- out_vc_vector[i]->setState(IDLE_, g_eventQueue_ptr->getTime());
+ out_vc_vector[i]->setState(IDLE_, g_system_ptr->getTime());
}
m_out_vc_state.push_back(out_vc_vector);
m_link_weights.push_back(link_weight);
@@ -138,9 +138,9 @@ Router::request_vc(int in_vc, int in_port, NetDest destination,
int outport = getRoute(destination);
m_in_vc_state[in_port][in_vc]->setRoute(outport);
m_in_vc_state[in_port][in_vc]->setState(VC_AB_, request_time);
- assert(request_time >= g_eventQueue_ptr->getTime());
- if (request_time > g_eventQueue_ptr->getTime())
- g_eventQueue_ptr->scheduleEventAbsolute(m_vc_arbiter, request_time);
+ assert(request_time >= g_system_ptr->getTime());
+ if (request_time > g_system_ptr->getTime())
+ m_vc_arbiter->scheduleEventAbsolute(request_time);
else
vc_arbitrate();
}
@@ -181,22 +181,22 @@ Router::vc_arbitrate()
InVcState *in_vc_state = m_in_vc_state[inport][invc];
- if (in_vc_state->isInState(VC_AB_, g_eventQueue_ptr->getTime())) {
+ if (in_vc_state->isInState(VC_AB_, g_system_ptr->getTime())) {
int outport = in_vc_state->get_outport();
vector<int> valid_vcs = get_valid_vcs(invc);
for (int valid_vc_iter = 0; valid_vc_iter < valid_vcs.size();
valid_vc_iter++) {
if (m_out_vc_state[outport][valid_vcs[valid_vc_iter]]
- ->isInState(IDLE_, g_eventQueue_ptr->getTime())) {
+ ->isInState(IDLE_, g_system_ptr->getTime())) {
in_vc_state->grant_vc(valid_vcs[valid_vc_iter],
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
m_in_link[inport]->grant_vc_link(invc,
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
m_out_vc_state[outport][valid_vcs[valid_vc_iter]]
- ->setState(VC_AB_, g_eventQueue_ptr->getTime());
+ ->setState(VC_AB_, g_system_ptr->getTime());
break;
}
}
@@ -233,7 +233,7 @@ Router::grant_vc(int out_port, int vc, Time grant_time)
{
assert(m_out_vc_state[out_port][vc]->isInState(VC_AB_, grant_time));
m_out_vc_state[out_port][vc]->grant_vc(grant_time);
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
}
void
@@ -241,7 +241,7 @@ Router::release_vc(int out_port, int vc, Time release_time)
{
assert(m_out_vc_state[out_port][vc]->isInState(ACTIVE_, release_time));
m_out_vc_state[out_port][vc]->setState(IDLE_, release_time);
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
}
// This function calculated the output port for a particular destination.
@@ -271,14 +271,13 @@ Router::routeCompute(flit *m_flit, int inport)
assert(m_net_ptr->getNumPipeStages() >= 1);
// Subtract 1 as 1 cycle will be consumed in scheduling the output link
- m_flit->set_time(g_eventQueue_ptr->getTime() +
+ m_flit->set_time(g_system_ptr->getTime() +
(m_net_ptr->getNumPipeStages() - 1));
m_flit->set_vc(outvc);
m_router_buffers[outport][outvc]->insert(m_flit);
if (m_net_ptr->getNumPipeStages() > 1)
- g_eventQueue_ptr->scheduleEvent(this,
- m_net_ptr->getNumPipeStages() - 1 );
+ scheduleEvent(m_net_ptr->getNumPipeStages() - 1 );
if ((m_flit->get_type() == HEAD_) || (m_flit->get_type() == HEAD_TAIL_)) {
NetworkMessage *nm =
safe_cast<NetworkMessage*>(m_flit->get_msg_ptr().get());
@@ -286,24 +285,24 @@ Router::routeCompute(flit *m_flit, int inport)
if (m_net_ptr->getNumPipeStages() > 1) {
m_out_vc_state[outport][outvc]->setState(VC_AB_,
- g_eventQueue_ptr->getTime() + 1);
+ g_system_ptr->getTime() + 1);
m_out_link[outport]->request_vc_link(outvc, destination,
- g_eventQueue_ptr->getTime() + 1);
+ g_system_ptr->getTime() + 1);
} else {
m_out_vc_state[outport][outvc]->setState(VC_AB_,
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
m_out_link[outport]->request_vc_link(outvc, destination,
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
}
}
if ((m_flit->get_type() == TAIL_) || (m_flit->get_type() == HEAD_TAIL_)) {
m_in_vc_state[inport][invc]->setState(IDLE_,
- g_eventQueue_ptr->getTime() + 1);
+ g_system_ptr->getTime() + 1);
m_in_link[inport]->release_vc_link(invc,
- g_eventQueue_ptr->getTime() + 1);
+ g_system_ptr->getTime() + 1);
}
}
@@ -328,7 +327,7 @@ Router::wakeup()
// checking the incoming link
if (m_in_link[incoming_port]->isReady()) {
DPRINTF(RubyNetwork, "m_id: %d, Time: %lld\n",
- m_id, g_eventQueue_ptr->getTime());
+ m_id, g_system_ptr->getTime());
t_flit = m_in_link[incoming_port]->peekLink();
routeCompute(t_flit, incoming_port);
m_in_link[incoming_port]->consumeLink();
@@ -366,14 +365,14 @@ Router::scheduleOutputLinks()
// models buffer backpressure
if (m_out_vc_state[port][vc_tolookat]->isInState(ACTIVE_,
- g_eventQueue_ptr->getTime()) &&
+ g_system_ptr->getTime()) &&
m_out_link[port]->isBufferNotFull_link(vc_tolookat)) {
flit *t_flit =
m_router_buffers[port][vc_tolookat]->getTopFlit();
- t_flit->set_time(g_eventQueue_ptr->getTime() + 1 );
+ t_flit->set_time(g_system_ptr->getTime() + 1 );
m_out_src_queue[port]->insert(t_flit);
- g_eventQueue_ptr->scheduleEvent(m_out_link[port], 1);
+ m_out_link[port]->scheduleEvent(1);
break; // done for this port
}
}
@@ -395,7 +394,7 @@ Router::checkReschedule()
for (int port = 0; port < m_out_link.size(); port++) {
for (int vc = 0; vc < m_num_vcs; vc++) {
if (m_router_buffers[port][vc]->isReadyForNext()) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
return;
}
}
@@ -408,9 +407,9 @@ Router::check_arbiter_reschedule()
for (int port = 0; port < m_in_link.size(); port++) {
for (int vc = 0; vc < m_num_vcs; vc++) {
if (m_in_vc_state[port][vc]->isInState(VC_AB_,
- g_eventQueue_ptr->getTime() + 1)) {
+ g_system_ptr->getTime() + 1)) {
- g_eventQueue_ptr->scheduleEvent(m_vc_arbiter, 1);
+ m_vc_arbiter->scheduleEvent(1);
return;
}
}
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/flit.cc b/src/mem/ruby/network/garnet/flexible-pipeline/flit.cc
index 2f5944c62..80b93172a 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/flit.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/flit.cc
@@ -34,8 +34,8 @@ flit::flit(int id, int vc, int vnet, int size, MsgPtr msg_ptr)
{
m_size = size;
m_msg_ptr = msg_ptr;
- m_enqueue_time = g_eventQueue_ptr->getTime();
- m_time = g_eventQueue_ptr->getTime();
+ m_enqueue_time = g_system_ptr->getTime();
+ m_time = g_system_ptr->getTime();
m_id = id;
m_vnet = vnet;
m_vc = vc;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.cc b/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.cc
index 2bb297e03..7fed60762 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.cc
@@ -55,7 +55,7 @@ flitBuffer::isReady()
{
if (m_buffer.size() != 0 ) {
flit *t_flit = m_buffer.front();
- if (t_flit->get_time() <= g_eventQueue_ptr->getTime())
+ if (t_flit->get_time() <= g_system_ptr->getTime())
return true;
}
return false;
@@ -66,7 +66,7 @@ flitBuffer::isReadyForNext()
{
if (m_buffer.size() != 0 ) {
flit *t_flit = m_buffer.front();
- if (t_flit->get_time() <= (g_eventQueue_ptr->getTime() + 1))
+ if (t_flit->get_time() <= (g_system_ptr->getTime() + 1))
return true;
}
return false;
diff --git a/src/mem/ruby/network/orion/NetworkPower.cc b/src/mem/ruby/network/orion/NetworkPower.cc
index 7c9634e56..9ac0dd815 100644
--- a/src/mem/ruby/network/orion/NetworkPower.cc
+++ b/src/mem/ruby/network/orion/NetworkPower.cc
@@ -41,7 +41,7 @@ Router_d::calculate_power()
calculate_performance_numbers();
double sim_cycles;
sim_cycles =
- g_eventQueue_ptr->getTime() - m_network_ptr->getRubyStartTime();
+ g_system_ptr->getTime() - m_network_ptr->getRubyStartTime();
// Number of virtual networks/message classes declared in Ruby
// maybe greater than active virtual networks.
@@ -248,7 +248,7 @@ NetworkLink_d::calculate_power()
orion_cfg_ptr);
double sim_cycles =
- (double)(g_eventQueue_ptr->getTime() - m_net_ptr->getRubyStartTime());
+ (double)(g_system_ptr->getTime() - m_net_ptr->getRubyStartTime());
// Dynamic Power
// Assume half the bits flipped on every link activity
diff --git a/src/mem/ruby/network/simple/PerfectSwitch.cc b/src/mem/ruby/network/simple/PerfectSwitch.cc
index 50b2055b5..66065e22c 100644
--- a/src/mem/ruby/network/simple/PerfectSwitch.cc
+++ b/src/mem/ruby/network/simple/PerfectSwitch.cc
@@ -260,7 +260,7 @@ PerfectSwitch::wakeup()
// There were not enough resources
if (!enough) {
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
DPRINTF(RubyNetwork, "Can't deliver message since a node "
"is blocked\n");
DPRINTF(RubyNetwork, "Message: %s\n", (*net_msg_ptr));
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index 7936e71dc..05dfc2553 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -167,7 +167,7 @@ Throttle::wakeup()
DPRINTF(RubyNetwork, "throttle: %d my bw %d bw spent "
"enqueueing net msg %d time: %lld.\n",
m_node, getLinkBandwidth(), m_units_remaining[vnet],
- g_eventQueue_ptr->getTime());
+ g_system_ptr->getTime());
// Move the message
m_out[vnet]->enqueue(m_in[vnet]->peekMsgPtr(), m_link_latency);
@@ -215,7 +215,7 @@ Throttle::wakeup()
// We are out of bandwidth for this cycle, so wakeup next
// cycle and continue
- g_eventQueue_ptr->scheduleEvent(this, 1);
+ scheduleEvent(1);
}
}
@@ -228,7 +228,7 @@ Throttle::printStats(ostream& out) const
void
Throttle::clearStats()
{
- m_ruby_start = g_eventQueue_ptr->getTime();
+ m_ruby_start = g_system_ptr->getTime();
m_links_utilized = 0.0;
for (int i = 0; i < m_message_counters.size(); i++) {
@@ -242,7 +242,7 @@ double
Throttle::getUtilization() const
{
return 100.0 * double(m_links_utilized) /
- double(g_eventQueue_ptr->getTime()-m_ruby_start);
+ double(g_system_ptr->getTime()-m_ruby_start);
}
void