Some simple questions on instructions
In principle, there’s no greater sin than writing data and not using it because you are throwing away time. In practice there several circumstances that may force this pointless action. First, you might save data when entering a subroutine. Typically, registers that are reused in the subroutine are saved. However, the data in a saved register may not be required and the save/restore operation wastes time.
A second occasion where data is written but not read occurs when the saved data is to be accessed in a conditional cause; for example, IF x == y THEN P=A+B ELSE P=A+C. Here, if x is equal to y then variable C is not accessed. If this is the only place C is read, then storing it was a pointless act.
In the early days of computing, self-
Today’s sophisticated processors make self-
Who’d be an instruction set designer?
No one in their right mind. It’s a no-
What is the first decision when creating a new architecture?
Assuming that you are not constrained by backward compatibility (e.g., creating a new ARM variant), the fundamental decision is the general ISA type:
Classic CISC . This is the register-
Classic RISC: The RISC architecture is strictly register-
DSP: DSP Processors are designed to process data representing audio and video; that
is, continuous, tine-
VLIW: The very long instruction word processor performs multiple operations per instruction word (or instruction bundle). The best know VLIW is the Itanium processor.
What is the second decision?
You have to decide how many on chip registers to implement. Increasing the number
of registers reduces the processor-
Suppose you design an instruction with the following format:
Destination register: 7 bits
Source register 1: 7 bits
Source register 2: 7 bits
Immediate/literal: 17 bits
a. What is the maximum number of unique op-
b. How many registers are there?
c. That is the range of the immediate if we assume it is signed?
d. What is the total instruction length?
e. What’s in register 0?
f. How many bits is a data word?
g. You eventually, settle for a 67-
You are designing a dedicated 16-
a. is such a processor possible?
b. what is the largest literal that can be loaded from memory?
c. Can’t you improve your answer to part b?
You have a really bright idea. Register-
The purpose of registers is to reduce processor-