1/*
2 * Copyright (c) 2012-2014, TU Delft
3 * Copyright (c) 2012-2014, TU Eindhoven
4 * Copyright (c) 2012-2014, TU Kaiserslautern
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
9 * met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * 3. Neither the name of the copyright holder nor the names of its
19 * contributors may be used to endorse or promote products derived from
20 * this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
23 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 * Authors: Karthik Chandrasekar
35 *
36 */
37
38#include "MemTimingSpec.h"
39
40using namespace Data;
41
42MemTimingSpec::MemTimingSpec() :
43  clkMhz(0.0),
44  RC(0),
45  RCD(0),
46  CCD(0),
47  CCD_S(0),
48  CCD_L(0),
49  RRD(0),
50  RRD_S(0),
51  RRD_L(0),
52  FAW(0),
53  TAW(0),
54  WTR(0),
55  WTR_S(0),
56  WTR_L(0),
57  REFI(0),
58  RL(0),
59  RP(0),
60  RFC(0),
61  REFB(0),
62  RAS(0),
63  WL(0),
64  AL(0),
65  DQSCK(0),
66  RTP(0),
67  WR(0),
68  XP(0),
69  XPDLL(0),
70  XS(0),
71  XSDLL(0),
72  CKE(0),
73  CKESR(0),
74  clkPeriod(0.0)
75{
76}
77
78void MemTimingSpec::processParameters()
79{
80  clkMhz    = getParamValWithDefault("clkMhz", 0.0);
81  RC        = getParamValWithDefault("RC", 0);
82  RCD       = getParamValWithDefault("RCD", 0);
83  CCD       = getParamValWithDefault("CCD", 0);
84  RRD       = getParamValWithDefault("RRD", 0);
85  WTR       = getParamValWithDefault("WTR", 0);
86  CCD_S     = getParamValWithDefault("CCD_S", 0);
87  CCD_L     = getParamValWithDefault("CCD_L", 0);
88  RRD_S     = getParamValWithDefault("RRD_S", 0);
89  RRD_L     = getParamValWithDefault("RRD_L", 0);
90  WTR_S     = getParamValWithDefault("WTR_S", 0);
91  WTR_L     = getParamValWithDefault("WTR_L", 0);
92  TAW       = getParamValWithDefault("TAW", 0);
93  FAW       = getParamValWithDefault("FAW", 0);
94  REFI      = getParamValWithDefault("REFI", 0);
95  RL        = getParamValWithDefault("RL", 0);
96  RP        = getParamValWithDefault("RP", 0);
97  RFC       = getParamValWithDefault("RFC", 0);
98  REFB      = getParamValWithDefault("REFB", 0);
99  RAS       = getParamValWithDefault("RAS", 0);
100  WL        = getParamValWithDefault("WL", 0);
101  AL        = getParamValWithDefault("AL", 0);
102  DQSCK     = getParamValWithDefault("DQSCK", 0);
103  RTP       = getParamValWithDefault("RTP", 0);
104  WR        = getParamValWithDefault("WR", 0);
105  XP        = getParamValWithDefault("XP", 0);
106  XPDLL     = getParamValWithDefault("XPDLL", 0);
107  XS        = getParamValWithDefault("XS", 0);
108  XSDLL     = getParamValWithDefault("XSDLL", 0);
109  CKE       = getParamValWithDefault("CKE", 0);
110  CKESR     = getParamValWithDefault("CKESR", 0);
111  clkPeriod = 1000.0 / clkMhz;
112} // MemTimingSpec::processParameters
113