# HG changeset patch # Parent 7e0f869f8f7ec90a2c7e8613fcf0d8d2d1ee7d72 config, mem: add command line options for L2 MSHR queue size and hit latency diff -r 7e0f869f8f7e -r 75983d24f699 configs/common/CacheConfig.py --- a/configs/common/CacheConfig.py Thu Jun 02 20:34:39 2016 +0100 +++ b/configs/common/CacheConfig.py Fri Jun 03 16:27:12 2016 -0300 @@ -82,7 +82,10 @@ # same clock as the CPUs. system.l2 = l2_cache_class(clk_domain=system.cpu_clk_domain, size=options.l2_size, - assoc=options.l2_assoc) + assoc=options.l2_assoc, + hit_latency=options.l2_hit, + response_latency=options.l2_hit, + mshrs=options.l2_mshr) system.tol2bus = L2XBar(clk_domain = system.cpu_clk_domain) system.l2.cpu_side = system.tol2bus.master diff -r 7e0f869f8f7e -r 75983d24f699 configs/common/Options.py --- a/configs/common/Options.py Thu Jun 02 20:34:39 2016 +0100 +++ b/configs/common/Options.py Fri Jun 03 16:27:12 2016 -0300 @@ -83,10 +83,9 @@ default='2GHz', help="Clock for blocks running at CPU speed") parser.add_option("--smt", action="store_true", default=False, - help = """ - Only used if multiple programs are specified. If true, - then the number of threads per cpu is same as the - number of programs.""") + help = """Only used if multiple programs are specified. + If true, then the number of threads per cpu is same as + the number of programs.""") parser.add_option("--elastic-trace-en", action="store_true", help="""Enable capture of data dependency and instruction fetch traces using elastic trace probe.""") @@ -126,21 +125,42 @@ help="use external ports of this port_type for caches") parser.add_option("--tlm-memory", type="string", help="use external port for SystemC TLM cosimulation") - parser.add_option("--caches", action="store_true") - parser.add_option("--l2cache", action="store_true") + parser.add_option("--caches", action="store_true", + help="use private L1 caches") + parser.add_option("--l2cache", action="store_true", + help="""use a shared and centralized L2 cache + (classic memory system)""") parser.add_option("--fastmem", action="store_true") - parser.add_option("--num-dirs", type="int", default=1) - parser.add_option("--num-l2caches", type="int", default=1) - parser.add_option("--num-l3caches", type="int", default=1) - parser.add_option("--l1d_size", type="string", default="64kB") - parser.add_option("--l1i_size", type="string", default="32kB") - parser.add_option("--l2_size", type="string", default="2MB") - parser.add_option("--l3_size", type="string", default="16MB") - parser.add_option("--l1d_assoc", type="int", default=2) - parser.add_option("--l1i_assoc", type="int", default=2) - parser.add_option("--l2_assoc", type="int", default=8) - parser.add_option("--l3_assoc", type="int", default=16) - parser.add_option("--cacheline_size", type="int", default=64) + parser.add_option("--num-dirs", type="int", default=1, + help="Specify the number of directories (Ruby only)") + parser.add_option("--num-l2caches", type="int", default=1, + help="Specify the number of L2 caches (Ruby only)") + parser.add_option("--num-l3caches", type="int", default=1, + help="Specify the number of L3 caches (Ruby only)") + parser.add_option("--l1d_size", type="string", default="64kB", + help="Specify the data L1 cache size") + parser.add_option("--l1i_size", type="string", default="32kB", + help="Specify the instruction L1 cache size") + parser.add_option("--l2_size", type="string", default="2MB", + help="Specify the L2 cache size") + parser.add_option("--l3_size", type="string", default="16MB", + help="Specify the L3 cache size") + parser.add_option("--l1d_assoc", type="int", default=2, + help="Specify the data L1 cache associativity") + parser.add_option("--l1i_assoc", type="int", default=2, + help="Specify the instruction L1 cache associativity") + parser.add_option("--l2_assoc", type="int", default=8, + help="Specify the L2 cache associativity") + parser.add_option("--l3_assoc", type="int", default=16, + help="Specify the L3 cache associativity") + parser.add_option("--cacheline_size", type="int", default=64, + help="Specify the cacheline size") + parser.add_option("--l2_hit", type="int", default=20, + help="""Specify hit latency for L2 cache + (classic memory system only)""") + parser.add_option("--l2_mshr", type="int", default=20, + help="""Specify MSHR queue size for L2 cache + (classic memory system only)""") # Enable Ruby parser.add_option("--ruby", action="store_true") @@ -237,7 +257,7 @@ --checkpoint-restore or --take-checkpoint.""") parser.add_option("--at-instruction", action="store_true", default=False, help="""Treat value of --checkpoint-restore or --take-checkpoint as a - number of instructions.""") + number of instructions.""") parser.add_option("--spec-input", default="ref", type="choice", choices=["ref", "test", "train", "smred", "mdred", "lgred"], @@ -300,8 +320,8 @@ parser.add_option("--dist", action="store_true", help="Parallel distributed gem5 simulation.") parser.add_option("--is-switch", action="store_true", - help="Select the network switch simulator process for a"\ - "distributed gem5 run") + help="Select the network switch simulator process for "\ + "a distributed gem5 run") parser.add_option("--dist-rank", default=0, action="store", type="int", help="Rank of this system within the dist gem5 run.") parser.add_option("--dist-size", default=0, action="store", type="int", @@ -335,8 +355,8 @@ # Metafile options parser.add_option("--etherdump", action="store", type="string", dest="etherdump", - help="Specify the filename to dump a pcap capture of the" \ - "ethernet traffic") + help="Specify the filename to dump a pcap capture of "\ + "the ethernet traffic") # Disk Image Options parser.add_option("--disk-image", action="store", type="string", default=None,