trace_cpu.hh (11249:0733a1c08600) trace_cpu.hh (11252:18bb597fc40c)
1/*
2 * Copyright (c) 2013 - 2015 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

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

556 private:
557
558 /** Node sequence number type. */
559 typedef uint64_t NodeSeqNum;
560
561 /** Node ROB number type. */
562 typedef uint64_t NodeRobNum;
563
1/*
2 * Copyright (c) 2013 - 2015 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

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

556 private:
557
558 /** Node sequence number type. */
559 typedef uint64_t NodeSeqNum;
560
561 /** Node ROB number type. */
562 typedef uint64_t NodeRobNum;
563
564 typedef ProtoMessage::InstDepRecord::RecordType RecordType;
565 typedef ProtoMessage::InstDepRecord Record;
566
564 /**
565 * The struct GraphNode stores an instruction in the trace file. The
566 * format of the trace file favours constructing a dependency graph of
567 * the execution and this struct is used to encapsulate the request
568 * data as well as pointers to its dependent GraphNodes.
569 */
570 class GraphNode {
571

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

584 typedef std::array<NodeSeqNum, TheISA::MaxInstSrcRegs> RegDepArray;
585
586 /** Instruction sequence number */
587 NodeSeqNum seqNum;
588
589 /** ROB occupancy number */
590 NodeRobNum robNum;
591
567 /**
568 * The struct GraphNode stores an instruction in the trace file. The
569 * format of the trace file favours constructing a dependency graph of
570 * the execution and this struct is used to encapsulate the request
571 * data as well as pointers to its dependent GraphNodes.
572 */
573 class GraphNode {
574

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

587 typedef std::array<NodeSeqNum, TheISA::MaxInstSrcRegs> RegDepArray;
588
589 /** Instruction sequence number */
590 NodeSeqNum seqNum;
591
592 /** ROB occupancy number */
593 NodeRobNum robNum;
594
592 /** If instruction is a load */
593 bool isLoad;
595 /** Type of the node corresponding to the instruction modelled by it */
596 RecordType type;
594
597
595 /** If instruction is a store */
596 bool isStore;
597
598 /** The address for the request if any */
599 Addr addr;
600
601 /** Size of request if any */
602 uint32_t size;
603
604 /** Request flags if any */
605 Request::Flags flags;

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

627
628 /**
629 * A vector of nodes dependent (outgoing) on this node. A
630 * sequential container is chosen because when dependents become
631 * free, they attempt to issue in program order.
632 */
633 std::vector<GraphNode *> dependents;
634
598 /** The address for the request if any */
599 Addr addr;
600
601 /** Size of request if any */
602 uint32_t size;
603
604 /** Request flags if any */
605 Request::Flags flags;

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

627
628 /**
629 * A vector of nodes dependent (outgoing) on this node. A
630 * sequential container is chosen because when dependents become
631 * free, they attempt to issue in program order.
632 */
633 std::vector<GraphNode *> dependents;
634
635 /** Is the node a load */
636 bool isLoad() const { return (type == Record::LOAD); }
637
638 /** Is the node a store */
639 bool isStore() const { return (type == Record::STORE); }
640
641 /** Is the node a compute (non load/store) node */
642 bool isComp() const { return (type == Record::COMP); }
643
635 /** Initialize register dependency array to all zeroes */
636 void clearRegDep();
637
638 /** Initialize register dependency array to all zeroes */
639 void clearRobDep();
640
641 /** Remove completed instruction from register dependency array */
642 bool removeRegDep(NodeSeqNum reg_dep);

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

651 bool isStrictlyOrdered() const {
652 return (flags.isSet(Request::STRICT_ORDER));
653 }
654 /**
655 * Write out element in trace-compatible format using debug flag
656 * TraceCPUData.
657 */
658 void writeElementAsTrace() const;
644 /** Initialize register dependency array to all zeroes */
645 void clearRegDep();
646
647 /** Initialize register dependency array to all zeroes */
648 void clearRobDep();
649
650 /** Remove completed instruction from register dependency array */
651 bool removeRegDep(NodeSeqNum reg_dep);

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

660 bool isStrictlyOrdered() const {
661 return (flags.isSet(Request::STRICT_ORDER));
662 }
663 /**
664 * Write out element in trace-compatible format using debug flag
665 * TraceCPUData.
666 */
667 void writeElementAsTrace() const;
668
669 /** Return string specifying the type of the node */
670 std::string typeToStr() const;
659 };
660
661 /** Struct to store a ready-to-execute node and its execution tick. */
662 struct ReadyNode
663 {
664 /** The sequence number of the ready node */
665 NodeSeqNum seqNum;
666

--- 435 unchanged lines hidden ---
671 };
672
673 /** Struct to store a ready-to-execute node and its execution tick. */
674 struct ReadyNode
675 {
676 /** The sequence number of the ready node */
677 NodeSeqNum seqNum;
678

--- 435 unchanged lines hidden ---