summaryrefslogtreecommitdiff
path: root/src/intersim2
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2017-07-19 12:04:54 -0400
committerMahmoud <[email protected]>2017-07-19 12:04:54 -0400
commit48ee58907ca5f7195baa8ef7f82e3ff41440cb15 (patch)
treebb19794db7a67d2d730b7ad7d5d1d3b4ee1ef79d /src/intersim2
parentb664037b0b06ee30a5070d1a440c3d48420f0c4d (diff)
Adding some interconnection traces
Diffstat (limited to 'src/intersim2')
-rw-r--r--src/intersim2/Makefile2
-rw-r--r--src/intersim2/interconnect_interface.cpp14
2 files changed, 5 insertions, 11 deletions
diff --git a/src/intersim2/Makefile b/src/intersim2/Makefile
index ef948d6..4c7d8cc 100644
--- a/src/intersim2/Makefile
+++ b/src/intersim2/Makefile
@@ -36,7 +36,7 @@ DEBUG ?= 0
LEX = flex
YACC = bison -y
DEFINE = #-DTRACK_STALLS -DTRACK_BUFFERS -DTRACK_FLOWS -DTRACK_CREDITS
-INCPATH = -I. -Iarbiters -Iallocators -Irouters -Inetworks -Ipower
+INCPATH = -I. -Iarbiters -Iallocators -Irouters -Inetworks -Ipower -I$(GPGPUSIM_ROOT)/src
ifeq ($(CREATE_LIBRARY),1)
INCPATH += -I$(GPGPUSIM_ROOT)/src/gpgpu-sim/
diff --git a/src/intersim2/interconnect_interface.cpp b/src/intersim2/interconnect_interface.cpp
index b397aad..1e1a2d7 100644
--- a/src/intersim2/interconnect_interface.cpp
+++ b/src/intersim2/interconnect_interface.cpp
@@ -44,6 +44,7 @@
#include "booksim.hpp"
#include "intersim_config.hpp"
#include "network.hpp"
+#include "trace.h"
InterconnectInterface* InterconnectInterface::New(const char* const config_file)
{
@@ -146,16 +147,9 @@ void InterconnectInterface::Init()
void InterconnectInterface::Push(unsigned input_deviceID, unsigned output_deviceID, void *data, unsigned int size)
{
// it should have free buffer
- bool hasBuffer = HasBuffer(input_deviceID, size);
-#if 0
- if(!hasBuffer)
- {
- cout<<"No free buffer for input_deviceID: "<<input_deviceID;
- cout<<", output_deviceID: "<<output_deviceID;
- cout<<", size: "<<size<<endl;
- }
-#endif
- assert(hasBuffer);
+ assert(HasBuffer(input_deviceID, size));
+
+ DPRINTF(INTERCONNECT, "Sent %d bytes from %d to %d", size, input_deviceID, output_deviceID);
int output_icntID = _node_map[output_deviceID];
int input_icntID = _node_map[input_deviceID];