gem5 v24.0.0.0
Loading...
Searching...
No Matches
hetero_mem_ctrl.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012-2020 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2013 Amin Farmahini-Farahani
15 * All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions are
19 * met: redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer;
21 * redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution;
24 * neither the name of the copyright holders nor the names of its
25 * contributors may be used to endorse or promote products derived from
26 * this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */
40
46#ifndef __HETERO_MEM_CTRL_HH__
47#define __HETERO_MEM_CTRL_HH__
48
49#include "mem/mem_ctrl.hh"
50#include "params/HeteroMemCtrl.hh"
51
52namespace gem5
53{
54
55namespace memory
56{
57class HeteroMemCtrl : public MemCtrl
58{
59 private:
60
65 MemPacketQueue::iterator chooseNext(MemPacketQueue& queue,
66 Tick extra_col_delay, MemInterface* mem_int) override;
68 chooseNextFRFCFS(MemPacketQueue& queue, Tick extra_col_delay,
69 MemInterface* mem_intr) override;
70 Tick doBurstAccess(MemPacket* mem_pkt, MemInterface* mem_int) override;
71 Tick minReadToWriteDataGap() override;
72 Tick minWriteToReadDataGap() override;
74
83 virtual Addr burstAlign(Addr addr, MemInterface* mem_intr) const override;
84
93 virtual bool
94 pktSizeCheck(MemPacket* mem_pkt, MemInterface* mem_intr) const override;
95
96 virtual void processRespondEvent(MemInterface* mem_intr,
97 MemPacketQueue& queue,
98 EventFunctionWrapper& resp_event,
99 bool& retry_rd_req) override;
100
107 virtual bool memBusy(MemInterface* mem_intr) override;
108
113 virtual void nonDetermReads(MemInterface* mem_intr) override;
114
122 virtual bool nvmWriteBlock(MemInterface* mem_intr) override;
123
124 public:
125
126 HeteroMemCtrl(const HeteroMemCtrlParams &p);
127
128 bool allIntfDrained() const override;
129 DrainState drain() override;
130 void drainResume() override;
131
132 protected:
133
134 Tick recvAtomic(PacketPtr pkt) override;
135 void recvFunctional(PacketPtr pkt) override;
136 bool recvTimingReq(PacketPtr pkt) override;
137
138};
139
140} // namespace memory
141} // namespace gem5
142
143#endif //__HETERO_MEM_CTRL_HH__
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
virtual void processRespondEvent(MemInterface *mem_intr, MemPacketQueue &queue, EventFunctionWrapper &resp_event, bool &retry_rd_req) override
void drainResume() override
Resume execution after a successful drain.
virtual bool pktSizeCheck(MemPacket *mem_pkt, MemInterface *mem_intr) const override
Check if mem pkt's size is sane.
HeteroMemCtrl(const HeteroMemCtrlParams &p)
Tick doBurstAccess(MemPacket *mem_pkt, MemInterface *mem_int) override
Actually do the burst based on media specific access function.
virtual bool memBusy(MemInterface *mem_intr) override
Checks if the memory interface is already busy.
Tick recvAtomic(PacketPtr pkt) override
virtual Addr burstAlign(Addr addr, MemInterface *mem_intr) const override
Burst-align an address.
virtual std::pair< MemPacketQueue::iterator, Tick > chooseNextFRFCFS(MemPacketQueue &queue, Tick extra_col_delay, MemInterface *mem_intr) override
For FR-FCFS policy reorder the read/write queue depending on row buffer hits and earliest bursts avai...
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
bool recvTimingReq(PacketPtr pkt) override
AddrRangeList getAddrRanges() override
MemPacketQueue::iterator chooseNext(MemPacketQueue &queue, Tick extra_col_delay, MemInterface *mem_int) override
The memory schduler/arbiter - picks which request needs to go next, based on the specified policy suc...
Tick minReadToWriteDataGap() override
Calculate the minimum delay used when scheduling a read-to-write transision.
bool allIntfDrained() const override
Ensure that all interfaced have drained commands.
virtual void nonDetermReads(MemInterface *mem_intr) override
Will access nvm memory interface and select non-deterministic reads to issue.
Tick minWriteToReadDataGap() override
Calculate the minimum delay used when scheduling a write-to-read transision.
virtual bool nvmWriteBlock(MemInterface *mem_intr) override
Will check if all writes are for nvm interface and nvm's write resp queue is full.
NVMInterface * nvm
Create pointer to interface of the actual nvm media when connected.
void recvFunctional(PacketPtr pkt) override
The memory controller is a single-channel memory controller capturing the most important timing const...
Definition mem_ctrl.hh:247
General interface to memory device Includes functions and parameters shared across media types.
A memory packet stores packets along with the timestamp of when the packet entered the queue,...
Definition mem_ctrl.hh:99
Interface to NVM devices with media specific parameters, statistics, and functions.
STL deque class.
Definition stl.hh:44
STL pair class.
Definition stl.hh:58
DrainState
Object drain/handover states.
Definition drain.hh:75
MemCtrl declaration.
Bitfield< 0 > p
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
uint64_t Tick
Tick count type.
Definition types.hh:58
Definition mem.h:38

Generated on Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0