RES: RES: Question about SIS for RTEMS 5 and timing

Fabrício de Novaes Kucinskis fabricio.kucinskis at inpe.br
Mon Aug 10 14:21:53 UTC 2020


Understood Jiri, and thank you for the explanation.

 

It would be nice to have a ‘wall-time’ option, mainly for learning and demonstration purposes. We use SIS here for RTEMS newcomers, before allowing them to access real hardware.

 

Thanks again and best regards,

 

Fabrício.

 

De: Jiri Gaisler [mailto:jiri at gaisler.se] 
Enviada em: sábado, 8 de agosto de 2020 16:42
Para: Fabrício de Novaes Kucinskis <fabricio.kucinskis at inpe.br>; joel at rtems.org
Cc: 'RTEMS Users' <rtems-users at rtems.org>
Assunto: Re: RES: Question about SIS for RTEMS 5 and timing

 

Hello Fabricio,

please note that sis does not try to run simulation synchronously with 'wall time', it executes the application as fast as it can. That does not mean that the simulation is not accurate - instruction timing is fairly accurate for erc32 (+- 5%), while for leon2/3 roughly +-25%. The time within the simulator (as visible to the execute application) is accurate, but simulator time might run faster or slower to wall time depending on target architecture and the emulated frequency set with -freq. Application with low cpu utilization (e.g ticker.exe) will run significantly faster than wall time since the simulator can skip time forward when the cpu is in power-down waiting for next interrupt. Applications with high load (e.g dhrystone) will run slower. The 'perf' command will report various simulation statistics.

To run simulation in step with wall time, sis would need to periodically compare wall time with simulated time and pause briefly if the simulator time exceeded wall time. I will consider this as an option for a future sis version. Right now, I am trying to speed up execution further by caching pre-decoded instructions, coupled with (simple) dynamic translation for x64 ...

Jiri.

On 8/7/20 6:40 PM, Fabrício de Novaes Kucinskis wrote:

Thanks for the response, Joel! Hope you’re fine.

 

It’s been a while since I've used SIS paying attention to its timing. I'm trying it now to make some activities possible at home office, because I’m not allowed to bring lab equipment home :(.

 

I've recovered some virtual machines we have with previous versions of RTEMS (and hence, SIS), and noticed that:

                * SIS 2.7.5 for RTEMS 4.10 had its timing "correct", or else, one simulated second is near one second;

                * SIS 2.8 for RTEMS 4.11 runs the same application super-fast, as does the current SIS 2.21 for RTEMS 5.

 

So, it seems that something has changed between versions 2.7.5 and 2.8. As I've stated before, set the "freq" parameter seems to have no effect.

 

Maybe Jiri - long time no write! - can say if there's a way to get the same "old 2.7.5" timing behavior on the current version?

 

Thanks again and best regards,

 

Fabrício.

 

De: Joel Sherrill [mailto:joel at rtems.org] 
Enviada em: sexta-feira, 7 de agosto de 2020 11:31
Para: Fabrício de Novaes Kucinskis  <mailto:fabricio.kucinskis at inpe.br> <fabricio.kucinskis at inpe.br>; Jiri Gaisler  <mailto:jiri at gaisler.se> <jiri at gaisler.se>
Cc: RTEMS Users  <mailto:rtems-users at rtems.org> <rtems-users at rtems.org>
Assunto: Re: Question about SIS for RTEMS 5 and timing

 

 

 

On Thu, Aug 6, 2020 at 3:54 PM Fabrício de Novaes Kucinskis <fabricio.kucinskis at inpe.br <mailto:fabricio.kucinskis at inpe.br> > wrote:

Hello all, I hope everyone on the list is health and safe.

 

I’m studying the update of a SPARC project, currently based on RTEMS 4.11, to RTEMS 5.

 

After installing RTEMS 5, the first thing I did was compile and run, on SIS, a set of example applications.

 

When calling sparc-rtems5-sis, I noticed that the loaded application run fast as hell, as SIS was just calling one instruction after the other, with no timing concerns – different from what I saw on older versions.

 

I’ve tried to set the frequency with the “-freq” parameter, but this makes no difference. I also checked the RTEMS SPARC BSP sources, and the CLOCK_SPEED definition inside the trap table is still set to 10, as ever.

 

Can anyone say what is different between the previous and current SIS versions, and how can I make the applications run with a reasonable timing?

 

AFAIK sis is cycle accurate for the instructions inside its simulated world. But the erc32 is VERY slow compared to the host processor and simulated code runs incredibly fast. 1 second of erc32 CPU time takes much less time to simulate.

 

There is a perf command in sis to get the view of the simulated CPU time.

 

I've cc'ed Jiri so he can add anything.

 

Thanks in advance and best regards,

 

Fabrício.

_______________________________________________
users mailing list
users at rtems.org <mailto:users at rtems.org> 
http://lists.rtems.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200810/8eb79a7d/attachment.html>


More information about the users mailing list