16145SN/A/*
26386SN/A * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
36386SN/A * All rights reserved.
46386SN/A *
56386SN/A * Redistribution and use in source and binary forms, with or without
66386SN/A * modification, are permitted provided that the following conditions are
76386SN/A * met: redistributions of source code must retain the above copyright
86386SN/A * notice, this list of conditions and the following disclaimer;
96386SN/A * redistributions in binary form must reproduce the above copyright
106386SN/A * notice, this list of conditions and the following disclaimer in the
116386SN/A * documentation and/or other materials provided with the distribution;
126386SN/A * neither the name of the copyright holders nor the names of its
136386SN/A * contributors may be used to endorse or promote products derived from
146386SN/A * this software without specific prior written permission.
156386SN/A *
166386SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176386SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186386SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196386SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206386SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216386SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226386SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236386SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246386SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256386SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266386SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276386SN/A */
286145SN/A
297553SN/A//
3011320Ssteve.reinhardt@amd.com// This Deterministic Generator generates GETX requests for all nodes in the
317553SN/A// system.  The GETX requests are generated one at a time in round-robin fashion
327553SN/A// 0...1...2...etc.
337553SN/A//
346145SN/A
357553SN/A#ifndef __CPU_DIRECTEDTEST_SERIESREQUESTGENERATOR_HH__
367553SN/A#define __CPU_DIRECTEDTEST_SERIESREQUESTGENERATOR_HH__
376145SN/A
387632SBrad.Beckmann@amd.com#include "cpu/testers/directedtest/DirectedGenerator.hh"
397632SBrad.Beckmann@amd.com#include "cpu/testers/directedtest/RubyDirectedTester.hh"
4014184Sgabeblack@google.com#include "mem/ruby/protocol/SeriesRequestGeneratorStatus.hh"
417553SN/A#include "params/SeriesRequestGenerator.hh"
426145SN/A
4311320Ssteve.reinhardt@amd.comclass SeriesRequestGenerator : public DirectedGenerator
447553SN/A{
457553SN/A  public:
467553SN/A    typedef SeriesRequestGeneratorParams Params;
477553SN/A    SeriesRequestGenerator(const Params *p);
4811320Ssteve.reinhardt@amd.com
497553SN/A    ~SeriesRequestGenerator();
5011320Ssteve.reinhardt@amd.com
517553SN/A    bool initiate();
528655Sandreas.hansson@arm.com    void performCallback(uint32_t proc, Addr address);
5311320Ssteve.reinhardt@amd.com
547553SN/A  private:
557553SN/A    SeriesRequestGeneratorStatus m_status;
567553SN/A    Addr m_address;
578655Sandreas.hansson@arm.com    uint32_t m_active_node;
588655Sandreas.hansson@arm.com    uint32_t m_addr_increment_size;
599365Snilay@cs.wisc.edu    uint32_t m_percent_writes;
606145SN/A};
616145SN/A
627553SN/A#endif //__CPU_DIRECTEDTEST_SERIESREQUESTGENERATOR_HH__
636145SN/A
64