RubyPort.hh (8229:78bf55f23338) RubyPort.hh (8436:5648986156db)
1/*
2 * Copyright (c) 2009 Advanced Micro Devices, Inc.
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;

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

45
46class RubyPort : public MemObject
47{
48 public:
49 class M5Port : public SimpleTimingPort
50 {
51 private:
52 RubyPort *ruby_port;
1/*
2 * Copyright (c) 2009 Advanced Micro Devices, Inc.
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;

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

45
46class RubyPort : public MemObject
47{
48 public:
49 class M5Port : public SimpleTimingPort
50 {
51 private:
52 RubyPort *ruby_port;
53 RubySystem* ruby_system;
53 bool _onRetryList;
54 bool access_phys_mem;
55
56 public:
57 M5Port(const std::string &_name, RubyPort *_port,
54 bool _onRetryList;
55 bool access_phys_mem;
56
57 public:
58 M5Port(const std::string &_name, RubyPort *_port,
58 bool _access_phys_mem);
59 RubySystem*_system, bool _access_phys_mem);
59 bool sendTiming(PacketPtr pkt);
60 void hitCallback(PacketPtr pkt);
61 unsigned deviceBlockSize() const;
62
63 bool onRetryList()
64 { return _onRetryList; }
65
66 void onRetryList(bool newVal)
67 { _onRetryList = newVal; }
68
69 protected:
70 virtual bool recvTiming(PacketPtr pkt);
71 virtual Tick recvAtomic(PacketPtr pkt);
60 bool sendTiming(PacketPtr pkt);
61 void hitCallback(PacketPtr pkt);
62 unsigned deviceBlockSize() const;
63
64 bool onRetryList()
65 { return _onRetryList; }
66
67 void onRetryList(bool newVal)
68 { _onRetryList = newVal; }
69
70 protected:
71 virtual bool recvTiming(PacketPtr pkt);
72 virtual Tick recvAtomic(PacketPtr pkt);
73 virtual void recvFunctional(PacketPtr pkt);
72
73 private:
74 bool isPhysMemAddress(Addr addr);
74
75 private:
76 bool isPhysMemAddress(Addr addr);
77 bool doFunctionalRead(PacketPtr pkt);
78 bool doFunctionalWrite(PacketPtr pkt);
75 };
76
77 friend class M5Port;
78
79 class PioPort : public SimpleTimingPort
80 {
81 private:
82 RubyPort *ruby_port;

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

140 }
141
142 uint16_t m_port_id;
143 uint64_t m_request_cnt;
144
145 M5Port* physMemPort;
146
147 PhysicalMemory* physmem;
79 };
80
81 friend class M5Port;
82
83 class PioPort : public SimpleTimingPort
84 {
85 private:
86 RubyPort *ruby_port;

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

144 }
145
146 uint16_t m_port_id;
147 uint64_t m_request_cnt;
148
149 M5Port* physMemPort;
150
151 PhysicalMemory* physmem;
152 RubySystem* ruby_system;
148
149 //
150 // Based on similar code in the M5 bus. Stores pointers to those ports
151 // that should be called when the Sequencer becomes available after a stall.
152 //
153 std::list<M5Port*> retryList;
154
155 bool waitingOnSequencer;
156 bool access_phys_mem;
157};
158
159#endif // __MEM_RUBY_SYSTEM_RUBYPORT_HH__
153
154 //
155 // Based on similar code in the M5 bus. Stores pointers to those ports
156 // that should be called when the Sequencer becomes available after a stall.
157 //
158 std::list<M5Port*> retryList;
159
160 bool waitingOnSequencer;
161 bool access_phys_mem;
162};
163
164#endif // __MEM_RUBY_SYSTEM_RUBYPORT_HH__