Go to the documentation of this file.
192 std::unique_ptr<GlobalSyncEvent, DescheduleDeleter> quantum_event;
194 inform(
"Entering event queue @ %d. Starting simulation...\n",
curTick());
204 if (num_cycles != -1) {
219 "Quantum for multi-eventq simulation not specified");
236 assert(global_event);
250 "simulate() limit reached", 0);
292 assert(!eventq->
empty());
294 "event scheduled in the past");
300 std::lock_guard<EventQueue>
lock(*eventq);
324 if (exit_event != NULL) {
A special global event that synchronizes all threads and forces them to process asynchronously enqueu...
Tick curTick()
The universal simulation clock.
void terminateEventQueueThreads()
Terminate helper threads when running in parallel mode.
GlobalSimLoopExitEvent * global_exit_event
Simulate for num_cycles additional cycles.
std::vector< EventQueue * > mainEventQueue
Array for main event queues.
volatile bool async_exit
Async request to exit simulator.
EventQueue * getEventQueue(uint32_t index)
Function for returning eventq queue for the provided index.
std::atomic< bool > terminate
void reschedule(Tick when)
volatile bool async_statreset
Async request to reset stats.
bool inParallelMode
Current mode of execution: parallel / serial.
void operator()(BaseGlobalEvent *event)
void set_max_tick(Tick tick)
Set the maximum tick.
static const Priority Progress_Event_Pri
Progress events come at the end.
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 (...
volatile bool async_statdump
Async request to dump stats.
Event * doSimLoop(EventQueue *)
forward declaration
void handleAsyncInsertions()
Function for moving events from the async_queue to the main queue.
Common base class for GlobalEvent and GlobalSyncEvent.
Tick get_max_tick()
Get the maximum simulation tick.
SimulatorThreads & operator=(SimulatorThreads &)=delete
volatile bool async_exception
Python exception.
uint64_t Tick
Tick count type.
Queue of events sorted in time order.
virtual BaseGlobalEvent * globalEvent()
If this is part of a GlobalEvent, return the pointer to the Global Event.
Tick simQuantum
Simulation Quantum for multiple eventq simulation.
bool empty() const
Returns true if no events are queued.
SimulatorThreads()=delete
volatile bool async_io
Async I/O request (SIGIO).
GlobalSimLoopExitEvent * simulate(Tick num_cycles)
EventQueue * curEventQueue()
uint32_t numMainEventQueues
Current number of allocated main event queues.
void thread_main(EventQueue *queue)
The main function for all subordinate threads (i.e., all threads other than the main thread).
std::vector< std::thread > threads
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
static std::unique_ptr< SimulatorThreads > simulatorThreads
void schedStatEvent(bool dump, bool reset, Tick when, Tick repeat)
Schedule statistics dumping.
volatile bool async_event
Some asynchronous event has happened.
GlobalSimLoopExitEvent * simulate_limit_event
SimulatorThreads(uint32_t num_queues)
Generated on Sun Jul 30 2023 01:57:00 for gem5 by doxygen 1.8.17