Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Endianess Transformation

Status
Not open for further replies.

pmat

Member level 5
Member level 5
Joined
Mar 26, 2007
Messages
91
Helped
15
Reputation
28
Reaction score
9
Trophy points
1,288
Location
Grenoble, France, EU
Activity points
1,790
Hi all,
lets suppose that in a system, a Big-Endian Processor communicates with a Little-Endian Peripheral.
Which is the best practice to perform the endianess transformation? (processor transforms its big endian
words to little endian ones, a bridge in the middle of the communication path performs the transformation,
or the peripheral itself performs the byte-swap, or something else...)


Thnx,
Pavlos
 

Using an Ethernet connection for communication between a Big Endian and a Little Endian system automatically transforms most data types.

Keeping the Endianness correct of data transmitted and received on an Ethernet Network is one of the jobs of the TCP/IP Stack.

By the way Ethernet is Bytewise Big Endian and Bitwise Little Endian.

Introduction to Endianness

BigDog
 
  • Like
Reactions: sanju_

    sanju_

    Points: 2
    Helpful Answer Positive Rating
There is no Ethernet connection for communication. There is only a Bus connecting the two devices.
 

Hi all,
lets suppose that in a system, a Big-Endian Processor communicates with a Little-Endian Peripheral.
Which is the best practice to perform the endianess transformation?

In your original post you made no mention of exactly what method this supposed communication employs.

If you want a specific answer, you'll need to give specific details.

You now indicate these two devices are connected by a "bus".

What type of bus exactly?

Do either or both the devices have an OS or RTOS implemented? If so, what are they?

What type of data types will be transmitted between the devices?

BigDog
 

There are no specific details right now, as the system's architecture is still
under development. There is a set of transaction level accurate processors,
an abstract Bus and the peripherals are sets of C-threads. The constraints
are that processors are Big-Endian and peripherals are little endian.

Although the level of abstraction is still quite high a decision should me
made.
 

I don't see a particular problem of applying transformations. Some protocols, e.g. Ethernet and interface standards, e.g. SPI are implying big endianess of data entities, so you'll have to consider it, when copying the data to or from internal representations. Ethernet libraries have the host-to-network functions (mostly implemented as macro) to make the code portable without thinking about endianess. You can use them for similar problems with other protocols as well.
 

So, its better to let software do endianess transformations at the endpoints... Using bridges in the middle of different endianess devices which do all the transformations, or having
dedicated hardware at the peripherals to transform representations have not so much value. Right? I ask all of these because the System simulation environment gives me these
3 choices and i would prefer to stick with the most meaningful one...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top