Professional Documents
Culture Documents
Falling edge-triggered
D flip-flop Q
Clk
0
C. E. Stroud Latches & Flip-flops (10/12) 11
Serial Shift Register Example
• A series of D flip-flops whose outputs are connected
to the input of the next flip-flop
serial-in, serial-out = data in on Din, data out on Qc
serial-in, parallel-out = data in on Din, data out on Qa, Qb,
and Qc Din Qa Qb Qc
Clk
Shift/Load Qa Qb Qc
C. E. Stroud Latches & Flip-flops (10/12) 13
PSIM Architecture
Sequential Logic:
Program Memory (MEM)
Program Counter (PC)
Address Register (AR)
Data Register (DR)
Input Register (IN)
Output Register (OR)
Accumulator (AC)
ALU Carry Register (C)
Instruction Register (IR)
Timing Counter (TC)
Combinational Logic:
Control Logic
Arithmetic/Logic Unit (ALU)
Multiplexers 1&2 (MUX)
C. E. Stroud Latches & Flip-flops (10/12) 14
Another Register Example
• A series of multiplexers and D flip-flops whose
outputs are connected to the input of the MUX
Register with active high Load
• Load = 1 & rising edge of clock: parallel-in, parallel-out =
data in on Da, Db, and Dc; data out on Qa, Qb, and Qc
• Otherwise: Holds data; data out remains on Qa, Qb, and Qc
Basic register design used in PSIM for:
• AR, DR, OR, IN (all 8-bits) and IR (4-bits)
Da Db Dc
0 0 0
1 1 1
Clk
Load
Qa Qb Qc
C. E. Stroud Latches & Flip-flops (10/12) 15
Accumulator Register Example
• Accumulator in PSIM AC-C2
ACi
Functions controlled DRi 0
by combinational AC-C1 DRi
1
logic design ACi
• Including holding data 2
Cin Sumi
when no operations 3
are specified
ACi adder Zi ACi
8
8-bit words 8 DIN
MADD(7-0) ADD
• Input data = 8-bits
From DR MEM
• Output data = 8-bits WR-MEM WE
DOUT
From MEM
8
Active high write enable MEM(7-0)
• WR-MEM (to DR)
DI
enable W0
LD Word0
ADD(7-0)
• Produces active high DO
DECODE
8
ADD(7-0)
enables to registers 8 8
Registers with parallel DI
MUX
W255 DOUT
load WR
LD Word255
DO
8
DI
parallel load Wi
LD Word0
DO
8 D-latches with active high
8
enable WORDi
DI0 DI7
D Q D Q
D active active
Q LDi high high
E Q’ E Q’
E
Q DO0 DO7
MUX
DOUT
• Read MUX 8
Word255 8
8 256-to-1 MUXs
8
Functional equivalent ADD0’
ADD1’ ADD(7-0)
ADD2’
example
ADD3’
• Address decoder ADD4’
ADD5’
8 inverters DOUTi
ADD0’ ADD0
W0
ADD1’ ADD1
DECODE
ADD2 ADD2
ADD(7-0) ADD3 ADD3
ADD4’ W12
8 example ADD4
ADD5’ ADD5
W255 ADD6’ ADD6
WR ADD7’ ADD7
WR Word255Bi
C. E. Stroud Latches & Flip-flops (10/12) 20
What is Sequential Logic?
• A collection of logic gates and flip-flops
The logic values stored in the flip-flops establish the
current state of the sequential logic circuit
The logic values at the inputs in conjunction with the
current state determines the next state of the sequential
logic circuit after the active edge of the clock
Primary Primary
Inputs Comb Outputs
Logic generalized architecture
for sequential logic circuits
Current Flip- Next also known as
State Flips State Huffman model
1 excitation table
Clk Q
Q Q+ T
characteristic table 0 0 0
logic diagram
T Q+ Mode 0 1 1
0 Q Storage 1 0 1
1 Q’ Toggle 1 1 0