pcisim.core.bus
index
../../src/pcisim/core/bus.py

Implements linking lines between widget components.

 
Modules
       
wx

 
Classes
       
__builtin__.object
Port
Bus
exceptions.Exception(exceptions.BaseException)
BusFull
NoSuchDevice
PortBadBits

 
class Bus(Port)
    A one-to-many Port like object.
 
@ATTRIBS
    (list) slots : available slots in the bus
    link : current active slot link
 
 
Method resolution order:
Bus
Port
__builtin__.object

Methods defined here:
__init__(self, bits, slots, name='bus')
@PARAMS
    (int) bits : number of data lines in the bus
    (int) slots : maximun device number
    (str) name : optional bus name
__str__(self)
get_slot(self, slot)
Get a device by slot number.
 
@PARAMS
    (int) slot : slot number
 
@RETURN
    device at that slot
 
@RAISE
    NoSuchDevice if slot number is out of range
 
@NOTES
    Can return (None) if slot is not already assigned.
set_link(self, slot)
Set current active slot link.
 
@PARAMS
    slot : slot number of the device to set
 
@RETURN
    device in that slot
 
@RAISE
    NoSuchDevice if slot number is out of range
 
@NOTES
    Can set and return (None) if slot is not already assigned.
set_slot(self, dev, slot=None)
Set a slot in the bus, assigning a device.
 
@PARAMS
    dev : device to assign the slot to
    | (int) slot : slot number
    | (None) slot : will find an available slot
 
@RETURN
    (int) assigned slot number
 
@RAISE
    BusFull if no slots are available
    NoSuchDevice if slot number is out of range
 
@NOTES
    If given slot number is already used, the previous device is
    replaced with new one.

Methods inherited from Port:
get_bits(self)
Get port bits.
write(self, data)
Write data onto the port.
 
@PARAMS
    | (int) data : data to write
    | (DataWord) data : data to write

Data descriptors inherited from Port:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class BusFull(exceptions.Exception)
    Notifies that a Bus is full.
 
@ATTRIBS
    (Bus) bus : subject Bus
 
 
Method resolution order:
BusFull
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, bus)
@PARAMS
    (Bus) bus : subject Bus
__str__(self)

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class NoSuchDevice(exceptions.Exception)
    Notifies that given device is not being found.
 
@ATTRIBS
    (int) self.devid : identifier for the device
 
 
Method resolution order:
NoSuchDevice
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, devid)
@PARAMS
    (int) self.devid : identifier for the device
__str__(self)

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class Port(__builtin__.object)
    A logical port between two components. Holds a DataWord.
 
@ATTRIBS
    (DataWord) value : value to keep into the port
    (str) name : symbolic name for the port
 
  Methods defined here:
__init__(self, bits, name)
@PARAMS
    (int) bits : bits of the port
    (str) name : symbolic name for the port
__str__(self)
get_bits(self)
Get port bits.
write(self, data)
Write data onto the port.
 
@PARAMS
    | (int) data : data to write
    | (DataWord) data : data to write

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class PortBadBits(exceptions.Exception)
    Notifies Port bits value mismatching.
 
@ATTRIBS
    (Port) port : subject port
    (DataWord) word : subject value
 
 
Method resolution order:
PortBadBits
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, port, word)
@PARAMS
    (Port) port : subject port
    (DataWord) word : subject value
__str__(self)

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
Data
        __all__ = ['Port', 'Bus', 'PortBadBits', 'BusFull', 'NoSuchDevice']