SlideShare a Scribd company logo
1 of 153
UNIT I
Computer Design and
Applications: Computer Organization
Syllabus
Basic architecture of CPU,
RTL,
common bus system,
different micro-operations,
ALU design,
stored program organization,
instruction format,
instruction set,
timing and control,
instruction cycle,
concept of interrupt.
Basic CPU design considerations.
Bus Unit in micro processor/microcomputer
• Address bus
• Data bus
• Control bus
Will 128 bit processors come in market?
Common Bus system in CPU:
Common bus: Shared by all blocks of the Microcomputer
Common Data Bus
Common Address Bus
Common Control Bus
Stored Program Architecture:
Machine reying on their performance on instruction and data stored in
the memory of the system.
1. Von Neuman Architecture
2. Harvard Architecture
Von Neuman Architecture
• It is also known as stored-program computer architecture
• Instruction and data share the same data bus
• Hence instruction fetch and a data operation cannot occur at the same time
• This limits the performance of the system.
The Harvard architecture
• Stored Program Architecture
• With separate storage and signal pathways for instructions and data.
Courtesy: https://en.wikipedia.org/wiki/Harvard_architecture
• Modern processors appear to the user to be systems with von Neumann
architectures, with the program code stored in the same main memory as
the data.
• For performance reasons, internally and largely invisible to the user, most
designs have separate processor caches for the instructions and data,
with separate pathways into the processor for each. This is one form of
what is known as the modified Harvard architecture.
Implementation of Common
Bus system:
Bus may be designed using—
• Multiplexer:
• Tristate buffer:
FSM Design (not in course)
• Using Logic Gates..
Characteristic Table of flip flops
• Describes output for a given input of flip flop.
• Useful for analysis and for defining the operation of
f/f
J K Q(t+1) Comment
0 0 Q(t) No change
0 1 0 Reset
1 0 1 Set
1 1 Q’(t) Compliment
S R Q(t+1) Comment
0 0 Q(t) No change
0 1 0 Reset
1 0 1 Set
1 1 ? Unpredictable
J-K
Flip
Flop
R-S
Flip
Flop
Excitation Table
• This lists the required input for the given
transition of output state.
Q(t) Q(t+1) J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
J-K
Flip
Flop
R-S
Flip
Flop
Q(t) Q(t+1) S R
0 0 0 X
0 1 1 X
1 0 0 1
1 1 X 0
Sequential Circuits
State equations
• Input: x(t)
• Output: y(t)
• State: (A(t), B(t))
• What is the Output
Function?
• What is the Next State
Function?
A
C
D Q
Q
C
D Q
Q
y
x A
B
CP
Sequential Circuits
Example (continued)
• Boolean equations
for the functions:
– A(t+1) = A(t)x(t) +
B(t)x(t)
– B(t+1) = A’(t)x(t)
– y(t) = x’(t)(B(t) + A(t))
– These may be reduced
using K-map
C
D Q
Q
C
D Q
Q'
y
x
A
A’
B
CP
Next State
Output
Sequential Circuits
State Table
• State table – a multiple variable table with the following
four sections:
– Present State – the values of the state variables for each allowed
state.
– Input – the input combinations allowed.
– Next-state – the value of the state at time (t+1) based on the
present state and the input.
– Output – the value of the output as a function of the present state
and (sometimes) the input.
• From the viewpoint of a truth table:
– the inputs are Input, Present State
– and the outputs are Output, Next State
Sequential Circuits
Example : State Table
The state table can be filled in using the next state and
output equations:
– A(t+1) = A(t)x(t) + B(t)x(t)
– B(t+1) =A (t)x(t);
– y(t) =x (t)(A(t) + B(t))
Present state Next state Output
X=0 X=1 X=0 X=1
AB A(t+1)B(t+1) A(t+1)B(t+1) Y Y
00 00 01 0 0
01 00 11 1 0
10 00 10 1 0
11 00 10 1 0
Sequential Circuits
State Diagram
• The sequential circuit function can be represented in graphical
form as a state diagram with the following components:
– A circle with the state name in it for each state
– A directed arc from the Present State to the Next State for each state
transition
– A label on each directed arc with the Input values which causes the
state transition, and
– A label:
• On each circle with the output value produced, or
• On each directed arc with the output value produced.
Example: State Diagram
• Which type?
• Diagram gets
confusing for
large circuits
• For small circuits,
usually easier to
understand than
the state table
• Pictorial view of state
transitions
• Used as initial design
specifications for a
sequential circuits.
A B
0 0
0 1 1 1
1 0
x=0/y=1 x=1/y=0
x=1/y=0
x=1/y=0
x=0/y=1
x=0/y=1
x=1/y=0
x=0/y=0
State reduction
• Reducing the no. of f/f in circuit is known as state
reduction
• Cost # of states
• In switching theory various algorithms are
designed to reduce the # of states in design.
• m flip flops produce 2m states.
• State reduction may or may not produce
reduction in no of gates.
• Sometimes it may increase no. of gates.
Example
Input/output
Suppose input sequence is
0101010110100
At state a if applied i/p is 0 out will be 0 and system will go to next state a.
Obtain state table from state diagram
Two states are said to be equivalent if for each member
of the set of inputs they give exactly the same output and
send the circuit either to the same state or to an
equivalent state. One of them can be removed
• Look for the two present states that go to the same
next state and have the same output for both input
combination.
• (similar rows except present state columns)
• Row for e and g are same hence equivalent states
one of them may be removed.
Modify the state table
• Remove last row and Replace state g by e at all
place.
• Look for new equivalency of states in a similar
fashion.
• States d and f become equivalent now
• Repeat the procedure till possible.
We can verify this by taking same sequence of input and we
observe that the same out comes—
State a a b c d e f f g f g a
Input 0 1 0 1 0 1 1 0 1 0 0
Output0 0 0 0 0 1 1 0 1 0 0
Reduced state diagram
•State reduction is possible only if input and out put relationship
is concerned.
•Output must be independent of number of states
State Assignment
• Size of combinational circuit associated with the
design may be reduced by using K-map or other
techniques.
• This may further be reduced by proper state
assignment.
• Assigning binary value to states is known as state
assignment.
• Minimization not applicable to circuit whose
external output are taken directly from f/f (circuit
viewed as external input output terminals).
• Sequence of state is immaterial as long as
their input and output relationships are
maintained.
• Any binary number assignment is satisfactory
as long as states are unique.
State table with binary state
assignment1
The combinational circuit obtained depends upon
the binary state assignment chosen
Optimal state assignment
• The most common criterion is that the chosen
assignment should result in a simple
combinational circuit.
• No state assignment procedure to guarantee
minimal-cost combinational circuit.
Q(t) Q(t+1) D
0 0 0
0 1 1
1 0 0
1 1 1
Q(t) Q(t+1) T
0 0 0
0 1 1
1 0 1
1 1 0
D Flip
Flop
T Flip
Flop
Design procedure of synchronous
Sequential Circuit
m f/f for upto 2m states
Example:
• Design an sequential circuit that detects 3
consecutive 1’s in the data stream.
State diagram
State table
K-Map redution
Circuit implementation
• Description:
•  reset state(S0) (initial state of machine)
• From S0 to S1 if input is 1 S0 otherwise
• From state S1 to S2 if input is 1 S0 otherwise.
• From S2 to S3 if input is 1 S0 otherwise
• From S3 to S3 if input is 1 S0 otherwise
Step1: Obtaining the State Diagram
•A very important step in the
design procedure.
•Requires experience!
•Example: Design a circuit that
detects a sequence of three
consecutive 1’s in a string of bits
coming through an input line (serial
bit stream)
KFUPM
Step2: Obtaining the State Table
•Assign binary codes for the states
•We choose 2 D-FF
•Next state specifies what should be
the input to each FF
•Example: Design a circuit that
detects a sequence of three
consecutive 1’s in a string of bits
coming through an input line (serial
bit stream)
Step3: Obtaining the State Equations
•Using K-Maps
•A(t + 1) = DA = ∑(3,5,7) = A x + B x
•B(t + 1) = DB = ∑(1,5,7) = A x + B’ x
•y = ∑(6,7) = A B
•Example: Design a circuit that
detects a sequence of three
consecutive 1’s in a string of bits
coming through an input line (serial
bit stream)
KFUPM
Step4: Draw Circuits
•Using K-Maps
•A(t + 1) = DA = ∑(3,5,7) = A x + B x
•B(t + 1) = DB = ∑(1,5,7) = A x + B’ x
•y = ∑(6,7) = A B
•Example: Design a circuit that
detects a sequence of three
consecutive 1’s in a string of bits
coming through an input line (serial
bit stream)
KFUPM
Timing Diagram (Verification)
KFUPM
• Question: Does it detect 111 ?
Example 2
• Problem: Design of A Sequence Recognizer
• Design a circuit that reads as inputs continuous bits, and
generates an output of ‘1’ if the sequence (1011) is
detected
Input 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 1 1
Output 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0
GPP
X Y
Example 2 (cont.)
• Step1: State Diagram
KFUPM
Sequence to be detected:1011
Example 2 (cont.)
KFUPM
• Step 2: State Table
OR
Example 2 (cont.)
KFUPM
• Step 2: State Table
• state assignment
Q: How many FF?
log2(no. of states)
Example 2 (cont.)
KFUPM
• Step 2: State Table
• choose FF
• In this example, lets use JK–FF for
A and D-FF for B
Example 2 (cont.)
KFUPM
• Step 2: State Table
• complete state table
• use excitation tables for JK–FF and
D-FF
D–FF excitation table
JK–FF excitation table
Next
State
output
Example 2 (cont.)
KFUPM
• Step 3: State Equations
• use k-map
• JA = BX’
• KA = BX + B’X’
• DB = X
• Y = ABX’
Example 2 (cont.)
KFUPM
• Step 4: Draw Circuit
•
• JA = BX’
• KA = BX + B’X’
• DB = X
• Y = ABX’
Example 3
KFUPM
Problem: Design of A 3-bit Counter
Design a circuit that counts in binary form as follows 000,
001, 010, … 111, 000, 001, …
Example 3 (cont.)
KFUPM
• Step1: State Diagram
- The outputs = the states
- Where is the input?
- What is the type of this
sequential circuit?
Example 3 (cont.)
KFUPM
• Step2: State Table
• No need for state assignment
here
Example 3 (cont.)
KFUPM
• Step2: State Table
• We choose T-FF
T–FF excitation table
0
Example 3 (cont.)
KFUPM
• Step3: State Equations
Example 3 (cont.)
KFUPM
• Step4: Draw Circuit
• TA0 = 1
• TA1 = A0
• TA2 = A1A0
Example 4
KFUPM
N
S
E
W
Traffic Action
EW only EW Signal green
NS Signal red
NS only NS Signal green
EW Signal red
EW & NS Alternate
No traffic Previous state
• Problem: Design a traffic light controller for a 2-way
intersection. In each way, there is a sensor and a light
Example 4 (cont.)
KFUPM
EW / 10
NS / 01
INPUTS
• Sensors X1, X0
X0: car coming on NS
X1 : car coming on EW
11, 10
00, 01 00, 10
11, 01
OUTPUTS
• Light S1, S0
S0 : NS is green
S1 : EW is green
STATES
• NS: NS is green
• EW: EW is green
• Step1: State Diagram
Example 4 (cont.)
• Exercise: Complete the design using:
• D-FF
• JK-FF
• T-FF
KFUPM
Example 5
• Problem: Design Up/Down counter with Enable
• Design a sequential circuit with two JK flip-flops A
and B and two inputs X and E. If E = 0, the circuit
remains in the same state, regardless of the input
X. When E = 1 and X = 1, the circuit goes through
the state transitions from 00 to 01 to 10 to 11,
back to 00, and then repeats. When E = 1 and X =
0, the circuit goes through the state transitions
from 00 to 11 to 10 to 01, back to 00 and then
repeats.
•
KFUPM
Example 5 (cont.)
00 01
10
11
00
01
10 11 10
11
10
11
11
00
01
00
01
10
00
01
Present
State
Inputs Next
State
FF Inputs
A B E X A B JA KA JB KB
0 0 0 0 0 0 0 X 0 X
0 0 0 1 0 0 0 X 0 X
0 0 1 0 1 1 1 X 1 X
0 0 1 1 0 1 0 X 1 X
0 1 0 0 0 1 0 X X 0
0 1 0 1 0 1 0 X X 0
0 1 1 0 0 0 0 X X 1
0 1 1 1 1 0 1 X X 1
1 0 0 0 1 0 X 0 0 X
1 0 0 1 1 0 X 0 0 X
1 0 1 0 0 1 X 1 1 X
1 0 1 1 1 1 X 0 1 X
1 1 0 0 1 1 X 0 X 0
1 1 0 1 1 1 X 0 X 0
1 1 1 0 1 0 X 0 X 1
1 1 1 1 0 0 X 1 X 1
KFUPM
Example 5 (cont.)
JA = BEX + B’EX’
EX
AB
00 01 11 10
00 x x x x
01 x x x x
11 0 0 1 0
10 0 0 0 1
KA = BEX + B’EX’
EX
AB
00 01 11 10
00 0 0 0 1
01 0 0 1 0
11 x x x x
10 x x x x
JB = E
EX
AB
00 01 11 10
00 x x x x
01 0 0 1 1
11 0 0 1 1
10 x x x X
KB = E
EX
AB
00 01 11 10
00 0 0 1 1
01 x x x x
11 x x x x
10 0 0 1 1
Y
X
JA
C
A
A’
KA
E
clock
JB
C
B
B’
KB
KFUPM
More Design Examples
KFUPM
Summary
• To design a synchronous sequential circuit:
• Obtain a state diagram
• State reduction if necessary
• Obtain State Table
• State Assignment
• Choose type of flip-flops
• Use FF’s excitation table to complete the table
• Derive state equations
• Use K-Maps
• Obtain the FF input equations and the output equations
• Draw the circuit diagram
KFUPM
67 / 17
Example: Detect 3 Consecutive 1
inputs (Moore)
State S0: zero 1s detected
State S1: one 1 detected
State S2: two 1s detected
State S3: three 1s detected
0
● Note that each state has 2 output arrows
● Two bits needed to encode state
68 / 17
State Table for Sequence Detector
● Sequence of inputs, outputs, and flip flop
states in state table
● Present state indicates current value of
flip flops
● Next state indicates state after next rising
clock edge
● Output is current output value
Present
State
Next
State
A B x A B y
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 0 0
0 1 1 1 0 0
1 0 0 0 0 0
1 0 1 1 1 0
1 1 0 0 0 1
1 1 1 1 1 1
Output
Input
S0 = 00
S1 = 01
S2 = 10
S3 = 11
Finding Expressions for Next State
and Output Value
● Create K-map directly from state table (3 columns = 3 K-maps)
● Minimize K-maps to find SOP representations
● Separate circuit for each next state and output value
Circuit for Consecutive
1s Detector
● Note location of state flip
flops
● Output value (y) is function
of state
● This is a Moore machine
Detect 111 or 00 in input string
in Mealy machine
Example... There are 4 states
( 2 bit for each let A & B)
state assignment done.
1 input (let x)
No output (f/f states may
be taken as out put)
Step 1: formation of
diagram already given
Step 2: Obtain State
Table
• State reduction  not possible (due to out
put directly taken from f/f and no two rows of
state table are identical)
• state assignment not required
• No of flip flops for 4 states 2 f/f will be
required
• Type of f/f not mentioned in problem let us
take J-K f/f ( most versatile)
• Obtain Circuit excitation table
Expected digital circuit
• Simplify for each f/f input variable using K-
map.
Take A, B & x
as input and
JA as output
Take A, B &
x as input
and KA as
output
Take A, B &
x as input
and JB as
output
Take A, B &
x as input
and KB as
output
Boolean function for each variable...
• JA=Bx’ (J input of f/f A)
• KA=Bx (K input of f/f A)
• JB=x (J input of f/f B)
• KB=Ax+A’x’
• =A(X-NOR)x (K input of f/f B)
Final circuit
Practice
Present state
Q(t)
Input x Input y Output S Output next
state Q(t+1)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
State table
State diagram
Example2
State Table
Present state
A(t)
Present state
B(t)
Output next
state Q(t+1)
Output next
state Q(t+1)
0 0 0 1
0 1 1 0
1 0 0 0
1 1 0 0
There is no external input nor output so present state is taken as
only input and next state as only output
Input to T-f/f A TA=A+B  next state toggles if TA is 1
A(t+1)=A’(A+B)+A(A+B)’=A’B=>(next state is A’ if (A+B ) is 1 otherwise
unchanged)
Input to T-f/f B TB=A’+B  next state toggles if TB is 1
B(t+1)=B’(A’+B)+B(A’+B)’=A’B’
State diagram
• It is modulo 3
binary counter
• Counts as
0120
• If started from 11
resets
automatically to
00
00
01 10
11
Practice problems
Using MUX: 4 register with 4 bits each
(in course)
• If we have k registers each of n bits
• Size of MUX= MX1 (where M=2m and m is next
integer obtained from m=log2(k))
• No of MUX=n
What is Tri-state Buffer
Using tri-state buffer
• A typical digital computer h a s many registers, and paths must b e
provided to transfer information from one register to another.
• The number of wires will be excessive if separate lines are used
between each register and all other registers in the system.
• A more efficient scheme for transferring information between
registers in a multiple-register configuration is a common bus
system.
• A bus structure consists of a set of common lines, one for each bit
of a register, through which binary information is transferred one at
a time.
• Control signals determine which register is selected by the bus
during each particular register transfer.
Register transfer Language
• Information transfer from one register to
another is designated in symbolic form by
means of a replacement operator.
• The statement
R2 R1
Register notation
Here P acts as control function,
The above statement may be written as
Register Transfer Language
Micro-operations
• Data Transfer micro-operations
– Register to memory (write)
– Memory to register (Read)
– Register to register
– Memory to memory (x)
• Arithmetic micro-operations
• Logical micro-operations
• Shift micro-operations
Micro-operations are
the functional or
atomic, operations of
a processor.
Memory transfer
• Memory Read:
• CPU put address on address bus, [AR is address Register]
• activate control line [Memory read],
• data comes out of memory and kept on data bus and
transferred to CPU [DR is data Register]
Animation of sequence of operations for memory read
operation:
https://electro-nx.blogspot.com/2019/02/instruction-
fetch-in-microprocessor.html
Memory transfer
• Memory Read: DR M[AR]
• CPU put address on address bus,
• activate control line [Memory Read],
• Put data on data bus
• Save into DR (activate load input of DR)
Arithmetic Micro-operation
Binary adder
Binary adder/ subtractor circuit
Incrementer circuit
Arithmetic circuit:
Logical microoperatoins
Hardware Implementation
s2 s1 s0 output
0 0 0 AND
0 0 1 OR
0 1 0 X-OR
0 1 1 NOT
1 0 0 NAND
1 0 1 NOR
1 1 0 Left shift (upward )
1 1 1 Right shift (downward)
Shift micro operations
Arithmetic shift
Ashr  shifts right with
sign bit LSB lost, sign bit
remains unchanged
Ashl shifts left with 0
inserted at LSB, sign may
change overflow
Over flow detection
rotate
Hardware implementation
ALU Design
1 bit ALU;
For multiple bits, add in series
Instruction set architecture
• Stored program organization
Opcode: tells operation to be performed
Address: gives address of operand, this may be used in
some operations like complement Accumulator, clear AC,
increment AC
Modified instruction format
Register set
Bus Design for the register set
Instruction set completeness
Computer Instruction:
Memory reference instructions
Register reference Instruction
I/O operations:
Timing and Control
Master clock pulse to all sequential ckts
Just clock will change the state of seq ckt  cotrol signal also required
Control signal gen from control unit and given to MUXes etc.
Control Unit:
1. Hard wired
2. microprogrammed
Instruction Cycle:
Fetch and Decode
To provide the data path fro AR PC we must use T0 signal to
get following:
During next clock pulse (T1):
Hence T1 is used to make following connection paths:
Instruction cycle
flow chart
Memory Reference Instruction:
AND to AC
ADD to AC
Load to AC
Store AC
Branch Unconditional
BSA: Branch and save return address
ISZ: Increment (Memory) and skip (next instruction) if
(incremented value) zero
Register Reference Instruction:
CPU design
https://www.youtube.com/watch?v=q8
PUsw-xvjs
Input output and Interrupt:
Serial comm
Serial comm
Parallel comm
Parallel comm
Output flag
Input flag
Input output instruction
Program Interrupt:
Due to inclusion of Interrupt cycle, we need to modify
the instruction cycle:
Complete
processor
design:
Control Logic of AR:
Hence different control inputs (
load, clear and increment) are:
D0T5:AC AC^DR
D1T5: AC AC+DR
D2T5: AC DR
rB11: AC0
rB9: AC AC’
rB7:------
rB6: ------
rB5: ACAC+1
pB11:AC(7-0)INPR LD(AC): D0T5+D1T5+D2T5+rB9+rB7+rB6+pB11
Clear(AC): rB11
INR(AC): rB5
Accumulator Logic development
Unit I_CDA-1 computer design and applications.

