ruby: Fix potential bugs in garnet2.0
authorJieming Yin <jieming.yin@amd.com>
Mon, 21 Nov 2016 20:41:30 +0000 (15:41 -0500)
committerJieming Yin <jieming.yin@amd.com>
Mon, 21 Nov 2016 20:41:30 +0000 (15:41 -0500)
1. Delete unused variable from struct LinkEntry
2. Correct GarnetExtLink and GarnetIntLink inheritance

src/mem/ruby/network/Topology.hh
src/mem/ruby/network/garnet2.0/GarnetLink.cc
src/mem/ruby/network/garnet2.0/GarnetLink.hh

index 1a5f4b19d41825681010b62866bf78852edc48bb..71faf4182fd1ed52b802d27699fb2d706a9fb1a8 100644 (file)
@@ -57,7 +57,6 @@ typedef std::string PortDirection;
 struct LinkEntry
 {
     BasicLink *link;
-    LinkDirection direction;
     PortDirection src_outport_dirn;
     PortDirection dst_inport_dirn;
 };
index ac5386a52b10a2425a5d715ef5c788a36f939cd3..7cf4c6fde69f2b803fd112cbbde21c6dc9afd80b 100644 (file)
@@ -37,7 +37,7 @@
 #include "mem/ruby/network/garnet2.0/NetworkLink.hh"
 
 GarnetIntLink::GarnetIntLink(const Params *p)
-    : BasicLink(p)
+    : BasicIntLink(p)
 {
     // Uni-directional
 
@@ -63,7 +63,7 @@ GarnetIntLinkParams::create()
 }
 
 GarnetExtLink::GarnetExtLink(const Params *p)
-    : BasicLink(p)
+    : BasicExtLink(p)
 {
     // Bi-directional
 
index d7c5829502087befa73e0fb71ba46582242aae18..7311e93795a0cc6e4da3d1b811651652c10ed3cd 100644 (file)
@@ -44,7 +44,7 @@
 #include "params/GarnetExtLink.hh"
 #include "params/GarnetIntLink.hh"
 
-class GarnetIntLink : public BasicLink
+class GarnetIntLink : public BasicIntLink
 {
   public:
     typedef GarnetIntLinkParams Params;
@@ -69,7 +69,7 @@ operator<<(std::ostream& out, const GarnetIntLink& obj)
     return out;
 }
 
-class GarnetExtLink : public BasicLink
+class GarnetExtLink : public BasicExtLink
 {
   public:
     typedef GarnetExtLinkParams Params;