Deleted Added
sdiff udiff text old ( 10360:919c02740209 ) new ( 10395:77b9f96786c1 )
full compact
1/*
2 * Copyright (c) 2013-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

--- 38 unchanged lines hidden (view full) ---

47 */
48
49
50#ifndef __SIM_DVFS_HANDLER_HH__
51#define __SIM_DVFS_HANDLER_HH__
52
53#include <vector>
54
55#include "params/ClockDomain.hh"
56#include "params/DVFSHandler.hh"
57#include "params/VoltageDomain.hh"
58#include "sim/clock_domain.hh"
59#include "sim/eventq.hh"
60#include "sim/sim_object.hh"
61
62
63/**
64 * DVFS Handler class, maintains a list of all the domains it can handle.
65 * Each entry of that list is an object of the DomainConfig class, and the
66 * handler uses the methods provided by that class to get access to the
67 * configuration of each domain. The handler is responsible for setting/getting
68 * clock periods and voltages from clock/voltage domains.
69 * The handler acts the bridge between software configurable information
70 * for each domain as provided to the controller and the hardware

--- 4 unchanged lines hidden (view full) ---

75 public:
76 typedef DVFSHandlerParams Params;
77 DVFSHandler(const Params *p);
78
79 typedef SrcClockDomain::DomainID DomainID;
80 typedef SrcClockDomain::PerfLevel PerfLevel;
81
82 /**
83 * Check whether a domain ID is known to the handler or not.
84 * @param domain_id Domain ID to check
85 * @return Domain ID known to handler?
86 */
87 bool validDomainID(DomainID domain_id) const;
88
89 /**
90 * Get transition latency to switch between performance levels.

--- 32 unchanged lines hidden (view full) ---

123 * the respective domain
124 */
125 Tick clkPeriodAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
126 {
127 return findDomain(domain_id)->clkPeriodAtPerfLevel(perf_level);
128 }
129
130 /**
131 * Get the total number of available performance levels.
132 *
133 * @param domain_id Domain ID to query
134 * @return Number of performance levels that where configured for the
135 * respective domain
136 */
137 PerfLevel numPerfLevels(PerfLevel domain_id) const
138 {

--- 10 unchanged lines hidden (view full) ---

149 void serialize(std::ostream &os);
150 void unserialize(Checkpoint *cp, const std::string &section);
151
152 private:
153 typedef std::map<DomainID, SrcClockDomain*> Domains;
154 Domains domains;
155
156 /**
157 * Clock domain of the system the handler is instantiated.
158 */
159 SrcClockDomain* sysClkDomain;
160
161 /**
162 * Search for a domain based on the domain ID.
163 *
164 * @param domain_id Domain ID to search for

--- 67 unchanged lines hidden ---