Design Principle 4: Good design demands good compromises: - PC-relative addressing for branches and immediate addressing for constant operands. Skip to content. Dismiss Document your code Every project on GitHub comes with a version-controlled wiki to give your documentation the high level of care it deserves. Sign up for free See pricing for teams and enterprises.
Because of this lack of distinction, the processor is capable of changing its instructions treating them as data under program control. And because the processor has no way of distinguishing between data and instruction, it will blindly execute anything that it is given, whether it is a meaningful sequence of instructions or not.
There is nothing to distinguish between a number that represents a dot of color in an image and a number that represents a character in a text document. Meaning comes from how these numbers are treated under the execution of a program. This means that sequences of instructions in a program may be treated as data by another program.
03716 - Digital Design Principles and Computer Architecture
A compiler creates a program binary by generating a sequence of numbers instructions in memory. To the compiler, the compiled program is just data, and it is treated as such. It is a program only when the processor begins execution. Similarly, an operating system loading an application program from disk does so by treating the sequence of instructions of that program as data. The program is loaded to memory just as an image or text file would be, and this is possible due to the shared memory space. Each location in the memory space has a unique, sequential address.
The address of a memory location is used to specify and select that location.
The address space is the array of all addressable memory locations. Hence, the processor is said to have a 64K address space. Most microprocessors available are standard Von Neumann machines. The main deviation from this is the Harvard architecture , in which instructions and data have different memory spaces Figure with separate address, data, and control buses for each memory space. This has a number of advantages in that instruction and data fetches can occur concurrently, and the size of an instruction is not set by the size of the standard data unit word.
- The Definitive Guide to NetBeans™ Platform 7?
- RISC (reduced instruction set computer)?
- The Secret Chord?
- An Introduction to Involutive Structures.
A bus is a physical group of signal lines that have a related function. Buses allow for the transfer of electrical signals between different parts of the computer system and thereby transfer information from one device to another. For example, the data bus is the group of signal lines that carry data between the processor and the various subsystems that comprise the computer. For example, an 8-bit-wide bus transfers 8 bits of data in parallel.
The majority of microprocessors available today with some exceptions use the three-bus system architecture Figure The three buses are the address bus , the data bus , and the control bus. The data bus is bidirectional, the direction of transfer being determined by the processor. The address bus carries the address, which points to the location in memory that the processor is attempting to access. It is the job of external circuitry to determine in which external device a given memory location exists and to activate that device.
This is known as address decoding. The control bus carries information from the processor about the state of the current access, such as whether it is a write or a read operation. The control bus can also carry information back to the processor regarding the current access, such as an address error. Different processors have different control lines, but there are some control lines that are common among many processors. The control bus may consist of output signals such as read, write, valid address, etc. A processor usually has several input control lines too, such as reset, one or more interrupt lines, and a clock input.
It was a massive machine, filling a very big room with the type of solid hardware that you can really kick. It was quite an experience looking over the old machine. I remember at one stage walking through the disk controller it was the size of small room and looking up at a mass of wires strung overhead. I asked what they were for. There are six basic types of access that a processor can perform with external chips. The internal data storage of the processor is known as its registers.
The instructions that are read and executed by the processor control the data flow between the registers and the ALU.
A symbolic representation of an ALU is shown in Figure These values, called operands , are typically obtained from two registers, or from one register and a memory location. The result of the operation is then placed back into a given destination register or memory location. The status outputs indicate any special attributes about the operation, such as whether the result was zero, negative, or if an overflow or carry occurred.
Some processors have separate units for multiplication and division, and for bit shifting, providing faster operation and increased throughput. Each architecture has its own unique ALU features, and this can vary greatly from one processor to another. However, all are just variations on a theme, and all share the common characteristics just described. Interrupts also known as traps or exceptions in some processors are a technique of diverting the processor from the execution of the current program so that it may deal with some event that has occurred.
An interrupt is generated in your computer every time you type a key or move the mouse.
You can think of it as a hardware-generated function call. Instead, the processor may continue with other tasks. Interrupts can be of varying priorities in some processors, thereby assigning differing importance to the events that can interrupt the processor. If the processor is servicing a low-priority interrupt, it will pause it in order to service a higher-priority interrupt.go site
Principles of Computer Architecture - Miles Murdocca, Vincent P. Heuring - Google книги
However, if the processor is servicing an interrupt and a second, lower-priority interrupt occurs, the processor will ignore that interrupt until it has finished the higher-priority service. When an interrupt occurs, the usual procedure is for the processor to save its state by pushing its registers and program counter onto the stack. The processor then loads an interrupt vector into the program counter. The interrupt vector is the address at which an interrupt service routine ISR lies. Thus, loading the vector into the program counter causes the processor to begin execution of the ISR, performing whatever service the interrupting device required.
This causes the processor to reload its saved state registers and program counter from the stack and resume its original program.
Principles of Computer Architecture : International Edition
Interrupts are largely transparent to the original program. Processors with shadow registers use these to save their current state, rather than pushing their register bank onto the stack. This saves considerable memory accesses and therefore time when processing an interrupt. If it does not, important state information will be lost. Upon returning from an ISR, the contents of the shadow registers are swapped back into the main register array. For some time-critical applications, polling can reduce the time it takes for the processor to respond to a change of state in a peripheral.
A better way is for the device to generate an interrupt to the processor when it is ready for a transfer to take place. Small, simple processors may only have one or two interrupt inputs, so several external devices may have to share the interrupt lines of the processor. When an interrupt occurs, the processor must check each device to determine which one generated the interrupt. This can also be considered a form of polling.