From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ad4:58b3:: with SMTP id ea19mr5391395qvb.80.1580134240572; Mon, 27 Jan 2020 06:10:40 -0800 (PST) X-Received: by 2002:a9d:6304:: with SMTP id q4mr12649113otk.332.1580134240218; Mon, 27 Jan 2020 06:10:40 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!g89no4184359qtd.0!news-out.google.com!w29ni650qtc.0!nntp.google.com!g89no4184352qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 27 Jan 2020 06:10:39 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=47.136.24.151; posting-account=o_Y23woAAACPYGlDsFV1OivhygPNSoRn NNTP-Posting-Host: 47.136.24.151 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <832d87e0-40c6-4edb-8e9a-af055a7099e3@googlegroups.com> Subject: Re: Creating several types from a base type and conversion From: Ken Roberts Injection-Date: Mon, 27 Jan 2020 14:10:40 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:57960 Date: 2020-01-27T06:10:39-08:00 List-Id: 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 th= e __data__ they get/return is a subtype of Unsigned_32, the conversion is a= utomatic (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; on= ce the instruction is loaded into the register, the upper half is pretty mu= ch 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 t= hey'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.