















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Goals for this chapter:
The computer has four topâlevel components.
We discussed the system clock when we discussed the basic flipâflops. Here are two depictions of the system clock that will be used in this course. The top representation is used when discussing the system bus and the I/O bus. The bottom representation is used elsewhere. The system clock regulates the execution of instructions in the CPU and synchronizes all of the CPU components to prevent errors due to bad timing.
The system bus comprises a set of digital lines; each of which carries a signal, power, or ground. The ground is used to complete circuits. If the line carries a signal that line is set either to logic 1 (often +5 volts) or logic 0 (often 0 volts). Consider it as transmitting a Boolean variable, in that the value on that line can be changed by some control unit as a program is executed. The ground lines also provide isolation between the signal lines, which can act as little antennas â either to âbroadcastâ signals or receive them from other signal lines. This is called âcross talkâ. It is not desirable. Here is a small bus with three data lines (D 2 , D 1 , D 0 ), two address lines (A 1 , A 0 ), a system clock (ď) and a voltage line (+ V).
The computer has three major sets of busses.
The design on the previous slide is logically correct, but IT WONâT WORK. IT IS TOO SLOW. Problem: A single system level bus cannot handle the load. Modern gamers demand fast video; this requires a fast bus to the video chip. The memory system is always a performance bottleneck. We need a dedicated memory bus in order to allow acceptable performance. Here is a refinement of the above diagram. This design is getting closer to reality. At least, it acknowledges two of the devices requiring high data rates in access to the CPU.
The memory stores the instructions and data for an executing program. Memory is characterized by the smallest addressable unit: Byte addressable the smallest unit is an 8âbit byte. Word addressable the smallest unit is a word, usually 16 or 32 bits in length. Most modern computers are byte addressable, facilitating access to character data. Logically, computer memory should be considered as an array. The index into this array is called the address or âmemory addressâ. A logical view of such a byte addressable memory might be written in code as: Const MemSize = byte Memory[MemSize] // Indexed 0 ⌠(MemSize â 1) The CPU has two registers dedicated to handling memory. The MAR (Memory Address Register) holds the address being accessed. The MBR (Memory Buffer Register) holds the data being written to the memory or being read from the memory. This is sometimes called the Memory Data Register.
I call this the âlinear viewâ, as memory is still modeled as one large linear array. The Nâbit address selects one of the 2N entities, numbered 0 through (2N â 1). Read sequence: First address to MAR; command a READ. then copy the contents of the MBR. Write sequence: First address to MAR; data to the MBR. then command a WRITE. This is logically correct, but difficult to implement at an acceptable price.
The CPU also has four main components:
There are two sets of registers, called âGeneral Purposeâ and âSpecial Purposeâ. The origin of the register set is simply the need to have some sort of memory on the computer and the inability to build what we now call âmain memoryâ. When reliable technologies, such as magnetic cores, became available for main memory, the concept of CPU registers was retained. Registers are now implemented as a set of flipâflops physically located on the CPU chip. These are used because access times for registers are two orders of magnitude faster than access times for main memory: 1 nanosecond vs. 80 nanoseconds. General Purpose Registers These are mostly used to store intermediate results of computation. The count of such registers is often a power of 2, say 2 4 = 16 or 2 5 = 32, because N bits address 2 N items. The registers are often numbered and named with a strange notation so that the assembler will not confuse them for variables; e.g. %R0 ⌠%R15. %R0 is often fixed at 0. NOTE: The MARIE has only one general purpose register â the AC (Accumulator). Think of the AC as the display on a standard calculator.
Registers are often built from D flipâflops. A 16âbit register has 16 D flipâflops. Here is a diagram of a 2âbit register to show how the flipâflops are used. There are two 2âbit busses, one carrying data to the registers and one data from them. When Clock = 1 and Load = 1, the register accepts input from the âTo Registerâ bus. When Clock = 1 and Read = 1, the register puts data onto the âFrom Registerâ bus.