Question Answers CS501
Question Answers CS501
Short Questions
Answer: The instruction fetch stage is crucial as it retrieves the next instruction to be
executed from the memory. This stage initiates the processing of an instruction by
loading the instruction bits into a temporary pipeline register, ensuring the smooth flow
of instructions through the subsequent stages of the pipeline.
2. What complications can arise from pipelining and how can they be resolved?
Answer: Complications in pipelining include data dependence, branch delay, and load
delay. These can be resolved using methods such as pipeline stalls, data forwarding, and
introducing nop instructions to handle branches and ensure proper operand availability.
Answer: Throughput refers to the number of instructions processed per second by the
pipeline. It is enhanced by pipelining as multiple instructions can be processed
simultaneously, increasing the overall number of operations performed per unit time.
Answer: Separate data and instruction memories prevent conflicts between data access
and instruction fetch operations. This separation allows for concurrent fetching of
instructions and reading/writing of data, thereby improving the efficiency and speed of
the pipeline.
Answer: Control signals regulate and direct the flow of data and instructions through the
various stages of the pipeline. They ensure that each stage performs its intended operation
at the right time, maintaining the correct sequence and coordination of processing steps.
8. Explain the concept of "pipeline stalls" and when they are used.
Answer: Pipeline stalls are deliberate delays introduced into the pipeline to handle
situations where instructions cannot proceed due to data dependencies or other hazards.
Stalls temporarily halt the progress of instructions to ensure that dependent instructions
have the necessary data available before continuing.
Lecture 17:
1. What are the differences between the store and load instruction time steps?
o The differences between the store and load instruction time steps are in T6 and T7. In
the store instruction, the data from the source register is written to memory in T6 and
T7, whereas in the load instruction, the data from memory is loaded into the destination
register during these steps.
2. Which control signal is issued to enable the write for the program counter if the
condition is met?
o The control signal issued to enable the write for the program counter if the condition is
met is LPC (Load Program Counter).
3. In the branch link instruction, which step is added compared to the simple
conditional branch instruction?
o The step added in the branch link instruction compared to the simple conditional branch
instruction is T5. This step is used to save the current program counter value to the link
register before branching.
Control Signals for the Shift Right Instruction
4. What control signal is activated for the shift right 'shr' instruction?
o The control signal activated for the shift right 'shr' instruction is SHR.
9. What are the buses named in the 2-bus implementation of the SRC?
o The buses in the 2-bus implementation of the SRC are named the In bus and the Out
bus.
Lecture 15:
Logic Design for the Uni-bus SRC
4. Which control signals are applied during time step T1 of the instruction fetch
phase?
o During T1, the control signals LMBR, MRead, MARout, Cout, and LPC are applied to
transfer data from memory to the MBR and update the Program Counter.
Memory Address Register (MAR) and Memory Buffer Register (MBR) Circuitry
6. What is the purpose of the Memory Address Register (MAR) in the SRC?
o The MAR provides temporary storage for the address of the memory location to be
accessed and interfaces with the internal CPU bus and external address bus.
8. What is the sequence of control signals for executing the add instruction?
o For the add instruction, during T3, the signals RBE, R2BUS, and LA are applied to transfer
the contents of register rb to the internal CPU bus and register A. During T4, the signals
RCE, R2BUS, ADD, and LC are used to transfer the contents of register rc to the bus,
perform the addition in the ALU, and store the result in register C. During T5, the signals
Cout, RAE, and BUS2R are activated to write the result to the destination register ra.
Sign Extension
Lecture14:
Lecture 13:
1. Describe the function of the brzr rb, rc instruction.
o The brzr rb, rc instruction branches to the address in rb if the value in rc is
zero.
2. What additional step is included in the brlzr ra, rb, rc instruction compared to
the brzr rb, rc instruction?
o The brlzr ra, rb, rc instruction includes an additional step where the current
value of the program counter is saved to ra.
3. Why is a barrel shifter suggested for shift instructions in FALCON-A?
o A barrel shifter is suggested for shift instructions in FALCON-A to handle
multiple-bit shifts efficiently, avoiding timing problems associated with single-bit
shifts.
4. How many bits wide is the FALCON-A processor bus, and how does it compare to
the SRC processor bus?
o The FALCON-A processor bus is 16-bits wide, whereas the SRC processor bus is
32-bits wide.
5. List the primary differences in the register sets between FALCON-A and SRC
processors.
o FALCON-A has 8 registers, each 16-bits wide, while SRC has 32 registers, each
32-bits wide. Additionally, the special registers (PC, IR, MAR, and MBR) in
FALCON-A are 16-bits wide, compared to 32-bits in SRC.
6. Where are the higher and lower 16-bits of the result stored in the mul ra, rb, rc
instruction in FALCON-A?
o The higher 16-bits are stored in the CH register, and the lower 16-bits are stored
in the C register.
7. Explain the role of the AH and CH registers in FALCON-A.
o The AH register is used to store the higher 16-bits of a 32-bit operand, while the
CH register stores the higher 16-bits of a 32-bit result.
8. What steps are involved in the execution of the div ra, rb, rc instruction in
FALCON-A?
o The first three steps fetch the instruction. In T3, the contents of rb are placed in
buffer register A. In T4, the contents of register R[0] are placed into register AH.
In T5, the division takes place, producing the remainder in CH and the quotient in
C. In T6, the quotient is transferred to register R[ra], and in T7, the remainder is
transferred to R[0].
9. How is the 5-bit immediate constant c1 sign-extended to 16 bits in the addi ra, rb,
c1 instruction?
o The 5-bit immediate constant c1 is sign-extended to 16 bits by replicating the sign
bit (bit 4) to the leftmost 11 positions.
10. What is the op-code for the jz instruction, and what condition does it check?
o The op-code for the jz instruction is 19, and it checks if the contents of the
specified register are zero.
Lecture 12:
Short-Answer Questions
1. What are the two main sub-systems of a processor that are involved in the design
process?
o Answer: The data path and the control unit.
2. Explain the role of the Timing Step Generator in the SRC data path.
o Answer: The Timing Step Generator ensures the correct and controlled execution
of instructions by providing mutually exclusive and sequential timing intervals,
analogous to clock cycles in an actual processor.
3. Describe the function of the Program Counter (PC) in the SRC.
o Answer: The Program Counter (PC) holds the address of the next instruction to
be executed. Its value is incremented after loading each instruction, and it can also
be updated based on branch decisions.
4. What is the significance of structural RTL in the processor design process?
o Answer: Structural RTL describes how specific operations are performed using
the actual hardware implementation, ensuring that the execution steps satisfy the
time and space requirements of the CPU.
5. How does the Memory Address Register (MAR) interact with the memory sub-
system in the SRC?
o Answer: The Memory Address Register (MAR) takes input from the ALSU as
the address of the memory location to be accessed and transfers the memory
contents at that location onto the memory sub-system.
6. In the context of instruction execution, what is the difference between Behavioral
RTL and Structural RTL?
o Answer: Behavioral RTL describes the abstract behavior of the processor in
response to instructions without binding to a specific implementation, while
Structural RTL shows the actual implementation steps and hardware details
required to execute those instructions.
7. List the seven steps involved in the processor design procedure.
o Answer:
1. ISA Design
2. Behavioral RTL Description
3. Implementation of the Data Path
4. Structural RTL Description
5. Control Unit Design
6. 2-bus and 3-bus designs
7. The machine reset and exceptions
8. Why is it important to consider the effect on overall performance during the design
phase of a processor?
o Answer: Considering the effect on overall performance is crucial because the
design decisions directly impact the execution time (ET), which is dependent on
the instruction count (IC), clock cycles per instruction (CPI), and clock cycle time
(T). Optimizing these factors ensures efficient and effective processor
performance.
By using these MCQs and short-answer questions, you can effectively review and assess
understanding of Lecture No. 12's content on the design process and structural RTL for the SRC.
Lecture 10:
Short-Answer Questions
1. Explain the purpose of the 'push' and 'pop' instructions in the FALCON-E.
o Answer: The 'push' instruction is used to push the contents of a register onto the
stack, while the 'pop' instruction is used to pop a value from the top of the stack
and store it into a register.
2. Describe the memory organization of the FALCON-E.
o Answer: The memory of FALCON-E is organized as 1-byte cells, with a word
size of 32 bits (4 bytes). It has a memory space of 2^32 bytes, accessed in 4-byte
chunks.
3. What does the 'ret' instruction do in the FALCON-E?
o Answer: The 'ret' instruction is used to return control to the normal flow of a
program after an interrupt or a procedure call concludes.
4. Explain the purpose of the 'ld' and 'st' instructions in the FALCON-E.
o Answer: The 'ld' instruction loads a memory word from a specified address into a
register, while the 'st' instruction stores a value from a register into the memory
location specified by the immediate operand field.
5. How are general-purpose registers encoded in FALCON-E instructions?
o Answer: General-purpose registers are encoded using 3 bits each, allowing
representation of up to 8 registers. For example, R0 is encoded as 000, R1 as 001,
and so on.