GPUTLBOptions.py revision 11308:7d8836fd043d
1#
2#  Copyright (c) 2011-2015 Advanced Micro Devices, Inc.
3#  All rights reserved.
4#
5#  For use for simulation and test purposes only
6#
7#  Redistribution and use in source and binary forms, with or without
8#  modification, are permitted provided that the following conditions are met:
9#
10#  1. Redistributions of source code must retain the above copyright notice,
11#  this list of conditions and the following disclaimer.
12#
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.
16#
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.
20#
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.
32#
33#  Author: Myrto Papadopoulou
34#
35
36def tlb_options(parser):
37
38    #===================================================================
39    # TLB Configuration
40    #===================================================================
41
42    parser.add_option("--TLB-config", type="string", default="perCU",
43            help="Options are: perCU (default), mono, 2CU, or perLane")
44
45    #===================================================================
46    #   L1 TLB Options (D-TLB, I-TLB, Dispatcher-TLB)
47    #===================================================================
48
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")
59
60    #===================================================================
61    #   L2 TLB Options
62    #===================================================================
63
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")
73
74    #===================================================================
75    #   L3 TLB Options
76    #===================================================================
77
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")
86
87    #===================================================================
88    #   L1 TLBCoalescer Options
89    #===================================================================
90
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")
94
95    #===================================================================
96    #   L2 TLBCoalescer Options
97    #===================================================================
98
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")
102
103    #===================================================================
104    #   L3 TLBCoalescer Options
105    #===================================================================
106
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")
110