pc386 benchmark timer driver Re: Timers problem

Joel Sherrill joel.sherrill at OARcorp.com
Thu Jan 9 14:54:36 UTC 2003



Mike Siers wrote:
> 
> Hi Joel,
> I just wanted to verify something related to this timer issue.
> The BSP timer subdirectory contains code for a more accurate
> timer that is used by the RTEMS benchmark timing tests.

Correct.  Ideally it is not using the same hardware timer source
as the clock tick but that is often not the case so in general,
you should not try to use the timer and clock drivers in the
same application.  On slow (16 Mhz 68020) hardware, the test 
cases measured generally fall below 30 milliseconds so that
sets a reasonable upper bound for most environments.
 
> If my BSP does not need to run these tests and I do not need a
> more precise timer, then I am assuming my BSP is not required
> to implement the timer.

No it is not required but if you do not provide at least a stub,
you cannot build with --enable-tests.  

> Is the more precise timer used any where else in the RTEMS core?

No.

> Or is my BSP considered incomplete without this timer?

Technically yes.  You can not verify the performance of RTEMS on your
target hardware.  It is not unheard of to discover that a BSP does
not enable some feature like caching and the performance is worse
than expected.  The tmtests push on RTEMS in different ways.
 
> Thanks
> Mike Siers
> 
> -----Original Message-----
> From: Joel Sherrill [mailto:joel.sherrill at OARcorp.com]
> Sent: Wednesday, January 08, 2003 3:17 PM
> To: Ilian Donev
> Cc: RTEMS Users
> Subject: pc386 benchmark timer driver Re: Timers problem
> 
> I clarified the subject just to point out that this is a BSP driver
> specific problem -- it is not related to the Timer managers in
> the Classic, POSIX, or ITRON APIs.
> 
> --joel
> 
> > Hello all,
> >
> > I'm new to RTEMS world and was (finally) able to build my first RTEMS
> (4.5.0) with success on a PC running Mandrake Linux.
> > I installed the latest precompiled tools for Linux from the "cd-working"
> directory and configured RTEMS for an i386 target, with bsp pc586 for
> testing purposes on a PC.
> > All the demos compiled just fine. I picked the standard "Hello world" app
> and booted from a floppy using GRUB. Everything was just perfect. I tried
> several other apps from the sample directory
> > ( tasks, semaphores, etc ) and was pleased with the results. So far, so
> good.
> > Then the problem: each time I try to run an app which uses the
> "Timer_Initialize " function I get the error "raw handler connection
> failed".
> > I recompiled RTEMS for bsp pc386, tried it again on several PCs - same
> error.
> >
> > What could be the problem ?
> 
> This is a problem with this BSP's benchmark timer driver.
> 
> Does the file c/src/lib/libbsp/i386/pc386/timer/timer.c have versions of
> the
> function for both a pentium class CPU and a default 486 and below
> version?
> 
> I suspect that if both versina re there that gcc is not defining the
> expecting cpp flag to indicate the CPU model.  The code is looking
> for pentium to be defined when on a 586 or above class x86 so you will
> know that the "rdtsc" instruction should be used for benchmarking.
> 
> > Thank you in advance !
> >
> 
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel at OARcorp.com                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list