1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 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; --- 244 unchanged lines hidden (view full) --- 253 void init(); 254 MessageBuffer* getMandatoryQueue() const; 255 const int & getVersion() const; 256 const std::string toString() const; 257 const std::string getName() const; 258 const MachineType getMachineType() const; 259 void stallBuffer(MessageBuffer* buf, Address addr); 260 void wakeUpBuffers(Address addr); |
261 void wakeUpAllBuffers(); |
262 void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; } 263 void print(std::ostream& out) const; 264 void printConfig(std::ostream& out) const; 265 void wakeup(); 266 void printStats(std::ostream& out) const; 267 void clearStats(); 268 void blockOnQueue(Address addr, MessageBuffer* port); 269 void unblock(Address addr); --- 460 unchanged lines hidden (view full) --- 730 (*(m_waiting_buffers[addr]))[in_port_rank]->reanalyzeMessages(addr); 731 } 732 } 733 delete m_waiting_buffers[addr]; 734 m_waiting_buffers.erase(addr); 735} 736 737void |
738$c_ident::wakeUpAllBuffers() 739{ 740 // 741 // Wake up all possible buffers that could be waiting on any message. 742 // 743 744 std::vector<MsgVecType*> wokeUpMsgVecs; 745 746 for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin(); 747 buf_iter != m_waiting_buffers.end(); 748 ++buf_iter) { 749 for (MsgVecType::iterator vec_iter = buf_iter->second->begin(); 750 vec_iter != buf_iter->second->end(); 751 ++vec_iter) { 752 if (*vec_iter != NULL) { 753 (*vec_iter)->reanalyzeAllMessages(); 754 } 755 } 756 wokeUpMsgVecs.push_back(buf_iter->second); 757 } 758 759 for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin(); 760 wb_iter != wokeUpMsgVecs.end(); 761 ++wb_iter) { 762 delete (*wb_iter); 763 } 764 765 m_waiting_buffers.clear(); 766} 767 768void |
769$c_ident::blockOnQueue(Address addr, MessageBuffer* port) 770{ 771 m_is_blocking = true; 772 m_block_map[addr] = port; 773} 774 775void 776$c_ident::unblock(Address addr) --- 846 unchanged lines hidden --- |