MessageBuffer.cc (11036:3de670f298b1) MessageBuffer.cc (11049:dfb0aa3f0649)
1/*
2 * Copyright (c) 1999-2008 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;

--- 348 unchanged lines hidden (view full) ---

357
358bool
359MessageBuffer::isReady() const
360{
361 return ((m_prio_heap.size() > 0) &&
362 (m_prio_heap.front()->getLastEnqueueTime() <= m_receiver->clockEdge()));
363}
364
1/*
2 * Copyright (c) 1999-2008 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;

--- 348 unchanged lines hidden (view full) ---

357
358bool
359MessageBuffer::isReady() const
360{
361 return ((m_prio_heap.size() > 0) &&
362 (m_prio_heap.front()->getLastEnqueueTime() <= m_receiver->clockEdge()));
363}
364
365bool
366MessageBuffer::functionalRead(Packet *pkt)
367{
368 // Check the priority heap and read any messages that may
369 // correspond to the address in the packet.
370 for (unsigned int i = 0; i < m_prio_heap.size(); ++i) {
371 Message *msg = m_prio_heap[i].get();
372 if (msg->functionalRead(pkt)) return true;
373 }
374
375 // Read the messages in the stall queue that correspond
376 // to the address in the packet.
377 for (StallMsgMapType::iterator map_iter = m_stall_msg_map.begin();
378 map_iter != m_stall_msg_map.end();
379 ++map_iter) {
380
381 for (std::list<MsgPtr>::iterator it = (map_iter->second).begin();
382 it != (map_iter->second).end(); ++it) {
383
384 Message *msg = (*it).get();
385 if (msg->functionalRead(pkt)) return true;
386 }
387 }
388 return false;
389}
390
365uint32_t
366MessageBuffer::functionalWrite(Packet *pkt)
367{
368 uint32_t num_functional_writes = 0;
369
370 // Check the priority heap and write any messages that may
371 // correspond to the address in the packet.
372 for (unsigned int i = 0; i < m_prio_heap.size(); ++i) {

--- 30 unchanged lines hidden ---
391uint32_t
392MessageBuffer::functionalWrite(Packet *pkt)
393{
394 uint32_t num_functional_writes = 0;
395
396 // Check the priority heap and write any messages that may
397 // correspond to the address in the packet.
398 for (unsigned int i = 0; i < m_prio_heap.size(); ++i) {

--- 30 unchanged lines hidden ---