Digital Logic Circuits (Part 2) Digital Logic Circuits (Part 2)
Digital Logic Circuits (Part 2) Digital Logic Circuits (Part 2)
Digital Logic
Logic Circuits
Circuits
(Part
(Part 2)
2)
Computer Architecture
Implementing DeMux in MultiSIM
• MultiSIM does not include a classical DeMux
– It includes a generic decoder (DCD_2TO4, DCD_3TO8, and
DCD_4TO16) that can be adapted to operate as a DEMUX as shown
below:
• Basically need to invert the input and the outputs to/from DCD_2TO4
Timing
• Gates take time to work
– Outputs don’t stabilize for some time
• Stabilization time is usually in nanoseconds
• Gate delays compound in circuits
– Final output is not ready until all gates are stable
• Propagation delay
– Time taken for changes at the input to propagate to output
– Typically, the longest path from input to output
• This is often called the “critical path” in a circuit
Example
A A•B
2ns
B A•B•C•D
2ns
C
2ns
D C•D
A.B
A.B.C
C
2ns
1ns
0
Clock Example
• Clocked I/O
– Minimum clock period = 4ns
– Maximum Frequency = 1/4ns = 250 MHz
A
2ns A•B•C
Clock 2ns
2ns
B
4 ns
Triggering
• Clocks transitions are used in different ways
– Level triggering
• When clock is in a given state
– Edge triggering
• Raising edge triggered
– When the clock is in transition from 0 → 1
• Falling edge triggered
– When the clock is in transition from 1 → 0
Rising Falling
edge Clock edge
Latches
• Latches maintain state
– Can be set to a specific value
– Output of latches does not change even after
Inputs change to 0!
• Fundamental units for storage
– Building blocks for memory
• Latches always store data when the clock is
at a fixed level
– Hence they are also called as level triggered
device
Set-Reset (SR) Latch
S
Q
Q
R
S R Q
0 0 No change
1 0 1
0 1 0
1 1 Unstable
Clocked S-R Latch
S Q
Clock /
Enable
Q
R
Clock /
Enable
Q
CK CK
D Q D Q
CK CK
D Q D Q D Q D Q
CK CK CK CK
4 X 1 Multiplexer
Select Lines
Word
• A fixed number of D-Flip Flops
– Usually powers of 2 (2, 4, 8, 16, 32, 64)
– Operate as a single unit
• Store/Read n-bits at a time
D0 D1 D2 D3
D Q D Q D Q D Q
CK CK CK CK
Q Q1 Q Q3
0 2
Reading & Writing Words
• A fixed number of D-Flip Flops
I1 I2 I3
S0
O1 O2 O3
CLK RD
(1=Read, O=Write)
Random Access Memory (RAM)
• RAM is the common form of main memory that is used to
store data and programs in modern computers.
– It is typically designed as a collection of flip flops as shown in
the previous slide
• However fabrication technology is different to reduce cost and
improve transistor densities
– Terminology:
• Lines that carry input or output data are referred to as data lines or
data bus
• The select lines associated with the Mux and DeMux are called the
address bus
– The selection data is called address
– In programming terminology it is called a pointer or a reference.