lsq_unit_impl.hh (10231:cb2e6950956d) lsq_unit_impl.hh (10239:592f0bb6bd6f)
1
2/*
3 * Copyright (c) 2010-2013 ARM Limited
1
2/*
3 * Copyright (c) 2010-2013 ARM Limited
4 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating
9 * to a hardware implementation of the functionality of the software
10 * licensed hereunder. You may use the software subject to the license
11 * terms below provided that you ensure that this notice is replicated

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

409
410 memDepViolator = NULL;
411
412 return temp;
413}
414
415template <class Impl>
416unsigned
5 * All rights reserved
6 *
7 * The license below extends only to copyright in the software and shall
8 * not be construed as granting a license to any other intellectual
9 * property including but not limited to intellectual property relating
10 * to a hardware implementation of the functionality of the software
11 * licensed hereunder. You may use the software subject to the license
12 * terms below provided that you ensure that this notice is replicated

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

410
411 memDepViolator = NULL;
412
413 return temp;
414}
415
416template <class Impl>
417unsigned
417LSQUnit::numFreeEntries()
418LSQUnit<Impl>::numFreeLoadEntries()
418{
419{
419 unsigned free_lq_entries = LQEntries - loads;
420 unsigned free_sq_entries = SQEntries - stores;
421
422 // Both the LQ and SQ entries have an extra dummy entry to differentiate
423 // empty/full conditions. Subtract 1 from the free entries.
424 if (free_lq_entries < free_sq_entries) {
425 return free_lq_entries - 1;
426 } else {
427 return free_sq_entries - 1;
428 }
420 //LQ has an extra dummy entry to differentiate
421 //empty/full conditions. Subtract 1 from the free entries.
422 DPRINTF(LSQUnit, "LQ size: %d, #loads occupied: %d\n", LQEntries, loads);
423 return LQEntries - loads - 1;
429}
430
431template <class Impl>
424}
425
426template <class Impl>
427unsigned
428LSQUnit<Impl>::numFreeStoreEntries()
429{
430 //SQ has an extra dummy entry to differentiate
431 //empty/full conditions. Subtract 1 from the free entries.
432 DPRINTF(LSQUnit, "SQ size: %d, #stores occupied: %d\n", SQEntries, stores);
433 return SQEntries - stores - 1;
434
435 }
436
437template <class Impl>
432void
433LSQUnit<Impl>::checkSnoop(PacketPtr pkt)
434{
435 int load_idx = loadHead;
436 DPRINTF(LSQUnit, "Got snoop for address %#x\n", pkt->getAddr());
437
438 // Unlock the cpu-local monitor when the CPU sees a snoop to a locked
439 // address. The CPU can speculatively execute a LL operation after a pending

--- 892 unchanged lines hidden ---
438void
439LSQUnit<Impl>::checkSnoop(PacketPtr pkt)
440{
441 int load_idx = loadHead;
442 DPRINTF(LSQUnit, "Got snoop for address %#x\n", pkt->getAddr());
443
444 // Unlock the cpu-local monitor when the CPU sees a snoop to a locked
445 // address. The CPU can speculatively execute a LL operation after a pending

--- 892 unchanged lines hidden ---