memtest.py (4628:17b3ce796176) memtest.py (4672:cc97e595e07d)
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 34 unchanged lines hidden (view full) ---

43parser.add_option("-l", "--maxloads", default="1G", metavar="N",
44 help="Stop after N loads [default: %default]")
45parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick,
46 metavar="T",
47 help="Stop after T ticks")
48parser.add_option("-n", "--numtesters", type="int", default=8,
49 metavar="N",
50 help="Number of tester pseudo-CPUs [default: %default]")
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 34 unchanged lines hidden (view full) ---

43parser.add_option("-l", "--maxloads", default="1G", metavar="N",
44 help="Stop after N loads [default: %default]")
45parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick,
46 metavar="T",
47 help="Stop after T ticks")
48parser.add_option("-n", "--numtesters", type="int", default=8,
49 metavar="N",
50 help="Number of tester pseudo-CPUs [default: %default]")
51parser.add_option("-p", "--protocol", default="moesi",
52 help="Coherence protocol [default: %default]")
53
54parser.add_option("-f", "--functional", type="int", default=0,
55 metavar="PCT",
56 help="Target percentage of functional accesses "
57 "[default: %default]")
58parser.add_option("-u", "--uncacheable", type="int", default=0,
59 metavar="PCT",
60 help="Target percentage of uncacheable accesses "

--- 29 unchanged lines hidden (view full) ---

90# Base L1 Cache
91# ====================
92
93class L1(BaseCache):
94 latency = '1ns'
95 block_size = block_size
96 mshrs = num_l1_mshrs
97 tgts_per_mshr = 8
51
52parser.add_option("-f", "--functional", type="int", default=0,
53 metavar="PCT",
54 help="Target percentage of functional accesses "
55 "[default: %default]")
56parser.add_option("-u", "--uncacheable", type="int", default=0,
57 metavar="PCT",
58 help="Target percentage of uncacheable accesses "

--- 29 unchanged lines hidden (view full) ---

88# Base L1 Cache
89# ====================
90
91class L1(BaseCache):
92 latency = '1ns'
93 block_size = block_size
94 mshrs = num_l1_mshrs
95 tgts_per_mshr = 8
98 protocol = CoherenceProtocol(protocol=options.protocol)
99
100# ----------------------
101# Base L2 Cache
102# ----------------------
103
104class L2(BaseCache):
105 block_size = block_size
106 latency = '10ns'
107 mshrs = num_l2_mshrs
108 tgts_per_mshr = 16
109 write_buffers = 8
96
97# ----------------------
98# Base L2 Cache
99# ----------------------
100
101class L2(BaseCache):
102 block_size = block_size
103 latency = '10ns'
104 mshrs = num_l2_mshrs
105 tgts_per_mshr = 16
106 write_buffers = 8
110 protocol = CoherenceProtocol(protocol=options.protocol)
111
112if options.numtesters > block_size:
113 print "Error: Number of testers limited to %s because of false sharing" \
114 % (block_size)
115 sys.exit(1)
116
117cpus = [ MemTest(atomic=options.atomic, max_loads=options.maxloads,
118 percent_functional=options.functional,

--- 56 unchanged lines hidden ---
107
108if options.numtesters > block_size:
109 print "Error: Number of testers limited to %s because of false sharing" \
110 % (block_size)
111 sys.exit(1)
112
113cpus = [ MemTest(atomic=options.atomic, max_loads=options.maxloads,
114 percent_functional=options.functional,

--- 56 unchanged lines hidden ---