0% found this document useful (0 votes)
33 views41 pages

Ch03 Computer Systems Slides

The document describes the basic components and operation of computer systems, including hardware components like program memory, data memory, the central processing unit (CPU) containing control logic and registers, and an arithmetic logic unit (ALU) for performing math and logic operations. The CPU fetches and decodes instructions from program memory and uses registers like the program counter, stack pointer, and status register to execute operations. Memory holds both program instructions and data that can be written and read during operation.

Uploaded by

bảo thế
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views41 pages

Ch03 Computer Systems Slides

The document describes the basic components and operation of computer systems, including hardware components like program memory, data memory, the central processing unit (CPU) containing control logic and registers, and an arithmetic logic unit (ALU) for performing math and logic operations. The CPU fetches and decodes instructions from program memory and uses registers like the program counter, stack pointer, and status register to execute operations. Memory holds both program instructions and data that can be written and read during operation.

Uploaded by

bảo thế
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 41

EMBEDDED SYSTEMS DESIGN

CHAPTER 3: COMPUTER SYSTEMS


The primary goal of this chapter is to introduce the key
components of a computer and all of the terminology that will be
used throughout the rest of the book, plus provide a basic
understanding of how computers execute instructions.
Learning Outcomes:
After completing this chapter you will be able to:
3.1 Describe the basic concept of a computer system.
3.2 Describe the basic components and operation of computer
hardware.
3.3 Describe the basic components and operation of computer
software.
Image Courtesy of
Recording Connection of Canada

BROCK J. LAMERES, PH.D.


EMBEDDED SYSTEMS DESIGN

CHAPTER 3: COMPUTER SYSTEMS


3.1 COMPUTER OVERVIEW

Image Courtesy of
Recording Connection of Canada

BROCK J. LAMERES, PH.D.


CHAPTER 3: COMPUTER SYSTEMS

COMPUTER DEFINITIONS
Computer – collection of hardware and software working together to
accomplish a task.

Image Courtesy of
Recording Connection of Canada

Digital Storm Desktop Computer


https://www.digitalstorm.com/lumos.asp

3.1 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

COMPUTER DEFINITIONS
Computer – collection of
hardware and software
working together to
accomplish a task.

Operation code (op-code) – a


binary code that identifies the
instruction.

Instruction set – a group of


instructions the computer is
designed to execute.
Digital Storm Desktop Computer
https://www.digitalstorm.com/lumos.asp

3.1 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

COMPUTER DEFINITIONS (CONT.)


Software – the sequence of
instructions that when
executed one-by-one, will
accomplish a task.

Program – the sequence of


instructions perform the task.

Software developer /
programmer – a person who
designs the program by
deciding which instruction
Image Courtesy of
and in what order to use.Recording Connection of Canada
Digital Storm Desktop Computer
https://www.digitalstorm.com/lumos.asp

3.1 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

COMPUTER DEFINITIONS
Hardware
- provides all the necessary functionality to store the program,
retrieve the individual instructions from memory, and execute
them.
- Refers to the physical components within the system.

Image Courtesy of
Recording Connection of Canada

PCB Unlimited Printed Circuit Boards


https://www.pcbunlimited.com/blog/in-case-you-didnt-know-print
ed-circuit-boards-are-in-almost-everything/

Digital Storm Desktop Computer


https://www.digitalstorm.com/lumos.asp

3.1 COMPUTER
EMBEDDED SYSTEMS DESIGN

CHAPTER 3: COMPUTER SYSTEMS


3.1 COMPUTER OVERVIEW

www.youtube.com/c/DigitalLogicProgramming_LaMeres

BROCK J. LAMERES, PH.D.


EMBEDDED SYSTEMS DESIGN

CHAPTER 3: COMPUTER SYSTEMS


3.2 COMPUTER HARDWARE

Image Courtesy of
Recording Connection of Canada

BROCK J. LAMERES, PH.D.


CHAPTER 3: COMPUTER SYSTEMS

