Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration gem5 udcc #17

Open
wants to merge 86 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
1f6ff60
mem: [wip] a rough sketch of integrated mem controller
aakahlow Feb 24, 2021
63af958
init files
mbabaie Mar 10, 2021
e982073
added Qs
mbabaie Mar 10, 2021
4c327c5
mem: not unified interface, dcache ctrl always hit dram cache
mbabaie Sep 9, 2021
d067acf
mem: not unified interface, dcache ctrl always hit dram cache
mbabaie Sep 9, 2021
ae70805
mem: everything before unifying ctrl and intrfc
mbabaie Sep 13, 2021
a0cad47
mem: more fix and updates
mbabaie Sep 13, 2021
0a903ab
mem: more fix and updates
mbabaie Sep 14, 2021
6b016e7
mem: minor fix
mbabaie Sep 14, 2021
d7db7b9
mem: minor fix
mbabaie Sep 14, 2021
14253ff
mem: Comments on dram cache controller
powerjg Sep 15, 2021
56e1ad6
mem: more updates
mbabaie Sep 22, 2021
e2d5658
mem: more update
mbabaie Sep 23, 2021
cfced46
mem: more update for hit only
mbabaie Sep 23, 2021
1de8cf2
mem: more update
mbabaie Sep 24, 2021
805664c
mem: pull from shasta
mbabaie Sep 24, 2021
b39a4ff
mem: adding responses for hits
mbabaie Sep 25, 2021
0979c8d
mem: adding event handler for initial reads
mbabaie Sep 27, 2021
d5256bd
mem: more updates
mbabaie Sep 28, 2021
cc5f320
mem: fixed the assert failed in the memInterface
mbabaie Sep 29, 2021
949d4d0
mem: read miss implemented
mbabaie Sep 30, 2021
0325bcc
mem: debugging the read miss cases
mbabaie Oct 4, 2021
66abddc
mem: miss Read Only fixed
mbabaie Oct 5, 2021
9d5b514
mem: latest version hit and miss read clean
mbabaie Oct 5, 2021
494f78e
mem: added rd/wr miss clean
mbabaie Oct 6, 2021
29f1401
mem: all the cases implemented and debugged
mbabaie Oct 6, 2021
0bc5f1b
mem: latest version all cases implemented tested for billion pkts
mbabaie Oct 8, 2021
fcf8e03
mem: fixed the insert/remove isInWriteQueue
mbabaie Oct 8, 2021
bccfd8a
mem: updated the FW/Merging checks for nvmWritebackQueue
mbabaie Oct 8, 2021
80e07c1
mem: writeback dcc pkt pointer in ROB is removed
mbabaie Oct 8, 2021
30d72a9
mem: updated arrival time of dccPkt whenever they are created
mbabaie Oct 8, 2021
46031e1
mem: added getter() for private Qs of NVM interface
mbabaie Oct 11, 2021
da623ef
mem: fixed the NVM burstready true/false nextBusState
mbabaie Oct 11, 2021
ee711a0
mem: updating the tagMetadataStore
mbabaie Oct 11, 2021
f491ab7
mem: added a new state for nvmReads to wait before issue
mbabaie Oct 12, 2021
6f170ce
mem: removed some of the redundancies before adding new stats
mbabaie Oct 13, 2021
3e38385
mem: removed some of the redundancies before adding new stats
mbabaie Oct 13, 2021
31fb563
mem: added and updated stats
mbabaie Oct 14, 2021
5120137
mem: latest version + fixed wrbacks
mbabaie Oct 15, 2021
6d0ab90
Delete .vscode directory
mbabaie Oct 15, 2021
5260a2b
Update simple.py
mbabaie Oct 15, 2021
1df0a67
mem: fixed merging wr, removed nwb Q
mbabaie Oct 18, 2021
2ddf0f8
mem: fixed the NVM Write State, moved to DRAM Read Resp Ready
mbabaie Oct 18, 2021
1148617
mem: updated stats for timing in each state
mbabaie Oct 19, 2021
393ec8c
mem: fixing styling and final touch ups
mbabaie Oct 20, 2021
9a7d700
mem: dramCacheSize is set via devicde size from memInterface
mbabaie Oct 20, 2021
d7cd2bd
mem: fixed a tiny bug about dramCacheSize in the previous commit
mbabaie Oct 20, 2021
0b2ec10
mem: deleteing mem-pkts for writebacks to nvm (mem leakage)
mbabaie Oct 20, 2021
f81d190
mem: fixed the NvmWrBack addresses and added stats
mbabaie Oct 21, 2021
c1f3865
mem: fixed the inifinite NVM write queue
mbabaie Oct 22, 2021
27cd815
mem: added more stats
mbabaie Oct 22, 2021
3129273
mem: fixed stats
mbabaie Oct 22, 2021
096f319
mem: fixed stats overflow
mbabaie Oct 24, 2021
b1df79b
mem: fixed and added more stats, fixed schedule times
mbabaie Oct 25, 2021
5129e39
mem: fixed memory leakage and some stats naming
mbabaie Oct 25, 2021
70221ae
mem: latest version
mbabaie Oct 26, 2021
c9555dd
mem: fixed stats delta calculations
mbabaie Oct 27, 2021
30efcc6
mem: fixing max size of Qs stats becoming 0 in long runs
mbabaie Oct 28, 2021
bf2157d
mem: adding two simple stats for counting cold misses
mbabaie Oct 28, 2021
ff181b5
mem: fixed the adr/cache size and tag problem causing always hit
mbabaie Oct 29, 2021
54a4adf
mem: traffic generator file
mbabaie Oct 29, 2021
ed7255c
mem: updated traffic generator script
mbabaie Oct 31, 2021
c01c40e
mem: important fix for WR Only cases clogged in NVRead processing
mbabaie Nov 2, 2021
5972708
Add files via upload
mbabaie Nov 5, 2021
1fc6f9a
mem: added frfcfsGem5 to dramRead state
mbabaie Nov 9, 2021
268a1a4
mem: removed printfs
mbabaie Nov 9, 2021
5bf52e9
mem: latest version of dcache FRFCFS, still testing and debugging
mbabaie Nov 10, 2021
a6f5b49
mem: added turnaround timing to baseline FRFCFS
mbabaie Nov 11, 2021
b2dae3b
mem: added chooseNext to nvmReadEvent
mbabaie Nov 16, 2021
22c3b7c
mem: first attempt
mbabaie Nov 17, 2021
a99b470
mem: FRFCFS WrBatch PrioritizedDRWr DrainDrWr DrainNvWr
mbabaie Nov 18, 2021
24f6c55
mem: small fix of drainings condition
mbabaie Nov 18, 2021
c4ed0d9
mem: latest version FRFCFS TAT WRBatched Drain,tested Ran and Lin
mbabaie Nov 22, 2021
d87e69f
mem: fixing a typo
mbabaie Nov 23, 2021
7422e22
mem: fixed a bug in write scheduling
mbabaie Nov 23, 2021
88ab6a6
mem: added write wear leveling delay to nvm writes
mbabaie Dec 2, 2021
03ae4f3
mem: mem_interfaces choose either UDCC or default controller
mbabaie Feb 8, 2022
9be3d54
Add files via upload
mbabaie Feb 9, 2022
973b37c
Add files via upload
mbabaie Feb 9, 2022
a0c71cd
small change in traffGen
aakahlow Feb 10, 2022
7ee3f9e
mem: latest version, still work in progress
mbabaie Feb 11, 2022
e8759f7
mem: fixed an error for the burstReady of NVMs
mbabaie Feb 17, 2022
d897d6c
mem: primary impl of DRAM Refresh support, testing is going on
mbabaie Apr 1, 2022
69e884a
mem: DRAM Refresh and reproduced results with 4% perf degrad
mbabaie Apr 12, 2022
12bbe37
mem: first step integration
mbabaie Apr 13, 2022
1f2c12d
mem: removed old files
mbabaie Apr 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions src/mem/DcacheCtrl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
### The copyright needs be modified for UCD/DArchR/the names of the writers


