Endian mapping engine, method of endian mapping and a processing system employing the engine and the method

Information

  • Patent Application
  • 20070150627
  • Publication Number
    20070150627
  • Date Filed
    November 22, 2005
    18 years ago
  • Date Published
    June 28, 2007
    17 years ago
Abstract
The present invention provides an endian mapping engine for use with a processing system. In one embodiment, the endian mapping engine includes an identification unit configured to identify sending and receiving endian schemes for data transfers between components of the processing system. Additionally, the endian scheme converter also includes a conversion unit coupled to the identification unit and configured to convert the data transfers between the sending and receiving endian schemes corresponding to an employed endian format. In an alternative embodiment, the endian mapping engine further includes a multiplexing unit coupled to the identification unit and configured to provide multiplexing between endian formats for a given endian scheme.
Description
TECHNICAL FIELD OF THE INVENTION

The present invention is directed, in general, to computer systems and, more specifically, to an endian mapping engine, a method of endian mapping and a processing system employing the engine or the method.


BACKGROUND OF THE INVENTION

Endianness refers to the ordering of bytes of data in a multi-byte wide memory, or the sequence in which the bytes are transmitted over some medium usually when the data contains multiple bytes. There are different endian schemes supported by processors, buses, and peripherals today, which include byte invariant, word invariant and double-word invariant endian schemes. In little endian format, the least significant byte of data is stored in the lowest memory address in the range of addresses used to store the quantity. Alternatively, in big endian format, the most significant byte of data is stored in the lowest memory address in the range of addresses used to store the quantity. In little endian format, the bytes are steered to the same byte lanes for the same address when employing each of these three endian schemes. For big endian format, however, the bytes are located in different byte lanes for the same address based on the endian scheme used.


Typically the processor, bus and peripherals for a processing system design use the same endian scheme whether it is byte, word or double-word invariant. For example, the processing system using an ARM9 processor, AMBA AHB/APB buses and associated peripherals would be designed to use a word invariant endian scheme throughout. However, by limiting the processing system design to one endiah scheme, advantages afforded by using different bus architectures and processor features to improve overall performance of the system may be sacrificed. Alternatively, for example, an application may advantageously employ a processing system having the MIPS processor using double-word invariant, the ARM Ltd. AMBA AXI bus using byte invariant, and the ARM Ltd. AMBA AHB/APB buses using word invariant endian schemes.


Additionally, by limiting the processing system design to components of the same endian scheme, time-to-market constraints may arise in addition to performance issues. For example, various peripherals may have been developed and maintained that already use one or more of a particular endian format and scheme. The capability to reuse these peripherals with a variety of processing system designs eliminates redesign and verification efforts thereby reducing both time-to-market concerns and development costs.


Accordingly, what is needed in the art is a way to resolve different endian schemes and formats used by various components of a processing system.


SUMMARY OF THE INVENTION

To address the above-discussed deficiencies of the prior art, the present invention provides an endian mapping engine for use with a processing system. In one embodiment, the endian mapping engine includes an identification unit configured to identify sending and receiving endian schemes for data transfers between components of the processing system. Additionally, the endian mapping engine also includes a conversion unit coupled to the identification unit and configured to convert the data transfers between the sending and receiving endian schemes corresponding to an employed endian format. In an alternative embodiment, the endian mapping engine further includes a multiplexing unit coupled to the identification unit and configured to provide multiplexing between endian formats for a given endian scheme.


In another aspect, the present invention provides a method of endian mapping for use with a processing system. The method includes identifying sending and receiving endian schemes for data transfers between components of the processing system and converting the data transfers between the sending and receiving endian schemes corresponding to an employed endian format.


The present invention also provides, in yet another aspect, a processing system including a processor block employing at least one processing unit, an interconnect block, coupled to the processor block, employing an input-output bus and a peripheral block, coupled to the interconnect block, employing at least one peripheral. The processing system also includes an endian mapping engine coupled to the processor, interconnect and peripheral blocks having an identification unit that identifies sending and receiving endian schemes for data transfers between components of the processing system. The endian mapping engine also has a conversion unit, coupled to the identification unit, which converts the data transfers between the sending and receiving endian schemes corresponding to an employed endian format.


