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; --- 18 unchanged lines hidden (view full) --- 27 28from m5.util import orderdict 29 30from slicc.symbols.Symbol import Symbol 31from slicc.symbols.Var import Var 32import slicc.generate.html as html 33import re 34 |
35python_class_map = { 36 "int": "Int", |
37 "uint32_t" : "UInt32", 38 "std::string": "String", 39 "bool": "Bool", 40 "CacheMemory": "RubyCache", 41 "WireBuffer": "RubyWireBuffer", 42 "Sequencer": "RubySequencer", 43 "DirectoryMemory": "RubyDirectoryMemory", 44 "MemoryControl": "MemoryControl", 45 "DMASequencer": "DMASequencer", |
46 "Prefetcher":"Prefetcher", 47 "Cycles":"Cycles", 48 } |
49 50class StateMachine(Symbol): 51 def __init__(self, symtab, ident, location, pairs, config_parameters): 52 super(StateMachine, self).__init__(symtab, ident, location, pairs) 53 self.table = None 54 self.config_parameters = config_parameters 55 self.prefetchers = [] 56 --- 569 unchanged lines hidden (view full) --- 626 # set description (may be overriden later by port def) 627 code(''' 628$vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{var.c_ident}}]"); 629 630''') 631 632 if vtype.isBuffer: 633 if "recycle_latency" in var: |
634 code('$vid->setRecycleLatency( ' \ 635 'Cycles(${{var["recycle_latency"]}}));') |
636 else: 637 code('$vid->setRecycleLatency(m_recycle_latency);') 638 639 # Set the prefetchers 640 code() 641 for prefetcher in self.prefetchers: 642 code('${{prefetcher.code}}.setController(this);') 643 --- 409 unchanged lines hidden (view full) --- 1053 while (true) { 1054 // Some cases will put us into an infinite loop without this limit 1055 assert(counter <= m_transitions_per_cycle); 1056 if (counter == m_transitions_per_cycle) { 1057 // Count how often we are fully utilized 1058 m_fully_busy_cycles++; 1059 1060 // Wakeup in another cycle and try again |
1061 scheduleEvent(Cycles(1)); |
1062 break; 1063 } 1064''') 1065 1066 code.indent() 1067 code.indent() 1068 1069 # InPorts --- 656 unchanged lines hidden --- |