Intro To Sequential Logic: CS 64: Computer Organization and Design Logic Lecture #14 Winter 2019
Intro To Sequential Logic: CS 64: Computer Organization and Design Logic Lecture #14 Winter 2019
to Sequential Logic
• Sequential Logic
• S-R Latch
• D-Latch
A0 B0 S A1 B1 S A2 B2 S A3 B3 S A31 B31 S
…
ALU
ALU
ALU
ALU
ALU
1bit
1bit
1bit
1bit
1bit
Co Ci
R0 R1 R2 R3 R31
• Combinatorial Logic
– Combining multiple logic blocks
– The output is a function only of the present inputs
– There is no memory of past “states”
• Sequential Logic
– Combining multiple logic blocks
– The output is a function of both the present inputs and past inputs
– There exists a memory of past “states”
2/26/19 Matni, CS64, Wi19 7
The S-R Latch
• Only involves 2 NORs
• Just avoid S = 1, R = 1…
• So, the truth table would change from a “normal” S-R Latch:
S R Q0 Comment
S R E Q0 Comment
0 0 Q* Hold output
X X 0 Q* Hold output
0 1 0 Reset output
0 1 1 0 Reset output
1 0 1 Set output
1 0 1 1 Set output
1 1 X Undetermined
We got rid of the “undetermined” state!!! JJJ
2/26/19 Matni, CS64, Wi19 12
Combining R and S inputs into One:
The Gated D Latch
• Force S and R inputs D S
to always be opposite Q
of each other
E
– Make them the same as
an input D, R Q
where D = S and !D = R.
D Q
E Q
Lab 7 (Task 2) R1
The second register to read, as a single bit.
If 0, then reg0 should be read. If 1,
then reg1 should be read.
“Write Register”. Specifies which register
to write to. If 0, then reg0 should be
WR
written to. If 1, then reg1 should be
written to.
The data that should be written to the
W register specified by WR. This is a single
bit.
“Write Enable”. If 1, then we will write to
a register. If 0, then we will not write to a
WE register. Note that if WE = 0, then the
inputs to WR and W are effectively
ignored.
Value of the first register read. As
described previously, this depends on
O1
which register was selected to be read,
This will be made from D-FFs or D-Latches via R0.
and Combinatorial Logic
Value of the second register read. As
described previously, this depends on
O2
which register was selected to be read,
via R1.
2/26/19 Matni, CS64, Wi19 18
Memory Interface I/O Name I/O Description
• REQUIREMENT:
Use ONLY 1 register block, 1 ALU,
and 1 memory interface
2/26/19 Matni, CS64, Wi19 22
YOUR TO-DOs
• Lab 7
– Start on Thursday
– Due back on Wednesday
– Paper copy – not electronic
– Drop off in the CS64 BOX in HFH 2nd Floor