More Related Content

Similar to Unit I_CDA-1 computer design and applications.

DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaaDD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaa
kasheenp
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
Piyush Rochwani
 
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptxSequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
AhmedAlAfandi5
 

Similar to Unit I_CDA-1 computer design and applications. (20)

flip flop 13.ppt
flip flop 13.pptflip flop 13.ppt
flip flop 13.ppt
 
2 marks DPCO.pdf
2 marks DPCO.pdf2 marks DPCO.pdf
2 marks DPCO.pdf
 
Ch3
Ch3Ch3
Ch3
 
DS_LEC_3.pptx
DS_LEC_3.pptxDS_LEC_3.pptx
DS_LEC_3.pptx
 
DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaaDD Slides6.pptx  aaaaaaaaaaaaaaaaaaaaaaaaaaaa
DD Slides6.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
PPT 2nd unit course file.ppt
PPT 2nd unit course file.pptPPT 2nd unit course file.ppt
PPT 2nd unit course file.ppt
 
synchronous state machine design
synchronous state machine designsynchronous state machine design
synchronous state machine design
 
Chapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdfChapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdf
 
Design System Design-ASM and Asynchronous Sequential Circuits
Design System Design-ASM and Asynchronous Sequential CircuitsDesign System Design-ASM and Asynchronous Sequential Circuits
Design System Design-ASM and Asynchronous Sequential Circuits
 
