SimLoop Class Reference

yasimavr: SimLoop Class Reference
yasimavr
Loading...
Searching...
No Matches
SimLoop Class Reference

Synchronous simulation loop Basic synchronous simulation loop. It is designed for "fast" simulations with a deterministic set of stimuli. It can run in "fast" mode or "real-time" mode. More...

#include <sim_loop.h>

Inheritance diagram for SimLoop:
AbstractSimLoop

Public Member Functions

 SimLoop (Device &device)
 
void set_fast_mode (bool fast)
 Set the simulation running mode: false=real-time, true=fast.
 
void run (cycle_count_t count=0)
 
- Public Member Functions inherited from AbstractSimLoop
 AbstractSimLoop (Device &device)
 
virtual ~AbstractSimLoop ()=default
 
AbstractSimLoop::State state () const
 
cycle_count_t cycle () const
 
CycleManagercycle_manager ()
 
const Devicedevice () const
 
Loggerlogger ()
 

Additional Inherited Members

- Public Types inherited from AbstractSimLoop
enum  State {
  State_Running , State_Step , State_Standby , State_Stopped ,
  State_Done
}
 
- Protected Member Functions inherited from AbstractSimLoop
cycle_count_t run_device (cycle_count_t final_cycle)
 
void set_state (AbstractSimLoop::State state)
 
- Protected Attributes inherited from AbstractSimLoop
Devicem_device
 
State m_state
 
CycleManager m_cycle_manager
 
Logger m_logger
 

Detailed Description

Synchronous simulation loop Basic synchronous simulation loop. It is designed for "fast" simulations with a deterministic set of stimuli. It can run in "fast" mode or "real-time" mode.

  • In real-time mode : the simulation will try to adjust the speed of the simulation to align the simulated time with the system time.
  • In fast mode : no adjustment is done and the simulation runs as fast as permitted.

Constructor & Destructor Documentation

◆ SimLoop()

SimLoop::SimLoop ( Device device)
explicit

Member Function Documentation

◆ run()

void SimLoop::run ( cycle_count_t  nbcycles = 0)

Runs the simulation for a given number of cycles. If set to zero, the simulation will run indefinitely and the function will only return when the device stops definitely.

◆ set_fast_mode()

void SimLoop::set_fast_mode ( bool  fast)
inline

Set the simulation running mode: false=real-time, true=fast.


The documentation for this class was generated from the following files: