Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 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
9a34171
mem: latest/final version of fcfs
mbabaie Nov 9, 2021
9d6ea85
mem: latest/final version of fcfs
mbabaie Nov 9, 2021
30e692d
Update dcache_ctrl.cc
mbabaie Nov 21, 2021
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
115 changes: 115 additions & 0 deletions cmds.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
ddr4_12_1000_WO_Miss

build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/1 traffGen.py DDR4_2400_16x4 16MiB 1 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/2 traffGen.py DDR4_2400_16x4 16MiB 2 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/4 traffGen.py DDR4_2400_16x4 16MiB 4 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/8 traffGen.py DDR4_2400_16x4 16MiB 8 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/16 traffGen.py DDR4_2400_16x4 16MiB 16 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/32 traffGen.py DDR4_2400_16x4 16MiB 32 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/64 traffGen.py DDR4_2400_16x4 16MiB 64 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/128 traffGen.py DDR4_2400_16x4 16MiB 128 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/256 traffGen.py DDR4_2400_16x4 16MiB 256 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/512 traffGen.py DDR4_2400_16x4 16MiB 512 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Miss/1024 traffGen.py DDR4_2400_16x4 16MiB 1024 linear 1000000000000 128MiB 1000 0

ddr4_12_1000_WO_Hit

build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/1 traffGen.py DDR4_2400_16x4 128MiB 1 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/2 traffGen.py DDR4_2400_16x4 128MiB 2 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/4 traffGen.py DDR4_2400_16x4 128MiB 4 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/8 traffGen.py DDR4_2400_16x4 128MiB 8 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/16 traffGen.py DDR4_2400_16x4 128MiB 16 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/32 traffGen.py DDR4_2400_16x4 128MiB 32 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/64 traffGen.py DDR4_2400_16x4 128MiB 64 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/128 traffGen.py DDR4_2400_16x4 128MiB 128 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/256 traffGen.py DDR4_2400_16x4 128MiB 256 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/512 traffGen.py DDR4_2400_16x4 128MiB 512 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr4_12_1000_WO_Hit/1024 traffGen.py DDR4_2400_16x4 128MiB 1024 linear 1000000000000 16MiB 1000 0

ddr4_12_1000_RO_Hit

build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/1 traffGen.py DDR4_2400_16x4 128MiB 1 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/2 traffGen.py DDR4_2400_16x4 128MiB 2 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/4 traffGen.py DDR4_2400_16x4 128MiB 4 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/8 traffGen.py DDR4_2400_16x4 128MiB 8 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/16 traffGen.py DDR4_2400_16x4 128MiB 16 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/32 traffGen.py DDR4_2400_16x4 128MiB 32 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/64 traffGen.py DDR4_2400_16x4 128MiB 64 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/128 traffGen.py DDR4_2400_16x4 128MiB 128 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/256 traffGen.py DDR4_2400_16x4 128MiB 256 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/512 traffGen.py DDR4_2400_16x4 128MiB 512 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Hit/1024 traffGen.py DDR4_2400_16x4 128MiB 1024 linear 1000000000000 16MiB 1000 100

ddr4_12_1000_RO_Miss

build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/1 traffGen.py DDR4_2400_16x4 16MiB 1 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/2 traffGen.py DDR4_2400_16x4 16MiB 2 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/4 traffGen.py DDR4_2400_16x4 16MiB 4 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/8 traffGen.py DDR4_2400_16x4 16MiB 8 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/16 traffGen.py DDR4_2400_16x4 16MiB 16 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/32 traffGen.py DDR4_2400_16x4 16MiB 32 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/64 traffGen.py DDR4_2400_16x4 16MiB 64 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/128 traffGen.py DDR4_2400_16x4 16MiB 128 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/256 traffGen.py DDR4_2400_16x4 16MiB 256 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/512 traffGen.py DDR4_2400_16x4 16MiB 512 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr4_12_1000_RO_Miss/1024 traffGen.py DDR4_2400_16x4 16MiB 1024 linear 1000000000000 128MiB 1000 100


ddr3_12_1000_WO_Miss

build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/1 traffGen.py DDR3_1600_8x8 16MiB 1 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/2 traffGen.py DDR3_1600_8x8 16MiB 2 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/4 traffGen.py DDR3_1600_8x8 16MiB 4 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/8 traffGen.py DDR3_1600_8x8 16MiB 8 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/16 traffGen.py DDR3_1600_8x8 16MiB 16 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/32 traffGen.py DDR3_1600_8x8 16MiB 32 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/64 traffGen.py DDR3_1600_8x8 16MiB 64 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/128 traffGen.py DDR3_1600_8x8 16MiB 128 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/256 traffGen.py DDR3_1600_8x8 16MiB 256 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/512 traffGen.py DDR3_1600_8x8 16MiB 512 linear 1000000000000 128MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Miss/1024 traffGen.py DDR3_1600_8x8 16MiB 1024 linear 1000000000000 128MiB 1000 0


ddr3_12_1000_RO_Miss

