timing.cc (6102:7fbf97dc6540) | timing.cc (6221:58a3c04e6344) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 423 unchanged lines hidden (view full) --- 432} 433 434template <class T> 435Fault 436TimingSimpleCPU::read(Addr addr, T &data, unsigned flags) 437{ 438 Fault fault; 439 const int asid = 0; | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 423 unchanged lines hidden (view full) --- 432} 433 434template <class T> 435Fault 436TimingSimpleCPU::read(Addr addr, T &data, unsigned flags) 437{ 438 Fault fault; 439 const int asid = 0; |
440 const int thread_id = 0; | 440 const ThreadID tid = 0; |
441 const Addr pc = thread->readPC(); 442 int block_size = dcachePort.peerBlockSize(); 443 int data_size = sizeof(T); 444 445 RequestPtr req = new Request(asid, addr, data_size, | 441 const Addr pc = thread->readPC(); 442 int block_size = dcachePort.peerBlockSize(); 443 int data_size = sizeof(T); 444 445 RequestPtr req = new Request(asid, addr, data_size, |
446 flags, pc, _cpuId, thread_id); | 446 flags, pc, _cpuId, tid); |
447 448 Addr split_addr = roundDown(addr + data_size - 1, block_size); 449 assert(split_addr <= addr || split_addr - addr < block_size); 450 451 452 _status = DTBWaitResponse; 453 if (split_addr > addr) { 454 RequestPtr req1, req2; --- 95 unchanged lines hidden (view full) --- 550 return dcache_pkt == NULL; 551} 552 553template <class T> 554Fault 555TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res) 556{ 557 const int asid = 0; | 447 448 Addr split_addr = roundDown(addr + data_size - 1, block_size); 449 assert(split_addr <= addr || split_addr - addr < block_size); 450 451 452 _status = DTBWaitResponse; 453 if (split_addr > addr) { 454 RequestPtr req1, req2; --- 95 unchanged lines hidden (view full) --- 550 return dcache_pkt == NULL; 551} 552 553template <class T> 554Fault 555TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res) 556{ 557 const int asid = 0; |
558 const int thread_id = 0; | 558 const ThreadID tid = 0; |
559 const Addr pc = thread->readPC(); 560 int block_size = dcachePort.peerBlockSize(); 561 int data_size = sizeof(T); 562 563 RequestPtr req = new Request(asid, addr, data_size, | 559 const Addr pc = thread->readPC(); 560 int block_size = dcachePort.peerBlockSize(); 561 int data_size = sizeof(T); 562 563 RequestPtr req = new Request(asid, addr, data_size, |
564 flags, pc, _cpuId, thread_id); | 564 flags, pc, _cpuId, tid); |
565 566 Addr split_addr = roundDown(addr + data_size - 1, block_size); 567 assert(split_addr <= addr || split_addr - addr < block_size); 568 569 T *dataP = new T; 570 *dataP = TheISA::htog(data); 571 _status = DTBWaitResponse; 572 if (split_addr > addr) { --- 492 unchanged lines hidden --- | 565 566 Addr split_addr = roundDown(addr + data_size - 1, block_size); 567 assert(split_addr <= addr || split_addr - addr < block_size); 568 569 T *dataP = new T; 570 *dataP = TheISA::htog(data); 571 _status = DTBWaitResponse; 572 if (split_addr > addr) { --- 492 unchanged lines hidden --- |