O'Reilly logo

Designing SOCs with Configured Cores by Steve Leibson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.5. TIE Instructions

The byte-swapping function described in the previous chapter provides an excellent demonstration of the ability of new processor instructions to reduce cycle count. Figure 4.3 illustrates the byte-swap function, which converts a 32-bit word between big- and little-endian formats.

Figure 4.3. Conversion from one endian format to the other for a 32-bit word.

The nine instructions from the base Xtensa ISA that are required to perform this operation are:

slli a9, a14, 24Form intermediate result bits 24–31 in register a9
slli a8, a14, 8Shift 32-bit word left by 8 bits, save in register a8
srli a10, a14, 8Shift 32-bit word right ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required