The foregoing has outlined preferred and alternative features of the present invention so that those skilled in the art may better understand the detailed description of the invention that follows. Additional features of the invention will be described hereinafter that form the subject of the claims of the invention. Those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiment as a basis for designing or modifying other structures for carrying out the same purposes of the present invention. Those skilled in the art should also realize that such equivalent constructions do not depart from the spirit and scope of the invention.




BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:



FIG. 1 illustrates a block diagram of an embodiment of a processing system constructed in accordance with the principles of the present invention;



FIG. 2 illustrates an expanded block diagram of an embodiment of a processing system constructed in accordance with the principles of the present invention; and



FIG. 3 illustrates a flow diagram of an embodiment of a method of endian mapping carried out in accordance with the principles of the present invention.




DETAILED DESCRIPTION

Referring initially to FIG. 1, illustrated is a block diagram of an embodiment of a processing system, generally designated 100, constructed in accordance with the principles of the present invention. The processing system 100 includes a processor block 105, an interconnect block 110, a peripheral block 115 and an endian mapping engine 120. The endian mapping engine 120 includes an identification unit 121, a conversion unit 122 and a multiplexing unit 123.


The processor block 105 employs at least one processor and may employ a plurality of processors as appropriate to a particular application. The interconnect block 110 is coupled to the processor block 105 and typically employs a plurality of input-output buses although only one may be required. The peripheral block 115 is coupled to the interconnect block 110 and employs at least one peripheral wherein a plurality is usually required.


The endian mapping engine 120 is coupled to the processor, interconnect and peripheral blocks 105, 110, 115. The identification unit 121 identifies sending and receiving endian schemes for data transfers between components of the processing system 100. The conversion unit 122 is coupled to the identification unit 121 and converts the data transfers between the sending and receiving endian schemes corresponding to an employed endian format. The multiplexing unit 123 is coupled to the identification unit 121 and provides multiplexing between endian formats, when both big and little endian formats are not employable for a given endian scheme.


The endian scheme employed for data transfers is selected from the group consisting of byte invariant, half-word invariant, word invariant and double-word invariant Additionally, the endian format is selected from the group consisting of a little endian format and a big endian format. In general, each of the sending and receiving endian schemes may be identified employing at least one of a static and a dynamic endianness signal, usually indicated by the processor block 105. In the illustrated embodiment, each component of the processing system 100 sends and receives data employing its native endian scheme.


Byte invariant means that a byte transfer to a given address passes the eight bits of data on the same data bus wires to the same address location regardless of endianness. Therefore, for a given transaction request size (i.e., byte, half-word or word) in a byte invariant system, the address of each byte of memory remains unchanged when switching between little endian and big endian operation. Alternatively, in a word invariant system, the address of each byte of memory changes when switching between little and big endian operation, but words stored in a multiword address would not change between big and little endian.


Additionally, byte steering is employed to convert the data transfers between the sending and receiving endian schemes. In the illustrated embodiment, the byte steering corresponds to the big endian format and the processing block 105 has a processor that employs a hardware signal to indicate the use of the big endian format.


Turning now to FIG. 2, illustrated is an expanded block diagram of an embodiment of a processing system, generally designated 200, constructed in accordance with the principles of the present invention. The processing system 200 includes a processor block 205, an interconnect block 210 and a peripheral block 215. The processing block 205 includes a MIPS processor 206 connected to an OCP (Open Core Protocol Specification) to AXI (Ocp2Axi) bridge 207 employing an OCP bus 208. The interconnect block 210 includes a 64-bit AXI interconnect 211, a 64-bit AXI to 64-bit AHB bus structure 212 and first and second 64-bit AXI to 32-bit AHB bus structures 213, 214. The peripheral block 215 includes a 64-bit AHB peripheral 216, a 32-bit AHB peripheral 217, a 32-bit AHB-to-APB bridge 218 that accommodates a collection of 32-bit APB peripherals 219.


For more information regarding the commercially available components shown in FIG. 2, one skilled in the pertinent art is referred to:

  • 1) MIPS32® 24K™ Processor Core Family Datasheet from MIPS Technologies,
  • 2) Open Core Protocol Specification from OCP International Partnership (OCP-IP),
  • 3) AMBA AXI Protocol Specification from ARM Limited and
  • 4) AMBA 2.0 or 3.0 Specification from ARM Limited,


    which are incorporated herein by reference. This information may also be available at (www.mips.com), (www.ocpip.org) and (www.arm.com), respectively. The data associated with the processing system 200 crosses several different bus architectures. The different endian schemes associated with the processor, buses, and peripherals need to be identified to ensure that the data is properly understood by each component in the system.


