RubySlicc_Util.hh (7805:f249937228b5) RubySlicc_Util.hh (7832:de7601e6e19d)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

28
29/*
30 * These are the functions that exported to slicc from ruby.
31 */
32
33#ifndef __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
34#define __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
35
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

28
29/*
30 * These are the functions that exported to slicc from ruby.
31 */
32
33#ifndef __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
34#define __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
35
36#include <cassert>
37
36#include "mem/protocol/AccessType.hh"
37#include "mem/protocol/CacheMsg.hh"
38#include "mem/protocol/CacheRequestType.hh"
39#include "mem/protocol/Directory_State.hh"
40#include "mem/protocol/GenericRequestType.hh"
41#include "mem/protocol/L1Cache_State.hh"
42#include "mem/protocol/MachineType.hh"
43#include "mem/protocol/MessageSizeType.hh"

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

129getTimePlusInt(Time addend1, int addend2)
130{
131 return (Time) addend1 + addend2;
132}
133
134inline Time
135getTimeMinusTime(Time t1, Time t2)
136{
38#include "mem/protocol/AccessType.hh"
39#include "mem/protocol/CacheMsg.hh"
40#include "mem/protocol/CacheRequestType.hh"
41#include "mem/protocol/Directory_State.hh"
42#include "mem/protocol/GenericRequestType.hh"
43#include "mem/protocol/L1Cache_State.hh"
44#include "mem/protocol/MachineType.hh"
45#include "mem/protocol/MessageSizeType.hh"

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

131getTimePlusInt(Time addend1, int addend2)
132{
133 return (Time) addend1 + addend2;
134}
135
136inline Time
137getTimeMinusTime(Time t1, Time t2)
138{
137 ASSERT(t1 >= t2);
139 assert(t1 >= t2);
138 return t1 - t2;
139}
140
141inline Time
142getPreviousDelayedCycles(Time t1, Time t2)
143{
144 if (RubySystem::getRandomization()) { // when randomizing delayed
145 return 0;

--- 38 unchanged lines hidden ---
140 return t1 - t2;
141}
142
143inline Time
144getPreviousDelayedCycles(Time t1, Time t2)
145{
146 if (RubySystem::getRandomization()) { // when randomizing delayed
147 return 0;

--- 38 unchanged lines hidden ---