Академический Документы
Профессиональный Документы
Культура Документы
The addressable memory space of the 80c196 consists of 64k bytes. However, not all
these addresses are available to the user. Addresses 0000H through 00FFH and 1FFEH
through 207FH are reserved for special purposes. All other locations can be used for either
program or data storage, or for memory-mapped I/O.
FFFFH +-------------------------+
| |
| External memory or I/O |
| |
4000H +-------------------------+
| Internal ROM/EPROM or |
| external memory or I/O |
2080H +-------------------------+
| Reserved |
2040H +-------------------------+
| 8 interrupt vectors |
2030H +-------------------------+
| ROM/EPROM security key |
2020H +-------------------------+
| Reserved |
2019H +-------------------------+
| Chip Configuration byte |
2018H +-------------------------+
| Reserved |
2014H +-------------------------+
| 10 interrupt vectors |
2000H +-------------------------+
| Port 3 and port 4 |
1FFEH +-------------------------+
| External memory or I/O |
0200H +-------------------------+
| 80c196KC internal RAM |
0100H +-------------------------+
| Registers and SFRs |
0000H +-------------------------+
80c196 addressable space
Locations 00H through OFFH contain the 232 general registers and the 24 SFRs - Special
Function Registers. The RALU can operate on any of these 256 internal register
locations, but code cannot be executed from them. If attempt is made to execute
instructions from locations 00H through OFFH, the instructions will be fetched from
external memory. This section of external memory is generally used by the Intel
development tools.
Locations 018H through OFFH are the general registers. These locations can be accessed as
byte, word ou double-word registers, and can be essentially considered as 232
accumulators.
Locations 018H and O19H contain the stack pointer. Operations to the stack cause it to be
built down and the stack pointer is pre-decremented, so the stack must be initialized by
the user program to 2 bytes above the highest stack location. The stack pointer must
point to a word (even) address.
Locations 00H through O17H are the I/O control registers or SFRs. All of the peripheral
devices of the 80c196 except ports 3 and 4 are controlled through these registers. SFR
functions are controlled through 3 windows. Switching between the windows is done
using the WSR - Window Select Register located at address 014H. SFR windows other
than WSR = 0 are out of the scope of this course.
Some of the Special Funtion Registers have different meanings if read from or written to.
Locations 1FFEH and O1FFFH are used for Ports 3 and 4 respectively. Many reserved and
special locations are in the memory area between 2000H and 2080H. The 18 interrupt
vectors, the chip configuration byte and the security key are located in this area. All the
addresses marked Reserved in this area have to be programmed with value 0FFH. 2080H
is the normal program start address. A reset interrupt restarts the program at address
2080H.
External memory
There are several modes of system bus operation on the 80c196. The standard bus mode
uses a 16-bit multiplexed address/data bus. Other bus modes include an 8-bit mode and a
mode in which the bus size can be dynamically switched between 8-bits and 16-bits. In
addition, there are several options available on the type of bus control signals which make
an external bus simple to design.
In the standard mode, external memory is addressed through lines AD0-AD15 which form
a 16-bit multiplexed bus. The idealized bus timings are represented below :
The ALE - Address Latch Enable signal provides a strobe for flip-flops (e.g. 74x373s) to
demultiplex the bus by latching the address. Demultiplexed address signals will be called
MA0-MA15.
The data returned from external memory must be on the bus and stable for a specified
setup time before the rising edge of !RD (Read). The rising edge of !RD signals the end of
the sampling window. Writing to external memory is controlled with the !WR (Write) pin.
Data is valid on AD0-15 on the rising edge of !WR. At this time data must be latched by
the external system.
In standard 16-bit mode, the external memory is composed of two parallel 8-bit memory
banks. Since a given address selects one byte, the 16-bit data bus has to be reconstructed
from the low-order byte located at the even address, and the high-order byte located at the
odd address (see Figure).
The !BHE signal is provided for 16-bit bus accesses. Together with MA0, this signal allows
to select either the low-order byte, the high order-byte, or both bytes during a 16-bit bus
access :
Actually, when a block of memory is decoded for reads only, which is typically the case
of EPROMS, the system does not have to decode !BHE and MA0 : the 80c196 will discard
the byte it does not need. But for systems that write to external memory, separate write
strobes must be generated for both the high and low bytes of memory.
5. Write about 16/32 bit ARM instruction set.
Ans: The ARM architecture is such that the 32 bit ARM instruction set and 16 bit Thumb
instruction subset both can be used. The instruction set extends to provide support for
Java acceleration (Jazelle). Instruction set also extends to provide support for security-
coding features.
Like the RISC instruction set with load and store architecture, instructions are such that
the variables and memory addresses must first be loaded into the registers and then
operations performed using the registers and then the result should be stored in the
memory. Absolute addressing and direction addressing instructions are not present in the
ARM as length of each instruction is 32-bit. Absolute address can be computed in a
register by arithmetic addition or subtraction using the PC address from r15 and offset
between current instruction, a pseudo instruction ADR r, addr, where addr are lower 12-
bit for the 32-bit address. Implementation of the ADR pseudo instruction is by
implementing instruction SUB r, r15, #&byte_offset, where 12-bit byte_offset is
Address_r15 and r15 has the current program counter at a 32-bit address.
Addressing modes that are present in the ARM instruction set are as follows.
1. Register Addressing: All operands are within the register itself. For example, MOV r1, r2
and MVN r1, r2 instruction. These mean (r1)←(r2) and (r1)←NOT(r2), move r2 or
complement of r2 bits into r1. AD r1,r2,r3 adds the source operands r2 and r3 bits and
execution result is at the destination operand r1,
2. Immediate Addressing: Second source operand can be immediate operand. Immediate
operand is of fewer-bits. For example, 8 bits in case of an ADDGT instruction, which
adds if the conditional test is successful, 12-bits in case of an ADD with no condition
tests. ADD r6, r7, #8 adds r7 and 8 and the result is in r6.
3. Indirect Base and Indexed Addressing: It is the major mode for load-store architecture as
direct absolute addressing is not provided. The following are the types of indirect
addressing modes. In all the types the assumption is all 16 msbs are 0.
a. A byte or half-word or word address is pointed by the indirect address in a GPR.
LDR r1, [r2] instruction loads r1 from the memory address pointed by r2. If r2
is 1000 1000 1000 1000, then r1 will load the 32 bits from memory address
1000 1000 1000 1000. The r2 and r3 remain unchanged.
b. A byte or half-word or word is pointed by the indirect address obtained by
subtracting two registers of GPR set. LDR r1, (r2’,-r3) instruction loads r1 from
the memory address, which is as per r2-r3. (If r2 is 1000 1000 1000 1000 and r3
is 1000 1000 0000 0000, then r1 will load the 32 bits from r2-r3= 0000 0000
1000 1000. The r2 and r3 remain unchanged).
c.A byte or half-word or word address is pointed by the indirect base address by
adding GPR with an offset as immediate operand. This mode is indirect
addressing by base plus 12-bit byte_offset (like base relative or index relative in
80x86 processor). LDR r4, [r5, #9] instruction loads r4 from the memory
address pointed by r5+9. (If base address at r5 is 0000 0000 1000 1000, then r4
will load the 32 bits from memory address 0000 0000 1000 1001 0001. The r5
remains unchanged). STR (r5, #&0C), r4 instruction stor r4 32-bits to the
memory address pointed by r5+12.
d. There is an indirect addressing mode by index plus offset with auto indexing.
LDR r4, [r5], #8 instruction loads r4 from the memory address pointed by r5
and then adds the offset 8 to r5. The r5 remains unchanged for next time use of
r5. This is called auto post indexing.