-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PTVCorner. Added initial timing functions to Greenpak4Bitstream…
…Entity. No serialization yet.
1 parent
83d0d15
commit 396c094
Showing
5 changed files
with
153 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/*********************************************************************************************************************** | ||
* Copyright (C) 2016-2017 Andrew Zonenberg and contributors * | ||
* * | ||
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * | ||
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * | ||
* any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * | ||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for * | ||
* more details. * | ||
* * | ||
* You should have received a copy of the GNU Lesser General Public License along with this program; if not, you may * | ||
* find one here: * | ||
* https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt * | ||
* or you may search the http://www.gnu.org website for the version 2.1 license, or you may write to the Free Software * | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * | ||
**********************************************************************************************************************/ | ||
|
||
#ifndef PTVCorner_h | ||
#define PTVCorner_h | ||
|
||
/** | ||
@brief A single point in the (process, temperature, voltage) space | ||
*/ | ||
class PTVCorner | ||
{ | ||
public: | ||
enum ProcessSpeed | ||
{ | ||
SPEED_SLOW, | ||
SPEED_TYPICAL, //TODO: average across all tested dies to find this? or just skip and specify slow/fast? | ||
SPEED_FAST | ||
}; | ||
|
||
PTVCorner(ProcessSpeed s, int t, int v) | ||
: m_speed(s) | ||
, m_dieTemp(t) | ||
, m_voltage(v) | ||
{} | ||
|
||
ProcessSpeed GetSpeed() const | ||
{ return m_speed; } | ||
|
||
int GetTemp() const | ||
{ return m_dieTemp; } | ||
|
||
int GetVoltage() const | ||
{ return m_voltage; } | ||
|
||
//Comparison operator for STL collections | ||
bool operator<(const PTVCorner& rhs) const | ||
{ | ||
if(m_speed < rhs.m_speed) | ||
return true; | ||
if(m_dieTemp < rhs.m_dieTemp) | ||
return true; | ||
if(m_voltage < rhs.m_voltage) | ||
return true; | ||
return false; | ||
} | ||
|
||
protected: | ||
|
||
/** | ||
@brief Where does this die fall in the process spectrum? Can be at either extreme or somewhere in the middle | ||
*/ | ||
ProcessSpeed m_speed; | ||
|
||
/** | ||
@brief Die temperature, in degC | ||
*/ | ||
int m_dieTemp; | ||
|
||
/** | ||
@brief Supply voltage, in mV | ||
Note, this is *cell* supply voltage which may not be the Vcore rail (e.g. if we're querying an I/O cell) | ||
*/ | ||
int m_voltage; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters