mem.hh revision 10994
110994Sandreas.sandberg@arm.com/* 210994Sandreas.sandberg@arm.com * Copyright (c) 2015 ARM Limited 310994Sandreas.sandberg@arm.com * All rights reserved 410994Sandreas.sandberg@arm.com * 510994Sandreas.sandberg@arm.com * The license below extends only to copyright in the software and shall 610994Sandreas.sandberg@arm.com * not be construed as granting a license to any other intellectual 710994Sandreas.sandberg@arm.com * property including but not limited to intellectual property relating 810994Sandreas.sandberg@arm.com * to a hardware implementation of the functionality of the software 910994Sandreas.sandberg@arm.com * licensed hereunder. You may use the software subject to the license 1010994Sandreas.sandberg@arm.com * terms below provided that you ensure that this notice is replicated 1110994Sandreas.sandberg@arm.com * unmodified and in its entirety in all distributions of the software, 1210994Sandreas.sandberg@arm.com * modified or unmodified, in source code or in binary form. 1310994Sandreas.sandberg@arm.com * 1410994Sandreas.sandberg@arm.com * Redistribution and use in source and binary forms, with or without 1510994Sandreas.sandberg@arm.com * modification, are permitted provided that the following conditions are 1610994Sandreas.sandberg@arm.com * met: redistributions of source code must retain the above copyright 1710994Sandreas.sandberg@arm.com * notice, this list of conditions and the following disclaimer; 1810994Sandreas.sandberg@arm.com * redistributions in binary form must reproduce the above copyright 1910994Sandreas.sandberg@arm.com * notice, this list of conditions and the following disclaimer in the 2010994Sandreas.sandberg@arm.com * documentation and/or other materials provided with the distribution; 2110994Sandreas.sandberg@arm.com * neither the name of the copyright holders nor the names of its 2210994Sandreas.sandberg@arm.com * contributors may be used to endorse or promote products derived from 2310994Sandreas.sandberg@arm.com * this software without specific prior written permission. 2410994Sandreas.sandberg@arm.com * 2510994Sandreas.sandberg@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2610994Sandreas.sandberg@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2710994Sandreas.sandberg@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2810994Sandreas.sandberg@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2910994Sandreas.sandberg@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3010994Sandreas.sandberg@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3110994Sandreas.sandberg@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3210994Sandreas.sandberg@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3310994Sandreas.sandberg@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3410994Sandreas.sandberg@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3510994Sandreas.sandberg@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3610994Sandreas.sandberg@arm.com * 3710994Sandreas.sandberg@arm.com * Authors: Andreas Sandberg 3810994Sandreas.sandberg@arm.com */ 3910994Sandreas.sandberg@arm.com#ifndef __SIM_PROBE_MEM_HH__ 4010994Sandreas.sandberg@arm.com#define __SIM_PROBE_MEM_HH__ 4110994Sandreas.sandberg@arm.com 4210994Sandreas.sandberg@arm.com#include <memory> 4310994Sandreas.sandberg@arm.com 4410994Sandreas.sandberg@arm.com#include "mem/packet.hh" 4510994Sandreas.sandberg@arm.com#include "sim/probe/probe.hh" 4610994Sandreas.sandberg@arm.com 4710994Sandreas.sandberg@arm.comnamespace ProbePoints { 4810994Sandreas.sandberg@arm.com 4910994Sandreas.sandberg@arm.com/** 5010994Sandreas.sandberg@arm.com * Packet probe point 5110994Sandreas.sandberg@arm.com * 5210994Sandreas.sandberg@arm.com * This probe point provides a unified interface for components that 5310994Sandreas.sandberg@arm.com * want to instrument Packets in the memory system. Components should 5410994Sandreas.sandberg@arm.com * when possible adhere to the following naming scheme: 5510994Sandreas.sandberg@arm.com * 5610994Sandreas.sandberg@arm.com * <ul> 5710994Sandreas.sandberg@arm.com * 5810994Sandreas.sandberg@arm.com * <li>PktRequest: Requests sent out on the memory side of a normal 5910994Sandreas.sandberg@arm.com * components and incoming requests for memories. Packets should 6010994Sandreas.sandberg@arm.com * not be duplicated (i.e., a packet should only appear once 6110994Sandreas.sandberg@arm.com * irrespective of the receiving end requesting a retry). 6210994Sandreas.sandberg@arm.com * 6310994Sandreas.sandberg@arm.com * <li>PktResponse: Response received from the memory side of a 6410994Sandreas.sandberg@arm.com * normal component or a response being sent out from a memory. 6510994Sandreas.sandberg@arm.com * 6610994Sandreas.sandberg@arm.com * <li>PktRequestCPU: Incoming, accepted, memory request on the CPU 6710994Sandreas.sandberg@arm.com * side of a two-sided component. This probe point is primarily 6810994Sandreas.sandberg@arm.com * intended for components that cache or forward requests (e.g., 6910994Sandreas.sandberg@arm.com * caches and XBars), single-sided components should use 7010994Sandreas.sandberg@arm.com * PktRequest instead. The probe point should only be called 7110994Sandreas.sandberg@arm.com * when a packet is accepted. 7210994Sandreas.sandberg@arm.com * 7310994Sandreas.sandberg@arm.com * <li>PktResponseCPU: Outgoing response memory request on the CPU 7410994Sandreas.sandberg@arm.com * side of a two-sided component. This probe point is primarily 7510994Sandreas.sandberg@arm.com * intended for components that cache or forward requests (e.g., 7610994Sandreas.sandberg@arm.com * caches and XBars), single-sided components should use 7710994Sandreas.sandberg@arm.com * PktRequest instead. 7810994Sandreas.sandberg@arm.com * 7910994Sandreas.sandberg@arm.com * </ul> 8010994Sandreas.sandberg@arm.com * 8110994Sandreas.sandberg@arm.com */ 8210994Sandreas.sandberg@arm.comtypedef ProbePointArg< ::PacketPtr> Packet; 8310994Sandreas.sandberg@arm.comtypedef std::unique_ptr<Packet> PacketUPtr; 8410994Sandreas.sandberg@arm.com 8510994Sandreas.sandberg@arm.com} 8610994Sandreas.sandberg@arm.com 8710994Sandreas.sandberg@arm.com#endif 88