The MIPS processor 206 has an input static signal to configure the core to support big or little endian. Table 1 shows endian byte lane usage for the MIPS processor 206. Table 1 shows that the MIPS processor 206 supports a double-word invariant endian scheme since the data is identical for 64-bit transfers for both big and little endian formats. The differences with respect to endianness are only visible for sub-double-word references.

TABLE 1MIPS Processor Endian Byte Lane UsageMIPSInternalAddrsBig EndianLittle Endian[2:0]OC_MData[63:0]OC_MDataByteEn [7:0]OC_MData[63:0]OC_MDataByteEn [7:0]00xef--------------100000000x--------------ef0000000110x--ef------------010000000x------------ef--0000001020x----ef----------001000000x----------ef----0000010030x------ef--------000100000x--------ef------0000100040x--------ef------000010000x------ef--------0001000050x----------ef----000001000x----ef----------0010000060x------------ef--000000100x--ef------------0100000070x--------------ef000000010xef--------------1000000000xcdef------------110000000x------------cdef0000001120x----cdef--------001100000x--------cdef----0000110040x--------cdef----000011000x----cdef--------0011000060x------------cdef000000110xcdef------------1100000000x89abcdef--------111100000x--------89abcdef0000111140x--------89abcdef000011110x89abcdef--------1111000000x0123456789abcdef111111110x0123456789abcdef11111111


The OCP bus 208 is endian-neutral, since the master and slave are the same bus width, in the illustrated embodiment. OCP addressing in this system is on a double-word granularity. For a 64-bit data bus width, the lower three bits of the address are always ignored. The OCP MAddr signal is aligned with this 64-bit word size.


The AXI bus (ARM Ltd.) uses a byte invariant endian scheme and is not endian-neutral like the OCP bus 208. The read address channel does not have byte strobes, but uses the lower three address bits and the ARSIZE signal to determine where the bytes should be steered. The write address channel uses write strobes (byte enables), the lower three address bits and the AWSIZE signal. For write operations, the AXI slave may use either the write strobes or address and AWSIZE information to determine where the bytes should be steered.


The AHB and APB buses (ARM Ltd.) use a word invariant endian scheme, where a word in this bus architecture is considered to be 32-bits wide. Word transfers are identical using big or little endian formats. The differences with respect to endianness are only visible for sub-word references. For AHB and APB buses of 64-bits wide, the data are treated as individual 32-bit wide units.


In the illustrated embodiment of FIG. 2, the data from the MIPS double-word invariant endian scheme needs to be converted to the AXI byte invariant endian scheme and then to the AHB/APB word invariant endian scheme. The following discussion indicates how conversion between these endian schemes may be accomplished. Little and big endian formats will be considered separately, and the following nomenclature will be used:


LE-64 refers to double-word invariant little endian,


LE-32 refers to word invariant little endian,


LE-8 refers to byte invariant little endian,


BE-64 refers to double-word invariant big endian,


BE-32 refers to word invariant big endian, and


BE-8 refers to byte invariant big endian.


In little endian format, the least significant byte is stored in the lowest memory address in the range of addresses used to store the quantity. Table 2, Table 3, Table 4, and Table 5 show how the byte lanes are specified using the lower address bits for byte, half-word, word, and double-word accesses for LE-8, LE-32 and LE-64. In these tables, the numbers 0-7 represent byte, half-word, word or double-word associated with that part of the data bus where 0 represents the least significant and 7 the most significant. For example, in Table 2 when transferring a byte of data to address[2:0]=b000, byte lane 7:0 is used for LE-8, 7:0 for LE-32 and 7:0 for LE-64. When transferring a byte of data to address[2:0]=b111, byte lane 63:56 is used for LE-8, LE-32 and LE-64.

TABLE 2Little Endian Byte NumberingBusData Bus1Type63:5655:4847:4039:3231:2423:1615:87:0LE-876543210LE-3276543210LE-6476543210
1Byte 0 is accessed with Addr [2:0] = b000, Byte 1 is accessed with Addr[2:0] = b001, Byte 2 is accessed with Addr[2:0] = b010, Byte 3 is accessed with Addr[2:0] = b011, Byte 4 is accessed with Addr[2:0] = b100, Byte 5 is accessed with Addr[2:0] = b101, Byte 6 is accessed with Addr[2:0] = b110, Byte 7 is accessed with Addr[2:0] = b111









