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 |
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{ |
139 assert(t1 >= t2); |
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 --- |