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; --- 250 unchanged lines hidden (view full) --- 259 void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; } 260 void print(std::ostream& out) const; 261 void printConfig(std::ostream& out) const; 262 void wakeup(); 263 void printStats(std::ostream& out) const; 264 void clearStats(); 265 void blockOnQueue(Address addr, MessageBuffer* port); 266 void unblock(Address addr); |
267 void recordCacheTrace(int cntrl, CacheRecorder* tr); 268 Sequencer* getSequencer() const; |
269 270private: 271''') 272 273 code.indent() 274 # added by SS 275 for param in self.config_parameters: 276 if param.pointer: --- 394 unchanged lines hidden (view full) --- 671 if port.code.find("mandatoryQueue_ptr") >= 0: 672 has_mandatory_q = True 673 674 if has_mandatory_q: 675 mq_ident = "m_%s_mandatoryQueue_ptr" % self.ident 676 else: 677 mq_ident = "NULL" 678 |
679 seq_ident = "NULL" 680 for param in self.config_parameters: 681 if param.name == "sequencer": 682 assert(param.pointer) 683 seq_ident = "m_%s_ptr" % param.name 684 |
685 code(''' 686int 687$c_ident::getNumControllers() 688{ 689 return m_num_controllers; 690} 691 692MessageBuffer* 693$c_ident::getMandatoryQueue() const 694{ 695 return $mq_ident; 696} 697 |
698Sequencer* 699$c_ident::getSequencer() const 700{ 701 return $seq_ident; 702} 703 |
704const int & 705$c_ident::getVersion() const 706{ 707 return m_version; 708} 709 710const string 711$c_ident::toString() const --- 172 unchanged lines hidden (view full) --- 884$c_ident::unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr) 885{ 886 m_tbe_ptr = NULL; 887} 888''') 889 890 code(''' 891 |
892void 893$c_ident::recordCacheTrace(int cntrl, CacheRecorder* tr) 894{ 895''') 896 # 897 # Record cache contents for all associated caches. 898 # 899 code.indent() 900 for param in self.config_parameters: 901 if param.type_ast.type.ident == "CacheMemory": 902 assert(param.pointer) 903 code('m_${{param.ident}}_ptr->recordCacheContents(cntrl, tr);') 904 905 code.dedent() 906 code(''' 907} 908 |
909// Actions 910''') 911 if self.TBEType != None and self.EntryType != None: 912 for action in self.actions.itervalues(): 913 if "c_code" not in action: 914 continue 915 916 code(''' --- 751 unchanged lines hidden --- |