NetworkLink.cc (11666:10d59d546ea2) NetworkLink.cc (12071:fd0b4bd769dd)
1/*
2 * Copyright (c) 2008 Princeton University
3 * Copyright (c) 2016 Georgia Institute of Technology
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 61 unchanged lines hidden (view full) ---

70 t_flit->set_time(curCycle() + m_latency);
71 linkBuffer->insert(t_flit);
72 link_consumer->scheduleEventAbsolute(clockEdge(m_latency));
73 m_link_utilized++;
74 m_vc_load[t_flit->get_vc()]++;
75 }
76}
77
1/*
2 * Copyright (c) 2008 Princeton University
3 * Copyright (c) 2016 Georgia Institute of Technology
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 61 unchanged lines hidden (view full) ---

70 t_flit->set_time(curCycle() + m_latency);
71 linkBuffer->insert(t_flit);
72 link_consumer->scheduleEventAbsolute(clockEdge(m_latency));
73 m_link_utilized++;
74 m_vc_load[t_flit->get_vc()]++;
75 }
76}
77
78void
79NetworkLink::resetStats()
80{
81 for (int i = 0; i < m_vc_load.size(); i++) {
82 m_vc_load[i] = 0;
83 }
84
85 m_link_utilized = 0;
86}
87
78NetworkLink *
79NetworkLinkParams::create()
80{
81 return new NetworkLink(this);
82}
83
84CreditLink *
85CreditLinkParams::create()
86{
87 return new CreditLink(this);
88}
89
90uint32_t
91NetworkLink::functionalWrite(Packet *pkt)
92{
93 return linkBuffer->functionalWrite(pkt);
94}
88NetworkLink *
89NetworkLinkParams::create()
90{
91 return new NetworkLink(this);
92}
93
94CreditLink *
95CreditLinkParams::create()
96{
97 return new CreditLink(this);
98}
99
100uint32_t
101NetworkLink::functionalWrite(Packet *pkt)
102{
103 return linkBuffer->functionalWrite(pkt);
104}