2 # Copyright (c) 2011-2015 Advanced Micro Devices, Inc.
5 # For use for simulation and test purposes only
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are met:
10 # 1. Redistributions of source code must retain the above copyright notice,
11 # this list of conditions and the following disclaimer.
13 # 2. Redistributions in binary form must reproduce the above copyright notice,
14 # this list of conditions and the following disclaimer in the documentation
15 # and/or other materials provided with the distribution.
17 # 3. Neither the name of the copyright holder nor the names of its contributors
18 # may be used to endorse or promote products derived from this software
19 # without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 # POSSIBILITY OF SUCH DAMAGE.
33 # Author: Myrto Papadopoulou
36 def tlb_options(parser
):
38 #===================================================================
40 #===================================================================
42 parser
.add_option("--TLB-config", type="string", default
="perCU",
43 help="Options are: perCU (default), mono, 2CU, or perLane")
45 #===================================================================
46 # L1 TLB Options (D-TLB, I-TLB, Dispatcher-TLB)
47 #===================================================================
49 parser
.add_option("--L1TLBentries", type='int', default
="32")
50 parser
.add_option("--L1TLBassoc", type='int', default
="32")
51 parser
.add_option("--L1AccessLatency", type='int', default
="1",
52 help="latency in gpu cycles")
53 parser
.add_option("--L1MissLatency", type='int', default
="750",
54 help="latency (in gpu cycles) of a page walk, "
55 "if this is a last level TLB")
56 parser
.add_option("--L1MaxOutstandingReqs", type='int', default
="64")
57 parser
.add_option("--L1AccessDistanceStat", action
="store_true")
58 parser
.add_option("--tot-L1TLB-size", type="int", default
="0")
60 #===================================================================
62 #===================================================================
64 parser
.add_option("--L2TLBentries", type='int', default
="4096")
65 parser
.add_option("--L2TLBassoc", type='int', default
="32")
66 parser
.add_option("--L2AccessLatency", type='int', default
="69",
67 help="latency in gpu cycles")
68 parser
.add_option("--L2MissLatency", type='int', default
="750",
69 help="latency (in gpu cycles) of a page walk, "
70 "if this is a last level TLB")
71 parser
.add_option("--L2MaxOutstandingReqs", type='int', default
="64")
72 parser
.add_option("--L2AccessDistanceStat", action
="store_true")
74 #===================================================================
76 #===================================================================
78 parser
.add_option("--L3TLBentries", type='int', default
="8192")
79 parser
.add_option("--L3TLBassoc", type='int', default
="32")
80 parser
.add_option("--L3AccessLatency", type='int', default
="150",
81 help="latency in gpu cycles")
82 parser
.add_option("--L3MissLatency", type='int', default
="750",
83 help="latency (in gpu cycles) of a page walk")
84 parser
.add_option("--L3MaxOutstandingReqs", type='int', default
="64")
85 parser
.add_option("--L3AccessDistanceStat", action
="store_true")
87 #===================================================================
88 # L1 TLBCoalescer Options
89 #===================================================================
91 parser
.add_option("--L1ProbesPerCycle", type='int', default
="2")
92 parser
.add_option("--L1CoalescingWindow", type='int', default
="1")
93 parser
.add_option("--L1DisableCoalescing", action
="store_true")
95 #===================================================================
96 # L2 TLBCoalescer Options
97 #===================================================================
99 parser
.add_option("--L2ProbesPerCycle", type='int', default
="2")
100 parser
.add_option("--L2CoalescingWindow", type='int', default
="1")
101 parser
.add_option("--L2DisableCoalescing", action
="store_true")
103 #===================================================================
104 # L3 TLBCoalescer Options
105 #===================================================================
107 parser
.add_option("--L3ProbesPerCycle", type='int', default
="2")
108 parser
.add_option("--L3CoalescingWindow", type='int', default
="1")
109 parser
.add_option("--L3DisableCoalescing", action
="store_true")