Computer Architecture

Preamble

Context

This is a course material available in HTML and PDF formats. It pertains to the computer architecture course offered to first-year students in the Mathematics option. This course is primarily based on Patrick Marcel's course, which is also available as a reference on the website (in French)

Objective

What is a computer? According to the dictionary :

"Computer : is a Machine capable of automatically performing arithmetic and logical operations (for scientific, administrative, accounting purposes, etc.) based on programs that define the sequence of these operations."

This course aims to answer the question "What is a computer?" by addressing the question "How does a computer work?"

Resources

We have two semesters of courses. In each semester, there is one lecture per week and one tutorial (TD) for each group (also per week). We will cover the following topics :

The progression method is as follows : the lecture introduces general principles and some fundamental examples. The tutorials are dedicated sessions during which course concepts are reviewed, explained, and expanded upon as needed. Tutorials consist of a series of application and in-depth exercises. Tutorials, along with their solutions, are evaluated.

I would also like to mention that any contributions or questions from the reader are welcome as additional resources.

 

 

Introduction

The purpose of this first course is to provide an initial understanding of what happens inside the computer when a user interacts with it. It is an introductory course that includes :

As an example, we are interested in the following sequence of events : reading a number from the keyboard, performing an operation on that number, and displaying the result on the screen. This course aims to set the stage for understanding the fundamental concepts of computer architecture and how it processes user interactions.

The Machine as Perceived by the User

Interactions with the machine through peripherals (external devices to the central unit) :

Interactions include command inputs, launching applications, visualization, and more. These interactions represent how users communicate with and utilize the computer system through various input and output devices.

The Machine Invisible to the User

The black box that is the central unit actually contains three functional units :

Every user action translates into the execution of a sequence of operations involving these units. This hidden machinery is responsible for processing and carrying out the user's commands and interactions with the computer system.

 

Historical Background

The primary motivation behind the development of computers is the desire to automate a series of elementary tasks.

Initially, specialized machines and automata existed, such as music boxes and weaving machines. Later on, the concepts of automata and calculating machines were combined. Charles Babbage, in the 19th century, was the first to describe the principles of a general-purpose computer, a machine capable of repeating sequences of operations and selecting specific operations based on the state of computation. The Von Neumann model, introduced in 1946, laid the foundation for universal machines (see section The Von Newmann Machine).

The evolution of these machines, primarily driven by technological advancements, is often divided into five generations or significant stages :

1945-1958 :

Many of the architectural concepts, including the concept of a "bug," found in modern computers date back to this era.

It's worth noting that the first general-purpose digital computer, ENIAC, commissioned by the U.S. Army in 1943 and completed in 1946, was initially tasked with complex calculations for studying the feasibility of the hydrogen bomb. This underscores the significant role early computers played in scientific and military research.

1958-1964 :

During this period, computers became more reliable and were adopted for a wider range of applications. The shift from vacuum tubes to transistors marked a significant advancement in technology, making computers more efficient and compact. Additionally, the development of higher-level programming languages like COBOL, FORTRAN, and LISP made it easier for programmers to write software, further expanding the capabilities of computers and their usability.

1964-1971 or 1975 or 1978 :

During this period, integrated circuit technology, specifically small to medium-scale integration (S/MSI), became prominent. This allowed for more components to be integrated onto a single chip, improving the efficiency and capabilities of computers. It also marked the rise of complex operating systems and the advent of mini-computers, which were smaller and more affordable than earlier mainframes.

The mention of "Moore's Law" by Gordon Moore, a co-founder of Intel, is significant. Moore's Law predicts that the number of transistors that can be integrated onto a single chip doubles approximately every two years. This prediction has largely held true and has been a driving force behind the rapid advancement of computer technology over the decades.

1971/5/8 -1978/85 :

In 1971, a significant milestone was reached with the invention of the microprocessor by Intel. This innovation consolidated all the components of the central processing unit (CPU) onto a single chip, paving the way for the development of personal computers and the microcomputer revolution.

During this period, there was a shift toward Large Scale Integration (LSI) technology, which allowed for even more components to be integrated onto a single chip, increasing computational power and efficiency. Additionally, the emergence of machine networks and distributed computing laid the foundation for interconnected systems and collaborative computing. These developments had a profound impact on the way computers were used and interconnected, shaping the modern computing landscape.

After this period :

This era marked a significant leap in the capabilities of computers, with a focus on AI, extensive integration of components on a chip, and the handling of multimedia and non-numeric data. The emphasis on massive parallelism contributed to the development of high-performance computing systems capable of handling complex tasks.

 

The Von Neumann Machine

John Von Neumann is credited with the development of a universal (non-specialized) machine model in 1946, which characterizes machines possessing the following components :

  1. Memory : Containing both program (instructions) and data.
  2. Arithmetic and Logic Unit (ALU) : Responsible for performing mathematical and logical operations.
  3. Input/Output Unit (I/O) : Facilitating communication with peripheral devices.
  4. Control Unit : Orchestrating the overall operation of the computer.

These components enable the fundamental functions of a computer : data storage, data processing, data movement, and control. The schematic operation of a Von Neumann machine is as follows :

  1. The Control Unit extracts an instruction from memory.
  2. It analyzes the instruction.
  3. It retrieves the data required by the instruction from memory.
  4. It triggers the appropriate operation on the ALU or I/O.
  5. If necessary, it stores the result back in memory.

The majority of modern computers are built upon the Von Neumann model, which remains a fundamental architectural concept in computer science. This architecture has been crucial in shaping the design and functionality of today's computers.

Figure 1.5. The Central Processing Unit (CPU)

 

 

Overview

This overview serves as an introduction to the behavior of the various components that make up the central unit. It provides a simplified outline and will be further elaborated upon in subsequent courses. It introduces fundamental concepts such as the clock cycle and timing diagrams. As you progress through the course, you will gain a deeper understanding of these concepts and how they relate to the functioning of a computer's central processing unit.

Basic Components

Clock

For example, a microprocessor with a clock frequency of 500MHz has elementary cycles of 2 nanoseconds each.

Registers

Storage controlled by a load signal : Two types of registers based on whether loading occurs on a level or edge.

Bus

Functional Units

Memory

ALU (Arithmetic and Logic Unit)

I/O (Input/Output)

Some peripherals allow only reading, some allow only writing, and some allow both reading and writing. The permissions depend on the nature and purpose of the peripheral device.

Similar to memory, there is a register that stores the address of the device (Peripheral Select Register - PSR) and a register for data exchange (Data Exchange Register - DER).

Control Unit

Complete computer system

Indeed, when you combine memory, an ALU, a control unit, an I/O unit, and a bus, you have the essential components of a complete computer system. This combination of components allows a computer to perform a wide range of tasks, from basic arithmetic calculations to complex data processing and interaction with peripheral devices. These components work together to execute instructions, store and retrieve data, and facilitate communication with the external world. The bus serves as the communication pathway, enabling data and instructions to flow between these units. It's the foundation upon which modern computers are built, and the interactions between these components are what enable the computer to carry out its functions.

CCS