ESD #2 Processors
ESD #2 Processors
#2 Processors
• Introduction
• Combinational logic
• Sequential logic
• Custom single-purpose processor design
• RT-level custom single-purpose processor design
source
gate Conducts
if gate=1
1 drain
gate
IC package IC oxide
source channel drain
Silicon
substrate
x x
x F x F F
x y F yx F x y F x
F y F
0 0 y 0 0 0 0 0 0 y 0 0 0
1 1 0 1 0 0 1 1 0 1 1
F=x F=xy 1 0 0 F=x+y 1 0 1 F=xÅy 1 0 1
1 1 1 1 1 1 1 1 0
Driver AND OR XOR
x F x F x x y F x x y F x x y F
F
0 1 y
F
0 0 1 y 0 0 1 y
F 0 0 1
1 0 0 1 1 0 1 0 0 1 0
1 0 1 1 0 0
F = xʼ F = (x+y)ʼ 1 0 0
1 1 1
Inverter F = (x y)ʼ 1 1 0 NOR 1 1 0 F = (x Å y)ʼ
NAND XNOR
z = ab + bʼc + bcʼ
I
n
load n-bit shift n-bit
n-bit
Register Shift register Counter
clear I Q
n n
Q Q
Q= Q = lsb Q=
0 if clear=1, - Content shifted 0 if clear=1,
I if load=1 and clock=1, - I stored in msb Q(prev)+1 if count=1 and clock=1.
Q(previous) otherwise.
a=1 a=1
a=0
1
a=1
2
a=0
• Given this implementation model
x=0 x=0
• Sequential logic design quickly reduces
to combinational logic design
F) Combinational Logic
a
x
I1
I0
Q1 Q0
… …
external external
control data controller datapath
inputs inputs
… …
datapath next-state registers
control and
controller inputs datapath control
logic
datapath
control state functional
outputs register units
… …
external external
control data
outputs outputs
… …
J:
next statement
units 5: !(x!=y)
!= < subtractor subtractor
• Based on reads and x!=y
5: x!=y 6: x<y 8: x-y 7: y-x
writes 6: x_neq_y
d_o
• Create unique identifier 6-J:
2:
1 !(!go_i) 0000 1:
1 !(!go_i) FSMD
0001 2:
!go_i
2-J:
00102-J:
!go_i
• Replace complex
3: x = x_i x_sel = 0
0011 3: x_ld = 1 actions/conditions with
4: y = y_i
y_sel = 0
datapath configurations
x_i y_i
0100 4: y_ld = 1
!(x!=y) Datapath
5: !x_neq_y
0101 5:
x!=y x_sel
x_neq_y n-bit 2x1 n-bit 2x1
6: 0110 6: y_sel
x<y !(x<y) x_lt_y !x_lt_y x_ld
0: x 0: y
7: y = y -x 8: x = x - y 7: y_sel = 1 8: x_sel =1
y_ld = 1 x_ld = 1 y_ld
d_o
… …
Problem Specification
state machine Send
rdy_in
Bridge Rec
er A single-purpose processor that rdy_out eive
• Rather than algorithm clock
converts two 4-bit inputs, arriving
one at a time over data_in along
r
(RT) level
rdy_in=0
• Exercise: complete the Send8Start
Send8End
Inputs
rdy_in: bit; data_in: bit[4];
design data_out=data_
hi & data_lo rdy_out=0
Outputs
rdy_out: bit; data_out:bit[8]
rdy_out=1 Variables
data_lo, data_hi: bit[4];
(a) Controller
rdy_in=0 rdy_in=1
rdy_in=1
WaitFirst4 RecFirst4Start RecFirst4End
data_lo_ld=1
Send8Start Send8End
data_out_ld=1 rdy_out=0
rdy_out=1
rdy_in rdy_out
clk
data_in(4) data_out
data_lo_ld
data_out_ld
data_hi_ld
data_hi data_lo
registers
to all
data_out
(b) Datapath
x!=y
9: d_o = x
6: merge state 5 and state 6 ‒ transitions from
x<y !(x<y) state 6 can be done in state 5
y = y -x 8: x = x - y
7:
eliminate state 5J and 6J ‒ transitions from each
6-J: state can be done from state 7 and state 8,
respectively
5-J:
eliminate state 1-J ‒ transition from state 1-J
d_o = x can be done directly from state 9
9:
1-J:
• State encoding
• task of assigning a unique bit pattern to each state in an FSM
• size of state register and combinational logic vary
• can be treated as an ordering problem
• State minimization
• task of merging equivalent states into a single state
• state equivalent if for all possible input combinations the two states generate
the same outputs and transitions to the next same state