Deleted Added
sdiff udiff text old ( 9496:28d88a0fda74 ) new ( 9499:b03b556a8fbb )
full compact
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 = {"int": "Int",
36 "uint32_t" : "UInt32",
37 "std::string": "String",
38 "bool": "Bool",
39 "CacheMemory": "RubyCache",
40 "WireBuffer": "RubyWireBuffer",
41 "Sequencer": "RubySequencer",
42 "DirectoryMemory": "RubyDirectoryMemory",
43 "MemoryControl": "MemoryControl",
44 "DMASequencer": "DMASequencer",
45 "Prefetcher":"Prefetcher"
46 }
47
48class StateMachine(Symbol):
49 def __init__(self, symtab, ident, location, pairs, config_parameters):
50 super(StateMachine, self).__init__(symtab, ident, location, pairs)
51 self.table = None
52 self.config_parameters = config_parameters
53 self.prefetchers = []
54

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

624 # set description (may be overriden later by port def)
625 code('''
626$vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{var.c_ident}}]");
627
628''')
629
630 if vtype.isBuffer:
631 if "recycle_latency" in var:
632 code('$vid->setRecycleLatency(${{var["recycle_latency"]}});')
633 else:
634 code('$vid->setRecycleLatency(m_recycle_latency);')
635
636 # Set the prefetchers
637 code()
638 for prefetcher in self.prefetchers:
639 code('${{prefetcher.code}}.setController(this);')
640

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

1050 while (true) {
1051 // Some cases will put us into an infinite loop without this limit
1052 assert(counter <= m_transitions_per_cycle);
1053 if (counter == m_transitions_per_cycle) {
1054 // Count how often we are fully utilized
1055 m_fully_busy_cycles++;
1056
1057 // Wakeup in another cycle and try again
1058 scheduleEvent(1);
1059 break;
1060 }
1061''')
1062
1063 code.indent()
1064 code.indent()
1065
1066 # InPorts

--- 656 unchanged lines hidden ---