32#include "debug/HelloExample.hh"
40 bandwidth(params.write_bandwidth), bufferSize(params.buffer_size),
41 buffer(
nullptr), bufferUsed(0)
43 buffer =
new char[bufferSize]();
44 DPRINTF(HelloExample,
"Created the goodbye object\n");
55 DPRINTF(HelloExample,
"Processing the event!\n");
64 DPRINTF(HelloExample,
"Saying goodbye to %s\n", other_name);
66 message =
"Goodbye " + other_name +
"!! ";
91 DPRINTF(HelloExample,
"Scheduling another fillBuffer in %d ticks\n",
95 DPRINTF(HelloExample,
"Goodbye done copying!\n");
std::string message
The message to put into the buffer.
void fillBuffer()
Fills the buffer for one iteration.
int bufferSize
The size of the buffer we are going to fill.
void sayGoodbye(std::string name)
Called by an outside object.
GoodbyeObject(const GoodbyeObjectParams &p)
float bandwidth
The bytes processed per tick.
void processEvent()
Fill the buffer with the next chunk of data.
char * buffer
The buffer we are putting our message in.
EventFunctionWrapper event
An event that wraps the above function.
int bufferUsed
The amount of the buffer we've used so far.
void schedule(Event &event, Tick when)
const Params & params() const
SimObject(const Params &p)
Copyright (c) 2024 Arm Limited All rights reserved.
Tick curTick()
The universal simulation clock.
void exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat, bool serialize)
The "old style" exitSimLoop functions.
const std::string & name()