0% found this document useful (0 votes)
31 views21 pages

Lec 2

The document provides an overview of embedded system design and microcontrollers. It discusses the basic components of computing systems including the CPU, microprocessor, and microcontroller. The evolution of microprocessors from 1971 to present is outlined. Key aspects of microprocessor design such as the datapath, controller, memory, and instruction execution process are described. Microcontrollers are defined as combining the main components of a computer onto a single chip.

Uploaded by

Prateek Goyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views21 pages

Lec 2

The document provides an overview of embedded system design and microcontrollers. It discusses the basic components of computing systems including the CPU, microprocessor, and microcontroller. The evolution of microprocessors from 1971 to present is outlined. Key aspects of microprocessor design such as the datapath, controller, memory, and instruction execution process are described. Microcontrollers are defined as combining the main components of a computer onto a single chip.

Uploaded by

Prateek Goyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Embedded

System Design
Lecture-2

Dr. Nalin Kumar Sharma

1
Objectives of the lecture

• Basic of computing systems


• Microcontrollers
• Microprocessor

2
Computing System

3
CPU (Central
Processing Unit)
• It is a general-purpose
processor.
• It is a programmable digital
system intended to solve
computation tasks in a large
variety of applications.

4
Microprocessor

• A microprocessor is a computer processor where the data


processing logic and control is included on a single
integrated circuit (IC)
• The microprocessor contains the arithmetic, logic, and
control circuitry required to perform the functions of a
computer's central processing unit (CPU).

5
Evolution of
Microprocessors
• Transistor was invented in 1948 (Bell lab). IC was invented in 1958
(By Texas Instruments).
• The first microprocessor was invented by INTEL(INTegrated
ELectronics).

6
Name Year of Invention Inst. per sec
INTEL 4004/4040 (4
1971 60,000
bit)

8085 (8-bit) 1976 769230

8086 (16-bit) 1978 2.5 Million

PENTIUM (32-bit) 1993 188M

Core-2 (64-bit) 2006 27,079 M

I7 (64-bit) 2011 92,000 M

I9 (64-bit) 2018 412,000 M

AMD Ryzen
Threadripper 3990X 2020 2,356,230
7
M
(64 core)
Datapath
• It contains an arithmetic-logic unit (ALU) capable of
transforming data through arithmetic operations.
• It also contains registers capable of storing temporary data.
• The internal data bus is the bus over which data travels within
the datapath.
• The external data bus is the bus over which data is brought to
and from the data memory.
• We measure size of processor by bit-width of the datapath
components. Ex: 64-bit processors.

8
Controller/ Control Logic
• It consists of circuitry for retrieving program instructions, and for moving data through
the datapath according to those instructions. It contains :
• program counter (PC) that holds the address in memory of the next program
instruction to fetch.
• instruction register (IR) to hold the fetched instruction.

• Based on this instruction, the controller’s control logic generates the appropriate signals
to control the flow of data in the datapath.
• The address size determines the number of directly accessible memory locations,
referred to as the address space or memory space. Thus, a processor with a 16-bit
PC can directly address 216 = 65,536 memory locations. We would typically refer to
this address space as 64K

9
Memory

• We can classify stored information in memory as either


program or data.
• Program information consists of the sequence of
instructions that cause the processor to carry out the
desired system functionality.
• Data information represents the values being input, output
and transformed by the program.

10
Two memory architectures: (a)
Harvard, (b) Princeton

11
Memory
• Read-only memory (ROM): Program memory
• Readable and writable memory (RAM): Data
Memory

12
13
Internal and External Memory

• Memory may be on-chip or off-chip.


• On-chip memory resides on the same IC as the
processor, while off-chip memory resides on a separate
IC.
• The processor can usually access on-chip memory must
faster than off-chip memory, perhaps in just one cycle, but
finite IC capacity of course implies only a limited amount
of on-chip memory.
14
Cache Memory

• To reduce the time needed to access (read or write)


memory, a local copy of a portion of memory may
be kept in a small but especially fast memory called
cache.
• Cache memory often resides on-chip.
• Caches are used for both program memory (often
called instruction cache, or I-cache) as well as data
memory (often called D-cache).

15
How does Cache Memory
works?
• Cache memory is based on the principle that if at a particular time a processor
accesses a particular memory location, then the processor will likely access that
location and immediate neighbours of the location in the near future.
• When we first access a location in memory, we copy that location and some
number of its neighbours (called a block) into cache, and then access the copy of
the location in cache.
• When we access another location, we first check a cache table to see if a copy of
the location resides in cache.
• Cache hit: If the copy does reside in cache, we can read or write that location
very quickly.
• Cache miss: If the copy does not reside in cache, we must copy the location’s
block into cache, which takes a lot of time. 16
(a) general-purpose, (b) application-specific,
(c) single-purpose processor.

17
Microcontroller

• Microprocessors require external chips like


RAM, ROM, Input / Output ports and other
components in order to design a complete
working system.
• Microcontrollers are the devices that
actually fit the profile “Computer – on – a
chip” as it consists of a main processing
unit or processor along with some other
components that are necessary to make it
a complete computer. 18
The first microcontroller was developed in 1971 by Texas
Instruments and is called TMS 1000.

19
Instruction execution
• A microprocessor’s execution of instructions consists of several basic
stages:
1. Fetch instruction: the task of reading the next instruction from memory
into the instruction register.
2. Decode instruction: the task of determining what operation the
instruction in the instruction register represents (e.g., add, move, etc.).
3. Fetch operands: the task of moving the instruction’s operand data into
appropriate registers.
4. Execute operation: the task of feeding the appropriate registers through
the ALU and back into an appropriate register.
5. Store results: the task of writing a register into memory.
• If each stage takes one clock cycle, then we can see that a single
20
instruction may take several cycles to complete.
Flow of control logic in
instruction
• Ex: Adding two values.
1. Fetch instruction of adding,
2. decode it,
3. Inputting two values in particular registers,
4. send the values into the ALU, storing ALU results into a particular
register,
5. moving data between register and memory.
• Finally, the next-state logic determines the next value of the PC.

21

You might also like