The Sparta Modeling Framework
Loading...
Searching...
No Matches
MSS.hpp
1
2#pragma once
3
16
17#include "CoreTypes.hpp"
18#include "FlushManager.hpp"
19
20namespace core_example
21{
22 class MSS : public sparta::Unit
23 {
24 public:
27 {
28 public:
29 // Constructor for MSSParameterSet
32 { }
33
34 PARAMETER(uint32_t, mss_latency, 5, "MSS access latency")
35 };
36
37 // Constructor for MSS
38 // node parameter is the node that represent the MSS and p is the MSS parameter set
39 MSS(sparta::TreeNode* node, const MSSParameterSet* p);
40
41 // name of this resource.
42 static const char name[];
43
44
46 // Type Name/Alias Declaration
48
49
50 private:
52 // Input Ports
54
56 {&unit_port_set_, "in_mss_req_sync", getClock()};
57
58
60 // Output Ports
62
63 sparta::SyncOutPort<bool> out_mss_ack_sync_
64 {&unit_port_set_, "out_mss_ack_sync", getClock()};
65
66
68 // Internal States
70 const uint32_t mss_latency_;
71 bool mss_busy_ = false;
72
73
75 // Event Handlers
77
78 // Event to handle MSS request from BIU
79 sparta::UniqueEvent<> ev_handle_mss_req_
80 {&unit_event_set_, "handle_mss_req", CREATE_SPARTA_HANDLER(MSS, handle_MSS_req_)};
81
82
84 // Callbacks
86
87 // Receive new MSS request from BIU
88 void getReqFromBIU_(const ExampleInstPtr &);
89
90 // Handle MSS request
91 void handle_MSS_req_();
92
93
95 // Regular Function/Subroutine Call
97
98
99 };
100}
101
Implementation of the Collectable class that allows a user to collect an object into an pipeViewer pi...
File that defines Data[In,Out]Port<DataT>
File that defines the EventSet class.
A set of sparta::Parameters per sparta::ResourceTreeNode.
#define PARAMETER(type, name, def, doc)
Parameter declaration.
Defines the Pipe class.
File that defines the PortSet class.
File that defines the SignalInPort.
#define CREATE_SPARTA_HANDLER(clname, meth)
File that defines the StartupEvent class.
File that defines synchronized input/output ports.
Basic Node framework in sparta device tree composite pattern.
File that defines the UniqueEvent class.
File that defines the Unit class, a common grouping of sets and loggers.
Parameters for MSS model.
Definition MSS.hpp:27
Generic container of Parameters.
const Clock * getClock() const
Class that defines an synchronized input port on modules on two different clocks.
Definition SyncPort.hpp:412
Class that defines a synchronized SyncOutPort for data writes on different clocks.
Definition SyncPort.hpp:113
Node in a composite tree representing a sparta Tree item.
Definition TreeNode.hpp:205
A type of Event that uniquely schedules itself on the schedule within a single time quantum....
The is the base class for user defined blocks in simulation.
Definition Unit.hpp:38
sparta::EventSet unit_event_set_
The Unit's event set.
Definition Unit.hpp:114
sparta::PortSet unit_port_set_
The Unit's Ports.
Definition Unit.hpp:111