3.2.1 PROGRAM MEMORY


• The storage system that holds • Most computers implement
the instruction. program memory on an
EEPROM – can be read from
• Treated as read only memory during normal operations but
during execution to prevent can only be written to using a
instructions from being dedicated procedure.
overwritten.

• Programs stored on non-


volatile memory, so the
computer system does not
lose its program when
power is removed.

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.2 DATA MEMORY


• Used to hold temporary memory of a computer.
variables that are created by
the software program.

• Can be written to and read


from during normal operation.

• Implemented with
read/write memory.

Image Courtesy of
Recording Connection of Canada

• “RAM” refers to the data


3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


• Reads instructions from • Contains circuitry to perform
memory, decodes the op-code arithmetic and logic operations
to determine the instruction is on data.
being performed, and executes
the necessary steps to
complete the instruction.

• Contains registers that are


used for general purpose
data storage, operational
information, and system
status.
Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.1 CONTROL UNIT
• Finite state machine that controls the operation of the computer by
fetching the instruction, decoding the instruction op-code, and
executing the appropriate steps to accomplish the functionality of
the instruction.

Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.2 REGISTERS

• Execute instructions and hold


status information.

• Dedicated Registers – used as


part of the normal operation of
the computer and are not under
the control of the program.

• General-purpose Registers –
used by the program as Image Courtesy of

needed.
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.2 REGISTERS (CONT.)

• Program Counter (PC) –


holds the address of the next
instruction in program memory
to execute.

Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.2 REGISTERS (CONT.)

• Program Counter (PC) –


holds the address of the next
instruction in program memory
to execute.

• Stack Pointer (SP) – provides


a way to dynamically allocate
variable space in the data
memory without having to
keep track of specific
Image Courtesy of
addresses. Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.2 REGISTERS (CONT.)

• Status Register (SR) –


contains flags that are
asserted when various
conditions occur during the
execution of the program.

Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.2 REGISTERS (CONT.)

• Status Register (SR) –


contains flags that are
asserted when various
conditions occur during the
execution of the program.

• Instruction Register (IR) –


holds the op-code/operand
that is fetched from program
memory.
Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.2 REGISTERS (CONT.)

• General Purpose Registers –


can be accessed directly by
the program.

Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.3 CENTRAL PROCESSING UNIT


3.2.3.3 ARITHMETIC LOGIC
UNIT (ALU)
• The system that performs all
mathematical and logic
operations.

• Contains logic to produce


status bits that provide the
ability for subsequent
instructions to react to
particular results.
Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.4 INPUT / OUTPUT PORTS


• Port – hardware component • Serial ports – use a single line
used to access the outside and send data bit-by-bit.
world; can be input, output, or
bidirectional.

• Input / Output ports –


designed to pass information
in parallel or serial format.

• Parallel ports – pass data


as a bus and allow more
information to be
Image Courtesy of
transferred per instruction. Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.5 BUS SYSTEM


• Handles routing of signals • I/O ports, data memory, and
between the CPU and program memory share the
memory. address and data busses.

Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.2.5 BUS SYSTEM (CONT.)


• Memory Address Bus (MAB) • Memory map – gives all the
– provides a single address to addresses for all locations in
data memory, program memory.
memory, and the I/O ports.

• Memory Data Bus (MDB) –


carries information back and
forth between the CPU and
the memory & I/O ports.

Image Courtesy of
Recording Connection of Canada

3.2 COMPUTER
EMBEDDED SYSTEMS DESIGN

CHAPTER 3: COMPUTER SYSTEMS


3.2 COMPUTER HARDWARE

www.youtube.com/c/DigitalLogicProgramming_LaMeres

BROCK J. LAMERES, PH.D.


EMBEDDED SYSTEMS DESIGN

CHAPTER 3: COMPUTER SYSTEMS


3.3 COMPUTER SOFTWARE

Image Courtesy of
Recording Connection of Canada

BROCK J. LAMERES, PH.D.


CHAPTER 3: COMPUTER SYSTEMS

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

