bridge.hh (2643:67ac7b611c56) | bridge.hh (2657:b119b774656b) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 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; --- 24 unchanged lines hidden (view full) --- 33#ifndef __MEM_BRIDGE_HH__ 34#define __MEM_BRIDGE_HH__ 35 36#include <string> 37#include <list> 38#include <inttypes.h> 39#include <queue> 40 | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 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; --- 24 unchanged lines hidden (view full) --- 33#ifndef __MEM_BRIDGE_HH__ 34#define __MEM_BRIDGE_HH__ 35 36#include <string> 37#include <list> 38#include <inttypes.h> 39#include <queue> 40 |
41 | |
42#include "mem/mem_object.hh" 43#include "mem/packet.hh" 44#include "mem/port.hh" 45#include "sim/eventq.hh" 46 47class Bridge : public MemObject 48{ 49 protected: --- 22 unchanged lines hidden (view full) --- 72 short origSrc; 73 bool expectResponse; 74 75 PacketBuffer(Packet *_pkt, Tick t) 76 : ready(t), pkt(_pkt), 77 origSenderState(_pkt->senderState), origSrc(_pkt->getSrc()), 78 expectResponse(_pkt->needsResponse()) 79 { | 41#include "mem/mem_object.hh" 42#include "mem/packet.hh" 43#include "mem/port.hh" 44#include "sim/eventq.hh" 45 46class Bridge : public MemObject 47{ 48 protected: --- 22 unchanged lines hidden (view full) --- 71 short origSrc; 72 bool expectResponse; 73 74 PacketBuffer(Packet *_pkt, Tick t) 75 : ready(t), pkt(_pkt), 76 origSenderState(_pkt->senderState), origSrc(_pkt->getSrc()), 77 expectResponse(_pkt->needsResponse()) 78 { |
80 pkt->senderState = this; | 79 if (!pkt->isResponse()) 80 pkt->senderState = this; |
81 } 82 83 void fixResponse(Packet *pkt) 84 { 85 assert(pkt->senderState == this); 86 pkt->setDest(origSrc); 87 pkt->senderState = origSenderState; 88 } --- 52 unchanged lines hidden (view full) --- 141 protected: 142 143 /** When receiving a timing request from the peer port, 144 pass it to the bridge. */ 145 virtual bool recvTiming(Packet *pkt); 146 147 /** When receiving a retry request from the peer port, 148 pass it to the bridge. */ | 81 } 82 83 void fixResponse(Packet *pkt) 84 { 85 assert(pkt->senderState == this); 86 pkt->setDest(origSrc); 87 pkt->senderState = origSenderState; 88 } --- 52 unchanged lines hidden (view full) --- 141 protected: 142 143 /** When receiving a timing request from the peer port, 144 pass it to the bridge. */ 145 virtual bool recvTiming(Packet *pkt); 146 147 /** When receiving a retry request from the peer port, 148 pass it to the bridge. */ |
149 virtual Packet* recvRetry(); | 149 virtual void recvRetry(); |
150 151 /** When receiving a Atomic requestfrom the peer port, 152 pass it to the bridge. */ 153 virtual Tick recvAtomic(Packet *pkt); 154 155 /** When receiving a Functional request from the peer port, 156 pass it to the bridge. */ 157 virtual void recvFunctional(Packet *pkt); --- 27 unchanged lines hidden --- | 150 151 /** When receiving a Atomic requestfrom the peer port, 152 pass it to the bridge. */ 153 virtual Tick recvAtomic(Packet *pkt); 154 155 /** When receiving a Functional request from the peer port, 156 pass it to the bridge. */ 157 virtual void recvFunctional(Packet *pkt); --- 27 unchanged lines hidden --- |