summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/local_interconnect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgpu-sim/local_interconnect.cc')
-rw-r--r--src/gpgpu-sim/local_interconnect.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gpgpu-sim/local_interconnect.cc b/src/gpgpu-sim/local_interconnect.cc
index ce4415c..93689c7 100644
--- a/src/gpgpu-sim/local_interconnect.cc
+++ b/src/gpgpu-sim/local_interconnect.cc
@@ -116,10 +116,24 @@ void xbar_router::Advance() {
RR_Advance();
else if (arbit_type == iSLIP)
iSLIP_Advance();
+ else if (arbit_type == PERFECT)
+ Perfect_Advance();
else
assert(0);
}
+void xbar_router::Perfect_Advance() {
+ for (unsigned node_id = 0; node_id < total_nodes; node_id++) {
+ if (!in_buffers[node_id].empty()) {
+ Packet _packet = in_buffers[node_id].front();
+ if (Has_Buffer_Out(_packet.output_deviceID, 1)) {
+ out_buffers[_packet.output_deviceID].push(_packet);
+ in_buffers[node_id].pop();
+ }
+ }
+ }
+};
+
void xbar_router::RR_Advance() {
bool active = false;
vector<bool> issued(total_nodes, false);
@@ -433,4 +447,4 @@ unsigned LocalInterconnect::GetFlitSize() const { return LOCAL_INCT_FLIT_SIZE; }
void LocalInterconnect::DisplayState(FILE* fp) const {
fprintf(fp, "GPGPU-Sim uArch: ICNT:Display State: Under implementation\n");
-}
+} \ No newline at end of file