RISC VS. CISC


RISC (Reduced Instruction CISC (Complex Instruction
Set Computer) Set Computer)
• Small number of instructions. • Large number of instructions.

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

RISC VS. CISC


RISC (Reduced Instruction CISC (Complex Instruction
Set Computer) Set Computer)
• Small number of instructions. • Large number of instructions.

• Reduces the size of the needed• Increased physical size of the


circuitry in the CPU. computer.

• Executes instructions very • Executes instructions very


quickly. quickly .

• Requires a large number of • Requires fewer number of


operations to accomplish a instructions to accomplish a
given task. given task.

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.1 CLASSES OF INSTRUCTIONS


3.3.1.1 DATA MOVEMENT INSTRUCTIONS
• Move information between the CPU and memory or between
two memory locations.
• Do not use the ALU.
• Assert control signals within the bus system to facilitate the
routing and storing of information between a source and
destination.

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.1 CLASSES OF INSTRUCTIONS


3.3.1.2 DATA MANIPULATION INSTRUCTIONS
• Use the ALU to perform arithmetic or logical operations on
information.
• Examples: addition, subtraction, ANDs, XORs, increments,
decrements, bit-sets, and bit-clears.

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.1 CLASSES OF INSTRUCTIONS


3.3.1.3 PROGRAM FLOW INSTRUCTIONS
• Provide the ability to alter the program counter to support looping
and conditional statement functionality.
• Unconditional program flow – always change the program
counter to a fixed value.
• Conditional program flow – only alter the program counter when
certain conditions exist
within the status register.

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.2 OP-CODES
• Unique binary code given to each instruction in the set.

• Mnemonic – a descriptive name for the op-code that can be used


when discussing the instruction functionally.

• Assembly – low-level language that uses mnemonics to


communicate which instruction is being talked about.

• Assembler – translates the mnemonics and additional information


for each instruction into its specific op-code.
Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.2 OPERANDS
• Provides additional information needed to complete the instruction.

• May include moving/copying information:


• From memory into any of the general-purpose CPU registers.
• From any CPU register into memory.
• Between any two CPU registers.
• Between any two memory locations.

Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.2 OP-CODES AND OPERANDS

Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.2 OP-CODES AND OPERANDS

Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.2 OP-CODES AND OPERANDS

Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.3 PROGRAM DEVELOPMENT FLOW


• At the highest level of program development, the language C can
be used to develop programs without needing to understand the
architecture of the CPU or how the internal registers are used to
move and manipulate data.

• Complier – used to convert high-level programming constructs


into individual assembly language instructions.

Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.3 PROGRAM DEVELOPMENT FLOW (CONT.)


• In assembly language programming, each instruction is listed in a
file using the mnemonic with the associated operands. Additionally,
information can be provided in an assembly file that will dictate
memory allocation for variables.

• Assembler – used to translate the instruction mnemonics and


operands into their corresponding binary codes.

Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.3 PROGRAM DEVELOPMENT FLOW (CONT.)


• Linker – a tool within the development flow that joins multiple
source files and assigns the final addresses for the program code.

• The output of the linker stage is an executable object file that is


ready to be downloaded to the MSP430 using the EEPROM
programmer.

• Debugger – a tool that allows the program to be executed


instruction-by-instruction (stepped) and the values within the CPU
registers and memory to be observed as instructions are executed

Image Courtesy of https://neodem.wp.horizon.ac.uk/

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.3 PROGRAM DEVELOPMENT FLOW

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
CHAPTER 3: COMPUTER SYSTEMS

3.3.3 PROGRAM DEVELOPMENT FLOW

Image Courtesy of
Recording Connection of Canada

3.3 COMPUTER
EMBEDDED SYSTEMS DESIGN

CHAPTER 3: COMPUTER SYSTEMS


3.3 COMPUTER SOFTWARE

www.youtube.com/c/DigitalLogicProgramming_LaMeres

BROCK J. LAMERES, PH.D.

You might also like