diff options
| author | Mahmoud <[email protected]> | 2019-06-27 18:15:28 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2019-06-27 18:15:28 -0400 |
| commit | b40c38d7e4d711b818718ae6e291ce6c108392ec (patch) | |
| tree | 0c4b63f2ba31391c52d0b17c3613087dec3c1744 /src/intersim2 | |
| parent | 44ba06730c4e14681eb285e01930148fdd8fabbb (diff) | |
fixing the booksim id buffer flip assertion
Diffstat (limited to 'src/intersim2')
| -rw-r--r-- | src/intersim2/flit.hpp | 4 | ||||
| -rw-r--r-- | src/intersim2/gputrafficmanager.cpp | 6 | ||||
| -rw-r--r-- | src/intersim2/routers/iq_router.cpp | 2 | ||||
| -rw-r--r-- | src/intersim2/stats.hpp | 3 | ||||
| -rw-r--r-- | src/intersim2/trafficmanager.cpp | 8 | ||||
| -rw-r--r-- | src/intersim2/trafficmanager.hpp | 14 |
6 files changed, 20 insertions, 17 deletions
diff --git a/src/intersim2/flit.hpp b/src/intersim2/flit.hpp index fd48306..1c58c68 100644 --- a/src/intersim2/flit.hpp +++ b/src/intersim2/flit.hpp @@ -57,8 +57,8 @@ public: int itime; int atime; - int id; - int pid; + unsigned long long id; + unsigned long long pid; bool record; diff --git a/src/intersim2/gputrafficmanager.cpp b/src/intersim2/gputrafficmanager.cpp index bf422d6..6897a22 100644 --- a/src/intersim2/gputrafficmanager.cpp +++ b/src/intersim2/gputrafficmanager.cpp @@ -105,7 +105,7 @@ void GPUTrafficManager::_RetireFlit( Flit *f, int dest ) if(f->head) { head = f; } else { - map<int, Flit *>::iterator iter = _retired_packets[f->cl].find(f->pid); + map<unsigned long long, Flit *>::iterator iter = _retired_packets[f->cl].find(f->pid); assert(iter != _retired_packets[f->cl].end()); head = iter->second; _retired_packets[f->cl].erase(iter); @@ -195,8 +195,8 @@ void GPUTrafficManager::_GeneratePacket(int source, int stype, int cl, int time, // Flit::FlitType packet_type = Flit::ANY_TYPE; int size = packet_size; //input size - int pid = _cur_pid++; - assert(_cur_pid); + unsigned long long pid = _cur_pid++; + assert(_cur_pid > 0); int packet_destination = dest; bool record = false; bool watch = gWatchOut && (_packets_to_watch.count(pid) > 0); diff --git a/src/intersim2/routers/iq_router.cpp b/src/intersim2/routers/iq_router.cpp index d97f485..7dffb3a 100644 --- a/src/intersim2/routers/iq_router.cpp +++ b/src/intersim2/routers/iq_router.cpp @@ -306,7 +306,7 @@ bool IQRouter::_ReceiveFlits( ) if(f->watch) { *gWatchOut << GetSimTime() << " | " << FullName() << " | " - << "Received flit " << f->id + << "Received flit " << (unsigned) f->id << " from channel at input " << input << "." << endl; } diff --git a/src/intersim2/stats.hpp b/src/intersim2/stats.hpp index 1aaf013..e186f4d 100644 --- a/src/intersim2/stats.hpp +++ b/src/intersim2/stats.hpp @@ -62,6 +62,9 @@ public: inline void AddSample( int val ) { AddSample( (double)val ); } + inline void AddSample( unsigned long long val ) { + AddSample( (double)val ); + } int GetBin(int b){ return _hist[b];} diff --git a/src/intersim2/trafficmanager.cpp b/src/intersim2/trafficmanager.cpp index 8a015bb..7a20d07 100644 --- a/src/intersim2/trafficmanager.cpp +++ b/src/intersim2/trafficmanager.cpp @@ -679,7 +679,7 @@ void TrafficManager::_RetireFlit( Flit *f, int dest ) if(f->head) { head = f; } else { - map<int, Flit *>::iterator iter = _retired_packets[f->cl].find(f->pid); + map<unsigned long long, Flit *>::iterator iter = _retired_packets[f->cl].find(f->pid); assert(iter != _retired_packets[f->cl].end()); head = iter->second; _retired_packets[f->cl].erase(iter); @@ -1380,7 +1380,7 @@ void TrafficManager::_DisplayRemaining( ostream & os ) const { for(int c = 0; c < _classes; ++c) { - map<int, Flit *>::const_iterator iter; + map<unsigned long long, Flit *>::const_iterator iter; int i; os << "Class " << c << ":" << endl; @@ -1463,7 +1463,7 @@ bool TrafficManager::_SingleSim( ) double latency = (double)_plat_stats[c]->Sum(); double count = (double)_plat_stats[c]->NumSamples(); - map<int, Flit *>::const_iterator iter; + map<unsigned long long, Flit *>::const_iterator iter; for(iter = _total_in_flight_flits[c].begin(); iter != _total_in_flight_flits[c].end(); iter++) { @@ -1568,7 +1568,7 @@ bool TrafficManager::_SingleSim( ) double acc_latency = _plat_stats[c]->Sum(); double acc_count = (double)_plat_stats[c]->NumSamples(); - map<int, Flit *>::const_iterator iter; + map<unsigned long long, Flit *>::const_iterator iter; for(iter = _total_in_flight_flits[c].begin(); iter != _total_in_flight_flits[c].end(); iter++) { diff --git a/src/intersim2/trafficmanager.hpp b/src/intersim2/trafficmanager.hpp index 9694df4..97564ea 100644 --- a/src/intersim2/trafficmanager.hpp +++ b/src/intersim2/trafficmanager.hpp @@ -113,9 +113,9 @@ protected: vector<vector<bool> > _qdrained; vector<vector<list<Flit *> > > _partial_packets; - vector<map<int, Flit *> > _total_in_flight_flits; - vector<map<int, Flit *> > _measured_in_flight_flits; - vector<map<int, Flit *> > _retired_packets; + vector<map<unsigned long long, Flit *> > _total_in_flight_flits; + vector<map<unsigned long long, Flit *> > _measured_in_flight_flits; + vector<map<unsigned long long, Flit *> > _retired_packets; bool _empty_network; bool _hold_switch_for_packet; @@ -229,12 +229,12 @@ protected: vector<double> _warmup_threshold; vector<double> _acc_warmup_threshold; - int _cur_id; - int _cur_pid; + unsigned long long _cur_id; + unsigned long long _cur_pid; int _time; - set<int> _flits_to_watch; - set<int> _packets_to_watch; + set<unsigned long long> _flits_to_watch; + set<unsigned long long> _packets_to_watch; bool _print_csv_results; |
