StateMachine.py (8651:c3d878fbdaea) | StateMachine.py (8683:9feb100066e1) |
---|---|
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); | 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; |
|
267 268private: 269''') 270 271 code.indent() 272 # added by SS 273 for param in self.config_parameters: 274 if param.pointer: --- 394 unchanged lines hidden (view full) --- 669 if port.code.find("mandatoryQueue_ptr") >= 0: 670 has_mandatory_q = True 671 672 if has_mandatory_q: 673 mq_ident = "m_%s_mandatoryQueue_ptr" % self.ident 674 else: 675 mq_ident = "NULL" 676 | 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 |
|
677 code(''' 678int 679$c_ident::getNumControllers() 680{ 681 return m_num_controllers; 682} 683 684MessageBuffer* 685$c_ident::getMandatoryQueue() const 686{ 687 return $mq_ident; 688} 689 | 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 |
|
690const int & 691$c_ident::getVersion() const 692{ 693 return m_version; 694} 695 696const string 697$c_ident::toString() const --- 172 unchanged lines hidden (view full) --- 870$c_ident::unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr) 871{ 872 m_tbe_ptr = NULL; 873} 874''') 875 876 code(''' 877 | 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 |
|
878// Actions 879''') 880 if self.TBEType != None and self.EntryType != None: 881 for action in self.actions.itervalues(): 882 if "c_code" not in action: 883 continue 884 885 code(''' --- 751 unchanged lines hidden --- | 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 --- |