Deleted Added
sdiff udiff text old ( 11209:d5a7a4da9f63 ) new ( 11307:bd7d06ea90f5 )
full compact
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;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the

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

36#include <cassert>
37
38#include "debug/RubySlicc.hh"
39#include "mem/packet.hh"
40#include "mem/ruby/common/Address.hh"
41#include "mem/ruby/common/BoolVec.hh"
42#include "mem/ruby/common/DataBlock.hh"
43#include "mem/ruby/common/TypeDefines.hh"
44
45inline Cycles zero_time() { return Cycles(0); }
46
47inline NodeID
48intToID(int nodenum)
49{
50 NodeID id = nodenum;
51 return id;

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

83 return 1024;
84}
85
86/**
87 * This function accepts an address, a data block and a packet. If the address
88 * range for the data block contains the address which the packet needs to
89 * read, then the data from the data block is written to the packet. True is
90 * returned if the data block was read, otherwise false is returned.
91 */
92inline bool
93testAndRead(Addr addr, DataBlock& blk, Packet *pkt)
94{
95 Addr pktLineAddr = makeLineAddress(pkt->getAddr());
96 Addr lineAddr = makeLineAddress(addr);
97
98 if (pktLineAddr == lineAddr) {

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

104 data[i] = blk.getByte(i + startByte);
105 }
106 return true;
107 }
108 return false;
109}
110
111/**
112 * This function accepts an address, a data block and a packet. If the address
113 * range for the data block contains the address which the packet needs to
114 * write, then the data from the packet is written to the data block. True is
115 * returned if the data block was written, otherwise false is returned.
116 */
117inline bool
118testAndWrite(Addr addr, DataBlock& blk, Packet *pkt)
119{

--- 29 unchanged lines hidden ---