diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-03-20 09:14:14 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-03-20 09:14:14 -0500 |
commit | 4b67ada89e2e47b26ad07562774ff65beb5633a5 (patch) | |
tree | a93e52d39595313eec559d9c4d9b164f76418706 /src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh | |
parent | 4f7ef51efba1c1688eadc14f628a1411512b235e (diff) | |
download | gem5-4b67ada89e2e47b26ad07562774ff65beb5633a5.tar.xz |
ruby: garnet: convert network interfaces into clocked objects
This helps in configuring the network interfaces from the python script and
these objects no longer rely on the network object for the timing information.
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh')
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh index e064b8650..0b8b9f12f 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh @@ -41,19 +41,21 @@ #include "mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh" #include "mem/ruby/network/garnet/NetworkHeader.hh" #include "mem/ruby/slicc_interface/Message.hh" +#include "params/GarnetNetworkInterface_d.hh" class NetworkMessage; class MessageBuffer; class flitBuffer_d; -class NetworkInterface_d : public Consumer +class NetworkInterface_d : public ClockedObject, public Consumer { public: - NetworkInterface_d(int id, int virtual_networks, - GarnetNetwork_d* network_ptr); - + typedef GarnetNetworkInterface_dParams Params; + NetworkInterface_d(const Params *p); ~NetworkInterface_d(); + void init(); + void addInPort(NetworkLink_d *in_link, CreditLink_d *credit_link); void addOutPort(NetworkLink_d *out_link, CreditLink_d *credit_link); @@ -62,6 +64,7 @@ class NetworkInterface_d : public Consumer std::vector<MessageBuffer *> &outNode); void print(std::ostream& out) const; int get_vnet(int vc); + void init_net_ptr(GarnetNetwork_d *net_ptr) { m_net_ptr = net_ptr; } uint32_t functionalWrite(Packet *); |