ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP3137Data Path
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP3137

    Computer Organization and Assembly Language

    Progress0 / 73 done
    Topics73
    1Introduction to Computer Organization2Assembly Language3Comparison of Low-Level and High-Level Languages
    4General Purpose and Special Purpose Registers5Introduction and Usage of RAM6Processor7Registers8System Bus9Instruction Execution Cycle10Assembly and Machine Language11Assembler12Linker and Link Libraries13Programmer's View of a Computer System14RISC and CISC Architecture15Physical Address Calculation16Basic Memory Organization17CPU Organization18Top Level View of Computer Function and Interconnection19Assembler Instruction Cycle20Execute Cycle21Interrupts22Interrupt Cycle23Memory Connection24Input/Output Connection25CPU Connection26MASM27MIPS28Defining Data in MASM Assembler29Elements of Assembly Language30Integer Constants31Integer Expressions32Real Number Constants33Character Constants34String Constants35Reserved Words36Identifiers37Directives38Instructions39The NOP (No Operation) Instruction40Adding and Subtracting Integer41INC and DEC Instructions42NEG Instruction43How to Move Integer Number in Register44Adding and Subtracting Numbers in Registers45Declaration and Initialization of Variables46Moving Data from Variable to Register47Data Definition Statement48BYTE and SBYTE Data49WORD and SWORD Data50Defining DWORD and SDWORD Data51Knowledge about Different Data Types52Operations, Array & Loops53Division and Multiplication in Assembly54Jumps Based on Specific Flags55Jumps Based on Equality56Simple Jump Statements57Jumps Based on Specific Condition58Code Examples59Practice on MASM60Procedures61File Operations Procedures62Labels in Procedures63Stack64Runtime Stack65Conditional Control Flow Directives66Compound Expressions67Data Representation & Conversion68Architecture69Data Path70Control Unit71Critical Path72General Principles of Pipelining73Pipelined Y86 Implementations
    7 min read
    Topic 69 of 73
    Topic Study Note Illustration
    69

    Data Path

    In computer architecture , the data path refers to the collection of functional units, registers, and buses that manage the flow of data during the execution of...

    Data Path in Computer Architecture

    In computer architecture, the data path refers to the collection of functional units, registers, and buses that manage the flow of data during the execution of instructions. It is essentially the part of the CPU that performs operations on the data, such as arithmetic operations, data movement, and logical operations. The data path works in conjunction with the control unit to process instructions and perform tasks.

    Key Components of a Data Path

    A data path typically consists of the following major components:

    1. Registers:

      • Registers are small, fast storage locations used to hold data temporarily.
      • Examples of registers include:
        • General-purpose registers (GPRs): Used to store intermediate results and operands.
        • Special-purpose registers: Used for specific purposes, such as the Program Counter (PC), which holds the address of the next instruction to execute, and the Status Register (SR), which holds flags like zero, carry, or overflow.
    2. Arithmetic and Logic Unit (ALU):

      • The ALU is responsible for performing arithmetic (addition, subtraction, etc.) and logical (AND, OR, NOT, etc.) operations on the data.
      • The ALU can take inputs from registers and memory, perform operations, and store the result in a register.
    3. Multiplexers (MUX):

      • A multiplexer is used to select one of several inputs and send it to the output.
      • In the data path, multiplexers are commonly used to decide between different sources for inputs to the ALU, such as whether to use data from memory or from a register.
    4. Buses:

      • Buses are the communication channels that carry data between registers, the ALU, memory, and other components of the CPU.
      • There are typically three types of buses in a system:
        • Data bus: Carries data.
        • Address bus: Carries memory addresses for reading/writing.
        • Control bus: Carries control signals to direct the operations of the system.
    5. Memory:

      • Memory is where data is stored. The data path includes connections to primary memory (RAM) for reading and writing data during instruction execution.
      • Cache memory may also be part of the data path, serving as high-speed storage for frequently accessed data.
    6. Control Signals:

      • The control unit sends control signals that direct the flow of data through the data path.
      • These signals include enabling registers, selecting multiplexers, determining which ALU operation to perform, and controlling memory read/write operations.

    The Instruction Cycle and Data Path

    The data path is involved in the execution of instructions during the instruction cycle (also known as the fetch-decode-execute cycle). Here's a simplified flow of how the data path operates during the execution of an instruction:

    1. Fetch:

      • The Program Counter (PC) holds the address of the next instruction to be executed.
      • The control unit sends a read signal to memory to fetch the instruction.
      • The instruction is loaded into the Instruction Register (IR).
      • The PC is incremented to point to the next instruction.
    2. Decode:

      • The Instruction Register holds the instruction to be decoded.
      • The control unit decodes the instruction to understand what operation is needed.
      • The control signals are set up to select the correct registers and functional units for the operation.
    3. Execute:

      • The data path is responsible for carrying out the operation.
        • The appropriate data is fetched from registers or memory.
        • If an arithmetic or logical operation is required, the data is passed to the ALU, which performs the operation.
        • The result of the operation is written back to a register or memory.
      • If needed, the data path involves shifting or rotating data, adding, subtracting, or performing logical operations.
    4. Memory Operations:

      • In some cases, the CPU will read data from memory or write data back to memory as part of the execution.
      • The memory address register (MAR) holds the address for memory operations.
      • The memory buffer register (MBR) holds the data being read from or written to memory.

    Data Path in RISC vs CISC Architectures

    The data path design can vary depending on the CPU architecture being used. The two main types of processor architectures that influence the data path are RISC (Reduced Instruction Set Computing) and CISC (Complex Instruction Set Computing).

    RISC (Reduced Instruction Set Computing)

    • RISC architectures have a simpler and more uniform instruction set, with each instruction typically taking one clock cycle.
    • The data path in RISC is often highly streamlined. Since RISC instructions are designed to be simple and consistent, the data path involves fewer stages, making it efficient for pipelining.
    • Common RISC processors include MIPS and ARM.

    Key Features of RISC Data Path:

    • Large number of general-purpose registers (used for intermediate values).
    • The ALU performs most operations, minimizing memory access.
    • Load/store architecture: memory is accessed only with specific load/store instructions, meaning other operations can be executed independently of memory.

    CISC (Complex Instruction Set Computing)

    • CISC architectures use a more complex instruction set, where each instruction can perform multiple operations (e.g., load, arithmetic, and store in one instruction).
    • The data path in CISC tends to be more complex, as the CPU must handle more complex instructions that may involve multiple memory accesses and more intricate addressing modes.
    • Common CISC processors include x86 processors.

    Key Features of CISC Data Path:

    • Smaller number of registers compared to RISC.
    • Instructions often involve a variety of operations, potentially with multiple memory accesses.
    • Data path is more complex to handle the varied and complex instructions.

    Example: Data Path for a Simple Addition Operation

    To illustrate how the data path works, let's walk through an example of adding two numbers.

    1. Instruction Fetch:

    • The Program Counter (PC) points to the memory location of the next instruction.
    • The Control Unit fetches the instruction (e.g., ADD R1, R2, R3), which tells the CPU to add the contents of registers R2 and R3 and store the result in R1.

    2. Instruction Decode:

    • The instruction is decoded by the Control Unit, which determines that the operation is addition and specifies the source registers (R2, R3) and the destination register (R1).
    • Control signals are sent to select the appropriate registers.

    3. Operand Fetch:

    • The values of R2 and R3 are read from the registers and sent to the ALU.

    4. Execution (ALU Operation):

    • The ALU performs the addition operation on the values of R2 and R3.
    • The result is computed and stored in the output register.

    5. Write-back:

    • The result is written back to R1.
    • The Program Counter (PC) is incremented to the address of the next instruction.

    Data Path and Pipelining

    In modern CPUs, data paths are optimized for pipelining, where multiple instructions can be processed in parallel at different stages of execution.

    • A typical pipelined data path will have multiple stages:
      • IF (Instruction Fetch)
      • ID (Instruction Decode)
      • EX (Execute)
      • MEM (Memory Access)
      • WB (Write-back)

    Each instruction moves through these stages, allowing multiple instructions to be in different stages simultaneously. This increases throughput and performance.


    Conclusion

    The data path is a fundamental concept in computer architecture that refers to the flow of data within the processor during instruction execution. It encompasses components such as registers, the ALU, buses, memory, and control signals, all working together to process data. Understanding the data path is crucial for optimizing the performance of both hardware and software, particularly in the context of instruction execution, pipelining, and data manipulation.

    In different architectures (RISC or CISC), the data path design and complexity can vary, but the core principles remain the same — efficiently moving data and executing operations to carry out program instructions.

    ← Previous topic 68
    Architecture
    Next topic 70 →
    Control Unit

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    7mremaining
    1.2kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Computer Organization and Assembly Language