19#include "CoreTypes.hpp"
43 auto non_zero_validator = [](uint32_t & val,
const sparta::TreeNode*)->
bool {
49 num_to_fetch.addDependentValidationCallback(non_zero_validator,
50 "Num to fetch must be greater than 0");
53 PARAMETER(uint32_t, num_to_fetch, 4,
"Number of instructions to fetch")
54 PARAMETER(uint32_t, inst_rand_seed, 0xdeadbeef,
"Seed for random instruction fetch")
55 PARAMETER(
bool, fetch_max_ipc,
false,
"Fetch tries to maximize IPC by distributing insts")
70 << example_inst_allocator.getNumAllocated()
71 <<
" ExampleInst objects allocated/created"
92 const uint32_t num_insts_to_fetch_;
95 uint32_t credits_inst_queue_ = 0;
98 uint64_t vaddr_ = 0x1000;
103 std::unique_ptr<sparta::SingleCycleUniqueEvent<>> fetch_inst_event_;
112 void receiveFetchQueueCredits_(
const uint32_t &);
116 template<
bool MaxIPC>
117 void fetchInstruction_();
120 void flushFetch_(
const uint64_t & new_addr);
123 uint64_t next_inst_id_ = 0;
126 bool speculative_path_ =
false;
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>
A set of sparta::Parameters per sparta::ResourceTreeNode.
#define PARAMETER(type, name, def, doc)
Parameter declaration.
File that defines the SingleCycleUniqueEvent class.
Basic Node framework in sparta device tree composite pattern.
File that defines the Unit class, a common grouping of sets and loggers.
Parameters for Fetch model.
static const char * name
Name of this resource. Required by sparta::UnitFactory.
DataInPort receives data from sender using a DataOutPort.
DataOutPort is used for transferring any data to another module.
Generic container of Parameters.
TreeNode * getContainer()
Gets the TreeNode (container) for this resource (if any)
Node in a composite tree representing a sparta Tree item.
std::string getLocation() const override final
The is the base class for user defined blocks in simulation.
log::MessageSource debug_logger_
Default debug logger.
sparta::PortSet unit_port_set_
The Unit's Ports.
Class used to either manually or auto-collect an Annotation String object in a pipeline database.
@ Tick
Most operations (combinational logic) occurs in this phase.
@ Flush
Phase where flushing of pipelines, etc can occur.