TABLE 3










Little Endian Half-word Numbering








Bus
Data Bus1















Type
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0














LE-8
3
2
1
0


LE-32
3
2
1
0


LE-64
3
2
1
0








1Half-word 0 is accessed with Addr[2:0] = b000, Half-word 1 is accessed with Addr[2:0] = b010, Half-word 2 is accessed with Addr[2:0] = b100, Half-word 3 is accessed with Addr[2:0] = b110














TABLE 4










Little Endian Word Numbering








Bus
Data Bus1















Type
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0












LE-8
1
0


LE-32
1
0


LE-64
1
0








1Word 0 is accessed with Addr[2:0] = b000, Word 1 is accessed with Addr[2:0] = b100














TABLE 5










Little Endian Double-Word Numbering








Bus
Data Bus1















Type
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0











LE-8
0


LE-32
0


LE-64
0








1Double-word 0 is accessed with Addr[2:0] = b000







Table 6 specifies the conversion between the byte, word and double-word invariant endian schemes for little endian formats. The relationship of byte lane to lower address bits (Addr[2:0]) and transfer size (A*SIZE, HSIZE) specified in Tables 2, 3, 4, and 5 are applied to Table 6. Table 6 uses the following values for byte, half-word, word and double-word examples:


byte=0x0


half word=0x10


word:=0x3210


double-word=0x76543210


Table 6 shows that no byte steering is needed to convert between byte, word and double-word invariant endian schemes for little endian formats. For the same address, byte enables, AWSIZE, ARSIZE and HSIZE settings, the bytes of data are placed in the same byte lanes for each endian scheme.

TABLE 6Conversion between LE-8, LE-32 and LE-64BusByteA*SIZEData BusTypeAddr[2:0]En1HSIZE263:5655:4847:4039:3231:2423:1615:87:0LE-80000x010000LE-320000x010000LE-640000x010000LE-80010x020000LE-320010x020000LE-640010x020000LE-80100x040000LE-320100x040000LE-640100x040000LE-80110x800000LE-320110x800000LE-640110x800000LE-81000x100000LE-321000x100000LE-641000x100000LE-81010x200000LE-321010x200000LE-641010x200000LE-81100x400000LE-321100x400000LE-641100x400000LE-81110x800000LE-321110x800000LE-641110x800000LE-80000x0300110LE-320000x0300110LE-640000x0300110LE-80100x0C00110LE-320100x0C00110LE-640100x0C00110LE-81000x3000110LE-321000x3000110LE-641000x3000110LE-81100xC000110LE-321100xC000110LE-641100xC000110LE-80000x0F0103210LE-320000x0F0103210LE-640000x0F0103210LE-81000xF00103210LE-321000xF00103210LE-641000xF00103210LE-80000xEF01176543210LE-320000xFF01176543210LE-640000xFF01176543210
1Byte En represents the OCP and AXI bus byte enables or write strobes depending on the bus terminology. Each active high bit represents a valid byte.

2A*SIZE represents the AXI signals AWSIZE and ARSIZE that represent the write and read burst size respectively. HSIZE is the AHB bus burst size indicator. 000 = byte, 001 = half-word, 010 = word, and 011 = double-word transfers.


In big endian format, the most significant byte is stored in the lowest memory address in the range of addresses used to store the quantity. Table 7, Table 8, Table 9 and Table 10 show how the byte lanes are specified using the lower address bits for byte, half-word, word and double-word accesses for BE-8, BE-32 and BE-64. In these tables, the numbers 0-7 represent byte, half-word, word or double-word associated with that part of the data bus where 0 represents the least significant and 7 the most significant, as before. For example, in Table 7 when transferring a byte of data to address[2:0]=b000, byte lane 7:0 is used for BE-8, 31:24 for BE-32 and 63:56 for BE-64. When transferring a byte of data to address[2:0]=b111, byte lane 63:56 is used for BE-8, 39:32 for BE-32 and 7:0 for BE-64.

