CS501 – Advanced Computer Architecture: Midterm Important Subjective (48 Solved Q&As)
Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · CS501 Course Page · CS501 MCQ Pack (175 MCQs)
-
Write at least one advantage and one disadvantage of microprogramming.
Topic: Control Unit, Timing & Microprogramming • 3 Marks marks
Advantage: Microprogramming simplifies the design and implementation of the control unit. Instead of building complex hardwired logic, the control signals for an instruction are produced by a microprogram stored in the control store, so the control unit becomes easier to design, debug and modify; the instruction set can even be changed or extended by changing the microprogram, without redesigning the hardware. Disadvantage: A microprogrammed control unit is slower than a hardwired control unit, because the microinstructions must be fetched from the control store during the execution of every machine instruction, which adds extra time to its execution.
-
What is the role of timing step generator in a processor?
Topic: Control Unit, Timing & Microprogramming • 3 Marks marks
The timing step generator (timing unit) in the control unit generates the sequence of timing steps (T0, T1, T2, ...) in which the micro-operations of an instruction are carried out. At each timing step it enables a specific set of control signals, so that the datapath performs exactly one step of the instruction (for example, one step of the fetch, decode or execute procedure). When the instruction finishes, the timing step generator is reset so that the next instruction starts again from the first timing step. In this way it sequences and synchronizes all the operations taking place inside the processor.
-
Write the related timing steps requirements and data path implementations of Instruction Fetch procedure using structural RTL.
Topic: Register Transfer Language (RTL) & Instruction Execution • 5 Marks marks
The instruction fetch procedure brings the next instruction from the memory into the Instruction Register (IR) and updates the Program Counter (PC). Its structural RTL is: T0: MAR ¬ PC T1: MBR ¬ M[MAR], PC ¬ PC + 4 T2: IR ¬ MBR Timing step requirements: three timing steps (T0–T2) are required. The memory read cannot start until the address has been placed in the MAR (T0); the instruction word arrives in the MBR only after the memory access completes (T1), and the IR can be loaded only after that (T2). The PC is incremented in parallel with the memory read so that it points to the next instruction. Datapath implementation: the datapath must provide a path from the PC to the MAR, a path from the memory to the MBR, a path from the MBR to the IR, and an incrementer (INC4) that adds 4 to the PC — all driven by the control signals generated at the respective timing steps.
-
Which register stores a previously calculated value or a value loaded from the main memory?
Topic: Registers, Datapath & Processor State • 2 Marks marks
The C register. It is a programmer-invisible (temporary) register of the SRC processor. It stores a value that has been previously calculated by the ALSU, or a value loaded from the main memory, and holds it safely while the processor bus is busy transferring some other value.
-
Identify the hazard in the following sequence of instructions going through the pipelined version of SRC and explain how this hazard can be resolved? / 200: str r3, 32 / 204: add r2, r4, r5 / 208: sub r1, r2, r3 / 212: ld r7, 48 / 216: shl r6, r3, 5
Topic: CPU Performance, Pipelining & Hazards • 5 Marks marks
The hazard is a data hazard — specifically a read-after-write (RAW) hazard on register r2. The sub instruction at 208 uses r2 as a source operand, but the new value of r2 is produced by the add instruction at 204, which is still in the pipeline and has not yet written its result back into the register file when sub reads its operands. The sub instruction would therefore read the old, incorrect value of r2. (Register r3 is read by the str and shl instructions but is not written by any instruction in this sequence, so it causes no hazard.) How it can be resolved: 1. Data forwarding: the result of the add instruction is forwarded directly from the ALSU output / pipeline register to the input of the sub instruction, without waiting for it to be written into the register file. 2. Pipeline stalls: the hazard detection unit of the SRC inserts stall cycles (bubbles) into the pipeline and holds the sub instruction until r2 has been updated. In the SRC, such a hazard is resolved using either pipeline stalls or data forwarding.
-
Differentiate between the superscalar architecture and VLIW architecture.
Topic: Advanced Architectures: Superscalar & VLIW • 2 Marks marks
Superscalar architecture: the processor can issue and execute more than one instruction in a single clock cycle using multiple functional units. Which independent instructions may be executed in parallel is decided by the hardware dynamically, at run time. VLIW (Very Long Instruction Word) architecture: several independent operations are packed by the compiler into one very long instruction word at compile time, and all the operations in that word are executed in parallel by the hardware, with no run-time scheduling. Key difference: in superscalar processors the parallel-issue decision is made by the hardware at run time, whereas in VLIW it is made by the compiler at compile time.
-
Differentiate between computer architecture and computer organization.
Topic: Computer Architecture Basics & Design Levels • 3 Marks marks
Computer architecture refers to those attributes of a system that are visible to the programmer — the instruction set, the number of bits used to represent data types, the addressing modes and the I/O mechanisms; it describes what the machine does. Computer organization refers to the operational units and their interconnections that realize the architectural specifications; it describes how the features are implemented (control signals, interfaces, memory technology used, etc.). For example, whether a computer has a multiply instruction is an architectural issue, while whether that instruction is implemented by a special hardware multiplier or by repeated addition is an organizational issue.
-
Name and briefly describe the different design levels of a computer system.
Topic: Computer Architecture Basics & Design Levels • 5 Marks marks
A computer system is designed at the following levels, with more implementation detail added at each lower level: 1. Behavioral (architecture) level: the system is described in terms of what it does — its functions and overall behavior — without any implementation detail. 2. Register Transfer Level (RTL): the design is described in terms of registers, the transfers of data between them, and the operations performed on the data. 3. Logic Design Level: the design is implemented with logic gates and flip-flops; it is also called the gate level. 4. Circuit Level: the gates are realized with actual electronic components such as transistors, resistors and capacitors, taking voltages and currents into account. 5. Mask (layout) Level: the physical layout of the chip — the masks used in the fabrication of the integrated circuit.
-
Differentiate between RISC and CISC architectures, giving one example of each.
Topic: Computer Architecture Basics & Design Levels • 3 Marks marks
CISC (Complex Instruction Set Computer) has a large instruction set with many complex, variable-length instructions; a single instruction can perform several operations including memory access, and the emphasis is on the hardware. Example: Motorola MC68000 (and the Intel x86 family). RISC (Reduced Instruction Set Computer) has a small set of simple, fixed-length instructions; almost all operations are register-to-register, and only the load/store instructions access memory. The emphasis is on the software (compiler) and on fast, single-cycle execution. Example: PowerPC, MIPS and SPARC. In short, the two differ in the number and complexity of instructions, instruction length (variable vs. fixed), the number of addressing modes, and the cycles taken per instruction.
-
What is an instruction? Name and explain the fields of a typical machine instruction.
Topic: Computer Architecture Basics & Design Levels • 3 Marks marks
An instruction is a binary pattern (a machine-language command) that tells the processor which operation to perform and on what data. A typical instruction consists of the following fields: 1. Opcode (operation code) field: specifies the type of operation to be performed, e.g., add, load, store. 2. Operand / address fields: specify the registers or the memory locations whose contents are the operands of the operation, and where the result is to be placed. 3. Constant / displacement field (where present): holds an immediate value or an offset used to compute the effective address of an operand. The complete set of instructions, their formats, registers and addressing modes of a processor is called its Instruction Set Architecture (ISA).
-
Describe the general organization of the SRC processor.
Topic: SRC Processor, Instruction Formats & Addressing Modes • 5 Marks marks
The SRC (Simple RISC Computer) is a hypothetical 32-bit RISC processor. Its organization consists of: 1. A register file of 32 general-purpose registers (R0–R31), each 32 bits wide. 2. Special-purpose registers: the PC (program counter), IR (instruction register), MAR (memory address register) and MBR (memory buffer register), plus the programmer-invisible temporary registers A and C. 3. The ALSU (Arithmetic and Logic Shift Unit), which performs arithmetic, logical and shift operations. 4. The control unit, which generates the control signals required for the execution of every instruction. 5. Internal and external buses connecting the registers, the ALSU, the memory and the I/O devices. It follows a load/store architecture and uses fixed-length 32-bit instructions.
-
Explain the four instruction formats (Type A, B, C and D) of the SRC processor.
Topic: SRC Processor, Instruction Formats & Addressing Modes • 5 Marks marks
All SRC instructions are 32 bits long, and the opcode occupies the field IR<31..27>. The four formats are: 1. Type A: contains no operand/register fields at all; it is used by instructions that need no operands. Only the opcode field is present. 2. Type B: used by the branch-type instructions (three in number), which use relative addressing. It contains a register field (ra) and a 22-bit relative displacement/address field (c2) that is added to the PC. 3. Type C: contains two register fields (ra and rb) and a 17-bit constant/displacement field (c1). It is used by load/store and immediate-type instructions. 4. Type D: contains three register fields (ra, rb and rc) and is used by register-to-register arithmetic/logical instructions, with two source registers and one destination register.
-
What is an addressing mode? Explain the addressing modes used in the SRC processor.
Topic: SRC Processor, Instruction Formats & Addressing Modes • 5 Marks marks
An addressing mode is the way in which the operand, or the address of the operand, of an instruction is specified. The important modes are: 1. Register mode: the operand is held in a register, e.g., add r1, r2, r3. 2. Immediate mode: the operand itself is given as a constant in the instruction. 3. Direct (absolute) mode: the instruction contains the actual memory address of the operand. 4. Indirect mode: the instruction specifies a register (or location) that contains the address of the operand. 5. Relative (PC-relative) mode: the effective address is obtained by adding the displacement given in the instruction to the PC (EA = PC + c2); it is used by branch and lar instructions. 6. Indexed / displacement mode: the effective address is the contents of a base register plus a constant displacement (EA = R[rb] + c1); it is used by the load/store instructions of the SRC.
-
Differentiate between the 'ld' and 'lar' instructions of the SRC processor.
Topic: SRC Processor, Instruction Formats & Addressing Modes • 2 Marks marks
ld (load): loads the contents of a memory location into a register. For example, ld r3, 36 loads the contents of the memory location M[PC + 36] into register r3 — the register receives the data stored at the effective address. lar (load address relative): loads the relative address itself into a register. For example, lar r3, 36 loads the value (PC + 36) into register r3 — the register receives the address, not the data stored at that address.
-
Write the abstract RTL description of the load (ld) instruction of the SRC.
Topic: SRC Processor, Instruction Formats & Addressing Modes • 3 Marks marks
For the instruction ld ra, c1(rb) the abstract RTL is: R[ra] ¬ M[R[rb] + c1] This means: the effective address is computed by adding the constant c1 to the contents of register rb, and the contents of that memory location are loaded into register ra. (In structural RTL the same operation is carried out in steps: the address is placed in the MAR, the memory is read into the MBR, and the MBR is finally transferred to R[ra].)
-
What is meant by upward compatibility of a processor family?
Topic: SRC Processor, Instruction Formats & Addressing Modes • 2 Marks marks
Upward compatibility means that a program written for an older (lower) model of a processor family can run without any modification on the newer (higher) models of the same family. It is achieved by keeping the same instruction set architecture: new machines may add new instructions, but they do not remove or change the existing ones, so the old software remains valid on the new hardware.
-
What is Register Transfer Language (RTL)? What is it used for?
Topic: Register Transfer Language (RTL) • 2 Marks marks
Register Transfer Language is a symbolic notation used to describe the internal operations of a processor — the movement (transfer) of data between registers and the operations performed on that data — in a precise, step-by-step manner. It is used to specify exactly what each instruction does and to design the datapath and the control unit of the processor. For example, R3 ¬ R5 + R7 means that the sum of the contents of registers R5 and R7 is transferred into register R3.
-
Differentiate between abstract RTL and structural RTL.
Topic: Register Transfer Language (RTL) • 3 Marks marks
Abstract RTL describes what an instruction does — its overall effect — without referring to the internal hardware structure or the timing steps. For example, the abstract RTL of an add instruction is simply: R[ra] ¬ R[rb] + R[rc]. Structural RTL describes how the instruction is actually implemented on the datapath: the individual transfers between the real registers (A, C, MAR, MBR, IR) performed at each timing step using the available buses and the ALSU. For example, the same add instruction in structural RTL is: T0: A ¬ R[rb] T1: C ¬ A + R[rc] T2: R[ra] ¬ C
-
Explain the basic symbols and notation used in Register Transfer Language.
Topic: Register Transfer Language (RTL) • 3 Marks marks
The basic RTL notation is: 1. ¬ (arrow): a transfer/assignment — the right-hand side value is loaded into the left-hand side register, e.g., R1 ¬ R2. 2. R[x] and M[address]: denote a register and a memory location respectively. 3. <m..n>: field selection — selects bits m down to n of a register, e.g., IR<31..27> selects the opcode field of the instruction register. 4. Comma (,): separates two transfers that take place simultaneously in the same timing step. 5. Colon (:): separates a condition from the transfer, which is performed only if the condition is true. 6. Timing step (T0, T1, ...): a prefix showing the clock step at which the transfer occurs.
-
List the steps involved in the execution of an instruction (instruction cycle) and explain each step briefly.
Topic: Register Transfer Language (RTL) • 5 Marks marks
The execution of an instruction passes through the following steps: 1. Instruction fetch: the instruction whose address is in the PC is fetched from the memory into the IR, and the PC is incremented to point to the next instruction. 2. Instruction decode: the control unit decodes the opcode field of the IR to determine the operation and the operands involved. 3. Operand fetch: the required operands are read from the registers or from the memory. 4. Execution: the ALSU performs the required operation on the operands. 5. Result storage: the result is written back into a register or stored in the memory. 6. Interrupt check: before fetching the next instruction, the processor checks whether any interrupt or exception is pending. Each of these steps is further divided into timing steps controlled by the control unit.
-
Differentiate between programmer-visible and programmer-invisible registers, with examples from the SRC.
Topic: Registers, Datapath & Processor State • 3 Marks marks
Programmer-visible registers are the registers that can be directly referenced by the programmer in instructions. In the SRC these are the 32 general-purpose registers R0–R31 (the PC is also affected directly by branch instructions). Programmer-invisible registers are internal temporary registers that cannot be addressed by any instruction; the hardware uses them during the execution of instructions. In the SRC these are the registers A and C: A holds one operand for the ALSU, while C holds the result of an operation, or a value loaded from the memory, while the bus is busy with another transfer. The IR, MAR and MBR also work internally as part of the datapath.
-
Differentiate between the MAR and MBR registers of a processor.
Topic: Registers, Datapath & Processor State • 3 Marks marks
MAR (Memory Address Register): it holds the address of the memory location that is to be read from or written to. It receives the address from the datapath/ALSU and is connected to the memory subsystem through the address bus. MBR (Memory Buffer Register): it holds the actual data being transferred between the CPU and the memory. Data read from the memory is first placed in the MBR, and data to be written to the memory is placed in the MBR before the write takes place. It has a bi-directional connection with both the memory subsystem and the registers/ALSU. In short, the MAR carries the address of the data, while the MBR carries the data itself.
-
Explain the roles of the Program Counter (PC) and the Instruction Register (IR) in a processor.
Topic: Registers, Datapath & Processor State • 3 Marks marks
Program Counter (PC): it holds the address of the next instruction to be executed. After an instruction is fetched, the PC is incremented (by 4 in the SRC, since each instruction is 4 bytes long) to point to the next instruction; branch instructions load a new target address into it. Instruction Register (IR): it holds the instruction that is currently being executed. The fetched instruction is placed in the IR, and its fields — the opcode IR<31..27>, the register fields and the constant fields — are decoded by the control unit to generate the control signals required for that instruction.
-
What is meant by the processor state? What does it consist of?
Topic: Registers, Datapath & Processor State • 2 Marks marks
The processor state is the complete set of information that describes the current status of the processor at any instant, and which is needed to resume its execution correctly (for example, after an interrupt). It consists of the contents of all the general-purpose registers, the program counter (PC), the instruction register, and the status/condition-code information (flags). Saving the processor state means saving these register contents so that the interrupted program can later be resumed from exactly the same point. (The stack is a memory structure and is not itself a part of the processor state.)
-
Differentiate between hardwired and microprogrammed control units.
Topic: Control Unit, Control Signals & Microprogramming • 3 Marks marks
Hardwired control unit: the control signals are generated by fixed hardware logic made of combinational and sequential circuits. It is fast, but its design is complex and difficult to modify — any change in the instruction set requires the hardware to be redesigned. Microprogrammed control unit: the control signals for each instruction are generated by a microprogram (a sequence of microinstructions) stored in a control store. It is slower, because microinstructions have to be fetched during execution, but it is much simpler to design, easier to modify and debug, and new instructions can be added simply by changing the microprogram.
-
What are control signals? Why are they required for the execution of every instruction in the SRC?
Topic: Control Unit, Control Signals & Microprogramming • 3 Marks marks
Control signals are the signals generated by the control unit that control every operation inside the processor: they select the function to be performed by the ALSU, enable registers to load data or to place their contents on the bus, select the memory location to be accessed, and control the memory read/write operations. Every instruction of the SRC requires a specific set of control signals at each timing step, so that the datapath performs the correct transfers and operations in the correct order. Without these control signals, the datapath hardware alone cannot execute any instruction.
-
What is a microinstruction? What is the function of the control store in a microprogrammed control unit?
Topic: Control Unit, Control Signals & Microprogramming • 3 Marks marks
In a microprogrammed control unit, each machine instruction is implemented by a sequence of microinstructions. A microinstruction specifies the set of control signals to be activated for one step (micro-operation) of the instruction, along with information about the next microinstruction to be executed. The microinstructions are stored in a special memory called the control store (control memory). Executing a machine instruction means fetching and executing its microinstructions from the control store one by one until the instruction is complete; the sequence of microinstructions for one instruction is called its microprogram (micro-routine).
-
How many types of reset operations are there in the SRC? Explain each briefly.
Topic: Control Unit, Control Signals & Microprogramming • 2 Marks marks
There are two types of reset operations in the SRC: 1. The external (power-on) reset: applied when the processor is switched on or the reset signal is given; it initializes the processor — the registers/control state are cleared and execution starts from a fixed starting address. 2. The internal reset at the end of an instruction: when an instruction completes, the timing step generator and the related control state are reset, so that the next instruction starts again from the first timing step (T0).
-
Write down the main characteristics of the FALCON-A processor.
Topic: FALCON-A, FALCON-E & EAGLE Processors • 3 Marks marks
The FALCON-A is a hypothetical 16-bit processor. Its main characteristics are: 1. All of its registers are 16 bits wide. 2. Its instruction length is 16 bits. 3. Its external interface consists of a 16-bit address bus and a 16-bit data bus. 4. The memory space available to it is 2^16 bytes. 5. The size of each of its I/O ports is 8 bits. 6. It has 'in' and 'out' instructions for input/output, which are not present in the SRC. 7. Register R0 is used as an implicit operand in its MUL and DIV instructions. 8. In its Type-2 instruction format, constants lie in the range -128 to +127.
-
Compare the SRC and FALCON-A processors with respect to register size, instruction length, bus width and instruction set.
Topic: FALCON-A, FALCON-E & EAGLE Processors • 3 Marks marks
Register size: all registers of the FALCON-A are 16 bits wide, whereas all registers of the SRC are 32 bits wide. Instruction length: the FALCON-A has 16-bit instructions, whereas the SRC has 32-bit instructions. Bus width: the FALCON-A bus is 16 bits wide, whereas the SRC bus is 32 bits wide. Instruction set / architecture: the FALCON-A is a simpler teaching machine that also has dedicated I/O instructions (in and out), whereas the SRC is a load/store RISC machine in which only the load and store instructions access the memory.
-
What is the FALCON-E processor? How does it differ from the FALCON-A?
Topic: FALCON-A, FALCON-E & EAGLE Processors • 2 Marks marks
The FALCON-E is the extended (enhanced) version of the FALCON-A processor. Its instruction length is 32 bits — double the 16-bit instructions of the FALCON-A — which provides room for a larger opcode and bigger operand fields. It extends the FALCON-A instruction set with additional instructions; for example, it has a 'divi' instruction that divides a register value by an immediate value. It is therefore a more powerful machine than the FALCON-A, while remaining based on the same architecture.
-
Write a short note on the instruction formats of the EAGLE processor.
Topic: FALCON-A, FALCON-E & EAGLE Processors • 3 Marks marks
The EAGLE is a hypothetical processor with a richer instruction set, and it uses several instruction formats with different numbers of operand fields. Some formats carry register and memory operands, while in the Type Z format there is no field reserved for the operands at all — the instruction consists only of the opcode and is used for operations that need no operands; an example is the INIT instruction, which initializes all the registers by setting them to 0. Memory operands in EAGLE are described in RTL notation, e.g., M[8]<15..0> denotes the 16-bit memory word stored at address 8.
-
Differentiate between throughput and latency.
Topic: CPU Performance, Pipelining & Hazards • 2 Marks marks
Throughput is the number of instructions (or tasks) completed per unit time — for example, the number of instructions processed per second. It measures the overall rate at which the system performs work. Latency is the total time taken to complete a single instruction (or task), from its start to its finish. Pipelining improves the throughput of a processor, but it does not reduce the latency of an individual instruction.
-
What is pipelining? How does it improve the performance of a processor?
Topic: CPU Performance, Pipelining & Hazards • 3 Marks marks
Pipelining is an implementation technique in which the execution of instructions is overlapped. The processor is divided into stages (such as fetch, decode and execute), and while one instruction is being processed in one stage, the next instruction is processed in the preceding stage — just like an assembly line. In the ideal case, one instruction is completed in every clock cycle, so for a pipeline of k stages the ideal speedup is about k times compared with non-pipelined execution of a long stream of instructions. In practice, hazards and branch instructions reduce the actual speedup below this ideal value.
-
What are the three types of hazards in a pipelined processor? Explain each briefly.
Topic: CPU Performance, Pipelining & Hazards • 5 Marks marks
1. Structural hazard: it occurs when two instructions try to use the same hardware resource (for example, the memory or a register-file port) at the same time in different ways, and the hardware cannot support both uses simultaneously. 2. Data hazard: it occurs when an instruction attempts to access a data value that has not yet been updated (written back) by a previous instruction, so it may read an old, incorrect value. 3. Control (branch) hazard: it occurs because the pipeline does not know which instruction to fetch next until a branch instruction has been resolved. Structural hazards are handled by providing extra resources or by stalling; data hazards by data forwarding or pipeline stalls; and control hazards by branch prediction, delayed branching or stalls.
-
What is an exception in a processor? What happens when an exception occurs?
Topic: CPU Performance, Pipelining & Hazards • 3 Marks marks
An exception is anything that interrupts the normal sequential flow of execution of instructions in the processor — for example, an arithmetic overflow, an invalid opcode, a division by zero, or an external interrupt request. When an exception occurs, the processor saves its current state (the PC and the registers), and control is transferred to a special exception/interrupt handling routine. After the routine has dealt with the cause, the saved state is restored and the interrupted program is resumed — or, in the case of a fatal error, the program is terminated.
-
How is the performance of a processor measured?
Topic: CPU Performance, Pipelining & Hazards • 2 Marks marks
The performance of a processor is measured by the time it takes to execute a given program or a mix of programs (workload): of two machines, the one that executes the same program in less time is the better performer. The execution time depends on the instruction count of the program, the average cycles per instruction (CPI) and the clock cycle time. In practice, performance is evaluated by running standard benchmark programs (a program mix) on the machines and comparing their total execution times; related measures are throughput (instructions per second) and speedup.
-
Which technique is used for overlapping multiple instructions in time?
Topic: CPU Performance, Pipelining & Hazards • 2 Marks marks
The pipelining technique is used for overlapping multiple instructions in time, so that while one instruction is being executed, the following instructions are being fetched and decoded at the same time.
-
Write the stages of the designing and implementation phase of pipelining.
Topic: CPU Performance, Pipelining & Hazards • 2 Marks marks
1. Adapting the instructions to pipelined execution. 2. Designing the pipelined data path. 3. Generating the control signals.
-
Explain horizontal and vertical microcode.
Topic: Control Unit, Control Signals & Microprogramming • 3 Marks marks
In horizontal microcode schemes, there are no intermediate decoders and the control word bits are directly connected to their destination, i.e. each bit in the control word is directly connected to some control signal, and the total number of bits in the control word is equal to the total number of control signals in the CPU. Vertical microcode schemes employ an extra level of decoding to reduce the control word width: from an n-bit control word we may have up to 2^n signal values. However, a completely vertical scheme is not feasible because of the high degree of fan-out.
-
Describe the working of a general micro-coded controller.
Topic: Control Unit, Control Signals & Microprogramming • 3 Marks marks
A micro-coded controller works in the same way as a small general-purpose computer: 1. Fetch a micro-instruction and increment the micro-PC. 2. Execute the instruction present in the micro-IR. 3. Fetch the next micro-instruction, and so on.
-
Explain the RTL step: C ¬ A + c2 (sign extend).
Topic: Register Transfer Language (RTL) • 2 Marks marks
In this step, the constant c2 is sign-extended and added to the contents of the temporary register A. As a result, the effective address is obtained in the buffer register C, to which the jump is to be made.
-
What is the functionality of the LMBR control signal in SRC?
Topic: Register Transfer Language (RTL) • 2 Marks marks
LMBR enables the 'write' for the register MBR. When this signal is activated, whatever value is present on the bus can be written into the MBR.
-
Write the structural RTL for the add instruction (add ra, rb, rc).
Topic: Register Transfer Language (RTL) • 5 Marks marks
The first three steps (T0 to T2) are the instruction fetch: the contents of the PC are moved to the MAR and incremented, the instruction is read from memory into the MDR, and then loaded into the IR, whose fields are decoded. In step T3, the operands are read from registers rb and rc into the temporary registers A and B. In step T4, the result is computed and stored in the destination register: ra ¬ A + B. The structural RTL of the add instruction is almost the same as that of the sub instruction, except that in timing step T4 the '+' sign is used for addition instead of the '-' sign used for subtraction. Other instructions of the same group are and, or and sub.
-
Differentiate between the Program Counter (PC) and the Instruction Register (IR).
Topic: SRC Processor, Instruction Formats & Addressing Modes • 3 Marks marks
The PC and the IR are two special registers of the processor. The Program Counter (PC) points to (holds the address of) the next instruction to be executed, while the Instruction Register (IR) holds the instruction that is currently being executed.
-
What is the advantage of a linker in the development of assembly language programs?
Topic: FALCON-A, FALCON-E & EAGLE Processors • 3 Marks marks
When developing large programs, different people working at the same time can develop separate modules of functionality. These modules can then be 'linked' to form a single module that can be loaded and executed. The modularity that the linking step makes possible provides the same convenience as in higher-level languages, namely abstraction and separation of concerns. Once the functionality of a module has been verified for correctness, it can be re-used in any number of other modules, and the programmer can focus on other parts of the program. This is the so-called modular approach, or top-down approach.
-
Define the term 'single stepping'.
Topic: FALCON-A, FALCON-E & EAGLE Processors • 3 Marks marks
Single stepping is a debugging facility that lets the user execute a program one instruction at a time. Single stepping and breakpoints allow the examination of the status of the program and of the registers at desired points during execution.
-
Write the FALCON-A instruction to evaluate the expression R3 = 2 * R7.
Topic: FALCON-A, FALCON-E & EAGLE Processors • 2 Marks marks
add R3, R7, R7. Adding R7 to itself doubles its value, so the destination register R3 receives 2 * R7. (Equivalently, the value may be doubled by a one-bit shift left: shl R3, R7, 1.)