1/* 2 * Copyright (c) 2012-2013,2017-2018 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 --- 306 unchanged lines hidden (view full) --- 315 316 /** 317 * The size of the request. This field must be set when vaddr or 318 * paddr is written via setVirt() or setPhys(), so it is always 319 * valid as long as one of the address fields is valid. 320 */ 321 unsigned _size; 322 |
323 /** Byte-enable mask for writes. */ 324 std::vector<bool> _byteEnable; 325 |
326 /** The requestor ID which is unique in the system for all ports 327 * that are capable of issuing a transaction 328 */ 329 MasterID _masterId; 330 331 /** Flag structure for the request. */ 332 Flags _flags; 333 --- 231 unchanged lines hidden (view full) --- 565 _paddr = paddr; 566 privateFlags.set(VALID_PADDR); 567 } 568 569 /** 570 * Generate two requests as if this request had been split into two 571 * pieces. The original request can't have been translated already. 572 */ |
573 // TODO: this function is still required by TimingSimpleCPU - should be 574 // removed once TimingSimpleCPU will support arbitrarily long multi-line 575 // mem. accesses |
576 void splitOnVaddr(Addr split_addr, RequestPtr &req1, RequestPtr &req2) 577 { 578 assert(privateFlags.isSet(VALID_VADDR)); 579 assert(privateFlags.noneSet(VALID_PADDR)); 580 assert(split_addr > _vaddr && split_addr < _vaddr + _size); 581 req1 = std::make_shared<Request>(*this); 582 req2 = std::make_shared<Request>(*this); 583 req1->_size = split_addr - _vaddr; 584 req2->_vaddr = split_addr; 585 req2->_size = _size - req1->_size; |
586 if (!_byteEnable.empty()) { 587 req1->_byteEnable = std::vector<bool>( 588 _byteEnable.begin(), 589 _byteEnable.begin() + req1->_size); 590 req2->_byteEnable = std::vector<bool>( 591 _byteEnable.begin() + req1->_size, 592 _byteEnable.end()); 593 } |
594 } 595 596 /** 597 * Accessor for paddr. 598 */ 599 bool 600 hasPaddr() const 601 { --- 35 unchanged lines hidden (view full) --- 637 638 unsigned 639 getSize() const 640 { 641 assert(privateFlags.isSet(VALID_SIZE)); 642 return _size; 643 } 644 |
645 const std::vector<bool>& 646 getByteEnable() const 647 { 648 return _byteEnable; 649 } 650 651 void 652 setByteEnable(const std::vector<bool>& be) 653 { 654 assert(be.empty() || be.size() == _size); 655 _byteEnable = be; 656 } 657 |
658 /** Accessor for time. */ 659 Tick 660 time() const 661 { 662 assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR)); 663 return _time; 664 } 665 --- 359 unchanged lines hidden --- |