ChampSim
defaults.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2023 The ChampSim Contributors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef DEFAULTS_HPP
18 #define DEFAULTS_HPP
19 
20 #include "cache.h"
21 #include "champsim_constants.h"
22 #include "ooo_cpu.h"
23 #include "ptw.h"
24 
26 {
28  .dib_set(32)
29  .dib_way(8)
30  .dib_window(16)
34  .rob_size(352)
35  .lq_size(128)
36  .sq_size(72)
37  .fetch_width(6)
38  .decode_width(6)
39  .dispatch_width(6)
40  .execute_width(4)
41  .lq_width(2)
42  .sq_width(2)
43  .retire_width(5)
45  .schedule_width(128)
46  .decode_latency(1)
49  .execute_latency(0)
50  .l1i_bandwidth(1)
51  .l1d_bandwidth(1)
52  // Specifying default branch predictors and BTBs like this is probably dangerous
53  // since the names could change.
54  // We're doing it anyway, for now.
55  .branch_predictor<O3_CPU::bbranchDbimodal>()
56  .btb<O3_CPU::tbtbDbasic_btb>();
57 
59  .sets(64)
60  .ways(8)
61  .pq_size(32)
62  .mshr_size(8)
63  .hit_latency(3)
64  .fill_latency(1)
65  .tag_bandwidth(2)
66  .fill_bandwidth(2)
67  .offset_bits(LOG2_BLOCK_SIZE)
72  // Specifying default prefetchers and replacement policies like this is probably dangerous
73  // since the names could change.
74  // We're doing it anyway, for now.
75  .prefetcher<CACHE::pprefetcherDno_instr>()
76  .replacement<CACHE::rreplacementDlru>();
77 
79  .sets(64)
80  .ways(12)
81  .pq_size(8)
82  .mshr_size(16)
83  .hit_latency(4)
84  .fill_latency(1)
85  .tag_bandwidth(2)
86  .fill_bandwidth(2)
87  .offset_bits(LOG2_BLOCK_SIZE)
92  .prefetcher<CACHE::pprefetcherDno>()
93  .replacement<CACHE::rreplacementDlru>();
94 
96  .sets(1024)
97  .ways(8)
98  .pq_size(16)
99  .mshr_size(32)
100  .hit_latency(9)
101  .fill_latency(1)
102  .tag_bandwidth(1)
103  .fill_bandwidth(1)
104  .offset_bits(LOG2_BLOCK_SIZE)
109  .prefetcher<CACHE::pprefetcherDno>()
110  .replacement<CACHE::rreplacementDlru>();
111 
113  .sets(16)
114  .ways(4)
115  .pq_size(0)
116  .mshr_size(8)
117  .hit_latency(1)
118  .fill_latency(1)
119  .tag_bandwidth(2)
120  .fill_bandwidth(2)
121  .offset_bits(LOG2_PAGE_SIZE)
126  .prefetcher<CACHE::pprefetcherDno>()
127  .replacement<CACHE::rreplacementDlru>();
128 
130  .sets(16)
131  .ways(4)
132  .pq_size(0)
133  .mshr_size(8)
134  .hit_latency(1)
135  .fill_latency(1)
136  .tag_bandwidth(2)
137  .fill_bandwidth(2)
138  .offset_bits(LOG2_PAGE_SIZE)
143  .prefetcher<CACHE::pprefetcherDno>()
144  .replacement<CACHE::rreplacementDlru>();
145 
147  .sets(128)
148  .ways(12)
149  .pq_size(0)
150  .mshr_size(16)
151  .hit_latency(7)
152  .fill_latency(1)
153  .tag_bandwidth(1)
154  .fill_bandwidth(1)
155  .offset_bits(LOG2_PAGE_SIZE)
160  .prefetcher<CACHE::pprefetcherDno>()
161  .replacement<CACHE::rreplacementDlru>();
162 
164  .name("LLC")
165  .sets(2048 * NUM_CPUS)
166  .ways(16)
167  .pq_size(32 * NUM_CPUS)
168  .mshr_size(64 * NUM_CPUS)
169  .hit_latency(19)
170  .fill_latency(1)
171  .tag_bandwidth(NUM_CPUS)
172  .fill_bandwidth(NUM_CPUS)
173  .offset_bits(LOG2_BLOCK_SIZE)
178  .prefetcher<CACHE::pprefetcherDno>()
179  .replacement<CACHE::rreplacementDlru>();
180 
181 const auto default_ptw =
182  PageTableWalker::Builder{}.tag_bandwidth(2).fill_bandwidth(2).mshr_size(5).add_pscl(5, 1, 2).add_pscl(4, 1, 4).add_pscl(3, 2, 4).add_pscl(2, 4, 8);
183 } // namespace champsim::defaults
184 
185 #endif
Definition: cache.h:296
self_type & pq_size(uint32_t pq_size_)
Definition: cache.h:354
self_type & prefetch_activate(Elems... pref_act_elems)
Definition: cache.h:425
self_type & set_virtual_prefetch()
Definition: cache.h:414
self_type & ways(uint32_t ways_)
Definition: cache.h:349
self_type & offset_bits(unsigned offset_bits_)
Definition: cache.h:389
self_type & hit_latency(uint64_t hit_lat_)
Definition: cache.h:369
self_type & fill_latency(uint64_t fill_lat_)
Definition: cache.h:374
self_type & sets(uint32_t sets_)
Definition: cache.h:344
self_type & name(std::string name_)
Definition: cache.h:334
self_type & reset_wq_checks_full_addr()
Definition: cache.h:409
self_type & mshr_size(uint32_t mshr_size_)
Definition: cache.h:359
self_type & reset_virtual_prefetch()
Definition: cache.h:419
Builder< P, R_FLAG > prefetcher()
Definition: cache.h:446
self_type & fill_bandwidth(uint32_t max_write_)
Definition: cache.h:384
self_type & reset_prefetch_as_load()
Definition: cache.h:399
self_type & set_wq_checks_full_addr()
Definition: cache.h:404
self_type & tag_bandwidth(uint32_t max_read_)
Definition: cache.h:379
Definition: ooo_cpu.h:252
self_type & l1d_bandwidth(long int l1d_bw_)
Definition: ooo_cpu.h:434
self_type & dib_window(std::size_t dib_window_)
Definition: ooo_cpu.h:324
self_type & sq_size(std::size_t sq_size_)
Definition: ooo_cpu.h:354
self_type & schedule_latency(unsigned schedule_latency_)
Definition: ooo_cpu.h:414
self_type & lq_width(unsigned lq_width_)
Definition: ooo_cpu.h:384
self_type & ifetch_buffer_size(std::size_t ifetch_buffer_size_)
Definition: ooo_cpu.h:329
self_type & rob_size(std::size_t rob_size_)
Definition: ooo_cpu.h:344
self_type & mispredict_penalty(unsigned mispredict_penalty_)
Definition: ooo_cpu.h:399
self_type & dib_way(std::size_t dib_way_)
Definition: ooo_cpu.h:319
self_type & l1i_bandwidth(long int l1i_bw_)
Definition: ooo_cpu.h:429
self_type & dib_set(std::size_t dib_set_)
Definition: ooo_cpu.h:314
self_type & dispatch_buffer_size(std::size_t dispatch_buffer_size_)
Definition: ooo_cpu.h:339
self_type & execute_width(unsigned execute_width_)
Definition: ooo_cpu.h:379
self_type & decode_width(unsigned decode_width_)
Definition: ooo_cpu.h:364
self_type & retire_width(unsigned retire_width_)
Definition: ooo_cpu.h:394
self_type & schedule_width(unsigned schedule_width_)
Definition: ooo_cpu.h:374
self_type & fetch_width(unsigned fetch_width_)
Definition: ooo_cpu.h:359
Builder< B, T_FLAG > branch_predictor()
Definition: ooo_cpu.h:451
self_type & decode_latency(unsigned decode_latency_)
Definition: ooo_cpu.h:404
self_type & sq_width(unsigned sq_width_)
Definition: ooo_cpu.h:389
self_type & dispatch_width(unsigned dispatch_width_)
Definition: ooo_cpu.h:369
self_type & decode_buffer_size(std::size_t decode_buffer_size_)
Definition: ooo_cpu.h:334
self_type & execute_latency(unsigned execute_latency_)
Definition: ooo_cpu.h:419
self_type & dispatch_latency(unsigned dispatch_latency_)
Definition: ooo_cpu.h:409
self_type & lq_size(std::size_t lq_size_)
Definition: ooo_cpu.h:349
Definition: ptw.h:90
Builder & mshr_size(uint32_t mshr_size_)
Definition: ptw.h:126
Builder & fill_bandwidth(uint32_t max_fill_)
Definition: ptw.h:136
Builder & add_pscl(uint8_t lvl, uint32_t set, uint32_t way)
Definition: ptw.h:121
Builder & tag_bandwidth(uint32_t max_read_)
Definition: ptw.h:131
Definition: defaults.hpp:26
const auto default_ptw
Definition: defaults.hpp:181
const auto default_llc
Definition: defaults.hpp:163
const auto default_core
Definition: defaults.hpp:27
const auto default_dtlb
Definition: defaults.hpp:129
const auto default_l2c
Definition: defaults.hpp:95
const auto default_l1d
Definition: defaults.hpp:78
const auto default_stlb
Definition: defaults.hpp:146
const auto default_itlb
Definition: defaults.hpp:112
const auto default_l1i
Definition: defaults.hpp:58