bridge.hh (4873:b135f6e6adfe) | bridge.hh (4918:3214e3694fb2) |
---|---|
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; --- 31 unchanged lines hidden (view full) --- 40#include <string> 41#include <list> 42#include <inttypes.h> 43#include <queue> 44 45#include "mem/mem_object.hh" 46#include "mem/packet.hh" 47#include "mem/port.hh" | 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; --- 31 unchanged lines hidden (view full) --- 40#include <string> 41#include <list> 42#include <inttypes.h> 43#include <queue> 44 45#include "mem/mem_object.hh" 46#include "mem/packet.hh" 47#include "mem/port.hh" |
48#include "params/Bridge.hh" |
|
48#include "sim/eventq.hh" 49 50class Bridge : public MemObject 51{ 52 protected: 53 /** Declaration of the buses port type, one will be instantiated for each 54 of the interfaces connecting to the bus. */ 55 class BridgePort : public Port --- 130 unchanged lines hidden (view full) --- 186 }; 187 188 BridgePort portA, portB; 189 190 /** If this bridge should acknowledge writes. */ 191 bool ackWrites; 192 193 public: | 49#include "sim/eventq.hh" 50 51class Bridge : public MemObject 52{ 53 protected: 54 /** Declaration of the buses port type, one will be instantiated for each 55 of the interfaces connecting to the bus. */ 56 class BridgePort : public Port --- 130 unchanged lines hidden (view full) --- 187 }; 188 189 BridgePort portA, portB; 190 191 /** If this bridge should acknowledge writes. */ 192 bool ackWrites; 193 194 public: |
194 struct Params 195 { 196 std::string name; 197 int req_size_a; 198 int req_size_b; 199 int resp_size_a; 200 int resp_size_b; 201 Tick delay; 202 Tick nack_delay; 203 bool write_ack; 204 bool fix_partial_write_a; 205 bool fix_partial_write_b; 206 }; | 195 typedef BridgeParams Params; |
207 208 protected: 209 Params *_params; 210 211 public: 212 const Params *params() const { return _params; } 213 214 /** A function used to return the port associated with this bus object. */ 215 virtual Port *getPort(const std::string &if_name, int idx = -1); 216 217 virtual void init(); 218 219 Bridge(Params *p); 220}; 221 222#endif //__MEM_BUS_HH__ | 196 197 protected: 198 Params *_params; 199 200 public: 201 const Params *params() const { return _params; } 202 203 /** A function used to return the port associated with this bus object. */ 204 virtual Port *getPort(const std::string &if_name, int idx = -1); 205 206 virtual void init(); 207 208 Bridge(Params *p); 209}; 210 211#endif //__MEM_BUS_HH__ |