pcisim.data.action_configure
index
../../src/pcisim/data/action_configure.py

Implements device configuration steps.

 
Modules
       
wx

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

 
class Action_Configure_Device(pcisim.core.simuaction.SimuAction)
    A sequence of steps to configure a PCI device.
 
 
Method resolution order:
Action_Configure_Device
pcisim.core.simuaction.SimuAction
pcisim.lib.action.Action
__builtin__.object

Methods defined here:
__init__(self)
activate_register(self)
Activate specified bar register
allocate_address(self)
Allocate memory necessary for BAR register
dev_writes_mask(self)
Write BAR mask onto the bus
on_reset(self, oldstep)
Action to perform on reset call.
read_mask_request(self)
Comunicate request to the device
request_maskcode(self)
Send a magic code to request BAR mask
save_assigned_address(self)
Save into the BAR the assigned address
select_bar(self)
Send BAR specific bdf code.
write_assigned_address(self)
Write on the bus the assigned address
write_mask_data(self)
Read mask data from 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_Configure_Device']