1/* 2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood 3 * Copyright (c) 2010 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 71 unchanged lines hidden (view full) --- 80} 81 82void 83CacheRecorder::enqueueNextFlushRequest() 84{ 85 if (m_records_flushed < m_records.size()) { 86 TraceRecord* rec = m_records[m_records_flushed]; 87 m_records_flushed++; |
88 auto req = std::make_shared<Request>(rec->m_data_address, 89 m_block_size_bytes, 0, 90 Request::funcMasterId); |
91 MemCmd::Command requestType = MemCmd::FlushReq; 92 Packet *pkt = new Packet(req, requestType); 93 94 Sequencer* m_sequencer_ptr = m_seq_map[rec->m_cntrl_id]; 95 assert(m_sequencer_ptr != NULL); 96 m_sequencer_ptr->makeRequest(pkt); 97 98 DPRINTF(RubyCacheTrace, "Flushing %s\n", *rec); --- 8 unchanged lines hidden (view full) --- 107 if (m_bytes_read < m_uncompressed_trace_size) { 108 TraceRecord* traceRecord = (TraceRecord*) (m_uncompressed_trace + 109 m_bytes_read); 110 111 DPRINTF(RubyCacheTrace, "Issuing %s\n", *traceRecord); 112 113 for (int rec_bytes_read = 0; rec_bytes_read < m_block_size_bytes; 114 rec_bytes_read += RubySystem::getBlockSizeBytes()) { |
115 RequestPtr req; |
116 MemCmd::Command requestType; 117 118 if (traceRecord->m_type == RubyRequestType_LD) { 119 requestType = MemCmd::ReadReq; |
120 req = std::make_shared<Request>( 121 traceRecord->m_data_address + rec_bytes_read, |
122 RubySystem::getBlockSizeBytes(), 0, Request::funcMasterId); 123 } else if (traceRecord->m_type == RubyRequestType_IFETCH) { 124 requestType = MemCmd::ReadReq; |
125 req = std::make_shared<Request>( 126 traceRecord->m_data_address + rec_bytes_read, |
127 RubySystem::getBlockSizeBytes(), 128 Request::INST_FETCH, Request::funcMasterId); 129 } else { 130 requestType = MemCmd::WriteReq; |
131 req = std::make_shared<Request>( 132 traceRecord->m_data_address + rec_bytes_read, |
133 RubySystem::getBlockSizeBytes(), 0, Request::funcMasterId); 134 } 135 136 Packet *pkt = new Packet(req, requestType); 137 pkt->dataStatic(traceRecord->m_data + rec_bytes_read); 138 139 Sequencer* m_sequencer_ptr = m_seq_map[traceRecord->m_cntrl_id]; 140 assert(m_sequencer_ptr != NULL); --- 62 unchanged lines hidden --- |