TABLE 7Big Endian Byte NumberingBusData Bus1Type63:5655:4847:4039:3231:2423:1615:87:0BE-876543210BE-3245670123BE-6401234567
1Byte 0 is accessed with Addr[2:0] = b000, Byte 1 is accessed with Addr[2:0] = b001, Byte 2 is accessed with Addr[2:0] = b010, Byte 3 is accessed with Addr[2:0] = b011, Byte 4 is accessed with Addr[2:0] = b100, Byte 5 is accessed with Addr[2:0] = b101, Byte 6 is accessed with Addr[2:0] = b110, Byte 7 is accessed with Addr[2:0] = b111









TABLE 8










Big Endian Half-word Numbering








Bus
Data Bus1















Type
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0














BE-8
3
2
1
0


BE-32
2
3
0
1


BE-64
0
1
2
3








1Half-word 0 is accessed with Addr[2:0] = b000, Half-word 1 is accessed with Addr[2:0] = b010, Half-word 2 is accessed with Addr[2:0] = b100, Half-word 3 is accessed with Addr[2:0] = b110














TABLE 9










Big Endian Word Numbering








Bus
Data Bus1















Type
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0












BE-8
1
0


BE-32
1
0


BE-64
0
1








1Word 0 is accessed with Addr[2:0] = b000, Word 1 is accessed with Addr[2:0] = b100














TABLE 10










Big Endian Double-Word Numbering








Bus
Data Bus1















Type
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0











BE-8
0


BE-32
0


BE-64
0








1Double-word 0 is accessed with Addr[2:0] = b000







Table 11 specifies the conversion between the byte, word and double-word invariant endian schemes for big endian formats. The relationship of byte lane to lower address bits (Addr[2:0]) and transfer size (A*SIZE, HSIZE) specified in Tables 7, 8, 9 and 10 are applied to Table 11. Table 11 uses the following values for byte, half-word, word, and double-word examples:


byte=0x0


half word=0x10


word:=0x3210


double-word=0x76543210


Table 11 clearly shows that byte steering is needed to convert between byte, word and double-word invariant endian schemes for big endian formats. For the same address, byte enables, A*SIZE and HSIZE settings, the data bytes are placed in different byte lanes for each endian scheme.

TABLE 11Conversion between BE-8, BE-32 and BE-64 BusBusByteA*SIZEData BusTypeAddr[2:0]En1HSIZE263:5655:4847:4039:3231:2423:1615:87:0BE-80000x010000BE-320000x080000BE-640000x800000BE-80010x020000BE-320010x040000BE-640010x400000BE-80100x040000BE-320100x020000BE-640100x200000BE-80110x080000BE-320110x010000BE-640110x100000BE-81000x100000BE-321000x800000BE-641000x080000BE-81010x200000BE-321010x400000BE-641010x040000BE-81100x400000BE-321100x200000BE-641100x020000BE-81110x800000BE-321110x100000BE-641110x010000BE-80000x0300101BE-320000x0C00110BE-640000xC000110BE-80100x0C00101BE-320100x0300110BE-640100x3000110BE-81000x3000101BE-321000xC000110BE-641000x0C00110BE-81100xC000101BE-321100x3000110BE-641100x0300110BE-80000x0F0100123BE-320000x0F0103210BE-640000xF00103210BE-81000x0F0100123BE-321000xF00103210BE-641000x0F0103210BE-80000xFF01101234567BE-320000xFF01132107654BE-640000xFF01176543210
1Byte En represents the OCP and AXI bus byte enables or write strobes depending on the bus terminology. Each active high bit represents a valid byte.

2A*SIZE represents the AXI signals AWSIZE and ARSIZE that represent the write and read burst size respectively. HSIZE is the AHB bus burst size indicator. 000 = byte, 001 = half-word, 010 = word, and 011 = double-word transfers.


Table 12, Table 13, Table 14, Table 15, Table 16, Table 17, and Table 18 show examples of byte, half-word, word and double-word transfers employing a little endian format from the MIPS processor to the AHB/APB bus. For these examples the following values are used:


byte=0xef


half-word=0xcdef


word=0x89abcdef


double-word=0x0123456789abcdef

TABLE 12Little Endian - Byte Transfer (0xef)ByteA*SIZEData BusBusAddr[2:0]EnHSIZE63:5655:4847:4039:3231:2423:1615:87:0MIPS0000x01n/aefOCPn/a0x01n/aefAXI0000x01000efAHB/APB000n/a000ef









TABLE 13










