Module 1
Module 1
Credits: 4
Max 5 sessions
COMPUTER SYSTEM COMPONENTS
Memory
Input/Output
Called peripherals
Used to input and output instructions and data
https://www.youtube.com/watch?v=_Cdf68NMTZ0.
INTRODUCTION
Slow
INTEL 8080 Introduced in 1974.
64 KB main memory
Could execute
10X faster than 8008 5,00,000
NMOS technology instructions per
Drawback was that it needed three power supplies.
second. 9
Small computers (Microcomputers) were designed in mid 1970’s
using 8080 as CPU.
Introduced in 1976.
INTEL It was also 8-bit µP.
8085
Its clock speed was 3 MHz.
Its data bus is 8-bit and address
bus is 16-bit.
It had 6,500 transistors.
Could execute 7,69,230
instructions per second.
It could access 64 KB of
memory.
It had 246 instructions.
64 KB main memory Over 100 million copies were10
NMOS technology sold.
Uses only one +5v power
Introduced in
1978.
It was first 16-bit µP and noted as
INTEL 3G.
Its clock speed is 4.77 MHz, 8 MHz
8086
13
.
INTEL 80186 & 80188
Introduced in 1982.
They were 16-bit µPs.
Clock speed was 6 MHz.
80188 was a cheaper version
of 80186 with an 8- bit
external data bus.
They had additional
components like:
Interrupt Controller
Clock Generator
Local Bus Controller
14
Counters
INTEL 80286 Introduced in 1982.
It was 16-bit µP.
Its clock speed was 8
MHz.
Its data bus is 16-bit
and address bus is
24-bit.
It could address 16
MB of
memory.
It had 1,34,000
It could execute 4
transistors. 15
million
instructions per second.
Introduced in 1986.
It was first 32-bit µP.
INTEL 80486
It was also 32-bit µP.
It had 1.2 million
transistors.
Its clock speed varied
from 16 MHz to 100 MHz
depending upon the
various versions.
It had five different
versions:
80486 DX
80486 SX
80486 DX2
8KB of cache
80486 SL memory
was
80486 DX4 18
introduced.
INTEL PENTIUM
Introduced in
1993.
It was also 32-bit
µP.
It was originally named 80586.
Its clock speed was 66 MHz.
Its data bus is 32-bit and
address bus is 32-bit.
It could address 4 GB of
memory.
Could execute 110 million
instructions per second.
Cache memory:
8 KB for
instructions. 19
8 KB for data.
INTEL PENTIUM PRO
Introduced in 1995.
It was also 32-bit µP.
It had L2 cache of 256 KB.
It had 21 million transistors.
It was primarily used in
server systems.
Cache memory:
8 KB for instructions.
8 KB for data.
20
It had L2 cache of 256 KB.
INTEL PENTIUM II
Introduced in 1997.
It was also 32-bit µP.
Its clock speed was 233
MHz to 500 MHz.
Could execute 333 million
instructions per second.
MMX technology was
supported.
L2 cache & processor
were on one circuit. 21
INTEL PENTIUM II XEON
Introduced in 1998.
It was also 32-bit µP.
It was designed for servers.
Its clock speed was 400
MHz to 450 MHz.
L1 cache of 32 KB & L2
cache of 512 KB, 1MB or 2
MB.
It could work with 4 Xeons
in same system. 22
INTEL PENTIUM III
Introduced in 1999.
It was also 32-bit µP.
Its clock speed varied from
500 MHz to 1.4 GHz.
It had 9.5 million
transistors.
23
INTEL PENTIUM IV
Introduced in 2000.
It was also 32-bit µP.
Its clock speed was from
1.3 GHz to 3.8 GHz.
L1 cache was of 32 KB & L2
cache of 256 KB.
It had 42 million transistors.
All internal connections were
made from aluminium to copper.
24
INTEL DUAL CORE
Introduced in 2006.
It is 32-bit or 64-bit µP.
It has two cores.
Both the cores have there own
internal bus and L1 cache, but
share the external bus and L2
cache.
It supported SMT
technology.
SMT: Simultaneously Multi-
Threading
E.g.: Adobe Photoshop
supported SMT.
25
29
INTEL CORE 2 Introduced in 2006.
It is a 64-bit µP.
Its clock speed is from 1.2 GHz to
3 GHz.
It has 291 million transistors.
It has 64 KB of L1 cache per core
and 4 MB of L2 cache.
It is launched in three different
versions:
Intel Core 2 Duo
Intel Core 2 Quad
Intel Core 2 Extreme
28
INTEL CORE I3
Introduced in 2010.
It is a 64-bit µP.
It has 2 physical cores.
Its clock speed is from
2.93 GHz to 3.33 GHz.
It has 781 million
transistors.
It has 64 KB of L1 cache
per core, 512 KB of L2
cache and 4 MB of L3
cache. 31
INTEL CORE I5
Introduced in 2009.
It is a 64-bit µP.
It has 4 physical cores.
Its clock speed is from
2.40 GHz to 3.60 GHz.
It has 781 million
transistors.
It has 64 KB of L1 cache
per core, 256 KB of L2
cache and 8 MB of L3
cache. 30
INTEL CORE I7
Introduced in 2008.
It is a 64-bit µP.
It has 4 physical cores.
Its clock speed is from
2.66 GHz to 3.33 GHz.
It has 230 billion
transistors.
It has 64 KB of L1 cache
per core, 256 KB of L2
cache and 8 MB of L3
cache. 29
INTEL CORE I9
Introduced in 2017.
It is a 64-bit µP.
It has 10 physical
cores.
Its clock speed is from
3.33 GHz to 5.2 GHz.
It has 430 billion
transistors.
It has 64 KB of L1
cache per core, 1
MB of L2 cache per
core and 13.75 MB
of L3 cache.
Assembly language, high level language, low level language,
machine language:
http://www.itrelease.com/2018/07/difference-between-assembly-language-and-high
-level-language
/.
MOV A, M : Assembly language
7E (0111 1110): Machine language
Assembly language and machine language are treated as low level languages.
In assembly language programs written for one processor will not run on another type of
processor. In high-level language programs run independently of processor type.
Performance and accuracy of assembly language code are better than a high-level.
High-level languages have to give extra instructions to run code on the computer.
Code of assembly language is difficult to understand and debug than a high-level.
One or two statements of high-level language expand into many assembly language
codes.
Assembly language can communicate better than a high-level. Some type
of hardware actions can only be performed by assembly language.
In assembly language, we can directly read pointers at a physical address which is not
possible in high-level
Working with bits is easier in assembly language.
Assembler is used to translate code in assembly language while the compiler is used to
compile code in the high-level.
The executable code of high-level language is larger than assembly language code so it
takes a longer time to execute.
Due to long executable code, high-level programs are less efficient than assembly
language programs.
High-level language programmer does not need to know details about hardware
like registers in the processor as compared to assembly programmers.
The most high-level language code is first automatically converted into assembly code.
Assembly Programming
• Machine Language
• binary
• hexadecimal
• machine code or object code
• Assembly Language
• mnemonics
• assembler
• High-Level Language
• Pascal, Basic, C
• compiler
Assembly Language Programming
Microprocessor development tools:
https://
csenotesforyou.blogspot.com/2016/12/assembly-language-program-development.
html
Hardware Tools :
. Software Tools !
In Circuit Emulator (ICE)
Assembler !
Logic Analyzer
Linker !
Emulator
Loader !
Compiler ! A debugger is a computer program used by programmers to test
Libraries ! and debug a target program. Debuggers may use instruction-set
Simulator ! simulators, rather than running a program directly on the
Debugger ! processor to achieve a higher level of control over its execution.
Locator ! This allows debuggers to stop or halt the program according to
specific conditions. However, use of simulators decreases
execution speed. When a program crashes, debuggers show the
position of the error in the target program. Most debuggers also
are capable of running programs in a step-by-step mode, besides
stopping on specific points. They also can often modify the state
of programs while they are running.
Linker : A linker is special program that combines the object files, generated by
compiler/assembler, and other pieces of codes to originate an executable file have. exe
extension. In the object file, linker searches and append all libraries needed for
execution of file. It regulates the memory space that will hold the code from each
module. It also merges two or more separate object programs and establishes link
among them.
Loader : The loader is special program that takes input of object code from linker,
loads it to main memory, and prepares this code for execution by computer. Loader
allocates memory space to program. Even it settles down symbolic reference between
objects. It is in charge of loading programs and libraries in operating system.
Locator - A locator is a program used to assign the specific addresses of where the
segments of object code are to be loaded into memory.
Linking and relocation:
In computing, a linker or link editor is a computer utility program that takes one or more
object files generated by a compiler and combines them into a single executable file, library
file, or another 'object' file.
The debugger allows you to look at the contents of registers and memory locations
after your program runs.
- It allows you to change the contents of registers and memory locations and re-run
the program.
- Some debuggers allow you to stop execution after each instruction so that you can
check or alter after each register contents.
- A debugger also allows you to set a breakpoint at any point in your program. If you
insert a breakpoint at any point in your program, the debugger will run the program
up to the instruction where you put the breakpoint and then stop the execution.
- It is used to test and debug the hardware and software of an external system, such
as the prototype of a microprocessor based instrument. Part of the hardware of an
emulator is a multi wire cable which connects the host system to the system being
developed. Ex: FPGAs, USRPs.
Debugging, Simulator, Emulator, In-circuit emulator:
https://www.youtube.com/watch?v=4wmDsd53ibE.
ICE:
Embedded systems pose unique debugging challenges. With neither terminal nor
display (in most cases), there's no natural way to probe these devices, to extract the
behavioural information needed to find what's wrong. They let us connect an external
computer to the system being debugged to enable single stepping, breakpoints, and all
of the debug resources enjoyed by programmers of desktop computers.
In-circuit emulation (ICE) is the use of a hardware device or in-circuit emulator used to
debug the software of an embedded system. It operates by using a processor with the additional
ability to support debugging operations, as well as to carry out the main function of the system.
Particularly for older systems, with limited processors, this usually involved replacing the
processor temporarily with a hardware emulator: a more powerful although more expensive
version. It was historically in the form of bond-out processor which has many internal signals
brought out for the purpose of debugging. These signals provide information about the state of
the processor.
Logic analysers:
https://www.radio-electronics.com/info/t_and_m/logic_analyzer/logic_analyzer.php.
An in-circuit emulator (ICE) provides a window into the embedded system. The
programmer uses the emulator to load programs into the embedded system, run
them, step through them slowly, and view and change data used by the system's
software.
WHAT DOES IT MEAN TO
DISASSEMBLE CODE?
Preprocessing
& Compiling
Source Code Assembly Code
Assembly
DLLs
WHAT DOES IT MEAN TO
DISASSEMBLE CODE?
Preprocessing
& Compiling
Source Code Assembly Code
LY
M B
SE
AS Assembly
I S
D
DLLs
Modular programming: https
://en.wikipedia.org/wiki/Modular_programming.
Modular programming is a software design technique that emphasizes separating the
functionality of a program into independent, interchangeable modules, such that each
contains everything necessary to execute only one aspect of the desired functionality.
A module interface expresses the elements that are provided and required by the module.
The elements defined in the interface are detectable by other modules. The implementation
contains the working code that corresponds to the elements declared in the interface.
Modular programming is closely related to structured programming and
object-oriented programming, all having the same goal of facilitating construction of large
software programs and systems by decomposition into smaller pieces, and all originating
around the 1960s. While the historical usage of these terms has been inconsistent, "modular
programming" now refers to high-level decomposition of the code of an entire program into
pieces: structured programming to the low-level code use of structured control flow, and
object-oriented programming to the data use of objects, a kind of data structure.
52