lsq_unit_impl.hh (9383:55fa95053ee8) lsq_unit_impl.hh (9440:fdc91cab5760)
1/*
2 * Copyright (c) 2010-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

1223 "no need to resend packet.\n");
1224 } else {
1225 DPRINTF(LSQUnit, "Retry received but LSQ is no longer blocked.\n");
1226 }
1227}
1228
1229template <class Impl>
1230inline void
1/*
2 * Copyright (c) 2010-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

1223 "no need to resend packet.\n");
1224 } else {
1225 DPRINTF(LSQUnit, "Retry received but LSQ is no longer blocked.\n");
1226 }
1227}
1228
1229template <class Impl>
1230inline void
1231LSQUnit::incrStIdx(int &store_idx)
1231LSQUnit<Impl>::incrStIdx(int &store_idx) const
1232{
1233 if (++store_idx >= SQEntries)
1234 store_idx = 0;
1235}
1236
1237template <class Impl>
1238inline void
1232{
1233 if (++store_idx >= SQEntries)
1234 store_idx = 0;
1235}
1236
1237template <class Impl>
1238inline void
1239LSQUnit::decrStIdx(int &store_idx)
1239LSQUnit<Impl>::decrStIdx(int &store_idx) const
1240{
1241 if (--store_idx < 0)
1242 store_idx += SQEntries;
1243}
1244
1245template <class Impl>
1246inline void
1240{
1241 if (--store_idx < 0)
1242 store_idx += SQEntries;
1243}
1244
1245template <class Impl>
1246inline void
1247LSQUnit::incrLdIdx(int &load_idx)
1247LSQUnit<Impl>::incrLdIdx(int &load_idx) const
1248{
1249 if (++load_idx >= LQEntries)
1250 load_idx = 0;
1251}
1252
1253template <class Impl>
1254inline void
1248{
1249 if (++load_idx >= LQEntries)
1250 load_idx = 0;
1251}
1252
1253template <class Impl>
1254inline void
1255LSQUnit::decrLdIdx(int &load_idx)
1255LSQUnit<Impl>::decrLdIdx(int &load_idx) const
1256{
1257 if (--load_idx < 0)
1258 load_idx += LQEntries;
1259}
1260
1261template <class Impl>
1262void
1256{
1257 if (--load_idx < 0)
1258 load_idx += LQEntries;
1259}
1260
1261template <class Impl>
1262void
1263LSQUnit::dumpInsts()
1263LSQUnit<Impl>::dumpInsts() const
1264{
1265 cprintf("Load store queue: Dumping instructions.\n");
1266 cprintf("Load queue size: %i\n", loads);
1267 cprintf("Load queue: ");
1268
1269 int load_idx = loadHead;
1270
1271 while (load_idx != loadTail && loadQueue[load_idx]) {
1264{
1265 cprintf("Load store queue: Dumping instructions.\n");
1266 cprintf("Load queue size: %i\n", loads);
1267 cprintf("Load queue: ");
1268
1269 int load_idx = loadHead;
1270
1271 while (load_idx != loadTail && loadQueue[load_idx]) {
1272 cprintf("%s ", loadQueue[load_idx]->pcState());
1272 const DynInstPtr &inst(loadQueue[load_idx]);
1273 cprintf("%s.[sn:%i] ", inst->pcState(), inst->seqNum);
1273
1274 incrLdIdx(load_idx);
1275 }
1274
1275 incrLdIdx(load_idx);
1276 }
1277 cprintf("\n");
1276
1277 cprintf("Store queue size: %i\n", stores);
1278 cprintf("Store queue: ");
1279
1280 int store_idx = storeHead;
1281
1282 while (store_idx != storeTail && storeQueue[store_idx].inst) {
1278
1279 cprintf("Store queue size: %i\n", stores);
1280 cprintf("Store queue: ");
1281
1282 int store_idx = storeHead;
1283
1284 while (store_idx != storeTail && storeQueue[store_idx].inst) {
1283 cprintf("%s ", storeQueue[store_idx].inst->pcState());
1285 const DynInstPtr &inst(storeQueue[store_idx].inst);
1286 cprintf("%s.[sn:%i] ", inst->pcState(), inst->seqNum);
1284
1285 incrStIdx(store_idx);
1286 }
1287
1288 cprintf("\n");
1289}
1287
1288 incrStIdx(store_idx);
1289 }
1290
1291 cprintf("\n");
1292}