InvalidateGenerator.hh revision 7632
11817SN/A/*
21817SN/A * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
31817SN/A * All rights reserved.
41817SN/A *
51817SN/A * Redistribution and use in source and binary forms, with or without
61817SN/A * modification, are permitted provided that the following conditions are
71817SN/A * met: redistributions of source code must retain the above copyright
81817SN/A * notice, this list of conditions and the following disclaimer;
91817SN/A * redistributions in binary form must reproduce the above copyright
101817SN/A * notice, this list of conditions and the following disclaimer in the
111817SN/A * documentation and/or other materials provided with the distribution;
121817SN/A * neither the name of the copyright holders nor the names of its
131817SN/A * contributors may be used to endorse or promote products derived from
141817SN/A * this software without specific prior written permission.
151817SN/A *
161817SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171817SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
181817SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
191817SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
201817SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
211817SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
221817SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
231817SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
241817SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251817SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
261817SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu */
283499Ssaidi@eecs.umich.edu
291817SN/A//
301817SN/A// This Directed Generator generates GETX requests for all nodes in the
311817SN/A// system.  The GETX requests are generated one at a time in round-robin fashion
321817SN/A// 0...1...2...etc.
331817SN/A//
341817SN/A
3511793Sbrandon.potter@amd.com#ifndef __CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__
3611793Sbrandon.potter@amd.com#define __CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__
371817SN/A
388232Snate@binkert.org#include "cpu/testers/directedtest/RubyDirectedTester.hh"
392542SN/A#include "cpu/testers/directedtest/DirectedGenerator.hh"
403348Sbinkertn@umich.edu#include "mem/protocol/InvalidateGeneratorStatus.hh"
411817SN/A#include "params/InvalidateGenerator.hh"
421817SN/A
431817SN/Aclass InvalidateGenerator : public DirectedGenerator
441817SN/A{
452539SN/A  public:
469808Sstever@gmail.com    typedef InvalidateGeneratorParams Params;
471817SN/A    InvalidateGenerator(const Params *p);
484762Snate@binkert.org
494762Snate@binkert.org    ~InvalidateGenerator();
504762Snate@binkert.org
514762Snate@binkert.org    bool initiate();
522539SN/A    void performCallback(uint proc, Addr address);
531817SN/A
542539SN/A  private:
553349Sbinkertn@umich.edu    InvalidateGeneratorStatus m_status;
562539SN/A    Addr m_address;
578461SAli.Saidi@ARM.com    uint m_active_read_node;
582539SN/A    uint m_active_inv_node;
594762Snate@binkert.org    uint m_addr_increment_size;
603814Ssaidi@eecs.umich.edu};
613814Ssaidi@eecs.umich.edu
624762Snate@binkert.org#endif //__CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__
635192Ssaidi@eecs.umich.edu
643499Ssaidi@eecs.umich.edu