ruby_direct_test.py (9100:3caf131d7a95) ruby_direct_test.py (9365:644be05ee7c2)
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# Copyright (c) 2009 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

47
48parser = optparse.OptionParser()
49Options.addCommonOptions(parser)
50
51parser.add_option("-l", "--requests", metavar="N", default=100,
52 help="Stop after N requests")
53parser.add_option("-f", "--wakeup_freq", metavar="N", default=10,
54 help="Wakeup every N cycles")
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# Copyright (c) 2009 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

47
48parser = optparse.OptionParser()
49Options.addCommonOptions(parser)
50
51parser.add_option("-l", "--requests", metavar="N", default=100,
52 help="Stop after N requests")
53parser.add_option("-f", "--wakeup_freq", metavar="N", default=10,
54 help="Wakeup every N cycles")
55parser.add_option("--test-type", type="string", default="SeriesGetx",
56 help="SeriesGetx|SeriesGets|Invalidate")
55parser.add_option("--test-type", type="choice", default="SeriesGetx",
56 choices = ["SeriesGetx", "SeriesGets", "SeriesGetMixed",
57 "Invalidate"],
58 help = "Type of test")
59parser.add_option("--percent-writes", type="int", default=100,
60 help="percentage of accesses that should be writes")
57
58#
59# Add the ruby specific and protocol specific options
60#
61Ruby.define_options(parser)
61
62#
63# Add the ruby specific and protocol specific options
64#
65Ruby.define_options(parser)
62
63execfile(os.path.join(config_root, "common", "Options.py"))
64
65(options, args) = parser.parse_args()
66
67if args:
68 print "Error: script doesn't take any positional arguments"
69 sys.exit(1)
70
71#
72# Select the direct test generator
73#
74if options.test_type == "SeriesGetx":
75 generator = SeriesRequestGenerator(num_cpus = options.num_cpus,
66(options, args) = parser.parse_args()
67
68if args:
69 print "Error: script doesn't take any positional arguments"
70 sys.exit(1)
71
72#
73# Select the direct test generator
74#
75if options.test_type == "SeriesGetx":
76 generator = SeriesRequestGenerator(num_cpus = options.num_cpus,
76 issue_writes = True)
77 percent_writes = 100)
77elif options.test_type == "SeriesGets":
78 generator = SeriesRequestGenerator(num_cpus = options.num_cpus,
78elif options.test_type == "SeriesGets":
79 generator = SeriesRequestGenerator(num_cpus = options.num_cpus,
79 issue_writes = False)
80 percent_writes = 0)
81elif options.test_type == "SeriesGetMixed":
82 generator = SeriesRequestGenerator(num_cpus = options.num_cpus,
83 percent_writes = options.percent_writes)
80elif options.test_type == "Invalidate":
81 generator = InvalidateGenerator(num_cpus = options.num_cpus)
82else:
83 print "Error: unknown direct test generator"
84 sys.exit(1)
85
86#
87# Create the M5 system. Note that the Memory Object isn't

--- 39 unchanged lines hidden ---
84elif options.test_type == "Invalidate":
85 generator = InvalidateGenerator(num_cpus = options.num_cpus)
86else:
87 print "Error: unknown direct test generator"
88 sys.exit(1)
89
90#
91# Create the M5 system. Note that the Memory Object isn't

--- 39 unchanged lines hidden ---