Q: Should Cygwin/RTEMS-4.6.2/powerpc-rtems/psim pass these: s p12. exe and sp32.exe?
Mills, John M.
Mills.J at ems-t.com
Fri Jan 21 18:07:56 UTC 2005
Joel -
Mills, John M. wrote:
> Following your note to Daniel Gustafsson and the contents of <confdefs.h>,
I
> edited
> <RTEMS-srcdir>/c/src/tests/sptests/sp32/init.c to add the line:
>
> "#define CONFIGURE_MICROSECONDS_PER_TICK
> RTEMS_MILLISECONDS_PER_MICROSECOND(xx)"
>
> before the line: "#include <confdefs.h>"
>
> I still fail 'sp32.exe' for values of xx between 1 and 5000.
js> psim is pretty simple. Each unit counted in the decrementer
js> register is 1 instruction. There is a constant in the BSP
js> named PSIM_INSTRUCTIONS_PER_MICROSECOND which is set to 10000
js> in the CVS source. The value put in the decrementer register
js> is calculated by this code.
js> PPC_DECREMENTER_CLICKS =
js> (unsigned int)&PSIM_INSTRUCTIONS_PER_MICROSECOND;
js> PPC_DECREMENTER_CLICKS *=
js> rtems_configuration_get_microseconds_per_tick();
js> So we are saying that there you need to execute at least 10000 * 5000
js> instructions per simulated millisecond to do the workload required
js> by this test.
I found the following in
<RTEMS-srcdir>/c/src/lib/libbsp/powerpc/psim/startup/linkcmds:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++
...
ENTRY(_start)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
PROVIDE (PSIM_INSTRUCTIONS_PER_MICROSECOND = 100);
PROVIDE (CPU_PPC_CLICKS_PER_MS = 16667);
...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++
Is that the right place to adjust psim's "bogomips" factor? Should there be
a matching adjustment made to "CPU_PPC_CLICKS_PER_MS"?
Also, where should I have looked for this information? I suppose it is
always a candidate for attention when you set up a BSP. I went through the
on-line docs and came up dry, but this kind of thing is surely there
somewhere.
js> Basically you can turn down the number of instructions per tick
js> to the point where you are not making forward progress on the test.
I'll try adjusting PSIM_INSTRUCTIONS_PER_MICROSECOND.
js> sp32.exe ran for me last night but sp12.exe failed on psim.
'sp12.exe' still dies for me, too. Looks like it's blowing up the priority
stack, else there's a misdefined constant or wrong storage class used to
link the priority 15 callback.
Thanks.
- John
John M. Mills
Staff Engineer
EMS Technologies
660 Engineering Drive
Norcross, GA 30092
770.263.9200 ext4882
More information about the users
mailing list