oagTimerModel.h

Go to the documentation of this file.
00001 /* (c) Copyright 2004-2005, Cadence Design Systems, Inc.  All rights reserved. 
00002 
00003 This file is part of the OA Gear distribution.  See the COPYING file in
00004 the top level OA Gear directory for copyright and licensing information. */
00005 
00006 /*
00007 Author: Zhong Xiu <zxiu@andrew.cmu.edu>
00008 
00009 ChangeLog:
00010 2004-09-15: ChangeLog started
00011 */
00012 
00013 #if !defined(oagTimerModel_P)
00014 #define oagTimerModel_P
00015 
00016 #include <float.h>
00017 #include <vector>
00018 
00019 namespace oagTimer {
00020 
00022 struct pinData {
00023   char *name; 
00024   double cap; 
00025   double loadLimit; 
00026   bool isClock; 
00027 };
00028 
00029 
00030 /* TEMPORARY time and delay type definitions */
00031 typedef double TimeType;
00032 typedef double DelayType;
00033 
00035 typedef std::vector<pinData> pinDataVector;
00036 
00041 class TimerModel {
00042   public:
00043     TimerModel();
00044     TimerModel(const TimerModel &c);
00046     ~TimerModel() {}
00047 
00048     int pushLoadAxis(double d);
00049     int pushClockSlewAxis(double d);
00050     int pushInputSlewAxis(double d);
00051     int pushSlewAxis(double d);
00052 
00053     void reserveData();
00054 
00055     int pushData(double d);
00056 
00057     void clear();
00058 
00059     DelayType lookup(double load, DelayType slew, double loadLimit);
00060 
00062     static TimeType MAX_TIME() { return DBL_MAX; }
00064     static TimeType ZERO_TIME() { return 0.0; }
00066     static DelayType MAX_DELAY() { return DBL_MAX; }
00068    static DelayType ZERO_DELAY() { return 0.0; }
00069 
00070   private:
00071     unsigned int loadSize, slewSize, dataSize;
00072     std::vector<double> loadAxis, slewAxis, tableData;
00074     bool originalSlewMajor;
00076     unsigned int ptr;
00077 
00078 };
00079 
00083 struct pathData {
00084   char *src; 
00085   char *dst; 
00086   const TimerModel *delay; 
00087   const TimerModel *slew; 
00088   int srcTrans; 
00089   int dstTrans; 
00090 };
00091 
00093 typedef std::vector<pathData> pathDataVector;
00094 
00095 /* TEMPORARY */
00096 typedef TimerModel ModelType;
00097 }
00098 
00099 #endif

Generated on Thu Aug 25 14:24:05 2011 by  doxygen 1.3.9.1