The Elements of Computing Systems: Building a Modern Computer from First Principles

Read Online The Elements of Computing Systems: Building a Modern Computer from First Principles by Noam Nisan, Shimon Schocken - Free Book Online

Book: The Elements of Computing Systems: Building a Modern Computer from First Principles by Noam Nisan, Shimon Schocken Read Free Book Online
Authors: Noam Nisan, Shimon Schocken
Ads: Link
decrementing instead of incrementing.
     
    Time Matters All the chips described so far in this chapter are sequential. Simply stated, a sequential chip is a chip that embeds one or more DFF gates, either directly or indirectly. Functionally speaking, the DFF gates endow sequential chips with the ability to either maintain state (as in memory units) or operate on state (as in counters). Technically speaking, this is done by forming feedback loops inside the sequential chip (see figure 3.4). In combinational chips, where time is neither modeled nor recognized, the introduction of feedback loops is problematic: The output would depend on the input, which itself would depend on the output, and thus the output would depend on itself. On the other hand, there is no difficulty in feeding the output of a sequential chip back into itself, since the DFFs introduce an inherent time delay: The output at time t does not depend on itself, but rather on the output at time t - 1. This property guards against the uncontrolled “data races” that would occur in combinational chips with feedback loops.

    Figure 3.4 Combinational versus sequential logic (in and out stand for one or more input and output variables). Sequential chips always consist of a layer of DFFs sandwiched between optional combinational logic layers.
     

    Recall that the outputs of combinational chips change when their inputs change, irrespective of time. In contrast, the inclusion of the DFFs in the sequential architecture ensures that their outputs change only at the point of transition from one clock cycle to the next, and not within the cycle itself. In fact, we allow sequential chips to be in unstable states during clock cycles, requiring only that at the beginning of the next cycle they output correct values.
    This “discretization” of the sequential chips’ outputs has an important side effect: It can be used to synchronize the overall computer architecture. To illustrate, suppose we instruct the arithmetic logic unit (ALU) to compute x + y where x is the value of a nearby register and y is the value of a remote RAM register. Because of various physical constraints (distance, resistance, interference, random noise, etc.) the electric signals representing x and y will likely arrive at the ALU at different times. However, being a combinational chip, the ALU is insensitive to the concept of time—it continuously adds up whichever data values happen to lodge in its inputs. Thus, it will take some time before the ALU’s output stabilizes to the correct x + y result. Until then, the ALU will generate garbage.
    How can we overcome this difficulty? Well, since the output of the ALU is always routed to some sort of a sequential chip (a register, a RAM location, etc.), we don’t really care. All we have to do is ensure, when we build the computer’s clock, that the length of the clock cycle will be slightly longer that the time it takes a bit to travel the longest distance from one chip in the architecture to another. This way, we are guaranteed that by the time the sequential chip updates its state (at the beginning of the next clock cycle), the inputs that it receives from the ALU will be valid. This, in a nutshell, is the trick that synchronizes a set of stand-alone hardware components into a well-coordinated system, as we shall see in chapter 5.

3.2 Specification

    This section specifies a hierarchy of sequential chips:
    • Data-flip-flops (DFFs)
    • Registers (based on DFFs)
    • Memory banks (based on registers)
    • Counter chips (also based on registers)

3.2.1 Data-Flip-Flop

    The most elementary sequential device that we present—the basic component from which all memory elements will be designed—is the data flip-flop gate. A DFF gate has a single-bit input and a single-bit output, as follows:
    Like Nand gates, DFF gates enter our computer archtecture at a very low level. Specifically, all the sequential chips in the computer (registers, memory, and

Similar Books

Fenway 1912

Glenn Stout

Two Bowls of Milk

Stephanie Bolster

Crescent

Phil Rossi

Command and Control

Eric Schlosser

Miles From Kara

Melissa West

Highland Obsession

Dawn Halliday

The Ties That Bind

Jayne Ann Krentz