comp.lang.ada
 help / color / mirror / Atom feed
From: Ken Roberts <alisonken1@gmail.com>
Subject: Re: Creating several types from a base type and conversion
Date: Mon, 27 Jan 2020 06:10:39 -0800 (PST)
Date: 2020-01-27T06:10:39-08:00	[thread overview]
Message-ID: <832d87e0-40c6-4edb-8e9a-af055a7099e3@googlegroups.com> (raw)
In-Reply-To: <f531cd40-6734-46cb-967e-638cf1004426@googlegroups.com>

After some more reflection (nice thing about having a boring job), I think I've been overthinking the problem.

The registers do not need to be a subtype of Unsigned_32 (or Word30), since they're going to be containers rather than actual variables. As long as the __data__ they get/return is a subtype of Unsigned_32, the conversion is automatic (from my understanding).

So, for what I'm looking at, I_Word[1-2] is only used by one register (the Instruction register), so they can be worked on using private variables; once the instruction is loaded into the register, the upper half is pretty much read-only with the lower half being the only part that _may_ be returned. The other registers pretty much just use Unsigned_30 as is. For the ones that use half-word (15-bit) parts, easy enough to work with as well since they'll be using subtypes of Unsigned_30.

Goes to show what happens when you over-think the problem.

Thanks for all of your suggestions and help.


      parent reply	other threads:[~2020-01-27 14:10 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18  7:32 Creating several types from a base type and conversion Ken Roberts
2020-01-18 12:16 ` Simon Wright
2020-01-18 12:49   ` Ken Roberts
2020-01-18 14:56     ` Bill Findlay
2020-01-18 16:13       ` Jeffrey R. Carter
2020-01-18 18:20         ` Bill Findlay
2020-01-18 18:32           ` Jeffrey R. Carter
2020-01-18 20:34             ` Simon Wright
2020-01-20 16:38               ` Bill Findlay
2020-01-18 22:20       ` Ken Roberts
2020-01-18 15:09     ` Simon Wright
2020-01-18 22:16       ` Ken Roberts
2020-01-18 22:35         ` Simon Wright
2020-01-18 23:03           ` Ken Roberts
2020-01-18 23:38             ` Simon Wright
2020-01-19  0:12               ` Ken Roberts
2020-01-19  9:37                 ` Simon Wright
2020-01-19 11:48                   ` AdaMagica
2020-01-19 14:51                     ` Simon Wright
2020-01-19 15:24                       ` Niklas Holsti
2020-01-19 16:11                     ` Optikos
2020-01-19  0:33               ` Ken Roberts
2020-01-19  0:07         ` Niklas Holsti
2020-01-18 15:47     ` Simon Wright
2020-01-21 21:35     ` Shark8
2020-01-21 23:06       ` Niklas Holsti
2020-01-22  1:08         ` Ken Roberts
2020-01-22 14:18           ` Ken Roberts
2020-01-22  8:37       ` Simon Wright
2020-01-22 14:32         ` Shark8
2020-01-22 15:40           ` Simon Wright
2020-01-18 14:17   ` Optikos
2020-01-18 17:57 ` Niklas Holsti
2020-01-18 22:59   ` Ken Roberts
2020-01-19  0:30     ` Niklas Holsti
2020-01-19  1:07       ` Ken Roberts
2020-01-19  3:37 ` Ken Roberts
2020-01-23 21:39 ` Optikos
2020-01-24  9:35   ` Ken Roberts
2020-01-24 10:04     ` AdaMagica
2020-01-24 12:38     ` Optikos
2020-01-24 15:01       ` Ken Roberts
2020-01-24 15:22         ` Simon Wright
2020-01-24 15:40           ` Ken Roberts
2020-01-24 15:54   ` Simon Wright
2020-01-25 10:37 ` Ken Roberts
2020-01-25 10:44   ` Ken Roberts
2020-01-25 20:26   ` Shark8
2020-01-27 14:10 ` Ken Roberts [this message]
replies disabled

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