diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:43:17 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:43:17 -0600 |
commit | cb7782f78d337527d8ea3d593645fc67cca54d23 (patch) | |
tree | ac0602477455b2364a32f788b0e1e6bae1fa999b /src/mem/ruby/slicc_interface/RubyRequest.hh | |
parent | 253e8edf13c4d7bee6bd13f84fdfa6cf40a0c5c3 (diff) | |
download | gem5-cb7782f78d337527d8ea3d593645fc67cca54d23.tar.xz |
ruby: enable multiple clock domains
This patch allows ruby to have multiple clock domains. As I understand
with this patch, controllers can have different frequencies. The entire
network needs to run at a single frequency.
The idea is that with in an object, time is treated in terms of cycles.
But the messages that are passed from one entity to another should contain
the time in Ticks. As of now, this is only true for the message buffers,
but not for the links in the network. As I understand the code, all the
entities in different networks (simple, garnet-fixed, garnet-flexible) should
be clocked at the same frequency.
Another problem is that the directory controller has to operate at the same
frequency as the ruby system. This is because the memory controller does
not make use of the Message Buffer, and instead implements a buffer of its
own. So, it has no idea of the frequency at which the directory controller
is operating and uses ruby system's frequency for scheduling events.
Diffstat (limited to 'src/mem/ruby/slicc_interface/RubyRequest.hh')
-rw-r--r-- | src/mem/ruby/slicc_interface/RubyRequest.hh | 62 |
1 files changed, 10 insertions, 52 deletions
diff --git a/src/mem/ruby/slicc_interface/RubyRequest.hh b/src/mem/ruby/slicc_interface/RubyRequest.hh index 654656132..49964ebb9 100644 --- a/src/mem/ruby/slicc_interface/RubyRequest.hh +++ b/src/mem/ruby/slicc_interface/RubyRequest.hh @@ -51,7 +51,7 @@ class RubyRequest : public Message PacketPtr pkt; unsigned m_contextId; - RubyRequest(Cycles curTime, uint64_t _paddr, uint8_t* _data, int _len, + RubyRequest(Tick curTime, uint64_t _paddr, uint8_t* _data, int _len, uint64_t _pc, RubyRequestType _type, RubyAccessMode _access_mode, PacketPtr _pkt, PrefetchBit _pb = PrefetchBit_No, unsigned _proc_id = 100) @@ -70,60 +70,18 @@ class RubyRequest : public Message m_LineAddress.makeLineAddress(); } - RubyRequest(Cycles curTime) : Message(curTime) - { - } - - RubyRequest* - clone() const - { - return new RubyRequest(*this); - } - - const Address& - getLineAddress() const - { - return m_LineAddress; - } - - const Address& - getPhysicalAddress() const - { - return m_PhysicalAddress; - } - - const RubyRequestType& - getType() const - { - return m_Type; - } + RubyRequest(Tick curTime) : Message(curTime) {} + RubyRequest* clone() const { return new RubyRequest(*this); } - const Address& - getProgramCounter() const - { - return m_ProgramCounter; - } - - const RubyAccessMode& - getAccessMode() const - { - return m_AccessMode; - } - - const int& - getSize() const - { - return m_Size; - } - - const PrefetchBit& - getPrefetch() const - { - return m_Prefetch; - } + const Address& getLineAddress() const { return m_LineAddress; } + const Address& getPhysicalAddress() const { return m_PhysicalAddress; } + const RubyRequestType& getType() const { return m_Type; } + const Address& getProgramCounter() const { return m_ProgramCounter; } + const RubyAccessMode& getAccessMode() const { return m_AccessMode; } + const int& getSize() const { return m_Size; } + const PrefetchBit& getPrefetch() const { return m_Prefetch; } void print(std::ostream& out) const; - bool functionalRead(Packet *pkt); bool functionalWrite(Packet *pkt); }; |