Deleted Added
sdiff udiff text old ( 8187:99428f716e7b ) new ( 8189:d5ad24eb015f )
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;

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

25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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
33
34python_class_map = {"int": "Int",
35 "std::string": "String",
36 "bool": "Bool",
37 "CacheMemory": "RubyCache",
38 "Sequencer": "RubySequencer",
39 "DirectoryMemory": "RubyDirectoryMemory",
40 "MemoryControl": "RubyMemoryControl",

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

468 code.indent()
469
470 #
471 # After initializing the universal machine parameters, initialize the
472 # this machines config parameters. Also detemine if these configuration
473 # params include a sequencer. This information will be used later for
474 # contecting the sequencer back to the L1 cache controller.
475 #
476 contains_sequencer = False
477 for param in self.config_parameters:
478 if param.name == "sequencer" or param.name == "dma_sequencer":
479 contains_sequencer = True
480 if param.pointer:
481 code('m_${{param.name}}_ptr = p->${{param.name}};')
482 else:
483 code('m_${{param.name}} = p->${{param.name}};')
484
485 #
486 # For the l1 cache controller, add the special atomic support which
487 # includes passing the sequencer a pointer to the controller.
488 #
489 if self.ident == "L1Cache":
490 if not contains_sequencer:
491 self.error("The L1Cache controller must include the sequencer " \
492 "configuration parameter")
493
494 code('''
495m_sequencer_ptr->setController(this);
496''')
497 #
498 # For the DMA controller, pass the sequencer a pointer to the
499 # controller.
500 #
501 if self.ident == "DMA":
502 if not contains_sequencer:
503 self.error("The DMA controller must include the sequencer " \
504 "configuration parameter")
505
506 code('''
507m_dma_sequencer_ptr->setController(this);
508''')
509
510 code('m_num_controllers++;')

--- 1129 unchanged lines hidden ---