SLIDE 4 4
7 of 12
Iterative Combinational Circuits
- General structure: n identical modules
– For problems that can be solved by an iterative algorithm:
1. Set C0 to its initial value and set i to 0 2. While i < n repeat:
a) Use Ci an PIi to determine the values of POi and Ci+1 b) Increment i a
PI PO CI CO module C0 PI0 C1 PO0 boundary inputs cascading input cascading
PI PO CI CO module PI1 C2 PO1 PI PO CI CO module Cn POn–1 boundary
PIn–1 Cn–1 primary inputs primary outputs
8 of 12
An Iterative Comparator Circuit
- (a) module for one bit
- (b) complete circuit
– Comparing two n-bit values X and Y:
- 1. Set EQ0 to 1 and set i to 0
- 2. While i < n repeat:
a) If EQi is 1 and Xi equals Yi, set EQi+1 to 1 Else set EQi+1 to 0 b) Increment i
- Slow because the cascading signals
need time to “ripple” from left to right
first input has to be 1
EQO = (A B) · EQI
EQO CMP X Y EQI
(a)
X0 Y0 1 EQ1 EQO EQI CMP X Y X1 Y1 EQ2 EQO EQI CMP X Y X2 Y2 EQ3 EQO EQI CMP X Y X(N–1) Y(N–1) EQN EQO EQI CMP X Y EQ(N–1)
(b)