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; --- 31 unchanged lines hidden (view full) --- 40 41# 42# Note: the L2 Cache latency is not currently used 43# 44class L2Cache(RubyCache): 45 latency = 15 46 47def define_options(parser): |
48 parser.add_option("--l1-retries", type="int", default=1, 49 help="Token_CMP: # of l1 retries before going persistent") 50 parser.add_option("--timeout-latency", type="int", default=300, 51 help="Token_CMP: cycles until issuing again"); 52 parser.add_option("--disable-dyn-timeouts", action="store_true", 53 help="Token_CMP: disable dyanimc timeouts, use fixed latency instead") |
54 55def create_system(options, phys_mem, piobus, dma_devices): 56 57 if buildEnv['PROTOCOL'] != 'MOESI_CMP_token': 58 panic("This script requires the MOESI_CMP_token protocol to be built.") 59 60 # 61 # number of tokens that the owner passes to requests so that shared blocks can --- 37 unchanged lines hidden (view full) --- 99 cpu_seq.pio_port = piobus.port 100 101 l1_cntrl = L1Cache_Controller(version = i, 102 sequencer = cpu_seq, 103 L1IcacheMemory = l1i_cache, 104 L1DcacheMemory = l1d_cache, 105 l2_select_num_bits = \ 106 math.log(options.num_l2caches, 2), |
107 N_tokens = n_tokens, 108 retry_threshold = options.l1_retries, 109 fixed_timeout_latency = \ 110 options.timeout_latency, 111 dynamic_timeout_enabled = \ 112 not options.disable_dyn_timeouts) 113 |
114 # 115 # Add controllers and sequencers to the appropriate lists 116 # 117 cpu_sequencers.append(cpu_seq) 118 l1_cntrl_nodes.append(l1_cntrl) 119 120 for i in xrange(options.num_l2caches): 121 # --- 54 unchanged lines hidden --- |