AbstractController.cc (10783:631e736554c9) | AbstractController.cc (10837:ecbab2522757) |
---|---|
1/* 2 * Copyright (c) 2011-2014 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 26 unchanged lines hidden (view full) --- 35AbstractController::AbstractController(const Params *p) 36 : MemObject(p), Consumer(this), m_version(p->version), 37 m_clusterID(p->cluster_id), 38 m_masterId(p->system->getMasterId(name())), m_is_blocking(false), 39 m_number_of_TBEs(p->number_of_TBEs), 40 m_transitions_per_cycle(p->transitions_per_cycle), 41 m_buffer_size(p->buffer_size), m_recycle_latency(p->recycle_latency), 42 memoryPort(csprintf("%s.memory", name()), this, ""), | 1/* 2 * Copyright (c) 2011-2014 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 26 unchanged lines hidden (view full) --- 35AbstractController::AbstractController(const Params *p) 36 : MemObject(p), Consumer(this), m_version(p->version), 37 m_clusterID(p->cluster_id), 38 m_masterId(p->system->getMasterId(name())), m_is_blocking(false), 39 m_number_of_TBEs(p->number_of_TBEs), 40 m_transitions_per_cycle(p->transitions_per_cycle), 41 m_buffer_size(p->buffer_size), m_recycle_latency(p->recycle_latency), 42 memoryPort(csprintf("%s.memory", name()), this, ""), |
43 m_responseFromMemory_ptr(new MessageBuffer()), 44 m_rubySystem(p->ruby_system) | 43 m_responseFromMemory_ptr(new MessageBuffer()) |
45{ 46 // Set the sender pointer of the response message buffer from the 47 // memory controller. 48 // This pointer is used for querying for the current time. 49 m_responseFromMemory_ptr->setSender(this); 50 m_responseFromMemory_ptr->setReceiver(this); 51 m_responseFromMemory_ptr->setOrdering(false); 52 --- 161 unchanged lines hidden (view full) --- 214 PacketPtr pkt = Packet::createRead(req); 215 uint8_t *newData = new uint8_t[RubySystem::getBlockSizeBytes()]; 216 pkt->dataDynamic(newData); 217 218 SenderState *s = new SenderState(id); 219 pkt->pushSenderState(s); 220 221 // Use functional rather than timing accesses during warmup | 44{ 45 // Set the sender pointer of the response message buffer from the 46 // memory controller. 47 // This pointer is used for querying for the current time. 48 m_responseFromMemory_ptr->setSender(this); 49 m_responseFromMemory_ptr->setReceiver(this); 50 m_responseFromMemory_ptr->setOrdering(false); 51 --- 161 unchanged lines hidden (view full) --- 213 PacketPtr pkt = Packet::createRead(req); 214 uint8_t *newData = new uint8_t[RubySystem::getBlockSizeBytes()]; 215 pkt->dataDynamic(newData); 216 217 SenderState *s = new SenderState(id); 218 pkt->pushSenderState(s); 219 220 // Use functional rather than timing accesses during warmup |
222 if (m_rubySystem->m_warmup_enabled) { | 221 if (RubySystem::getWarmupEnabled()) { |
223 memoryPort.sendFunctional(pkt); 224 recvTimingResp(pkt); 225 return; 226 } 227 228 memoryPort.schedTimingReq(pkt, clockEdge(latency)); 229} 230 --- 10 unchanged lines hidden (view full) --- 241 pkt->dataDynamic(newData); 242 memcpy(newData, block.getData(0, RubySystem::getBlockSizeBytes()), 243 RubySystem::getBlockSizeBytes()); 244 245 SenderState *s = new SenderState(id); 246 pkt->pushSenderState(s); 247 248 // Use functional rather than timing accesses during warmup | 222 memoryPort.sendFunctional(pkt); 223 recvTimingResp(pkt); 224 return; 225 } 226 227 memoryPort.schedTimingReq(pkt, clockEdge(latency)); 228} 229 --- 10 unchanged lines hidden (view full) --- 240 pkt->dataDynamic(newData); 241 memcpy(newData, block.getData(0, RubySystem::getBlockSizeBytes()), 242 RubySystem::getBlockSizeBytes()); 243 244 SenderState *s = new SenderState(id); 245 pkt->pushSenderState(s); 246 247 // Use functional rather than timing accesses during warmup |
249 if (m_rubySystem->m_warmup_enabled) { | 248 if (RubySystem::getWarmupEnabled()) { |
250 memoryPort.sendFunctional(pkt); 251 recvTimingResp(pkt); 252 return; 253 } 254 255 // Create a block and copy data from the block. 256 memoryPort.schedTimingReq(pkt, clockEdge(latency)); 257} --- 93 unchanged lines hidden --- | 249 memoryPort.sendFunctional(pkt); 250 recvTimingResp(pkt); 251 return; 252 } 253 254 // Create a block and copy data from the block. 255 memoryPort.schedTimingReq(pkt, clockEdge(latency)); 256} --- 93 unchanged lines hidden --- |