memtest.py (4627:2766d5cfbd9d) | memtest.py (4628:17b3ce796176) |
---|---|
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 --- 46 unchanged lines hidden (view full) --- 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 " 61 "[default: %default]") 62 | 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 --- 46 unchanged lines hidden (view full) --- 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 " 61 "[default: %default]") 62 |
63parser.add_option("--progress", type="int", default=1000, 64 metavar="NLOADS", 65 help="Progress message interval " 66 "[default: %default]") 67 |
|
63(options, args) = parser.parse_args() 64 65if args: 66 print "Error: script doesn't take any positional arguments" 67 sys.exit(1) 68 69# Should generalize this someday... would be cool to have a loop that 70# just iterates, adding a level of caching each time. --- 36 unchanged lines hidden (view full) --- 107if options.numtesters > block_size: 108 print "Error: Number of testers limited to %s because of false sharing" \ 109 % (block_size) 110 sys.exit(1) 111 112cpus = [ MemTest(atomic=options.atomic, max_loads=options.maxloads, 113 percent_functional=options.functional, 114 percent_uncacheable=options.uncacheable, | 68(options, args) = parser.parse_args() 69 70if args: 71 print "Error: script doesn't take any positional arguments" 72 sys.exit(1) 73 74# Should generalize this someday... would be cool to have a loop that 75# just iterates, adding a level of caching each time. --- 36 unchanged lines hidden (view full) --- 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, 119 percent_uncacheable=options.uncacheable, |
115 progress_interval=1000) | 120 progress_interval=options.progress) |
116 for i in xrange(options.numtesters) ] 117 118# system simulated 119system = System(cpu = cpus, funcmem = PhysicalMemory(), 120 physmem = PhysicalMemory(latency = "100ns"), 121 membus = Bus(clock="500MHz", width=16)) 122 123# l2cache & bus --- 46 unchanged lines hidden --- | 121 for i in xrange(options.numtesters) ] 122 123# system simulated 124system = System(cpu = cpus, funcmem = PhysicalMemory(), 125 physmem = PhysicalMemory(latency = "100ns"), 126 membus = Bus(clock="500MHz", width=16)) 127 128# l2cache & bus --- 46 unchanged lines hidden --- |