From 86a344a721b3215da894794675bd709da79e44db Mon Sep 17 00:00:00 2001 From: Mahmoud Date: Tue, 18 Jul 2017 16:56:08 -0400 Subject: Free buffer interconnection assertion --- src/intersim2/interconnect_interface.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/intersim2') diff --git a/src/intersim2/interconnect_interface.cpp b/src/intersim2/interconnect_interface.cpp index 4386821..456b757 100644 --- a/src/intersim2/interconnect_interface.cpp +++ b/src/intersim2/interconnect_interface.cpp @@ -146,7 +146,16 @@ void InterconnectInterface::Init() void InterconnectInterface::Push(unsigned input_deviceID, unsigned output_deviceID, void *data, unsigned int size) { // it should have free buffer - assert(HasBuffer(input_deviceID, size)); + bool hasBuffer = HasBuffer(input_deviceID, size); +#if 0 + if(!hasBuffer) + { + cout<<"No free buffer for input_deviceID: "< Date: Tue, 18 Jul 2017 17:35:20 -0400 Subject: Interconnection assertion failing demysstifying --- src/intersim2/interconnect_interface.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/intersim2') diff --git a/src/intersim2/interconnect_interface.cpp b/src/intersim2/interconnect_interface.cpp index 456b757..b397aad 100644 --- a/src/intersim2/interconnect_interface.cpp +++ b/src/intersim2/interconnect_interface.cpp @@ -187,7 +187,11 @@ void InterconnectInterface::Push(unsigned input_deviceID, unsigned output_device case WRITE_REQUEST: packet_type = Flit::WRITE_REQUEST ;break; case READ_REPLY: packet_type = Flit::READ_REPLY ;break; case WRITE_ACK: packet_type = Flit::WRITE_REPLY ;break; - default: assert (0); + default: + { + cout<<"Type "<get_type()<<" is undefined!"< Date: Wed, 19 Jul 2017 12:04:54 -0400 Subject: Adding some interconnection traces --- src/intersim2/Makefile | 2 +- src/intersim2/interconnect_interface.cpp | 14 ++++---------- src/trace_streams.tup | 1 + 3 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src/intersim2') 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: "<