Circuitrix@Pragyan 2015 NITT
Circuitrix@Pragyan 2015 NITTCircuitrix@Pragyan 2015 NITT
Circuitrix@Pragyan 2015 NITT
 
Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential Circuits
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
 
Unit 2 - Single Purpose Processors
Unit 2 - Single Purpose ProcessorsUnit 2 - Single Purpose Processors
Unit 2 - Single Purpose Processors
 
DLD Chapter-5.pdf
DLD Chapter-5.pdfDLD Chapter-5.pdf
DLD Chapter-5.pdf
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential Circuit
 
digital-electronics_7.pdf
digital-electronics_7.pdfdigital-electronics_7.pdf
digital-electronics_7.pdf
 
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptxSequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
Sequential Circuitsdddddddddddddddddsssssssssss-ppt.pptx
 
Sequential Circuits-ppt_2.pdf
Sequential Circuits-ppt_2.pdfSequential Circuits-ppt_2.pdf
Sequential Circuits-ppt_2.pdf
 
ANALOG AND DIGITAL ELECTRONICS unit 5
ANALOG AND DIGITAL ELECTRONICS unit 5ANALOG AND DIGITAL ELECTRONICS unit 5
ANALOG AND DIGITAL ELECTRONICS unit 5
 
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.pptEET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
 

