Hardware Reference
In-Depth Information
values. The size of the floating-point register accessed is determined by the instruc-
tion; in general, all ARM floating-point instructions come in single- and double-
precision variants.
The ARM architecture is a load/store architecture . That is, the only opera-
tions that access memory directly are load and store instructions to move data be-
tween the registers and the memory. All operands for arithmetic and logical in-
structions must come from registers or be supplied by the instruction (not memo-
ry), and all results must be saved in a register (not memory).
5.1.7 Overview of the ATmega168 AVR ISA Level
Our third example is the ATmega168. Unlike the Core i7 (which is used pri-
marily in desktop machines and server farms), and the OMAP4430 (which is used
primarily in phones, tablets, and other mobile devices), the ATmega168 is used in
low-end embedded systems such as traffic lights and clock radios to control the de-
vice and manage the buttons, lights, and other parts of the user interface. In this
section, we will give a brief technical introduction to the ATmega168 AVR ISA.
The ATmega168 has one mode and no protection hardware since it never runs
multiple programs owned by potentially hostile users. The memory model is ex-
tremely simple. There is 16 KB of program memory and a second 1 KB of data
memory. Each is its own distinct address space, so a particular address will refer-
ence different memory depending on whether the access is to the program or data
memory. The program and data spaces are split to make it possible to implement
the program space in flash and the data space in SRAM.
Several different implementations of memory are possible, depending on how
much the designer wants to pay for the processor. In the simplest one, the
ATmega48, there is a 4-KB flash for the program and a 512-byte SRAM for data.
Both the flash and the RAM are on chip. For small applications, this amount of
memory is often enough and having all the memory on the CPU chip is a big win.
The ATmega88 has twice as much memory on chip: 8 KB of ROM and 1 KB of
SRAM.
The ATmega168 uses a two-tiered memory organization to provide better pro-
gram security. Program flash memory is divided into the boot loader section and
application section , the size of each being determined by fuse bits that are one-
time programmed when the microcontroller is first powered up. For security rea-
sons, only code run from the boot loader section can update flash memory. With
this feature, any code can be placed in the application area (including downloaded
third-party applications) with confidence that it will never muck with other code in
the system (because application code will be running from the application space
which cannot write flash memory). To really tie down a system, a vendor can digi-
tally sign code. With signed code, the boot loader loads code into the flash memo-
ry only if it is digitally signed by an approved software vendor. As such, the system
 
 
Search WWH ::




Custom Search