comp.lang.ada
 help / color / mirror / Atom feed
From: bashford@srs.loral.com (Dave Bashford)
Subject: Intel Bit/Byte Order Conversion for Alsys Ada ?
Date: Fri, 12 Mar 1993 04:44:50 GMT
Date: 1993-03-12T04:44:50+00:00	[thread overview]
Message-ID: <1993Mar12.044450.7494@scf.loral.com> (raw)

We are having a major problem sending data between an Intel processor
and a Motorola processor both running Alsys compiled Ada. A simple
bit-packed message gets completely garbled by the compiler on the Intel
side even though it was completely rep-spec'd. Example:

        type Message is record
                Field_1: Some_11_Bit_Type;
                Field_2: Some_02_Bit_Type;
                Field_3: Some_01_Bit_Type;
                Field_4: Some_15_Bit_Type;
        end record;
        for Message use record
                Field_1 at 0 range  0..10;
                Field_2 at 0 range 11..12;
                Field_3 at 0 range 13..13;
                Field_4 at 0 range 14..28;
        end record;

When this message is sent across to the Motorola processor the bit
stream looks like this:

        Least-Significant 8 Bits of Field_1,
        Least-Significant 2 Bits of Field_4,
        Field_3,
        Field_2,
        Most-Significant 3 Bits of Field_1,
        middle 8 bits of Field_4,
        Bits 29..31,
        Most-Significant 5 Bits of Field_4

This seems pretty screwy to me, but we have to find a solution !
We obviously have a space problem - otherwise we wouldn't bit-pack.
But we also have very tight time requirements.

Does anyone have a solution to this ? I would also be interested in
editorial comments. Please e-mail your replys and I will summarize
for the network. (I won't be able to read the news before it expires.)

Thanks, in advance from a _very_ frustrated engineer.
-- 

db
bashford@srs.loral.com (Dave Bashford, Sunnyvale, CA)



                 reply	other threads:[~1993-03-12  4:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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