MESI_Three_Level-L1cache.sm (14184:11ac1337c5e2) | MESI_Three_Level-L1cache.sm (14300:22183ae13998) |
---|---|
1/* 2 * Copyright (c) 1999-2013 Mark D. Hill and David A. Wood 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; --- 351 unchanged lines hidden (view full) --- 360 } else { 361 if (cache.cacheAvail(in_msg.addr)) { 362 // L1 does't have the line, but we have space for it 363 // in the L1 let's see if the L2 has it 364 trigger(mandatory_request_type_to_event(in_msg.Class), 365 in_msg.addr, cache_entry, tbe); 366 } else { 367 // No room in the L1, so we need to make room in the L1 | 1/* 2 * Copyright (c) 1999-2013 Mark D. Hill and David A. Wood 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; --- 351 unchanged lines hidden (view full) --- 360 } else { 361 if (cache.cacheAvail(in_msg.addr)) { 362 // L1 does't have the line, but we have space for it 363 // in the L1 let's see if the L2 has it 364 trigger(mandatory_request_type_to_event(in_msg.Class), 365 in_msg.addr, cache_entry, tbe); 366 } else { 367 // No room in the L1, so we need to make room in the L1 |
368 Entry victim_entry := 369 getCacheEntry(cache.cacheProbe(in_msg.addr)); 370 TBE victim_tbe := TBEs[cache.cacheProbe(in_msg.addr)]; | 368 Addr victim := cache.cacheProbe(in_msg.addr); 369 Entry victim_entry := getCacheEntry(victim); 370 TBE victim_tbe := TBEs[victim]; |
371 372 if (is_valid(victim_entry) && inL0Cache(victim_entry.CacheState)) { 373 trigger(Event:L0_Invalidate_Own, | 371 372 if (is_valid(victim_entry) && inL0Cache(victim_entry.CacheState)) { 373 trigger(Event:L0_Invalidate_Own, |
374 cache.cacheProbe(in_msg.addr), 375 victim_entry, victim_tbe); | 374 victim, victim_entry, victim_tbe); |
376 } else { 377 trigger(Event:L1_Replacement, | 375 } else { 376 trigger(Event:L1_Replacement, |
378 cache.cacheProbe(in_msg.addr), 379 victim_entry, victim_tbe); | 377 victim, victim_entry, victim_tbe); |
380 } 381 } 382 } 383 } 384 } 385 } 386 } 387 --- 671 unchanged lines hidden --- | 378 } 379 } 380 } 381 } 382 } 383 } 384 } 385 --- 671 unchanged lines hidden --- |