Recently uploaded

Design-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora AgencyDesign-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora Agency
Isadora Agency
 
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
Evaluating natural frequencies and mode shapes.pptx
Evaluating natural frequencies and mode shapes.pptxEvaluating natural frequencies and mode shapes.pptx
Evaluating natural frequencies and mode shapes.pptx
joshuaclack73
 
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Klinik kandungan
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
awasv46j
 
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
thubko
 
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
Resume all my skills and educations and achievement
Resume all my skills and educations and  achievement Resume all my skills and educations and  achievement
Resume all my skills and educations and achievement
210303105569
 
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
ugzga
 

Recently uploaded (20)

Design-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora AgencyDesign-System - FinTech - Isadora Agency
Design-System - FinTech - Isadora Agency
 
CADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdfCADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdf
 
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
 
The concept of motion graphics and its applications.
The concept of motion graphics and its applications.The concept of motion graphics and its applications.
The concept of motion graphics and its applications.
 
Morgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity DesignMorgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity Design
 
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
 
Evaluating natural frequencies and mode shapes.pptx
Evaluating natural frequencies and mode shapes.pptxEvaluating natural frequencies and mode shapes.pptx
Evaluating natural frequencies and mode shapes.pptx
 
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
 
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Saudi ( 085657271886 ) Cytote pil telat bulan penggugur kand...
 