Little Endian - Byte Transfer (0xef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0















MIPS
111
0x80
n/a
ef



OCP
n/a
0x80
n/a
ef


AXI
111
0x80
000
ef


AHB/APB
111
n/a
000
ef
















TABLE 14










Little Endian - Half-Word Transfer (0xcdef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0
















MIPS
000
0x03
n/a

cd
ef


OCP
n/a
0x03
n/a

cd
ef


AXI
000
0x03
001

cd
ef


AHB/APB
000
n/a
001

cd
ef
















TABLE 15










Little Endian - Half-Word Transfer (0xcdef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0
















MIPS
110
0xC0
n/a
cd
ef



OCP
n/a
0xC0
n/a
cd
ef


AXI
110
0xC0
001
cd
ef


AHB/APB
110
n/a
001
cd
ef
















TABLE 16










Little Endian - Word Transfer (0x89abcdef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0


















MIPS
000
0x0F
n/a

89
ab
cd
ef


OCP
n/a
0x0F
n/a

89
ab
cd
ef


AXI
000
0x0F
010

89
ab
cd
ef


AHB/APB
000
n/a
010

89
ab
cd
ef
















TABLE 17










Little Endian - Word Transfer (0x89abcdef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0


















MIPS
100
0xF0
n/a
89
ab
cd
ef



OCP
n/a
0xF0
n/a
89
ab
cd
ef


AXI
100
0xF0
010
89
ab
cd
ef


AHB/APB
100
n/a
010
89
ab
cd
ef
















TABLE 18










Little Endian - Double-Word Transfer (0x0123456789abcdef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0





MIPS
000
0xFF
n/a
01
23
45
67
89
ab
cd
ef


OCP
n/a
0xFF
n/a
01
23
45
67
89
ab
cd
ef


AXI
000
0xFF
011
01
23
45
67
89
ab
cd
ef


AHB/APB
000
n/a
011
01
23
45
67
89
ab
cd
ef









Table 19, Table 20, Table 21, Table 22, Table 23, Table 24, and Table 25 show examples of byte, half-word, word, and double-word transfers employing a big endian format from the MIPS processor to the AHB/APB bus. For these examples the following values are used:


byte=0xef


half-word=0xcdef


word=0x89abcdef


double-word=0x0123456789abcdef

TABLE 19Big Endian - Byte Transfer (0xef)ByteA*SIZEData BusBusAddr[2:0]EnHSIZE63:5655:4847:4039:3231:2423:1615:87:0MIPS0000x80n/aefOCPn/a0x80n/aefAXI0000x01000efAHB/APB000n/a000ef









TABLE 20










Big Endian - Byte Transfer (0xef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0


















MIPS
111
0x01
n/a




ef


OCP
n/a
0x01
n/a




ef


AXI
111
0x80
000
ef


AHB/APB
111
n/a
000


ef
















TABLE 21










Big Endian - Half-Word Transfer (0xcdef)











Byte
A*SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0




















MIPS
000
0xC0
n/a
cd
ef







OCP
n/a
0xC0
n/a
cd
ef


AXI
000
0x03
001





ef
cd


AHB/APB
000
n/a
001



cd
ef
















TABLE 22










Big Endian - Half-Word Transfer (0xcdef)











Byte
A * SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0





MIPS
110
0x03
n/a






cd
ef


OCP
n/a
0x03
n/a






cd
ef


AXI
110
0xC0
001
ef
cd


AHB/APB
110
n/a
001


cd
ef
















TABLE 23










Big Endian - Word Transfer (0x89abcdef)











Byte
A * SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0





MIPS
000
0xF0
n/a
89
ab
cd
ef






OCP
n/a
0xF0
n/a
89
ab
cd
ef


AXI
000
0x0F
010




ef
cd
ab
89


AHB/APB
000
n/a
010




89
ab
cd
ef
















TABLE 24










Big Endian - Word Transfer (0x89abcdef)











Byte
A * SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0





MIPS
100
0xF0
n/a




89
ab
cd
ef


OCP
n/a
0x0F
n/a




89
ab
cd
ef


AXI
100
0xF0
010
ef
cd
ab
89


AHB/APB
100
n/a
010
89
ab
cd
ef
















TABLE 25










Big Endian - Double-Word Transfer (0x0123456789abcdef)











Byte
A * SIZE
Data Bus


















Bus
Addr[2:0]
En
HSIZE
63:56
55:48
47:40
39:32
31:24
23:16
15:8
7:0





MIPS
000
0xFF
n/a
01
23
45
67
89
ab
cd
ef


OCP
n/a
0xFF
n/a
01
23
45
67
89
ab
cd
ef


AXI
000
0xFF
011
ef
cd
ab
89
67
45
23
01


AHB/APB
000
n/a
011
89
ab
cd
ef
01
23
45
67









Tables 19, 20, 21, 22, 23, 24, and 25 show that the boundaries between the different endian schemes are between double-word to byte invariant at the OCP to AXI bridge and byte to word invariant at the BP137-AXI to AHB-lite bridge. The MIPS processor 206 double-word invariant endian scheme rides on the endian-neutral OCP bus 208 transparently. It needs to be converted to AXI byte invariant endian scheme. A reasonable place to do this is in the Ocp2Axi bridge since this is the point where the data transitions between the double-word and byte invariant endian schemes.


The Ocp2Axi bridge 207 will perform the double-word to byte invariant endian scheme conversion. For little endian systems specified with the input signal BIGEND being low, no byte steering will be performed. For big endian systems specified with the input signal BIGEND being high, the following byte steering will take place for read and write data:


Byte 0 to Byte 7,


Byte 1 to Byte 6,


Byte 2 to Byte 5,


Byte 3 to Byte 4,


Byte 4 to Byte 3,


Byte 5 to Byte 2,


Byte 6 to Byte 1, and


Byte 7 to Byte 0.


The AXI byte invariant endian scheme needs to be converted to AHB/APB word invariant endian scheme. A reasonable place to do this is after the BP137-AXI to AHB-lite Bridge, since this is where the data transitions between byte and word invariant endian schemes. A block called AhbEndian is placed next to the BP137-AXI to AHB-lite Bridge, as shown in FIG. 2, to perform the byte to word invariant endian scheme conversion. For little endian systems specified by BIGEND, no byte steering is performed. For big endian systems specified by BIGEND, the following byte steering takes place for read and write data:


Byte 0 to Byte 3,


Byte 1 to Byte 2,


Byte 2 to Byte 1,


Byte 3 to Byte 0,


Byte 4 to Byte 7,


Byte 5 to Byte 6,


Byte 6 to Byte 5, and


Byte 7 to Byte 4.


The APB Endian Mux (multiplexer), shown in FIG. 2, is used to convert APB data bus information between little and big endian formats. Some of the APB peripherals use only 8-bit or 16-bit data buses, do not have a BIGEND signal and only support little endian format. The APB Endian Mux steers the 8-bit and 16-bit information to or from the proper byte lanes of the AHB data bus for big endian accesses. This endian mux is not part of the double-word, word or byte invariant endian scheme conversion implementation, but converts between little and big endian formats for the AHB word invariant endian scheme.


Turning now to FIG. 3, illustrated is a flow diagram of an embodiment of a method of endian mapping, generally designated 300, carried out in accordance with the principles of the present invention. The method 300 is for use with a processing system and starts in a step 305. Then, in a step 310, sending and receiving endian schemes are identified for data transfers between components of the processing system. In the illustrated embodiment, the endian schemes are selected from the group consisting of byte invariant, half-word invariant, word invariant and double-word invariant.


In a step 315, the data transfers are converted between the sending and receiving endian schemes corresponding to an endian format employed by the respective endian schemes. Each of the sending and receiving endian schemes may be identified employing at least one of a static and a dynamic endianness signal. The endian format is selected from the group consisting of a little endian format and a big endian format. In the illustrated embodiment, byte steering is employed to convert the data transfers between the sending and receiving endian schemes that correspond to a big endian format. The big endian format may be indicated by employing a hardware signal. Where a little endian format is employed, byte steering is not required. This action allows each component of the processing system to send and receive data employing its native endian scheme. In the illustrated embodiment, a step 320 further includes providing multiplexing between endian formats, when both big and little endian formats are not supported for a given endian scheme. The method 300 ends in a step 325.


While the method disclosed herein has been described and shown with reference to particular steps performed in a particular order, it will be understood that these steps may be combined, subdivided, or reordered to form an equivalent method without departing from the teachings of the present invention. Accordingly, unless specifically indicated herein, the order or the grouping of the steps is not a limitation of the present invention.


In summary, embodiments of the present invention employing an endian mapping engine, a method of endian mapping and a processing system employing the engine or the method have been presented. Advantages include the ability for each component in the processing system to send and receive data using its native double-word, word, half-word or byte invariant endian scheme. Additionally, both big and little endian formats may be supported. When employing a big endian format, byte steering is required when crossing an endian scheme boundary in the processing system. Embodiments of the present invention allow performance enhancements and time-to-market advantages to be achieved by tailoring a differing endianness collection of components to form the processing system.


Although the present invention has been described in detail, those skilled in the art should understand that they can make various changes, substitutions and alterations herein without departing from the spirit and scope of the invention in its broadest form.

Claims
  • 1. An endian mapping engine for use with a processing system, comprising: an identification unit configured to identify sending and receiving endian schemes for data transfers between components of said processing system; and a conversion unit coupled to said identification unit and configured to convert said data transfers between said sending and receiving endian schemes corresponding to an employed endian format.
  • 2. The engine as recited in claim 1 further comprising a multiplexing unit coupled to said identification unit and configured to provide multiplexing between endian formats for a given endian scheme.
  • 3. The engine as recited in claim 1 wherein endian schemes for data transfers are selected from the group consisting of: byte invariant; half-word invariant; word invariant; and double-word invariant.
  • 4. The engine as recited in claim 1 wherein each of said sending and receiving endian schemes is identified by employing at least one of a static and a dynamic endianness signal.
  • 5. The engine as recited in claim 1 wherein said endian format is selected from the group consisting of: a little endian format; and a big endian format.
  • 6. The engine as recited in claim 1 wherein byte steering is employed to convert said data transfers between said sending and receiving endian schemes.
  • 7. The engine as recited in claim 6 wherein said byte steering corresponds to a big endian format.
  • 8. The engine as recited in claim 1 wherein a hardware signal is employed to indicate the use of a big endian format.
  • 9. a method of endian mapping for use with a processing system, comprising: identifying sending and receiving endian schemes for data transfers between components of said processing unit; and converting said data transfers between said sending and receiving endian schemes corresponding to an employed endian format.
  • 10. The method as recited in claim 9 further comprising providing multiplexing between endian formats for a given endian scheme.
  • 11. The method as recited in claim 9 wherein endian schemes for data transfers are selected from the group consisting of: byte invariant; half-word invariant; word invariant; and double-word invariant.
  • 12. The method as recited in claim 9 wherein each of said sending and receiving endian schemes is identified by employing at least one of a static and a dynamic endianness signal.
  • 13. The method as recited in claim 9 wherein said endian format is selected from the group consisting of: a little endian format; and a big endian format.
  • 14. The method as recited in claim 9 wherein byte steering is employed to convert said data transfers between said sending and receiving endian schemes.
  • 15. The method as recited in claim 14 wherein said byte steering corresponds to a big endian format.
  • 16. The method as recited in claim 9 wherein a hardware signal is employed to indicate the use of a big endian format.
  • 17. A processing system, comprising: a processor block employing at least one processor; an interconnect block, coupled to said processor block, employing an input-output bus; a peripheral block, coupled to said interconnect block, employing at least one peripheral; and an endian mapping engine coupled to said processor, interconnect and peripheral blocks, including: an identification unit that identifies sending and receiving endian schemes for data transfers between components of said processing system, and a conversion unit, coupled to said identification unit, that converts said data transfers between said sending and receiving endian schemes corresponding to an employed endian format.
  • 18. The system as recited in claim 17 further comprising a multiplexing unit, coupled to said identification unit, that provides multiplexing between endian formats for a given endian scheme.
  • 19. The system as recited in claim 17 wherein endian schemes for data transfers are selected from the group consisting of: byte invariant; half-word invariant; word invariant; and double-word invariant.
  • 20. The engine as recited in claim 17 wherein each of said sending and receiving endian schemes is identified by employing at least one of a static and a dynamic endianness signal.
  • 21. The system as recited in claim 17 wherein said endian format is selected from the group consisting of: a little endian format; and a big endian format.
  • 22. The system as recited in claim 17 wherein byte steering is employed to convert said data transfers between said sending and receiving endian schemes.
  • 23. The system as recited in claim 22 wherein said byte steering corresponds to a big endian format.
  • 24. The engine as recited in claim 17 wherein a hardware signal is employed to indicate the use of a big endian format.