fetch2.cc (11793:ef606668d247) fetch2.cc (12324:6142a2fec8d9)
1/*
1/*
2 * Copyright (c) 2013-2014 ARM Limited
2 * Copyright (c) 2013-2014,2016 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

410 * Remember not to assign it until *after* calling
411 * decode */
412 StaticInstPtr decoded_inst = decoder->decode(fetch_info.pc);
413 dyn_inst->staticInst = decoded_inst;
414
415 dyn_inst->pc = fetch_info.pc;
416 DPRINTF(Fetch, "decoder inst %s\n", *dyn_inst);
417
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

410 * Remember not to assign it until *after* calling
411 * decode */
412 StaticInstPtr decoded_inst = decoder->decode(fetch_info.pc);
413 dyn_inst->staticInst = decoded_inst;
414
415 dyn_inst->pc = fetch_info.pc;
416 DPRINTF(Fetch, "decoder inst %s\n", *dyn_inst);
417
418 // Collect some basic inst class stats
419 if (decoded_inst->isLoad())
420 loadInstructions++;
421 else if (decoded_inst->isStore())
422 storeInstructions++;
423 else if (decoded_inst->isVector())
424 vecInstructions++;
425 else if (decoded_inst->isFloating())
426 fpInstructions++;
427 else if (decoded_inst->isInteger())
428 intInstructions++;
418
419 DPRINTF(Fetch, "Instruction extracted from line %s"
420 " lineWidth: %d output_index: %d inputIndex: %d"
421 " pc: %s inst: %s\n",
422 line_in->id,
423 line_in->lineWidth, output_index, fetch_info.inputIndex,
424 fetch_info.pc, *dyn_inst);
425

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

589 return false;
590 }
591
592 return (*inp.outputWire).isBubble() &&
593 (*predictionOut.inputWire).isBubble();
594}
595
596void
429
430 DPRINTF(Fetch, "Instruction extracted from line %s"
431 " lineWidth: %d output_index: %d inputIndex: %d"
432 " pc: %s inst: %s\n",
433 line_in->id,
434 line_in->lineWidth, output_index, fetch_info.inputIndex,
435 fetch_info.pc, *dyn_inst);
436

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

600 return false;
601 }
602
603 return (*inp.outputWire).isBubble() &&
604 (*predictionOut.inputWire).isBubble();
605}
606
607void
608Fetch2::regStats()
609{
610 using namespace Stats;
611
612 intInstructions
613 .name(name() + ".int_instructions")
614 .desc("Number of integer instructions successfully decoded")
615 .flags(total);
616
617 fpInstructions
618 .name(name() + ".fp_instructions")
619 .desc("Number of floating point instructions successfully decoded")
620 .flags(total);
621
622 vecInstructions
623 .name(name() + ".vec_instructions")
624 .desc("Number of SIMD instructions successfully decoded")
625 .flags(total);
626
627 loadInstructions
628 .name(name() + ".load_instructions")
629 .desc("Number of memory load instructions successfully decoded")
630 .flags(total);
631
632 storeInstructions
633 .name(name() + ".store_instructions")
634 .desc("Number of memory store instructions successfully decoded")
635 .flags(total);
636}
637
638void
597Fetch2::minorTrace() const
598{
599 std::ostringstream data;
600
601 if (fetchInfo[0].blocked)
602 data << 'B';
603 else
604 (*out.inputWire).reportData(data);
605
606 MINORTRACE("inputIndex=%d havePC=%d predictionSeqNum=%d insts=%s\n",
607 fetchInfo[0].inputIndex, fetchInfo[0].havePC, fetchInfo[0].predictionSeqNum, data.str());
608 inputBuffer[0].minorTrace();
609}
610
611}
639Fetch2::minorTrace() const
640{
641 std::ostringstream data;
642
643 if (fetchInfo[0].blocked)
644 data << 'B';
645 else
646 (*out.inputWire).reportData(data);
647
648 MINORTRACE("inputIndex=%d havePC=%d predictionSeqNum=%d insts=%s\n",
649 fetchInfo[0].inputIndex, fetchInfo[0].havePC, fetchInfo[0].predictionSeqNum, data.str());
650 inputBuffer[0].minorTrace();
651}
652
653}