atomic.hh (4040:eb894f3fc168) atomic.hh (4192:7accc6365bb9)
1/*
2 * Copyright (c) 2002-2005 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;

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

76 const int width;
77 const bool simulate_stalls;
78
79 // main simulation loop (one cycle)
80 void tick();
81
82 class CpuPort : public Port
83 {
1/*
2 * Copyright (c) 2002-2005 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;

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

76 const int width;
77 const bool simulate_stalls;
78
79 // main simulation loop (one cycle)
80 void tick();
81
82 class CpuPort : public Port
83 {
84
85 AtomicSimpleCPU *cpu;
86
87 public:
88
89 CpuPort(const std::string &_name, AtomicSimpleCPU *_cpu)
90 : Port(_name, _cpu), cpu(_cpu)
91 { }
92
93 bool snoopRangeSent;
94
95 protected:
96
84 public:
85
86 CpuPort(const std::string &_name, AtomicSimpleCPU *_cpu)
87 : Port(_name, _cpu), cpu(_cpu)
88 { }
89
90 bool snoopRangeSent;
91
92 protected:
93
94 AtomicSimpleCPU *cpu;
95
97 virtual bool recvTiming(PacketPtr pkt);
98
99 virtual Tick recvAtomic(PacketPtr pkt);
100
101 virtual void recvFunctional(PacketPtr pkt);
102
103 virtual void recvStatusChange(Status status);
104
105 virtual void recvRetry();
106
107 virtual void getDeviceAddressRanges(AddrRangeList &resp,
108 AddrRangeList &snoop)
109 { resp.clear(); snoop.clear(); snoop.push_back(RangeSize(0,0)); }
110
111 };
112 CpuPort icachePort;
96 virtual bool recvTiming(PacketPtr pkt);
97
98 virtual Tick recvAtomic(PacketPtr pkt);
99
100 virtual void recvFunctional(PacketPtr pkt);
101
102 virtual void recvStatusChange(Status status);
103
104 virtual void recvRetry();
105
106 virtual void getDeviceAddressRanges(AddrRangeList &resp,
107 AddrRangeList &snoop)
108 { resp.clear(); snoop.clear(); snoop.push_back(RangeSize(0,0)); }
109
110 };
111 CpuPort icachePort;
113 CpuPort dcachePort;
114
112
113 class DcachePort : public CpuPort
114 {
115 public:
116 DcachePort(const std::string &_name, AtomicSimpleCPU *_cpu)
117 : CpuPort(_name, _cpu)
118 { }
119
120 virtual void setPeer(Port *port);
121 };
122 DcachePort dcachePort;
123
115 Request *ifetch_req;
116 PacketPtr ifetch_pkt;
117 Request *data_read_req;
118 PacketPtr data_read_pkt;
119 Request *data_write_req;
120 PacketPtr data_write_pkt;
121 PacketPtr data_swap_pkt;
122

--- 25 unchanged lines hidden ---
124 Request *ifetch_req;
125 PacketPtr ifetch_pkt;
126 Request *data_read_req;
127 PacketPtr data_read_pkt;
128 Request *data_write_req;
129 PacketPtr data_write_pkt;
130 PacketPtr data_swap_pkt;
131

--- 25 unchanged lines hidden ---