Professional Documents
Culture Documents
Fall 2002
uPC REGISTER
words
ADDRESS
0 cond0
0 1 COND 2 MUX
DATA out
POLARITY NEXT ADDRESS LOGIC NEXT ADDRESS POLARITY SELECT BRANCH BRANCH COND OTHER ADDRESS SELECT
cond1 3 1
To Architecture
10
Decoder
/
10
Push SP2
Pop SP2
Stack Pointer
reset clk
ARn 10
Down Counter 10
\ \
4 levels of nesting
Enable
From PC 10/
10/
PushSP1 or load SA Enable
3 stacks
incremented
Decoder
incremented
Decoder
incremented or Current
Decoder
ARn Current
/
10
Current
2 PC
10
10
10
/ Stack Pointer /
2 reset clk
Comparator
XOR 10 NOR
reset clk
Down Counter
Dec load
10
NOR
AND
load Start Address
AND
To Stack Pointer Loop End Flag
reset
clk
reset
clk
/
\
10
To Down Counter
Counter, 10 bit
\
\
\ \ \
Rise Delay
0, x or z t_rise
Fall Delay
1, x or z
t_fall
Turnoff Delay
Gate output transition to the high impedance value (z) from another value
$setup and $hold check clock data Setup hold time time
The setup time is the minimum time the data must arrive before the active clock edge. The hold time is the minimum time the data cannot change after active clock edge
Mix/Typ/Max Values
The delay values ranges between min and max because of the IC process fabrication variation Min val
The min value is the minimum delay value that the designer expects the gate to have
Typ val
The typical delay value the desingner expects the gate to have.
Max value
The max delay value the designer expects the gate to have.
Adv. Digital Design By Dr. Shoab A. Khan
Delays are specified on a per element basis module M(out, a, b, c, d); output out; M e a input a, b, c, d; #5 b assign #5 e = a & b; #4 assign #7 f = c & d; c f assign #4 out = e & f; #7 d endmodule
out
Lumped Delay Delay is specified on per module basis module M(out, a, b, c, d); output out; input a, b, c, d; assign e = a & b; assign f = c & d; assign #11 out = e & f; endmodule
a b c d
e out f
Pin-to-pin Delays
Delay are assigned individually from each input to each output
aM b c d
e out f
Path a-e-out, delay = 9 Path b-e-out, delay = 9 Path c-f-out, delay = 11 Path d-f-out, delay = 11
Adv. Digital Design By Dr. Shoab A. Khan
module M(out, a, b, c, d); output out; input a, b, c, d; specify (a => out) = 9; (b => out) = 9; (c => out) = 11; (d => out) = 11; endspcify assign e = a & b; assign f = c & d; assign #11 out = e & f; endmodule
(<source_field> => <destination_field>) = <delay_value>; bit to bit connection, a and out are single-bit
(a => out) = 9
Destination 2 Field
module M(out, a, b, c, d); output out; input a, b, c, d; specify (a, b *> out) = 9; (c, d *> out) = 11; 0 endspcify 1 assign e = a & b; Source assign f = c & d; Field 2 assign out = e & f; endmodule
Adv. Digital Design By Dr. Shoab A. Khan
0 1 Destination 2 Field
specparam statement
Special parameters is used inside a specify block specify specparam d_to_q = 9; specparam clk_to_q = 11; (d => q) = d_to_q
Pin-to-pin timing can be expressed in more detail by specifying rise, fall and turn-off delay values. specparam t_rise = 9, t_fall=13; (clk => q) = (t_rise, t_fall); specparam t_rise = 9, t_fall=13, t_turnoff=11; (clk => q) = (t_rise, t_fall, t_turnoff);
Min, max and typical values can also be specified for pin-to-pin delays. Specparam t_rise=8:9:10, t_fall=12:13:14, t_turnoff=10:11:12; (Clk => q) = (t_rise, t_fall, t_turnoff);
An example of Min, max and typical delays Module VAND(out, in0, in1); input in0; input in1; output out; //timing information Specify (in0 => out) = (0.26:0.513:0.955,0.255:0.503:0.936); (in1 => out) = (0.26:0.513:0.955,0.255:0.503:0.936); endspecify and(out,in0,in1); endmodule
FPGA
Most common is a lookup table (LUT) containing storage cells used to implement a small logic function Each storage cell holds a 0 or 1 LUT size is determined by the number of inputs LUT with n inputs can implement any logic function of n variables
Logic block
I/O block
I/O block
I/O block
Structure of an FPGA
Adv. Digital Design By Dr. Shoab A. Khan
(b) f 1 = x1 x2 + x1 x2
Figure 3.37 A three-input LUT Adv. Digital Design By Dr. Shoab A. Khan
Example
How would you implement f = abc + ac in a LUT abc 000 001 010 011 100 101 110 111 f 0 0 1 0 0 1 0 1
a b 0 0 1 0 0 1 0 1 c
Adv. Digital Design By Dr. Shoab A. Khan
Often a DFF is included in the logic block to store the value of the D Input
Select