Deleted Added
sdiff udiff text old ( 9543:a373b2e664ff ) new ( 9546:ac0c18d738ce )
full compact
1/*
2 * Copyright (c) 2012-2013 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

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

324 /**
325 * These values specify the range of bytes found that satisfy a
326 * functional read.
327 */
328 uint16_t bytesValidStart;
329 uint16_t bytesValidEnd;
330
331 public:
332 /// Used to calculate latencies for each packet.
333 Tick time;
334
335 /// The time at which the packet will be fully transmitted
336 Tick finishTime;
337
338 /// The time at which the first chunk of the packet will be transmitted
339 Tick firstWordTime;
340
341 /**

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

580 * Constructor. Note that a Request object must be constructed
581 * first, but the Requests's physical address and size fields need
582 * not be valid. The command must be supplied.
583 */
584 Packet(Request *_req, MemCmd _cmd)
585 : cmd(_cmd), req(_req), data(NULL),
586 src(InvalidPortID), dest(InvalidPortID),
587 bytesValidStart(0), bytesValidEnd(0),
588 time(curTick()), senderState(NULL)
589 {
590 if (req->hasPaddr()) {
591 addr = req->getPaddr();
592 flags.set(VALID_ADDR);
593 }
594 if (req->hasSize()) {
595 size = req->getSize();
596 flags.set(VALID_SIZE);

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

601 * Alternate constructor if you are trying to create a packet with
602 * a request that is for a whole block, not the address from the
603 * req. this allows for overriding the size/addr of the req.
604 */
605 Packet(Request *_req, MemCmd _cmd, int _blkSize)
606 : cmd(_cmd), req(_req), data(NULL),
607 src(InvalidPortID), dest(InvalidPortID),
608 bytesValidStart(0), bytesValidEnd(0),
609 time(curTick()), senderState(NULL)
610 {
611 if (req->hasPaddr()) {
612 addr = req->getPaddr() & ~(_blkSize - 1);
613 flags.set(VALID_ADDR);
614 }
615 size = _blkSize;
616 flags.set(VALID_SIZE);
617 }

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

623 * less than that of the original packet. In this case the new
624 * packet should allocate its own data.
625 */
626 Packet(Packet *pkt, bool clearFlags = false)
627 : cmd(pkt->cmd), req(pkt->req),
628 data(pkt->flags.isSet(STATIC_DATA) ? pkt->data : NULL),
629 addr(pkt->addr), size(pkt->size), src(pkt->src), dest(pkt->dest),
630 bytesValidStart(pkt->bytesValidStart), bytesValidEnd(pkt->bytesValidEnd),
631 time(curTick()), senderState(pkt->senderState)
632 {
633 if (!clearFlags)
634 flags.set(pkt->flags & COPY_FLAGS);
635
636 flags.set(pkt->flags & (VALID_ADDR|VALID_SIZE));
637 flags.set(pkt->flags & STATIC_DATA);
638
639 }

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

660 */
661 void
662 reinitFromRequest()
663 {
664 assert(req->hasPaddr());
665 flags = 0;
666 addr = req->getPaddr();
667 size = req->getSize();
668 time = req->time();
669
670 flags.set(VALID_ADDR|VALID_SIZE);
671 deleteData();
672 }
673
674 /**
675 * Take a request packet and modify it in place to be suitable for
676 * returning as a response to that request. The source field is

--- 231 unchanged lines hidden ---