cpu.hh (11567:560d7fbbddd1) | cpu.hh (13632:483aaa00c69c) |
---|---|
1/* 2 * Copyright (c) 2012-2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 69 unchanged lines hidden (view full) --- 78 */ 79class MinorCPU : public BaseCPU 80{ 81 protected: 82 /** pipeline is a container for the clockable pipeline stage objects. 83 * Elements of pipeline call TheISA to implement the model. */ 84 Minor::Pipeline *pipeline; 85 | 1/* 2 * Copyright (c) 2012-2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 69 unchanged lines hidden (view full) --- 78 */ 79class MinorCPU : public BaseCPU 80{ 81 protected: 82 /** pipeline is a container for the clockable pipeline stage objects. 83 * Elements of pipeline call TheISA to implement the model. */ 84 Minor::Pipeline *pipeline; 85 |
86 /** An event that wakes up the pipeline when a thread context is 87 * activated */ 88 EventFunctionWrapper pipelineStartupEvent; 89 90 /** List of threads that are ready to wake up and run */ 91 std::vector<ThreadID> readyThreads; 92 |
|
86 public: 87 /** Activity recording for pipeline. This belongs to Pipeline but 88 * stages will access it through the CPU as the MinorCPU object 89 * actually mediates idling behaviour */ 90 Minor::MinorActivityRecorder *activityRecorder; 91 92 /** These are thread state-representing objects for this CPU. If 93 * you need a ThreadContext for *any* reason, use --- 66 unchanged lines hidden (view full) --- 160 /** Switching interface from BaseCPU */ 161 void switchOut() override; 162 void takeOverFrom(BaseCPU *old_cpu) override; 163 164 /** Thread activation interface from BaseCPU. */ 165 void activateContext(ThreadID thread_id) override; 166 void suspendContext(ThreadID thread_id) override; 167 | 93 public: 94 /** Activity recording for pipeline. This belongs to Pipeline but 95 * stages will access it through the CPU as the MinorCPU object 96 * actually mediates idling behaviour */ 97 Minor::MinorActivityRecorder *activityRecorder; 98 99 /** These are thread state-representing objects for this CPU. If 100 * you need a ThreadContext for *any* reason, use --- 66 unchanged lines hidden (view full) --- 167 /** Switching interface from BaseCPU */ 168 void switchOut() override; 169 void takeOverFrom(BaseCPU *old_cpu) override; 170 171 /** Thread activation interface from BaseCPU. */ 172 void activateContext(ThreadID thread_id) override; 173 void suspendContext(ThreadID thread_id) override; 174 |
175 /** Wake up ready-to-run threads */ 176 void wakeupPipeline(); 177 |
|
168 /** Thread scheduling utility functions */ 169 std::vector<ThreadID> roundRobinPriority(ThreadID priority) 170 { 171 std::vector<ThreadID> prio_list; 172 for (ThreadID i = 1; i <= numThreads; i++) { 173 prio_list.push_back((priority + i) % numThreads); 174 } 175 return prio_list; --- 20 unchanged lines hidden --- | 178 /** Thread scheduling utility functions */ 179 std::vector<ThreadID> roundRobinPriority(ThreadID priority) 180 { 181 std::vector<ThreadID> prio_list; 182 for (ThreadID i = 1; i <= numThreads; i++) { 183 prio_list.push_back((priority + i) % numThreads); 184 } 185 return prio_list; --- 20 unchanged lines hidden --- |