1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * Copyright (c) 2009 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 --- 68 unchanged lines hidden (view full) --- 77} 78 79void 80Check::initiatePrefetch() 81{ 82 DPRINTF(RubyTest, "initiating prefetch\n"); 83 84 int index = random() % m_num_readers; |
85 MasterPort* port = m_tester_ptr->getReadableCpuPort(index); |
86 87 Request::Flags flags; 88 flags.set(Request::PREFETCH); 89 90 Packet::Command cmd; 91 92 // 1 in 8 chance this will be an exclusive prefetch 93 if ((random() & 0x7) != 0) { 94 cmd = MemCmd::ReadReq; 95 96 // if necessary, make the request an instruction fetch |
97 if (m_tester_ptr->isInstReadableCpuPort(index)) { |
98 flags.set(Request::INST_FETCH); 99 } 100 } else { 101 cmd = MemCmd::WriteReq; 102 flags.set(Request::PF_EXCLUSIVE); 103 } 104 105 // Prefetches are assumed to be 0 sized --- 25 unchanged lines hidden (view full) --- 131 132void 133Check::initiateFlush() 134{ 135 136 DPRINTF(RubyTest, "initiating Flush\n"); 137 138 int index = random() % m_num_writers; |
139 MasterPort* port = m_tester_ptr->getWritableCpuPort(index); |
140 141 Request::Flags flags; 142 143 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags, 144 m_tester_ptr->masterId(), curTick(), m_pc.getAddress()); 145 146 Packet::Command cmd; 147 --- 13 unchanged lines hidden (view full) --- 161 162void 163Check::initiateAction() 164{ 165 DPRINTF(RubyTest, "initiating Action\n"); 166 assert(m_status == TesterStatus_Idle); 167 168 int index = random() % m_num_writers; |
169 MasterPort* port = m_tester_ptr->getWritableCpuPort(index); |
170 171 Request::Flags flags; 172 173 // Create the particular address for the next byte to be written 174 Address writeAddr(m_address.getAddress() + m_store_count); 175 176 // Stores are assumed to be 1 byte-sized 177 Request *req = new Request(writeAddr.getAddress(), 1, flags, --- 47 unchanged lines hidden (view full) --- 225 226void 227Check::initiateCheck() 228{ 229 DPRINTF(RubyTest, "Initiating Check\n"); 230 assert(m_status == TesterStatus_Ready); 231 232 int index = random() % m_num_readers; |
233 MasterPort* port = m_tester_ptr->getReadableCpuPort(index); |
234 235 Request::Flags flags; 236 237 // If necessary, make the request an instruction fetch |
238 if (m_tester_ptr->isInstReadableCpuPort(index)) { |
239 flags.set(Request::INST_FETCH); 240 } 241 242 // Checks are sized depending on the number of bytes written 243 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags, 244 m_tester_ptr->masterId(), curTick(), m_pc.getAddress()); 245 246 req->setThreadContext(index, 0); --- 142 unchanged lines hidden --- |