build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/1 traffGen.py DDR3_1600_8x8 16MiB 1 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/2 traffGen.py DDR3_1600_8x8 16MiB 2 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/4 traffGen.py DDR3_1600_8x8 16MiB 4 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/8 traffGen.py DDR3_1600_8x8 16MiB 8 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/16 traffGen.py DDR3_1600_8x8 16MiB 16 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/32 traffGen.py DDR3_1600_8x8 16MiB 32 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/64 traffGen.py DDR3_1600_8x8 16MiB 64 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/128 traffGen.py DDR3_1600_8x8 16MiB 128 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/256 traffGen.py DDR3_1600_8x8 16MiB 256 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/512 traffGen.py DDR3_1600_8x8 16MiB 512 linear 1000000000000 128MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Miss/1024 traffGen.py DDR3_1600_8x8 16MiB 1024 linear 1000000000000 128MiB 1000 100


ddr3_12_1000_RO_Hit

build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/1 traffGen.py DDR3_1600_8x8 128MiB 1 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/2 traffGen.py DDR3_1600_8x8 128MiB 2 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/4 traffGen.py DDR3_1600_8x8 128MiB 4 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/8 traffGen.py DDR3_1600_8x8 128MiB 8 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/16 traffGen.py DDR3_1600_8x8 128MiB 16 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/32 traffGen.py DDR3_1600_8x8 128MiB 32 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/64 traffGen.py DDR3_1600_8x8 128MiB 64 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/128 traffGen.py DDR3_1600_8x8 128MiB 128 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/256 traffGen.py DDR3_1600_8x8 128MiB 256 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/512 traffGen.py DDR3_1600_8x8 128MiB 512 linear 1000000000000 16MiB 1000 100
build/NULL/gem5.opt --outdir=../ddr3_12_1000_RO_Hit/1024 traffGen.py DDR3_1600_8x8 128MiB 1024 linear 1000000000000 16MiB 1000 100


ddr3_12_1000_WO_Hit

build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/1 traffGen.py DDR3_1600_8x8 128MiB 1 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/2 traffGen.py DDR3_1600_8x8 128MiB 2 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/4 traffGen.py DDR3_1600_8x8 128MiB 4 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/8 traffGen.py DDR3_1600_8x8 128MiB 8 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/16 traffGen.py DDR3_1600_8x8 128MiB 16 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/32 traffGen.py DDR3_1600_8x8 128MiB 32 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/64 traffGen.py DDR3_1600_8x8 128MiB 64 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/128 traffGen.py DDR3_1600_8x8 128MiB 128 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/256 traffGen.py DDR3_1600_8x8 128MiB 256 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/512 traffGen.py DDR3_1600_8x8 128MiB 512 linear 1000000000000 16MiB 1000 0
build/NULL/gem5.opt --outdir=../ddr3_12_1000_WO_Hit/1024 traffGen.py DDR3_1600_8x8 128MiB 1024 linear 1000000000000 16MiB 1000 0
108 changes: 108 additions & 0 deletions src/mem/DCMemInterface.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
### 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.AbstractMemory import AbstractMemory

# Enum for the address mapping. With Ch, Ra, Ba, Ro and Co denoting
# channel, rank, bank, row and column, respectively, and going from
# MSB to LSB. Available are RoRaBaChCo and RoRaBaCoCh, that are
# suitable for an open-page policy, optimising for sequential accesses
# hitting in the open row. For a closed-page policy, RoCoRaBaCh
# maximises parallelism.
class AddrMap(Enum): vals = ['RoRaBaChCo', 'RoRaBaCoCh', 'RoCoRaBaCh']

class DCMemInterface(AbstractMemory):
type = 'DCMemInterface'
abstract = True
cxx_header = "mem/dcmem_interface.hh"

# Allow the interface to set required controller buffer sizes
# each entry corresponds to a burst for the specific memory channel
# configuration (e.g. x32 with burst length 8 is 32 bytes) and not
# the cacheline size or request/packet size
write_buffer_size = Param.Unsigned(64, "Number of write queue entries")
read_buffer_size = Param.Unsigned(32, "Number of read queue entries")

# scheduler, address map
addr_mapping = Param.AddrMap('RoRaBaCoCh', "Address mapping policy")

# size of memory device in Bytes
device_size = Param.MemorySize("Size of memory device")
# the physical organisation of the memory
device_bus_width = Param.Unsigned("data bus width in bits for each "\
"memory device/chip")
burst_length = Param.Unsigned("Burst lenght (BL) in beats")
device_rowbuffer_size = Param.MemorySize("Page (row buffer) size per "\
"device/chip")
devices_per_rank = Param.Unsigned("Number of devices/chips per rank")
ranks_per_channel = Param.Unsigned("Number of ranks per channel")
banks_per_rank = Param.Unsigned("Number of banks per rank")

# timing behaviour and constraints - all in nanoseconds

# the base clock period of the memory
tCK = Param.Latency("Clock period")

# time to complete a burst transfer, typically the burst length
# divided by two due to the DDR bus, but by making it a parameter
# it is easier to also evaluate SDR memories like WideIO and new
# interfaces, emerging technologies.
# This parameter has to account for burst length.
# Read/Write requests with data size larger than one full burst are broken
# down into multiple requests in the controller
tBURST = Param.Latency("Burst duration "
"(typically burst length / 2 cycles)")

# write-to-read, same rank turnaround penalty
tWTR = Param.Latency("Write to read, same rank switching time")

# read-to-write, same rank turnaround penalty
tRTW = Param.Latency("Read to write, same rank switching time")

# rank-to-rank bus delay penalty
# this does not correlate to a memory timing parameter and encompasses:
# 1) RD-to-RD, 2) WR-to-WR, 3) RD-to-WR, and 4) WR-to-RD
# different rank bus delay
tCS = Param.Latency("Rank to rank switching time")
Loading