InvalidateGenerator.hh revision 8229:78bf55f23338
114039Sstacze01@arm.com/* 214039Sstacze01@arm.com * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 314039Sstacze01@arm.com * All rights reserved. 414039Sstacze01@arm.com * 514039Sstacze01@arm.com * Redistribution and use in source and binary forms, with or without 614039Sstacze01@arm.com * modification, are permitted provided that the following conditions are 714039Sstacze01@arm.com * met: redistributions of source code must retain the above copyright 814039Sstacze01@arm.com * notice, this list of conditions and the following disclaimer; 914039Sstacze01@arm.com * redistributions in binary form must reproduce the above copyright 1014039Sstacze01@arm.com * notice, this list of conditions and the following disclaimer in the 1114039Sstacze01@arm.com * documentation and/or other materials provided with the distribution; 1214039Sstacze01@arm.com * neither the name of the copyright holders nor the names of its 1314039Sstacze01@arm.com * contributors may be used to endorse or promote products derived from 1414039Sstacze01@arm.com * this software without specific prior written permission. 1514039Sstacze01@arm.com * 1614039Sstacze01@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1714039Sstacze01@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1814039Sstacze01@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1914039Sstacze01@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2014039Sstacze01@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2114039Sstacze01@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2214039Sstacze01@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2314039Sstacze01@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2414039Sstacze01@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2514039Sstacze01@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2614039Sstacze01@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2714039Sstacze01@arm.com */ 2814039Sstacze01@arm.com 2914039Sstacze01@arm.com// 3014039Sstacze01@arm.com// This Directed Generator generates GETX requests for all nodes in the 3114039Sstacze01@arm.com// system. The GETX requests are generated one at a time in round-robin fashion 3214039Sstacze01@arm.com// 0...1...2...etc. 3314039Sstacze01@arm.com// 3414039Sstacze01@arm.com 3514039Sstacze01@arm.com#ifndef __CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__ 3614039Sstacze01@arm.com#define __CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__ 3714039Sstacze01@arm.com 3814039Sstacze01@arm.com#include "cpu/testers/directedtest/DirectedGenerator.hh" 3914039Sstacze01@arm.com#include "cpu/testers/directedtest/RubyDirectedTester.hh" 4014039Sstacze01@arm.com#include "mem/protocol/InvalidateGeneratorStatus.hh" 4114039Sstacze01@arm.com#include "params/InvalidateGenerator.hh" 4214039Sstacze01@arm.com 4314039Sstacze01@arm.comclass InvalidateGenerator : public DirectedGenerator 4414039Sstacze01@arm.com{ 4514039Sstacze01@arm.com public: 4614039Sstacze01@arm.com typedef InvalidateGeneratorParams Params; 4714039Sstacze01@arm.com InvalidateGenerator(const Params *p); 4814039Sstacze01@arm.com 4914039Sstacze01@arm.com ~InvalidateGenerator(); 5014039Sstacze01@arm.com 5114039Sstacze01@arm.com bool initiate(); 5214039Sstacze01@arm.com void performCallback(uint proc, Addr address); 5314039Sstacze01@arm.com 5414039Sstacze01@arm.com private: 5514039Sstacze01@arm.com InvalidateGeneratorStatus m_status; 5614039Sstacze01@arm.com Addr m_address; 5714039Sstacze01@arm.com uint m_active_read_node; 5814039Sstacze01@arm.com uint m_active_inv_node; 5914039Sstacze01@arm.com uint m_addr_increment_size; 6014039Sstacze01@arm.com}; 6114039Sstacze01@arm.com 6214039Sstacze01@arm.com#endif //__CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__ 6314039Sstacze01@arm.com 6414039Sstacze01@arm.com