Sequencer.cc (6893:9cdf9b65d946) | Sequencer.cc (6899:f8057af86bf7) |
---|---|
1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 27 unchanged lines hidden (view full) --- 36#include "mem/ruby/system/CacheMemory.hh" 37#include "mem/protocol/CacheMsg.hh" 38#include "mem/ruby/recorder/Tracer.hh" 39#include "mem/ruby/common/SubBlock.hh" 40#include "mem/protocol/Protocol.hh" 41#include "mem/gems_common/Map.hh" 42#include "mem/ruby/buffers/MessageBuffer.hh" 43#include "mem/ruby/slicc_interface/AbstractController.hh" | 1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 27 unchanged lines hidden (view full) --- 36#include "mem/ruby/system/CacheMemory.hh" 37#include "mem/protocol/CacheMsg.hh" 38#include "mem/ruby/recorder/Tracer.hh" 39#include "mem/ruby/common/SubBlock.hh" 40#include "mem/protocol/Protocol.hh" 41#include "mem/gems_common/Map.hh" 42#include "mem/ruby/buffers/MessageBuffer.hh" 43#include "mem/ruby/slicc_interface/AbstractController.hh" |
44#include "cpu/rubytest/RubyTester.hh" |
|
44 45#include "params/RubySequencer.hh" 46 47//Sequencer::Sequencer(int core_id, MessageBuffer* mandatory_q) 48 49#define LLSC_FAIL -2 50long int already = 0; 51 --- 17 unchanged lines hidden (view full) --- 69 m_deadlock_threshold = 0; 70 m_instCache_ptr = NULL; 71 m_dataCache_ptr = NULL; 72 73 m_instCache_ptr = p->icache; 74 m_dataCache_ptr = p->dcache; 75 m_max_outstanding_requests = p->max_outstanding_requests; 76 m_deadlock_threshold = p->deadlock_threshold; | 45 46#include "params/RubySequencer.hh" 47 48//Sequencer::Sequencer(int core_id, MessageBuffer* mandatory_q) 49 50#define LLSC_FAIL -2 51long int already = 0; 52 --- 17 unchanged lines hidden (view full) --- 70 m_deadlock_threshold = 0; 71 m_instCache_ptr = NULL; 72 m_dataCache_ptr = NULL; 73 74 m_instCache_ptr = p->icache; 75 m_dataCache_ptr = p->dcache; 76 m_max_outstanding_requests = p->max_outstanding_requests; 77 m_deadlock_threshold = p->deadlock_threshold; |
77 | 78 m_usingRubyTester = p->using_ruby_tester; 79 |
78 assert(m_max_outstanding_requests > 0); 79 assert(m_deadlock_threshold > 0); 80 assert(m_instCache_ptr != NULL); 81 assert(m_dataCache_ptr != NULL); 82} 83 84Sequencer::~Sequencer() { 85 --- 253 unchanged lines hidden (view full) --- 339 (type == RubyRequestType_IFETCH) || 340 (type == RubyRequestType_RMW_Read)) { 341 memcpy(ruby_request.data, data.getData(request_address.getOffset(), ruby_request.len), ruby_request.len); 342 } else { 343 data.setData(ruby_request.data, request_address.getOffset(), ruby_request.len); 344 } 345 } 346 | 80 assert(m_max_outstanding_requests > 0); 81 assert(m_deadlock_threshold > 0); 82 assert(m_instCache_ptr != NULL); 83 assert(m_dataCache_ptr != NULL); 84} 85 86Sequencer::~Sequencer() { 87 --- 253 unchanged lines hidden (view full) --- 341 (type == RubyRequestType_IFETCH) || 342 (type == RubyRequestType_RMW_Read)) { 343 memcpy(ruby_request.data, data.getData(request_address.getOffset(), ruby_request.len), ruby_request.len); 344 } else { 345 data.setData(ruby_request.data, request_address.getOffset(), ruby_request.len); 346 } 347 } 348 |
349 // 350 // If using the RubyTester, update the RubyTester sender state's subBlock 351 // with the recieved data. The tester will later access this state. 352 // Note: RubyPort will access it's sender state before the RubyTester. 353 // 354 if (m_usingRubyTester) { 355 // 356 // Since the hit callback func only takes a request id, we must iterate 357 // through the requests and update the packet's subBlock here. 358 // All this would be fixed if we could attach a M5 pkt pointer to the 359 // ruby request, however that change will break the libruby interface so 360 // we'll hold off on that for now. 361 // 362 RequestMap::iterator i = pending_cpu_requests.find(srequest->id); 363 if (i == pending_cpu_requests.end()) 364 panic("could not find pending request %d\n", srequest->id); 365 RequestCookie *cookie = i->second; 366 Packet *pkt = cookie->pkt; 367 368 RubyTester::SenderState* testerSenderState; 369 testerSenderState = safe_cast<RubyTester::SenderState*>(pkt->senderState); 370 testerSenderState->subBlock->mergeFrom(data); 371 } 372 |
|
347 m_hit_callback(srequest->id); 348 delete srequest; 349} 350 351// Returns true if the sequencer already has a load or store outstanding 352int Sequencer::isReady(const RubyRequest& request) { 353 bool is_outstanding_store = m_writeRequestTable.exist(line_address(Address(request.paddr))); 354 bool is_outstanding_load = m_readRequestTable.exist(line_address(Address(request.paddr))); --- 161 unchanged lines hidden --- | 373 m_hit_callback(srequest->id); 374 delete srequest; 375} 376 377// Returns true if the sequencer already has a load or store outstanding 378int Sequencer::isReady(const RubyRequest& request) { 379 bool is_outstanding_store = m_writeRequestTable.exist(line_address(Address(request.paddr))); 380 bool is_outstanding_load = m_readRequestTable.exist(line_address(Address(request.paddr))); --- 161 unchanged lines hidden --- |