A processor (also called a central processing unit or CPU) is the primary component of a computer that executes instructions from programs. It performs basic arithmetic, logic, control, and input/output operations specified by the instructions. The processor typically consists of several key components:
Program Counter (PC):
Keeps track of the address of the next instruction to be fetched and executed. It automatically increments after each instruction fetch.
Memory Address Register (MAR):
Holds the address of the memory location to be accessed (read or written) during memory operations.
Memory Buffer Register (MBR):
Temporarily holds the data that is being transferred to or from memory. It acts as a buffer between the CPU and memory.
Instruction Register (IR):
Holds the current instruction that has been fetched from memory. The instruction is decoded and executed by the control unit.
Control Unit (CU):
Directs the operations of the processor by interpreting instructions and generating control signals that guide the execution of tasks in other components like the ALU and registers.
Arithmetic Logic Unit (ALU):
Performs all arithmetic operations (e.g., addition, subtraction) and logic operations (e.g., AND, OR) on the data processed by the CPU.
Register Bank:
A collection of registers that store intermediate data, instructions, or results. Registers provide quick access to data during computation and control operations.
Microinstructions for the instructions we are running on our designed processor:
T1: MAR ← (PC)
CU issues Read command
T2: MBR ← (memory)
PC ← (PC) + 1
T3: IR ← (MBR)
T4: MAR ← (R1)
CU issues Read command
T5: MBR ← (memory)
T6: IR(address) ← (MBR(address))
T7: MAR ← (IR(address))
CU issues Read command
T8: MBR ← (memory)
T9: ACC ← (MBR)
Problem Statement: Design a 16-bit processor with 1 address format and having Register Indirect addressing mode.
16-bit ALU
16-bit _16-reg file
This register bank we used in our processor design.
Control Unit
Program Counter
Challenges faced while designing:
Efficiently managing the instruction set, ensuring the 1-address format can reference a register for memory access.
Designing the register file and control unit to handle Register Indirect addressing.
Synchronizing memory access and ensuring correct timing for fetching and writing data.
Testing and debugging the processor to verify instruction decoding and proper memory access.
Managing the data path efficiently and implementing an optimized instruction execution pipeline.
Understand Processor Architecture
Learn the structure of a 16-bit processor and how it processes data in 16-bit chunks.
Understand the components of a processor, such as the ALU, registers, and control unit.
1-Address Format
Learn how the 1-address instruction format works, where only one operand address is specified.
Understand how the instruction specifies an operand and where to fetch or store the data.
Register Indirect Addressing Mode
Learn how Register Indirect addressing mode works, where the address of the operand is stored in a register (rather than directly in the instruction).
Understand how the processor uses the value in the register to access memory.
Design the Processor
Design the processor’s data path, including how the register file, ALU, and memory interact.
Implement the Register Indirect addressing mode, ensuring that the processor can fetch data from memory using a register pointer.
Instruction Fetch and Execution
Learn how the processor fetches and decodes instructions, processes them in the ALU, and stores results in registers or memory.
Understand the control signals required to execute operations in the Register Indirect mode.
Simulation and Testing
Test the processor design by simulating different instructions using the 1-address format and Register Indirect addressing mode.
Debug and optimize the design for correct instruction execution.