mem_delay.hh (13784:1941dc118243) mem_delay.hh (13892:0182a0601f66)
1/*
2 * Copyright (c) 2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 26 unchanged lines hidden (view full) ---

35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Andreas Sandberg
38 */
39
40#ifndef __MEM_MEM_DELAY_HH__
41#define __MEM_MEM_DELAY_HH__
42
1/*
2 * Copyright (c) 2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 26 unchanged lines hidden (view full) ---

35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Andreas Sandberg
38 */
39
40#ifndef __MEM_MEM_DELAY_HH__
41#define __MEM_MEM_DELAY_HH__
42
43#include "mem/mem_object.hh"
44#include "mem/qport.hh"
43#include "mem/qport.hh"
44#include "sim/clocked_object.hh"
45
46struct MemDelayParams;
47struct SimpleMemDelayParams;
48
49/**
50 * This abstract component provides a mechanism to delay
51 * packets. It can be spliced between arbitrary ports of the memory
52 * system and delays packets that pass through it.
53 *
54 * Specialisations of this abstract class should override at least one
55 * of delayReq, delayResp, deleySnoopReq, delaySnoopResp. These
56 * methods receive a PacketPtr as their argument and return a delay in
57 * Ticks. The base class implements an infinite buffer to hold delayed
58 * packets until they are ready. The intention is to use this
59 * component for rapid prototyping of other memory system components
60 * that introduce a packet processing delays.
61 *
62 * NOTE: Packets may be reordered if the delays aren't constant.
63 */
45
46struct MemDelayParams;
47struct SimpleMemDelayParams;
48
49/**
50 * This abstract component provides a mechanism to delay
51 * packets. It can be spliced between arbitrary ports of the memory
52 * system and delays packets that pass through it.
53 *
54 * Specialisations of this abstract class should override at least one
55 * of delayReq, delayResp, deleySnoopReq, delaySnoopResp. These
56 * methods receive a PacketPtr as their argument and return a delay in
57 * Ticks. The base class implements an infinite buffer to hold delayed
58 * packets until they are ready. The intention is to use this
59 * component for rapid prototyping of other memory system components
60 * that introduce a packet processing delays.
61 *
62 * NOTE: Packets may be reordered if the delays aren't constant.
63 */
64class MemDelay : public MemObject
64class MemDelay : public ClockedObject
65{
66
67 public:
68 MemDelay(const MemDelayParams *params);
69
70 void init() override;
71
72 protected: // Port interface

--- 110 unchanged lines hidden ---
65{
66
67 public:
68 MemDelay(const MemDelayParams *params);
69
70 void init() override;
71
72 protected: // Port interface

--- 110 unchanged lines hidden ---