We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
It's not clear to me how Fast Models, especially the ARM CPU models set or use quantums. If I call tlm_quantumkeeper::set_global_quantum in my sc_main to set a global quantum, will it also affect the exported virtual system called in my simulation application? If yes, is there any requirement on the size of the global quantum?
Thanks
-Oscar
The Fast Models use the tlm_global_quantum API to set and manage the quantum size; an example of using this API to set quantum size in an exported virtual system model:
/* Number of ticks to simulate per quantum */ double quantum = 10000.0; /* Simulation quantum, i.e. seconds to run per quantum */ tlm::tlm_global_quantum::instance().set(sc_core::sc_time(quantum / 100000000, sc_core::SC_SEC));
/* Number of ticks to simulate per quantum */
double quantum = 10000.0;
/* Simulation quantum, i.e. seconds to run per quantum */
tlm::tlm_global_quantum::instance().set(sc_core::sc_time(quantum / 100000000, sc_core::SC_SEC));
tlm_quantumkeeper is a utility class built on the tlm_global_quantum API, so it should function as intended within an EVS model.
The recommended quantum size will depend on your workload and platform, for reference the EVS models use a default quantum size of 10000 nanoseconds. A higher quantum value will increase performance at the cost of accuracy and synchronization latency.
Thank you very much, Josh.