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.

big endian vs little endian, how to do data bus conversion

Status
Not open for further replies.

ilikebbs

Advanced Member level 4
Joined
Nov 30, 2002
Messages
104
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Activity points
705
for example:
If CPU has 22 bit address bus a[21:0], 32 bit data bus d[31:0] and it is big endian,
Generally we do endian conversion like this.
d[7:0] ---- chip_data[0:7]
d[15:0] ---- chip_data[0:15]
d[31:0] ---- chip_data[0:31]

My question is that since the unit for big endian and little endian is byte, why do not we do endian conversion like this:
===d[7:0] ---- chip_data[0:7]
===d[15:8] ---- chip_data[7:0]; d[7:0] ---- chip_data[15:8];
===d[31:24] ---- chip_data[7:0]; d[23:16] ---- chip_data[15:8]; d[15:8] ---- chip_data[23:16];d[7:0] ---- chip_data[31:24];

thanks for your help.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top