comp.lang.ada
 help / color / mirror / Atom feed
From: dkristol@see-my.sig (David Kristola)
Subject: Re: Caching & Annex C.6
Date: 1999/09/07
Date: 1999-09-07T00:00:00+00:00	[thread overview]
Message-ID: <7r1l93$9lq4@svlss.lmms.lmco.com> (raw)
In-Reply-To: x7vyaenahw3.fsf@pogner.moho

In article fsf@pogner.moho, Simon Wright <simon@pogner.demon.co.uk> () writes:
>In C.6 the AARM says
>
>16 For a volatile object all reads and updates of the object as a
>   whole are performed directly to memory.
>
>   16.a Implementation Note: This precludes any use of register
>      temporaries, caches, and other similar optimizations for that
>      object.
>
>We've been having an argument as to precisely what sort of "cache"
>we're talking about here. Is it the CPU cache? does this imply that an
>implementation must force a cache write-through for volatile objects?
>
>My personal view is that the existence or otherwise of the cache is
>transparent and that all that's required is that the write doesn't go
>to registers. But then why does the AARM mention cache?
>
>Are there (multi-processor, presumably) systems where you would have
>to force a write-through to get the proper effect? Do Ada
>implementations on such systems have to do that?


I work with real-time embedded systems, and we use pragma
Volatile to mark variables that represent (and are located
on) memory mapped registers.  The data must be written to
the memory mapped register when that code executes.
Likewise, many of those registers return values set by
hardware, so reads can't come from the cache.


--djk, keeper of arcane lore & trivial fluff
Home: David95037 at aol dot com
Spam: goto.hades@welovespam.com





  parent reply	other threads:[~1999-09-07  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-03  0:00 Caching & Annex C.6 Simon Wright
1999-09-05  0:00 ` Robert Dewar
1999-09-05  0:00   ` Simon Wright
1999-09-07  0:00 ` David Kristola [this message]
1999-09-08  0:00   ` Robert Dewar
1999-09-08  0:00     ` David Kristola
1999-09-08  0:00       ` Robert Dewar
1999-09-09  0:00         ` Memory mapped registers (was Re: Caching & Annex C.6) David Kristola
1999-09-09  0:00           ` Robert Dewar
1999-09-14  0:00             ` Memory mapped registers (was Re: Cachi David Kristola
1999-09-14  0:00               ` Robert Dewar
1999-09-15  0:00                 ` David Kristola
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox