RubyRequest.hh revision 8165
12SN/A/*
21762SN/A * Copyright (c) 2009 Mark D. Hill and David A. Wood
32SN/A * All rights reserved.
42SN/A *
52SN/A * Redistribution and use in source and binary forms, with or without
62SN/A * modification, are permitted provided that the following conditions are
72SN/A * met: redistributions of source code must retain the above copyright
82SN/A * notice, this list of conditions and the following disclaimer;
92SN/A * redistributions in binary form must reproduce the above copyright
102SN/A * notice, this list of conditions and the following disclaimer in the
112SN/A * documentation and/or other materials provided with the distribution;
122SN/A * neither the name of the copyright holders nor the names of its
132SN/A * contributors may be used to endorse or promote products derived from
142SN/A * this software without specific prior written permission.
152SN/A *
162SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu */
282760Sbinkertn@umich.edu
292760Sbinkertn@umich.edu#ifndef __MEM_RUBY_SLICC_INTERFACE_RUBY_REQUEST_HH__
302665Ssaidi@eecs.umich.edu#define __MEM_RUBY_SLICC_INTERFACE_RUBY_REQUEST_HH__
312SN/A
322SN/A#include <ostream>
332SN/A
342SN/A#include "mem/packet.hh"
352SN/A#include "mem/protocol/RubyAccessMode.hh"
362SN/A#include "mem/protocol/RubyRequestType.hh"
372SN/A#include "mem/protocol/Message.hh"
382SN/A#include "mem/protocol/PrefetchBit.hh"
392SN/A#include "mem/ruby/common/Address.hh"
402SN/A
418229Snate@binkert.orgtypedef void* RubyPortHandle;
422SN/A
438229Snate@binkert.orgclass RubyRequest
444841Ssaidi@eecs.umich.edu{
452SN/A  public:
4610459SAndreas.Sandberg@ARM.com    uint64_t paddr;
476214Snate@binkert.org    uint8_t* data;
482SN/A    int len;
492738Sstever@eecs.umich.edu    uint64_t pc;
50395SN/A    RubyRequestType type;
51237SN/A    RubyAccessMode access_mode;
524000Ssaidi@eecs.umich.edu    PacketPtr pkt;
539983Sstever@gmail.com    unsigned proc_id;
542SN/A
559048SAli.Saidi@ARM.com    RubyRequest() {}
569048SAli.Saidi@ARM.com    RubyRequest(uint64_t _paddr,
579056SAli.Saidi@ARM.com                uint8_t* _data,
589048SAli.Saidi@ARM.com                int _len,
599048SAli.Saidi@ARM.com                uint64_t _pc,
609056SAli.Saidi@ARM.com                RubyRequestType _type,
619048SAli.Saidi@ARM.com                RubyAccessMode _access_mode,
6210861SCurtis.Dunham@arm.com                PacketPtr _pkt,
639048SAli.Saidi@ARM.com                unsigned _proc_id = 100)
64217SN/A        : paddr(_paddr),
65502SN/A          data(_data),
66217SN/A          len(_len),
6710459SAndreas.Sandberg@ARM.com          pc(_pc),
6810459SAndreas.Sandberg@ARM.com          type(_type),
6910459SAndreas.Sandberg@ARM.com          access_mode(_access_mode),
7010459SAndreas.Sandberg@ARM.com          pkt(_pkt),
7110459SAndreas.Sandberg@ARM.com          proc_id(_proc_id)
7210459SAndreas.Sandberg@ARM.com    {}
7310459SAndreas.Sandberg@ARM.com
74217SN/A    void print(std::ostream& out) const;
75237SN/A};
76502SN/A
77217SN/Astd::ostream& operator<<(std::ostream& out, const RubyRequest& obj);
7810459SAndreas.Sandberg@ARM.com
7910459SAndreas.Sandberg@ARM.com#endif
8010459SAndreas.Sandberg@ARM.com