params.py (8664:42052d5bb793) params.py (8714:cd48e2802644)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# Copyright (c) 2010-2011 Advanced Micro Devices, Inc.
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;

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

1483
1484 def ccConnect(self):
1485 [el.ccConnect() for el in self.elements]
1486
1487# Port description object. Like a ParamDesc object, this represents a
1488# logical port in the SimObject class, not a particular port on a
1489# SimObject instance. The latter are represented by PortRef objects.
1490class Port(object):
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# Copyright (c) 2010-2011 Advanced Micro Devices, Inc.
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;

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

1483
1484 def ccConnect(self):
1485 [el.ccConnect() for el in self.elements]
1486
1487# Port description object. Like a ParamDesc object, this represents a
1488# logical port in the SimObject class, not a particular port on a
1489# SimObject instance. The latter are represented by PortRef objects.
1490class Port(object):
1491 # Port("description") or Port(default, "description")
1491 # Port("description")
1492 def __init__(self, *args):
1493 if len(args) == 1:
1494 self.desc = args[0]
1492 def __init__(self, *args):
1493 if len(args) == 1:
1494 self.desc = args[0]
1495 elif len(args) == 2:
1496 self.default = args[0]
1497 self.desc = args[1]
1498 else:
1499 raise TypeError, 'wrong number of arguments'
1500 # self.name is set by SimObject class on assignment
1501 # e.g., pio_port = Port("blah") sets self.name to 'pio_port'
1502
1503 # Generate a PortRef for this port on the given SimObject with the
1504 # given name
1505 def makeRef(self, simobj):

--- 52 unchanged lines hidden ---
1495 else:
1496 raise TypeError, 'wrong number of arguments'
1497 # self.name is set by SimObject class on assignment
1498 # e.g., pio_port = Port("blah") sets self.name to 'pio_port'
1499
1500 # Generate a PortRef for this port on the given SimObject with the
1501 # given name
1502 def makeRef(self, simobj):

--- 52 unchanged lines hidden ---