Subject: Put this in the EFI email folder RPM Bit Banding
From: AAA-rotaryeng
Date: 2/2/2013, 4:01 AM
To: AAA-rotaryeng
CC: mikroElektronika Support Center <support@mikroe.com>

What the heck is Bit-Banding? I am no expert in this subject but I will do my best to explain it here as I understand it now. Bit-Banding is a feature of the ARM processor.

This bit-banding operation greatly simplifies bit manipulations. Instead of reading a byte, AND?ing in the appropriate bit, and then writing the byte back out, as done in the old 8 bit embedded processors, bit-banding accomplishes this with a single store instruction.

Example of Bit-Banding

Bit-banding uses address space that aliases peripheral or static ram address space, allowing a single bit within a byte to be manipulated by a reference to a byte at an aliased address.

In computing, aliasing describes a situation in which a data location in memory can be accessed through different symbolic names in the program. In other words the programmer assigns a name to a memory location. Lets say we want to turn a light on in the instrument panel when the oil pressure drops to a dangerous level. The programmer would call it the "oil-pressure-light". It only needs one on or off bit (wire) to do this just like the light switch in your house.

For example, a write to address 0x20000000 modifies the static ram 32-bit word at that location, but writing to 0x28000000 modifies only bit 0 at address 0x20000000.

Static random-access memory (SRAM) is a type of semiconductor memory that uses bistable latching circuitry to store each bit. The term static differentiates it from cheaper dynamic RAM (DRAM) which must be periodically refreshed. Static RAM is widely used in embedded processors as unlike PC's it takes no valuable programming time to refresh. Time is of the essence when you are controlling machines.

With the prior method of bit manipulations with sequential instructions doing the read-modify-write operations, a hardware interrupt could occur which, potentially, could change a bit at that memory location.
After the interrupt returns, the store could be writing corrupt data back to that memory location.


Paul Lamar

-- 
The Rotary Engine News Letter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
You Tube http://tinyurl.com/beqqxas
Copyright 1998-2013 All world wide rights reserved.