Go to the documentation of this file.
32 #include "debug/HelloExample.hh"
37 bandwidth(params->write_bandwidth), bufferSize(params->buffer_size),
38 buffer(
nullptr), bufferUsed(0)
40 buffer =
new char[bufferSize]();
41 DPRINTF(HelloExample,
"Created the goodbye object\n");
52 DPRINTF(HelloExample,
"Processing the event!\n");
61 DPRINTF(HelloExample,
"Saying goodbye to %s\n", other_name);
63 message =
"Goodbye " + other_name +
"!! ";
88 DPRINTF(HelloExample,
"Scheduling another fillBuffer in %d ticks\n",
92 DPRINTF(HelloExample,
"Goodbye done copying!\n");
99 GoodbyeObjectParams::create()
void fillBuffer()
Fills the buffer for one iteration.
int bufferUsed
The amount of the buffer we've used so far.
std::string message
The message to put into the buffer.
EventFunctionWrapper event
An event that wraps the above function.
float bandwidth
The bytes processed per tick.
int bufferSize
The size of the buffer we are going to fill.
void sayGoodbye(std::string name)
Called by an outside object.
char * buffer
The buffer we are putting our message in.
void schedule(Event &event, Tick when)
GoodbyeObject(GoodbyeObjectParams *p)
void exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat, bool serialize)
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (...
const std::string & name()
void processEvent()
Fill the buffer with the next chunk of data.
Tick curTick()
The current simulated tick.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17