public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] to consume cpu time
@ 2003-10-22 21:02 Doug Fraser
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Fraser @ 2003-10-22 21:02 UTC (permalink / raw)
  To: 'Nick Garnett', Luca Formaggio; +Cc: ecos-discuss

One method of forcing nanosecond delays that I have
used is to read from FLASH. It is usually not cached
(to avoid programming problems) and also responds
in fixed time to a read cycle for most hardware.
For example, on our MPC850 based hardware, a FLASH
read (Intel Strata) responds in exactly 150nS.
You can get very consistent delay loops this way.

Doug Fraser

> -----Original Message-----
> From: Nick Garnett [mailto:nickg@ecoscentric.com]
> Sent: Wednesday, October 22, 2003 6:17 AM
> To: Luca Formaggio
> Cc: ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] to consume cpu time
> 
> 
> Luca Formaggio <luca_formaggio@yahoo.it> writes:
> 
> > Hi. I need to consume a cpu time in a program. This
> > time is in nanoseconds. Is there a ecos function that
> > consume time in nanoseconds? If it exists, how I call
> > this function from my program?
> 
> There's nothing in eCos that can handle that. The best we have is
> HAL_DELAY_US() which approximates a given microsecond delay.
> 
> If you want to insert delays for sub-microsecond periods then the best
> approach is probably to use timed code loops. Even then, your timing
> is going to be thrown out by any interupts. Even cache misses or DRAM
> refresh cycles may affect you.
> 
> -- 
> Nick Garnett                    eCos Kernel Architect
> http://www.ecoscentric.com      The eCos and RedBoot experts
> 
> 
> -- 
> Before posting, please read the FAQ: 
> http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> 

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] to consume cpu time
  2003-10-22  8:40 Luca Formaggio
@ 2003-10-22 11:30 ` Nick Garnett
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Garnett @ 2003-10-22 11:30 UTC (permalink / raw)
  To: Luca Formaggio; +Cc: ecos-discuss

Luca Formaggio <luca_formaggio@yahoo.it> writes:

> Hi. I need to consume a cpu time in a program. This
> time is in nanoseconds. Is there a ecos function that
> consume time in nanoseconds? If it exists, how I call
> this function from my program?

There's nothing in eCos that can handle that. The best we have is
HAL_DELAY_US() which approximates a given microsecond delay.

If you want to insert delays for sub-microsecond periods then the best
approach is probably to use timed code loops. Even then, your timing
is going to be thrown out by any interupts. Even cache misses or DRAM
refresh cycles may affect you.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] to consume cpu time
@ 2003-10-22  8:40 Luca Formaggio
  2003-10-22 11:30 ` Nick Garnett
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Formaggio @ 2003-10-22  8:40 UTC (permalink / raw)
  To: ecos-discuss

Hi. I need to consume a cpu time in a program. This
time is in nanoseconds. Is there a ecos function that
consume time in nanoseconds? If it exists, how I call
this function from my program?

Thanks

Luca Formaggio


______________________________________________________________________
Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro Anti-spam
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-22 21:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-22 21:02 [ECOS] to consume cpu time Doug Fraser
  -- strict thread matches above, loose matches on Subject: below --
2003-10-22  8:40 Luca Formaggio
2003-10-22 11:30 ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).