# Copyright (c) 2012-2020 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality of the software
# licensed hereunder. You may use the software subject to the license
# terms below provided that you ensure that this notice is replicated
# unmodified and in its entirety in all distributions of the software,
# modified or unmodified, in source code or in binary form.
#
# Copyright (c) 2013 Amin Farmahini-Farahani
# Copyright (c) 2015 University of Kaiserslautern
# Copyright (c) 2015 The University of Bologna
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer;
# redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution;
# neither the name of the copyright holders nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from m5.params import *
from m5.proxy import *
from m5.objects.QoSMemCtrl import *

# Enum for memory scheduling algorithms, currently First-Come
# First-Served and a First-Row Hit then First-Come First-Served
class MemSched(Enum): vals = ['fcfs', 'frfcfs']

# MemCtrl is a single-channel single-ported Memory controller model
# that aims to model the most important system-level performance
# effects of a memory controller, interfacing with media specific
# interfaces
class DcacheCtrl(QoSMemCtrl):
type = 'DcacheCtrl'
cxx_header = "mem/dcache_ctrl.hh"

# single-ported on the system interface side, instantiate with a
# bus in front of the controller for multiple ports
port = ResponsePort("This port responds to memory requests")

# Interface to volatile, DRAM media
dram = Param.DRAMInterface("DRAM interface")

