From: Shark8 <onewingedshark@gmail.com>
Subject: Re: SPARK 2014 and protected objects
Date: Wed, 31 Aug 2016 08:41:55 -0700 (PDT)
Date: 2016-08-31T08:41:55-07:00 [thread overview]
Message-ID: <7b6e2997-fea8-4840-8829-8f975b4eed4a@googlegroups.com> (raw)
In-Reply-To: <ly8tvdidty.fsf@pushface.org>
On Wednesday, August 31, 2016 at 1:42:51 AM UTC-6, Simon Wright wrote:
>
> We seem to have come up with (almost) the same solution, which gives me
> confidence it's the right one. Thanks.
You're quite welcome.
> I had Protected_Value outside the PO because it's standing in for a
> number of I/O registers communicating with devices on a shared SPI bus
> via their /Chip Select lines. Not sure how to deal with the concept of
> "a number of machine registers"!
Well, if they're memory-mapped registers you could use something like:
Regester_A : Word with Address => Location;
If they aren't, you may have to be a bit more complex. Perhaps something like:
Type Register is (AX, BX, CX, PC, Flags);
Subtype GP_Register is Register range AX..Register'Pred(PC);
-- Implemented w/ Machine_Code.
Procedure Read ( Item : GP_Register; Value : out Value_Type );
Procedure Write( Item : GP_Register; Value : in Value_Type );
next prev parent reply other threads:[~2016-08-31 15:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 10:34 SPARK 2014 and protected objects Simon Wright
2016-08-30 14:45 ` Shark8
2016-08-30 15:33 ` Simon Wright
2016-08-30 18:42 ` Simon Wright
2016-08-30 18:47 ` Simon Wright
2016-08-31 0:11 ` Shark8
2016-08-31 7:42 ` Simon Wright
2016-08-31 15:41 ` Shark8 [this message]
2016-08-31 20:55 ` Simon Wright
2016-09-01 20:07 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox