Page 128 - A Practical Guide from Design Planning to Manufacturing
P. 128

Computer Architecture  101

          Register architectures allow the destination operand to be explicitly
        specified as one of number of general-purpose registers. To perform the
        example operation, first two load instructions place the values A and B
        in two general-purpose registers. The Add instruction reads both these
        registers and writes the results to a third. The store instruction then
        writes the result to memory. RISC architectures allow register desti-
        nations only for computations.
          Memory architectures allow memory addresses to be given as desti-
        nation operands. In this type of architecture, a single instruction might
        specify the addresses of both the input operands and the address where
        the result is to be stored. What might take several separate instructions
        in the other architectures is accomplished in one. The x86 architecture
        supports memory destinations for computations.
          Many early computers were based upon stack or accumulator archi-
        tectures. By using implicit operands they allow instructions to be coded
        in very few bits. This was important for early computers with extremely
        limited memory capacity. These early computers also executed only one
        instruction at a time. However, as increased transistor budgets allowed
        multiple instructions to be executed in parallel, stack and accumulator
        architectures were at a disadvantage. More recent architectures have
        all used register or memory destinations. The JVM architecture is an
        exception to this rule, but because it was not originally intended to be
        implemented in silicon, small code size and ease of translation were
        deemed far more important than the possible impact on performance.
          The results of one computation are commonly used as a source for
        another computation, so typically the first source operand of a compu-
        tation will be the same as the destination type. It wouldn’t make sense
        to only support computations that write to registers if a register could
        not be an input to a computation. For two source computations, the
        other source could be of the same or a different type than the destina-
        tion. One source could also be an immediate value, a constant encoded
        as part of the instruction. For register and memory architectures, this
        leads to six types of instructions. Table 4-5 shows which architectures
        discussed so far provide support for which types.



        TABLE 4-5  Computation Instruction Types
                                        Second source type
        Destination and
        first source type    Immediate              Register       Memory
           Register    VAX, x86, SPARC, PA-RISC, VAX, x86, SPARC, PA-RISC, VAX, x86
                        PowerPC, EPIC        PowerPC, EPIC
           Memory      VAX, x86              VAX, x86              VAX
   123   124   125   126   127   128   129   130   131   132   133