You are on page 1of 9

Lecture 1

Any device that has memory and a control/clock input is called a sequential machine. Latches,
flip-flops, and ripple counters are examples of sequential machines.
Moore Machine: The output is a function of the state (combinational logic), independent of the
input

Mealy Machine: The output is a function of both the input and the clock. It changes when the
INPUT changes (asynchronously). It is possible to synchronize a mealy machine, but with more
flip flops.
Mealy & Moore Example: Design a Moore & Mealy machine whose output is asserted
whenever its input string has 2 1’s in sequence and goes to 0 on a 0 input.
Lecture 2
Execution time depends on:

• Number of inst. (Architecture)


• Avg. clock cycle per inst. (Organization)
• Time per clock cycle. (IC-Technology)
The main memory is a large number of semiconductor devices (Transistors) to store data

Structure is how components relate to each other


Function: is the operation of individual components as part of the structure
Single Bus: is simple but takes more time to execute any instruction.
Double Bus: is a faster bus and more complicated as its needs more registers and synchronous
modules.
Computer functions are: Data processing – Data storage – Data movement – Control
Structure - Top Level:

Structure - The CPU:

Structure - The Control Unit:


Memory Connection:

• Receives and sends data


• Receives addresses (of locations)
• Receives control signals
• Read – Write – Timing
CPU Connection:

• Reads instructions and data


• Writes out data (after processing)
• Sends control signals to other units
• Receives interrupts
Buses: A common group of wires that interconnect. The 32-bit data bus is 32 separate single-
bit channels
Width is a key determinant of performance
Central Processing Unit (CPU): electronic circuit responsible for executing the instructions of a
computer program
Registers: high-speed storage areas in the CPU. All data must be stored in a register before
processing
MAR (Memory address register): is located in the main memory and holds the memory location of
data that needs to be accessed
MDR (Memory Data Register): is located in the main memory and holds data that is being
transferred to or from memory
AC (Accumulator): Where arithmetic and logic results are stored
PC (Program counter): Contains the address of the next instruction to be executed
IR (instruction register): Contains current instructions under process
(ALU) Arithmetic and Logic Unit: allows arithmetic (add, subtract) and logic (AND, OR)
operations
CU (Control Unit): controls the operation of ALU, memory, and input/output devices, telling
them how to respond to the program instructions it took from the memory unit. And provides
the timing and control signals required by other components
SB (System bus): a set of (lines) that connects the major components (CPU, Memory) of a
computer (works as a communication path in which info flows from one hardware piece to
another)
Data bus: used for transmitting the data instruction from CPU to memory (bi-directional)
Control Bus: transfer the control and timing signals from one component to another CPU.
Memory read/write signal – Interrupt request – Clock signals
Address bus: used to carry address from CPU to memory/IO devices and identify the particular
locations in memory that carry the source or destination of data (unidirectional)
Buses look like:

• Parallel lines on circuit boards


• Ribbon cables
• Strip connectors on motherboards
• Sets of wires
Bus Types:
1. Dedicated: Separate data & address lines
2. Multiplexed: Shared lines and Address valid or data valid control line.
Advantage (fewer lines). Disadvantages (More complex control and Ultimate
performance)
Bus Arbitration: More than one module controlling the bus
Operation example:
When the CPU wants to read or write data, it sends the memory read or memory write control
signal on the control bus to perform the memory read or write operation from the main
memory and the address of the memory location is sent to the address bus.
If the CPU wants to read data stored at the memory location (address) 4, the CPU sends the
value 4 in binary on the address bus
Computer Architecture: the science and art of selecting and interconnecting hardware
components to create computers that meet functional, performance, and cost goals. Deal with
design aspects outside the microprocessor, or in the microprocessor interface.
Computer Organization: the implementation of these blocks and how each block functions
independently. Deals with totally inside processor aspects
I can have 2 computers that have the same processor brand, the same number of internal
registers, the same instruction set, same format for operands in both memory and CPU
registers, but they have different memory sizes, different processor frequencies, different bus
structures between the CPU and memory and I/O devices, and different instruction execution
time.
Lecture 3
The size of the data bus would affect if the instruction would be fetched on one cycle or more.
Each instruction consists of an opcode and an operand.
The opcode gets decoded into 1’s and 0’s to be sent by the control unit to different units.
The operand is the variable that the opcode would be executed.
Every instruction is split down into micro-instructions, this would be dependent on the
organization, as follows:

• Load A (A is memory location):


1. Move A into MAR
2. Send read signal to Memory
3. Move data from MDR to one of the microprocessor registers
• Add B:
1. Move B to MAR
2. Send a read signal
3. Move B to the ALU input, send add bits to the ALU
4. Move output through the accumulator to one of the CPU registers
• Write C:
1. Move C into MAR
2. Send a Write signal to Memory
3. Move data from MDR to the memory location C
Fetch: brings the opcode from memory and decodes it into machine code through the IR.
Execute: executes the previous opcode upon the operand
Every opcode gets fetched while an operand gets executed
Hardwired systems are inflexible
Program: is a sequence of steps. For each step, an arithmetic or logical operation is done. For
each operation, a different set of control signals is needed
The function of the Control Unit:

• For each operation a unique code is provided


• Hardware segment accepts the code and issues the control signals
Control Unit and the Arithmetic and Logic Unit constitute the CPU.
Main memory: Temporary storage of code and results is needed
Input/output: Data and instructions need to get into the system and result out
Fetch Cycle:
1. PC holds the address of the next instruction to fetch.
2. Processor fetches the instruction from the memory location pointed to by the PC.
3. Increment PC
4. Instruction loaded into IR
5. Processor interprets instruction and performs required actions
Execute Cycle:

• Processor-memory: data transfer between CPU and main memory

• Processor I/O: Data transfer between CPU and I/O module

• Data processing: Some arithmetic or logical operation on data

• Control: Alteration of the sequence of operations


Example of Program Execution:

Hard-wired Computer Board Computer-programmed circuits: are wired with all signals. The
advantages are easy to track and simpler to understand but are inflexible if we want to
redesign.
Micro-coded Computer Board Computer-programmed circuits: are programmed through a
pseudo code and any programming language and embedded in digital devices. Advantages easy
to reprogram, but harder to track errors.

You might also like