# Interface to non-volatile media
nvm = Param.NVMInterface("NVM interface")

dram_cache_size = Param.MemorySize('512MiB',
"DRAM cache block size in bytes")
block_size = Param.Unsigned('64',
"DRAM cache block size in bytes")
addr_size = Param.Unsigned('64',
"Addr size of the request from outside world")
orb_max_size = Param.Unsigned(256, "Outstanding Requests Buffer size")
crb_max_size = Param.Unsigned(64, "Conflicting Requests Buffer size")

# JASON: We need to think about this a bit
# The dram interface is a abstract memory, but we don't need the backing
# store. So, null should be true, in_addr_map should be false,
# kvm_map false, and conf_table_reported false

# read and write buffer depths are set in the interface
# the controller will read these values when instantiated

# threshold in percent for when to forcefully trigger writes and
# start emptying the write buffer
write_high_thresh_perc = Param.Percent(85, "Threshold to force writes")

# threshold in percentage for when to start writes if the read
# queue is empty
write_low_thresh_perc = Param.Percent(50, "Threshold to start writes")

# minimum write bursts to schedule before switching back to reads
min_writes_per_switch = Param.Unsigned(16, "Minimum write bursts before "
"switching to reads")

# scheduler, address map and page policy
mem_sched_policy = Param.MemSched('frfcfs', "Memory scheduling policy")

# pipeline latency of the controller and PHY, split into a
# frontend part and a backend part, with reads and writes serviced
# by the queues only seeing the frontend contribution, and reads
# serviced by the memory seeing the sum of the two
static_frontend_latency = Param.Latency("10ns", "Static frontend latency")
static_backend_latency = Param.Latency("10ns", "Static backend latency")

command_window = Param.Latency("10ns", "Static backend latency")
9 changes: 9 additions & 0 deletions src/mem/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ SimObject('AbstractMemory.py')
SimObject('AddrMapper.py')
SimObject('Bridge.py')
SimObject('MemCtrl.py')
SimObject('DcacheCtrl.py')
SimObject('MemInterface.py')
SimObject('DRAMInterface.py')
SimObject('NVMInterface.py')
SimObject('DCMemInterface.py')
SimObject('DRAMDCInterface.py')
SimObject('NVMDCInterface.py')
SimObject('ExternalMaster.py')
SimObject('ExternalSlave.py')
SimObject('MemObject.py')
Expand All @@ -64,10 +68,13 @@ Source('addr_mapper.cc')
Source('bridge.cc')
Source('coherent_xbar.cc')
Source('drampower.cc')
Source('dramcachepower.cc')
Source('external_master.cc')
Source('external_slave.cc')
Source('mem_ctrl.cc')
Source('dcache_ctrl.cc')
Source('mem_interface.cc')
Source('dcmem_interface.cc')
Source('noncoherent_xbar.cc')
Source('packet.cc')
Source('port.cc')
Expand Down Expand Up @@ -116,12 +123,14 @@ DebugFlag('Bridge')
DebugFlag('CommMonitor')
DebugFlag('DRAM')
DebugFlag('DRAMPower')
DebugFlag('DRAMDCPower')
DebugFlag('DRAMState')
DebugFlag('NVM')
DebugFlag('ExternalPort')
DebugFlag('HtmMem', 'Hardware Transactional Memory (Mem side)')
DebugFlag('LLSC')
DebugFlag('MemCtrl')
DebugFlag('DcacheCtrl')
DebugFlag('MMU')
DebugFlag('MemoryAccess')
DebugFlag('PacketQueue')
Expand Down
Loading