Spring Summer 26 Colors Trend Book Peclers Paris
Spring Summer 26 Colors Trend Book Peclers ParisSpring Summer 26 Colors Trend Book Peclers Paris
Spring Summer 26 Colors Trend Book Peclers Paris
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
 
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
 
BIT Khushi gandhi project.pdf graphic design
BIT Khushi gandhi project.pdf graphic designBIT Khushi gandhi project.pdf graphic design
BIT Khushi gandhi project.pdf graphic design
 
Webhost NVME Cloud VPS Hosting1234455678
Webhost NVME Cloud VPS Hosting1234455678Webhost NVME Cloud VPS Hosting1234455678
Webhost NVME Cloud VPS Hosting1234455678
 
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
 
Levi's Advertisement and camapign design
Levi's Advertisement and camapign designLevi's Advertisement and camapign design
Levi's Advertisement and camapign design
 
Resume all my skills and educations and achievement
Resume all my skills and educations and  achievement Resume all my skills and educations and  achievement
Resume all my skills and educations and achievement
 
Digital Marketing Company in Bangalore.pdf
Digital Marketing Company in Bangalore.pdfDigital Marketing Company in Bangalore.pdf
Digital Marketing Company in Bangalore.pdf
 
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
 

Unit I_CDA-1 computer design and applications.

  • 1. UNIT I Computer Design and Applications: Computer Organization
  • 2. Syllabus Basic architecture of CPU, RTL, common bus system, different micro-operations, ALU design, stored program organization, instruction format, instruction set, timing and control, instruction cycle, concept of interrupt. Basic CPU design considerations.
  • 3. Bus Unit in micro processor/microcomputer • Address bus • Data bus • Control bus
  • 4.
  • 5. Will 128 bit processors come in market?
  • 6. Common Bus system in CPU: Common bus: Shared by all blocks of the Microcomputer Common Data Bus Common Address Bus Common Control Bus
  • 7. Stored Program Architecture: Machine reying on their performance on instruction and data stored in the memory of the system. 1. Von Neuman Architecture 2. Harvard Architecture Von Neuman Architecture • It is also known as stored-program computer architecture • Instruction and data share the same data bus • Hence instruction fetch and a data operation cannot occur at the same time • This limits the performance of the system.
  • 8. The Harvard architecture • Stored Program Architecture • With separate storage and signal pathways for instructions and data. Courtesy: https://en.wikipedia.org/wiki/Harvard_architecture • Modern processors appear to the user to be systems with von Neumann architectures, with the program code stored in the same main memory as the data. • For performance reasons, internally and largely invisible to the user, most designs have separate processor caches for the instructions and data, with separate pathways into the processor for each. This is one form of what is known as the modified Harvard architecture.
  • 9. Implementation of Common Bus system: Bus may be designed using— • Multiplexer: • Tristate buffer:
  • 10. FSM Design (not in course) • Using Logic Gates..
  • 11. Characteristic Table of flip flops • Describes output for a given input of flip flop. • Useful for analysis and for defining the operation of f/f J K Q(t+1) Comment 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 Q’(t) Compliment S R Q(t+1) Comment 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 ? Unpredictable J-K Flip Flop R-S Flip Flop
  • 12.
  • 13. Excitation Table • This lists the required input for the given transition of output state. Q(t) Q(t+1) J K 0 0 0 X 0 1 1 X 1 0 X 1 1 1 X 0 J-K Flip Flop R-S Flip Flop Q(t) Q(t+1) S R 0 0 0 X 0 1 1 X 1 0 0 1 1 1 X 0
  • 14.
  • 15. Sequential Circuits State equations • Input: x(t) • Output: y(t) • State: (A(t), B(t)) • What is the Output Function? • What is the Next State Function? A C D Q Q C D Q Q y x A B CP
  • 16. Sequential Circuits Example (continued) • Boolean equations for the functions: – A(t+1) = A(t)x(t) + B(t)x(t) – B(t+1) = A’(t)x(t) – y(t) = x’(t)(B(t) + A(t)) – These may be reduced using K-map C D Q Q C D Q Q' y x A A’ B CP Next State Output
  • 17. Sequential Circuits State Table • State table – a multiple variable table with the following four sections: – Present State – the values of the state variables for each allowed state. – Input – the input combinations allowed. – Next-state – the value of the state at time (t+1) based on the present state and the input. – Output – the value of the output as a function of the present state and (sometimes) the input. • From the viewpoint of a truth table: – the inputs are Input, Present State – and the outputs are Output, Next State
  • 18. Sequential Circuits Example : State Table The state table can be filled in using the next state and output equations: – A(t+1) = A(t)x(t) + B(t)x(t) – B(t+1) =A (t)x(t); – y(t) =x (t)(A(t) + B(t)) Present state Next state Output X=0 X=1 X=0 X=1 AB A(t+1)B(t+1) A(t+1)B(t+1) Y Y 00 00 01 0 0 01 00 11 1 0 10 00 10 1 0 11 00 10 1 0
  • 19. Sequential Circuits State Diagram • The sequential circuit function can be represented in graphical form as a state diagram with the following components: – A circle with the state name in it for each state – A directed arc from the Present State to the Next State for each state transition – A label on each directed arc with the Input values which causes the state transition, and – A label: • On each circle with the output value produced, or • On each directed arc with the output value produced.
  • 20. Example: State Diagram • Which type? • Diagram gets confusing for large circuits • For small circuits, usually easier to understand than the state table • Pictorial view of state transitions • Used as initial design specifications for a sequential circuits. A B 0 0 0 1 1 1 1 0 x=0/y=1 x=1/y=0 x=1/y=0 x=1/y=0 x=0/y=1 x=0/y=1 x=1/y=0 x=0/y=0
  • 21. State reduction • Reducing the no. of f/f in circuit is known as state reduction • Cost # of states • In switching theory various algorithms are designed to reduce the # of states in design. • m flip flops produce 2m states. • State reduction may or may not produce reduction in no of gates. • Sometimes it may increase no. of gates.
  • 22. Example Input/output Suppose input sequence is 0101010110100 At state a if applied i/p is 0 out will be 0 and system will go to next state a.
  • 23. Obtain state table from state diagram Two states are said to be equivalent if for each member of the set of inputs they give exactly the same output and send the circuit either to the same state or to an equivalent state. One of them can be removed
  • 24. • Look for the two present states that go to the same next state and have the same output for both input combination. • (similar rows except present state columns) • Row for e and g are same hence equivalent states one of them may be removed.
  • 25. Modify the state table • Remove last row and Replace state g by e at all place. • Look for new equivalency of states in a similar fashion. • States d and f become equivalent now • Repeat the procedure till possible.
  • 26. We can verify this by taking same sequence of input and we observe that the same out comes— State a a b c d e f f g f g a Input 0 1 0 1 0 1 1 0 1 0 0 Output0 0 0 0 0 1 1 0 1 0 0
  • 27. Reduced state diagram •State reduction is possible only if input and out put relationship is concerned. •Output must be independent of number of states
  • 28. State Assignment • Size of combinational circuit associated with the design may be reduced by using K-map or other techniques. • This may further be reduced by proper state assignment. • Assigning binary value to states is known as state assignment. • Minimization not applicable to circuit whose external output are taken directly from f/f (circuit viewed as external input output terminals).
  • 29. • Sequence of state is immaterial as long as their input and output relationships are maintained. • Any binary number assignment is satisfactory as long as states are unique.
  • 30. State table with binary state assignment1 The combinational circuit obtained depends upon the binary state assignment chosen
  • 31. Optimal state assignment • The most common criterion is that the chosen assignment should result in a simple combinational circuit. • No state assignment procedure to guarantee minimal-cost combinational circuit.
  • 32. Q(t) Q(t+1) D 0 0 0 0 1 1 1 0 0 1 1 1 Q(t) Q(t+1) T 0 0 0 0 1 1 1 0 1 1 1 0 D Flip Flop T Flip Flop
  • 33. Design procedure of synchronous Sequential Circuit m f/f for upto 2m states
  • 34. Example: • Design an sequential circuit that detects 3 consecutive 1’s in the data stream.
  • 39. • Description: •  reset state(S0) (initial state of machine) • From S0 to S1 if input is 1 S0 otherwise • From state S1 to S2 if input is 1 S0 otherwise. • From S2 to S3 if input is 1 S0 otherwise • From S3 to S3 if input is 1 S0 otherwise
  • 40. Step1: Obtaining the State Diagram •A very important step in the design procedure. •Requires experience! •Example: Design a circuit that detects a sequence of three consecutive 1’s in a string of bits coming through an input line (serial bit stream) KFUPM
  • 41. Step2: Obtaining the State Table •Assign binary codes for the states •We choose 2 D-FF •Next state specifies what should be the input to each FF •Example: Design a circuit that detects a sequence of three consecutive 1’s in a string of bits coming through an input line (serial bit stream)
  • 42. Step3: Obtaining the State Equations •Using K-Maps •A(t + 1) = DA = ∑(3,5,7) = A x + B x •B(t + 1) = DB = ∑(1,5,7) = A x + B’ x •y = ∑(6,7) = A B •Example: Design a circuit that detects a sequence of three consecutive 1’s in a string of bits coming through an input line (serial bit stream) KFUPM
  • 43. Step4: Draw Circuits •Using K-Maps •A(t + 1) = DA = ∑(3,5,7) = A x + B x •B(t + 1) = DB = ∑(1,5,7) = A x + B’ x •y = ∑(6,7) = A B •Example: Design a circuit that detects a sequence of three consecutive 1’s in a string of bits coming through an input line (serial bit stream) KFUPM
  • 44. Timing Diagram (Verification) KFUPM • Question: Does it detect 111 ?
  • 45. Example 2 • Problem: Design of A Sequence Recognizer • Design a circuit that reads as inputs continuous bits, and generates an output of ‘1’ if the sequence (1011) is detected Input 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 1 1 Output 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 GPP X Y
  • 46. Example 2 (cont.) • Step1: State Diagram KFUPM Sequence to be detected:1011
  • 47. Example 2 (cont.) KFUPM • Step 2: State Table OR
  • 48. Example 2 (cont.) KFUPM • Step 2: State Table • state assignment Q: How many FF? log2(no. of states)
  • 49. Example 2 (cont.) KFUPM • Step 2: State Table • choose FF • In this example, lets use JK–FF for A and D-FF for B
  • 50. Example 2 (cont.) KFUPM • Step 2: State Table • complete state table • use excitation tables for JK–FF and D-FF D–FF excitation table JK–FF excitation table Next State output
  • 51. Example 2 (cont.) KFUPM • Step 3: State Equations • use k-map • JA = BX’ • KA = BX + B’X’ • DB = X • Y = ABX’
  • 52. Example 2 (cont.) KFUPM • Step 4: Draw Circuit • • JA = BX’ • KA = BX + B’X’ • DB = X • Y = ABX’
  • 53. Example 3 KFUPM Problem: Design of A 3-bit Counter Design a circuit that counts in binary form as follows 000, 001, 010, … 111, 000, 001, …
  • 54. Example 3 (cont.) KFUPM • Step1: State Diagram - The outputs = the states - Where is the input? - What is the type of this sequential circuit?
  • 55. Example 3 (cont.) KFUPM • Step2: State Table • No need for state assignment here
  • 56. Example 3 (cont.) KFUPM • Step2: State Table • We choose T-FF T–FF excitation table 0
  • 57. Example 3 (cont.) KFUPM • Step3: State Equations
  • 58. Example 3 (cont.) KFUPM • Step4: Draw Circuit • TA0 = 1 • TA1 = A0 • TA2 = A1A0
  • 59. Example 4 KFUPM N S E W Traffic Action EW only EW Signal green NS Signal red NS only NS Signal green EW Signal red EW & NS Alternate No traffic Previous state • Problem: Design a traffic light controller for a 2-way intersection. In each way, there is a sensor and a light
  • 60. Example 4 (cont.) KFUPM EW / 10 NS / 01 INPUTS • Sensors X1, X0 X0: car coming on NS X1 : car coming on EW 11, 10 00, 01 00, 10 11, 01 OUTPUTS • Light S1, S0 S0 : NS is green S1 : EW is green STATES • NS: NS is green • EW: EW is green • Step1: State Diagram
  • 61. Example 4 (cont.) • Exercise: Complete the design using: • D-FF • JK-FF • T-FF KFUPM
  • 62. Example 5 • Problem: Design Up/Down counter with Enable • Design a sequential circuit with two JK flip-flops A and B and two inputs X and E. If E = 0, the circuit remains in the same state, regardless of the input X. When E = 1 and X = 1, the circuit goes through the state transitions from 00 to 01 to 10 to 11, back to 00, and then repeats. When E = 1 and X = 0, the circuit goes through the state transitions from 00 to 11 to 10 to 01, back to 00 and then repeats. • KFUPM
  • 63. Example 5 (cont.) 00 01 10 11 00 01 10 11 10 11 10 11 11 00 01 00 01 10 00 01 Present State Inputs Next State FF Inputs A B E X A B JA KA JB KB 0 0 0 0 0 0 0 X 0 X 0 0 0 1 0 0 0 X 0 X 0 0 1 0 1 1 1 X 1 X 0 0 1 1 0 1 0 X 1 X 0 1 0 0 0 1 0 X X 0 0 1 0 1 0 1 0 X X 0 0 1 1 0 0 0 0 X X 1 0 1 1 1 1 0 1 X X 1 1 0 0 0 1 0 X 0 0 X 1 0 0 1 1 0 X 0 0 X 1 0 1 0 0 1 X 1 1 X 1 0 1 1 1 1 X 0 1 X 1 1 0 0 1 1 X 0 X 0 1 1 0 1 1 1 X 0 X 0 1 1 1 0 1 0 X 0 X 1 1 1 1 1 0 0 X 1 X 1 KFUPM
  • 64. Example 5 (cont.) JA = BEX + B’EX’ EX AB 00 01 11 10 00 x x x x 01 x x x x 11 0 0 1 0 10 0 0 0 1 KA = BEX + B’EX’ EX AB 00 01 11 10 00 0 0 0 1 01 0 0 1 0 11 x x x x 10 x x x x JB = E EX AB 00 01 11 10 00 x x x x 01 0 0 1 1 11 0 0 1 1 10 x x x X KB = E EX AB 00 01 11 10 00 0 0 1 1 01 x x x x 11 x x x x 10 0 0 1 1 Y X JA C A A’ KA E clock JB C B B’ KB KFUPM
  • 66. Summary • To design a synchronous sequential circuit: • Obtain a state diagram • State reduction if necessary • Obtain State Table • State Assignment • Choose type of flip-flops • Use FF’s excitation table to complete the table • Derive state equations • Use K-Maps • Obtain the FF input equations and the output equations • Draw the circuit diagram KFUPM
  • 67. 67 / 17 Example: Detect 3 Consecutive 1 inputs (Moore) State S0: zero 1s detected State S1: one 1 detected State S2: two 1s detected State S3: three 1s detected 0 ● Note that each state has 2 output arrows ● Two bits needed to encode state
  • 68. 68 / 17 State Table for Sequence Detector ● Sequence of inputs, outputs, and flip flop states in state table ● Present state indicates current value of flip flops ● Next state indicates state after next rising clock edge ● Output is current output value Present State Next State A B x A B y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 Output Input S0 = 00 S1 = 01 S2 = 10 S3 = 11
  • 69. Finding Expressions for Next State and Output Value ● Create K-map directly from state table (3 columns = 3 K-maps) ● Minimize K-maps to find SOP representations ● Separate circuit for each next state and output value
  • 70. Circuit for Consecutive 1s Detector ● Note location of state flip flops ● Output value (y) is function of state ● This is a Moore machine
  • 71. Detect 111 or 00 in input string in Mealy machine
  • 72.
  • 73.
  • 74.
  • 75. Example... There are 4 states ( 2 bit for each let A & B) state assignment done. 1 input (let x) No output (f/f states may be taken as out put) Step 1: formation of diagram already given Step 2: Obtain State Table
  • 76. • State reduction  not possible (due to out put directly taken from f/f and no two rows of state table are identical) • state assignment not required • No of flip flops for 4 states 2 f/f will be required • Type of f/f not mentioned in problem let us take J-K f/f ( most versatile)
  • 77. • Obtain Circuit excitation table
  • 79. • Simplify for each f/f input variable using K- map. Take A, B & x as input and JA as output Take A, B & x as input and KA as output Take A, B & x as input and JB as output Take A, B & x as input and KB as output
  • 80. Boolean function for each variable... • JA=Bx’ (J input of f/f A) • KA=Bx (K input of f/f A) • JB=x (J input of f/f B) • KB=Ax+A’x’ • =A(X-NOR)x (K input of f/f B)
  • 83. Present state Q(t) Input x Input y Output S Output next state Q(t+1) 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 State table
  • 86. State Table Present state A(t) Present state B(t) Output next state Q(t+1) Output next state Q(t+1) 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 There is no external input nor output so present state is taken as only input and next state as only output Input to T-f/f A TA=A+B  next state toggles if TA is 1 A(t+1)=A’(A+B)+A(A+B)’=A’B=>(next state is A’ if (A+B ) is 1 otherwise unchanged) Input to T-f/f B TB=A’+B  next state toggles if TB is 1 B(t+1)=B’(A’+B)+B(A’+B)’=A’B’
  • 87. State diagram • It is modulo 3 binary counter • Counts as 0120 • If started from 11 resets automatically to 00 00 01 10 11
  • 89.
  • 90.
  • 91. Using MUX: 4 register with 4 bits each (in course)
  • 92. • If we have k registers each of n bits • Size of MUX= MX1 (where M=2m and m is next integer obtained from m=log2(k)) • No of MUX=n
  • 95. • A typical digital computer h a s many registers, and paths must b e provided to transfer information from one register to another. • The number of wires will be excessive if separate lines are used between each register and all other registers in the system. • A more efficient scheme for transferring information between registers in a multiple-register configuration is a common bus system. • A bus structure consists of a set of common lines, one for each bit of a register, through which binary information is transferred one at a time. • Control signals determine which register is selected by the bus during each particular register transfer.
  • 96.
  • 97. Register transfer Language • Information transfer from one register to another is designated in symbolic form by means of a replacement operator. • The statement R2 R1
  • 99. Here P acts as control function, The above statement may be written as
  • 101. Micro-operations • Data Transfer micro-operations – Register to memory (write) – Memory to register (Read) – Register to register – Memory to memory (x) • Arithmetic micro-operations • Logical micro-operations • Shift micro-operations Micro-operations are the functional or atomic, operations of a processor.
  • 102. Memory transfer • Memory Read: • CPU put address on address bus, [AR is address Register] • activate control line [Memory read], • data comes out of memory and kept on data bus and transferred to CPU [DR is data Register]
  • 103. Animation of sequence of operations for memory read operation: https://electro-nx.blogspot.com/2019/02/instruction- fetch-in-microprocessor.html
  • 104. Memory transfer • Memory Read: DR M[AR] • CPU put address on address bus, • activate control line [Memory Read], • Put data on data bus • Save into DR (activate load input of DR)
  • 110.
  • 113. s2 s1 s0 output 0 0 0 AND 0 0 1 OR 0 1 0 X-OR 0 1 1 NOT 1 0 0 NAND 1 0 1 NOR 1 1 0 Left shift (upward ) 1 1 1 Right shift (downward)
  • 114. Shift micro operations Arithmetic shift Ashr  shifts right with sign bit LSB lost, sign bit remains unchanged Ashl shifts left with 0 inserted at LSB, sign may change overflow Over flow detection rotate
  • 116. ALU Design 1 bit ALU; For multiple bits, add in series
  • 117.
  • 118. Instruction set architecture • Stored program organization
  • 119. Opcode: tells operation to be performed Address: gives address of operand, this may be used in some operations like complement Accumulator, clear AC, increment AC
  • 122.
  • 123. Bus Design for the register set
  • 129. Timing and Control Master clock pulse to all sequential ckts Just clock will change the state of seq ckt  cotrol signal also required Control signal gen from control unit and given to MUXes etc. Control Unit: 1. Hard wired 2. microprogrammed
  • 130.
  • 131.
  • 133.
  • 134. To provide the data path fro AR PC we must use T0 signal to get following: During next clock pulse (T1): Hence T1 is used to make following connection paths:
  • 137. AND to AC ADD to AC Load to AC Store AC Branch Unconditional
  • 138. BSA: Branch and save return address
  • 139. ISZ: Increment (Memory) and skip (next instruction) if (incremented value) zero
  • 140. Register Reference Instruction: CPU design https://www.youtube.com/watch?v=q8 PUsw-xvjs
  • 141.
  • 142. Input output and Interrupt: Serial comm Serial comm Parallel comm Parallel comm Output flag Input flag
  • 145. Due to inclusion of Interrupt cycle, we need to modify the instruction cycle:
  • 147.
  • 148.
  • 149.
  • 150. Control Logic of AR: Hence different control inputs ( load, clear and increment) are:
  • 151.
  • 152. D0T5:AC AC^DR D1T5: AC AC+DR D2T5: AC DR rB11: AC0 rB9: AC AC’ rB7:------ rB6: ------ rB5: ACAC+1 pB11:AC(7-0)INPR LD(AC): D0T5+D1T5+D2T5+rB9+rB7+rB6+pB11 Clear(AC): rB11 INR(AC): rB5 Accumulator Logic development