pcisim.data.action_discover
index
../../src/pcisim/data/action_discover.py

Implements device discovering steps.

 
Classes
       
pcisim.core.simuaction.SimuAction(pcisim.lib.action.Action)
Action_Discover_Devices

 
class Action_Discover_Devices(pcisim.core.simuaction.SimuAction)
    A sequence of steps to discover PCI devices.
 
 
Method resolution order:
Action_Discover_Devices
pcisim.core.simuaction.SimuAction
pcisim.lib.action.Action
__builtin__.object

Methods defined here:
__init__(self)
activate_idsel(self)
Activate eventual IDSEL for specified device.
dev_get_reply(self)
Device reply if any.
on_reset(self, oldstep)
Action to perform on reset call.
read_dev_response(self)
Read device response, if any.
send_bdf(self)
Send BDF to select a device on the bus.

Methods inherited from pcisim.core.simuaction.SimuAction:
config_in(self)
Reads config from config_port
 
The following effects are triggered:
    - port_config is set to READ mode
    - port_config data is retrieved
    - pcibus is set to WRITE mode
    - pcibus is written with config
    - pcibus is dumped into the DataView
 
@RETURN
    the read word
 
@NOTES
    only NorthBridge should call config_in
config_out(self, data)
Write config onto config_port.
 
The following effects are triggered:
    - port_config is set to WRITE mode
    - port_config data is written
    - port_config is dumped into the DataView
 
@PARAMS
    data : data to write on the port
data_in(self)
Reads data from pcisim.core.port
 
The following effects are triggered:
    - port_data is set to READ mode
    - port_data is read
    - port_data is dumped into the DataView
 
@RETURN
    the read value
data_inbus(self)
Reads data from pcisim.core.port and copies value to pcibus
 
The following effects are triggered:
    - port_data is set to READ mode
    - port_data is read
    - port_data is dumped into the DataView
    - pcibus is set to WRITE mode
    - pcibus is written
 
@RETURN
    the read value
 
@NOTES
    only NorthBridge should call data_inbus
data_out(self, data)
Writes data to data_port
 
The following effects are triggered:
    - port_data is set to WRITE mode
    - port_data is written
    - port_data is dumped into the DataView
 
@PARAMS
    data : data to write on the port
data_outbus(self, data)
Writes data to pcibus and copies it to data_port
 
The following effects are triggered:
    - pcibus is set to WRITE mode
    - pcibus is written
    - port_data is set to WRITE mode
    - port_data is written
    - port_data is dumped into the DataView
 
@PARAMS
    data : data to write on the port
 
@NOTES
    only NorthBridge should call data_outbus
set_subject(self, subj)
Set action subject and highlights it.
 
@PARAMS
    subj : current action subject.

Methods inherited from pcisim.lib.action.Action:
__str__(self)
Shows the step name and the next step
done(self)
Call this when action has finished.
get_action_by_id(self, actname)
Get action using his 'name'.
 
@PARAMS
    (str) actname : 'name' attribute of the action to search
 
@RETURN
    | SUCCESS : (int) action index in self.steps
    | FAILURE : (None)
get_next_step(self)
Get the next step.
 
@RETURN
    (Action) next step.
 
@NOTES
    In particular, should return a 'Step' instance.
get_return_value(self)
Gets return value from previous action, if any.
 
@RETURN
    | SUCCESS : return value (it could be None as well)
    | FAILURE : (None)
is_done(self)
Query action execution state.
 
@RETURN
    | True : action has ended
is_waiting(self)
Query action state.
 
@RETURN
    | True : sub-action is being executed so action is stalled
    | False : action is being executed
reset(self, oldstep=None)
Recursively resets all the actions to be ready to new calls.
 
@PARAMS
    | (None) oldstep : this should be None when called for resetting
        the action.
    | (Step) oldstep : this should be last executed Step when called
        for entering the sub-action
 
@NOTES
    This functions invokes 'on_reset' method for each action.
seek(self, stepi)
Set next action to perform.
 
This function is very usefull for implementing loops. One could
use an attribute as a test, call 'seek' as continue instruction and
'done' to stop.
 
@PARAMS
    (int) stepi : index of the action in self.steps
step(self)
Performs a step in the action.
 
@RETURN
    An optional return value can be returned by the step.
 
@NOTES
    The same return value is saved and can be retrieved by
    'get_return_value' method.

Data descriptors inherited from pcisim.lib.action.Action:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        __all__ = ['Action_Discover_Devices']