Difference between revisions of "InOrder Resource Pool"

From gem5
Jump to: navigation, search
(Interaction w/CPU)
(Blanked the page)
 
Line 1: Line 1:
== Overview ==
 
The ResourcePool is the interface that the CPU must go through in order to access a resource. The "pool" instantiates all resources, allocates IDs to resources, and can schedule events to be processed on one or all of the resources available to the CPU.
 
  
'''Relevant source files:'''
 
* resource_pool.[hh,cc]
 
* resource.[hh,cc]
 
* resources/*.[hh,cc]
 
* pipeline_traits.[hh,cc]
 
* cpu.[hh,cc]
 
 
== Interaction w/CPU ==
 
As stated before, the resource pool encapsulates all of the resources that a CPU accesses. Consequently, the CPU must first access the resource pool before receiving access to any specific resource. Conversely, a resource can talk to the CPU by grabbing a pointer to the CPU through the resource pool.
 
 
Typically, the CPU will access the resource pool in just a few cases:
 
# An instruction request in a pipeline stage
 
# Broadcasting a CPU Event
 
# Non-cycle-accurate instances such as initialization, system calls, and in the future checkpointing.
 
 
== Resource Pool Events ==
 
The resource pool allows the CPU to broadcast events that all of the resources will see and process. This is beneficial to provide the CPU ability to transfer information to resources and provide for resources the ability to generically pass information to other resources.
 
 
By default, any CPU event that is scheduled (excluding the Tick event) is copied and scheduled as a ResourcePool event. A list of CPU events is available in cpu.hh:
 
<pre>
 
    enum CPUEventType {
 
        ActivateThread,
 
        ActivateNextReadyThread,
 
        DeactivateThread,
 
        HaltThread,
 
        SuspendThread,
 
        Trap,
 
        InstGraduated,
 
        SquashFromMemStall,
 
        UpdatePCs,
 
        NumCPUEvents
 
    };
 
</pre>
 
 
Each of these events are implemented as virtual functions in the "Resource" base class, such that any resource that needs to react to any of the aforementioned events simply needs to override the virtual function in it's implementation.
 
 
The ResourcePool also has a few specific events that resources can schedule themselves. The current list is found in resource_pool.hh:
 
<pre>
 
    enum ResPoolEventType {
 
        InstGraduated = InOrderCPU::NumCPUEvents,
 
        SquashAll,
 
        UpdateAfterContextSwitch,
 
        Default
 
    };
 
</pre>
 

Latest revision as of 17:56, 19 January 2010