Chapter 06 Synthesis of VHDL Code 6
Chapter 06 Synthesis of VHDL Code 6
Fundamental limitations of
1
EDA software
1 2 Realization of VHDL operator
6 2
3 Realization of VHDL data types
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
value_expr_1 T 00 F
The diagram is refined further
sig
In Chapters 4 and 5, we value_expr_2 T F
2
boolean_expr_2
Bus conceptual diagram
boolean_expr_1
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
1
SYNTHESIS OF VHDL CODE SYNTHESIS OF VHDL CODE
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE
Developing a large digital circuit The ideal scenario is that human designers would only need to
is a complicated process and develop a high-level behavioral description and EDA software would
involves many difficult tasks. perform:
2
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE
The limitation comes from The core is the algorithms that
the theoretical study of perform the transformation or
computational algorithms. optimization,
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE
Although the shell is
important, the core
algorithms ultimately
determine the quality
and efficiency of the
software tool.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 1. COMPUTABILITY 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 1. COMPUTABILITY
If an algorithm exists, the problem is computable.
• Otherwise, the problem is uncomputable.
An example of an uncomputable
problem is the “halting problem.”
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
3
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
The computation complexity can be further divided into: Since most statements on time complexity can be applied to
space complexity as well,
• time complexity • space complexity • in the remaining section we focus on time complexity.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
Type of
Compiler The order is defined as follows
processor
• Given two functions, f(n) and g(n),
01 03 05
• we say that f(n) is O(g(n)) (pronounced as f(n) is big-O
02 04 of g(n) or f(n) is of order g(n)) if two constants, n0 and
The size of Programming Personal
the input
c can be found to satisfy:
language coding style
• f(n) < cg(n) for any n, n > n0
Instead of determining the exact function for computation
time, we usually consider only the order of this function.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
4
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
The g(n) function is normally a simple function, such as n, Big-O notation is essentially a scaling
nlog2n, n2, n3 or 2n. factor or growth rate, indicating the
For example, all the following functions are O(n2): resources needed as input size
increase.
0.1n2
n2+5n+9 Commonly • O(1), O(n),
encountered • O(log2n), O(nlog2n),
500 n2 + 1000000
orders are:
• O(n2), O(n3)
• and O(2n).
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
O(n2) and O(n3) have faster growth O(2n) indicates the exponential
rates growth rate and the
computation time increases
and the required computation geometrically.
resources become more significant
as the input size increases. Note that an increment of 1 in
input size doubles the
computation time.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
5
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
8 combinations
One way to test a combinational circuit
3 input
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE. 6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION 2. COMPUTATION COMPLEXITY. BIG-O NATATION
264
6
600,000 years
10 * 60 * 60 * 24 * 365
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6
6.1. FUNDAMENTAL LIMITATIONS OF EDA SOFTWARE.
2. COMPUTATION COMPLEXITY. BIG-O NATATION CHAPTER 6
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
5 3
6
4 VHDL synthesis flow .4 Synthesis support for other operator
4 Realization of an operator with
5 Timing considerations .5 constant operands
.6 An example implementation
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Logical operators can be mapped directly to logic gates, and their The xor and xnor operators are slightly
synthesis is straightforward.
more involved
y <= a and b; VHDL Statement
7
6.2. REALIZATION OF VHDL OPERATORS 6.2. REALIZATION OF VHDL OPERATORS
1. REALIZATION OF LOGICAL OPERATORS 1. REALIZATION OF LOGICAL OPERATORS
• the area of the circuit grows linearly with the number of a(0)
y(0)
a(4)
y(4)
b(0) b(4)
input bits (i.e., on the order of O(n)), a(1)
y(1)
a(5)
y(5)
b(1) b(5)
of O(1)). a(3)
b(3)
y(3)
a(7)
b(7)
y(7)
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
8
CONTENTS of CHAPTER 6 6.2. REALIZATION OF VHDL OPERATORS
Fundamental limitations of
1
EDA software .1 Realization of logical operators
5 3
6
4 VHDL synthesis flow .4 Synthesis support for other operator
4 Realization of an operator with
5 Timing considerations .5 constant operands
.6 An example implementation
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
There are six relational operators in VHDL: According to their hardware implementation, these operators
=, Compare circuit can be divided into
Oa>=b
/=, a 2 Oa>b
Oa/=b
• The equality group,
Oa=b Compare circuit
<, b 2
Oa<b
which includes the = Oa>=b
<=, Oa=<b
and /= operators, 2 Oa>b
a Oa/=b
> and • The greater-less group, 2
Oa=b
b Oa<b
which includes the other
=>. Oa=<b
four operators.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
2
Oa=b eq (a0 b0 ).(a1 b1 ).(a2 b2 ) a(1)
b Oa<b b(1) eq
a(2)
eq (a0 b0 ).(a1 b1 ).(a 2 b2 ).(a3 b3 )
Oa=<b b(2)
a(3)
b(3)
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
9
6.2. REALIZATION OF VHDL OPERATORS 6.2. REALIZATION OF VHDL OPERATORS
2. REALIZATION OF RELATIONAL OPERATORS 2. REALIZATION OF RELATIONAL OPERATORS
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
In the greater-less group, the Oa>=b This leads to larger area and
Oa>b
operation exhibits a strong data a 2
Oa=b
Oa/=b
propagation delay.
2
dependency of input bits. b Oa<b
Oa=<b
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
10
6.2. REALIZATION OF VHDL OPERATORS
2. REALIZATION OF RELATIONAL OPERATORS CHAPTER 6
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
5 3
6
4 VHDL synthesis flow .4 Synthesis support for other operator
4 Realization of an operator with
5 Timing considerations .5 constant operands
.6 An example implementation
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
11
6.2. REALIZATION OF VHDL OPERATORS 6.2. REALIZATION OF VHDL OPERATORS
3. REALIZATION OF ADDITION OPERATORS 3. REALIZATION OF ADDITION OPERATORS
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
5 3
6
4 VHDL synthesis flow .4 Synthesis support for other operator
4 Realization of an operator with
5 Timing considerations .5 constant operands
.6 An example implementation
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
12
6.2. REALIZATION OF VHDL OPERATORS 6.2. REALIZATION OF VHDL OPERATORS
4. SYNTHESIS SUPPORT FOR OTHER OPERATORS 4. SYNTHESIS SUPPORT FOR OTHER OPERATORS
Synthesis support for other more complicated operators is Some high-end synthesis software can automatically derive
sporadic.
• multiplication operator (*) and
It depends on:
• shift operators
• individual synthesis software,
• (sll, srl, sla, sra, rol and ror of VHDL, and
• the width of the input operands
• as well as the targeted device technology. • shift-left, shift right, rotate-left and rotate
right of the IEEE numeric std library).
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
13
CONTENTS of CHAPTER 6 6.2. REALIZATION OF VHDL OPERATORS
Fundamental limitations of
1
EDA software .1 Realization of logical operators
5 3
6
4 VHDL synthesis flow .4 Synthesis support for other operator
4 Realization of an operator with
5 Timing considerations .5 constant operands
.6 An example implementation
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
The operands of VHDL operators can sometimes be a For example, consider the following code segment:
constant expression,
constant OFFSET: integer := 8;
• which does not depend on the value of any input signal. signal boundary: unsigned(8 downto 0);
signal overflow: std_logic;
Operator with all constant operands ...
Operator with partial constant operands overflow <='1' when boundary > (2**OFFSET-1) else
'0';
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
14
6.2. REALIZATION OF VHDL OPERATORS 6.2. REALIZATION OF VHDL OPERATORS
5. REALIZATION OF AN OPERATOR WITH CONSTANT OPERANDS 5. REALIZATION OF AN OPERATOR WITH CONSTANT OPERANDS
x3 .x2 .x1.x0
x3 .x2 .x1.x0 x3 x2 x1 x0
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
5 3
6
4 VHDL synthesis flow .4 Synthesis support for other operator
4 Realization of an operator with
5 Timing considerations .5 constant operands
.6 An example implementation
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
15
6.2. REALIZATION OF VHDL OPERATORS 6.2. REALIZATION OF VHDL OPERATORS
6. AN EXAMPLE IMPLEMENTATION 6. AN EXAMPLE IMPLEMENTATION
It will be helpful to have a comprehensive table that lists the Table 6.2 shows one synthesis result for several
areas and delays of synthesizable operators. representative operators of different input widths in a 0.55-
micron CMOS standard-cell technology.
However, because of the complexity of the synthesis
process and device technology,
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
16
CONTENTS of CHAPTER 6 6.3. REALIZATION OF VHDL DATA TYPES
Fundamental limitations of
1
EDA software
1 2 Realization of VHDL operator .1 Use of the std-logic data type
6 2
3 Realization of VHDL data types 3 Use and realization of the ‘Z’
3 .2
5 3 4 VHDL synthesis flow 3 value
4
.3 Use of the ‘-’ value
5 Timing considerations
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. REALIZATION OF VHDL DATA TYPES. 1. USE OF THE STD-LOGIC DATA TYPE 6.3. REALIZATION OF VHDL DATA TYPES. 1. USE OF THE STD-LOGIC DATA TYPE
VHDL supports a rich set of data types. Recall that there are nine
possible values in the
During synthesis, these data types must be mapped into
std_logic data type.
binary representations so that they can be realized in a
physical circuit.
Among them, ‘0’ and ‘1’
are interpreted as logic 0
and logic 1 and are used in
regular synthesis.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. REALIZATION OF VHDL DATA TYPES. 1. USE OF THE STD-LOGIC DATA TYPE 6.3. REALIZATION OF VHDL DATA TYPES. 1. USE OF THE STD-LOGIC DATA TYPE
‘L’ and ‘H’ are interpreted ‘U’, ‘X’ and ‘W’ are
as weak 0 and weak 1, as in meaningful only in
wired logic. modeling and simulation,
Since modern device and they cannot be
technologies no longer use synthesized.
this kind of circuitry, the
two values should not be
used.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
17
6.3. REALIZATION OF VHDL DATA TYPES. 1. USE OF THE STD-LOGIC DATA TYPE 6.3. REALIZATION OF VHDL DATA TYPES. 1. USE OF THE STD-LOGIC DATA TYPE
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. REALIZATION OF VHDL DATA TYPES 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
18
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
+VCC +VCC
+VCC
R1 R2 R3 R3
R3
Q4
Q4
Q4
Input Q2
Q1 D1
Output
D1
D3 High – Z output D1
High – Z output
Enable D2 Q3
Q5
R4 Q3
Q3
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
19
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
20
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
VHDL description of a Most FPGA and memory devices utilize bidirectional I/O pins.
bidirectional I/O port
The schematic of a simple circuit with bidirectional I/O port,
bi, is shown in Figure
As a silicon device packs more
dir
circuitry into a chip, the number of dir
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE
dir
The VHDL segment for the
dir
sig_out
sig_out
tow-buffer diagram is bi
bi
sig_in
sig_in
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
21
6.3. USE OF THE STD-LOGIC DATA TYPE. 2. USE AND REALIZATION OF THE ‘Z’ VALUE CHAPTER 6
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.3. USE OF THE STD-LOGIC DATA TYPE. 3. USE OF THE ‘-’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 3. USE OF THE ‘-’ VALUE
Don't-care is not a valid Don't-care is not a valid logic value in Boolean algebra but is
logic value in Boolean used to facilitate the design process.
Input Output
algebra but is used to Input Output req code
facilitate the design process. req code 1 - - 1 0
1 0 0 1 0 0 1 - 0 1
0 0 1 0 0
Don't-care can be used as 1
1
0
1
1
0
1
1
0
0 0 0 0 0 0
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
22
6.3. USE OF THE STD-LOGIC DATA TYPE. 3. USE OF THE ‘-’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 3. USE OF THE ‘-’ VALUE
6.3. USE OF THE STD-LOGIC DATA TYPE. 3. USE OF THE ‘-’ VALUE 6.3. USE OF THE STD-LOGIC DATA TYPE. 3. USE OF THE ‘-’ VALUE
6.3. USE OF THE STD-LOGIC DATA TYPE. 3. USE OF THE ‘-’ VALUE CHAPTER 6
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
23
CONTENTS of CHAPTER 6 6.4. VHDL SYNTHESIS FLOW
Fundamental limitations of
1
EDA software 5 .1 RT-level Synthesis
1 2 Realization of VHDL operator
5 .2 Module generator
6 2
3 Realization of VHDL data types
5 .3 Logic synthesis
5 3 4 VHDL synthesis flow
4
5 Timing considerations
5 .4 Technology mapping
6 Synthesis guidelines
5 .5 Effective use of synthesis Software
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
24
6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS RT-LEVEL
CODE
DATA
FILE
6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS RT-LEVEL
CODE
DATA
FILE
Predesigned Predesigned
• from an RT-level netlist to
Module generator Module generator
module library module library
a gate-level netlist and Logic synthesis gate library Logic synthesis gate library
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS
RT-level synthesis RT-LEVEL DATA The components can be RT-LEVEL DATA
CODE FILE CODE FILE
transforms a COMPONENT
LIBRARY
classified into three COMPONENT
LIBRARY
RT-level synthesis and PROCESS RT-level synthesis and PROCESS
behavioral VHDL optimization categories: optimization
circuit
netlist
functional units, netlist
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS
functional units RT-LEVEL
CODE
DATA
FILE
routing units RT-LEVEL
CODE
DATA
FILE
COMPONENT COMPONENT
optimization optimization
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
25
6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS
storage units. RT-LEVEL
CODE
DATA
FILE
RT-LEVEL
CODE
DATA
FILE
COMPONENT COMPONENT
sequential circuits
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS
RT-level synthesis RT-LEVEL
CODE
DATA
FILE
Some optimization RT-LEVEL
CODE
DATA
FILE
includes the derivation COMPONENT
LIBRARY techniques, such as: COMPONENT
LIBRARY
RT-level synthesis and PROCESS RT-level synthesis and PROCESS
and optimization of an optimization optimization
operator sharing,
netlist netlist
6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 1. RT-LEVEL SYNTHESIS
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
26
CHAPTER 6 CONTENTS of CHAPTER 6
Fundamental limitations of
1
EDA software
1 2 Realization of VHDL operator
6 2
3 Realization of VHDL data types
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW 6.4. VHDL SYNTHESIS FLOW. 2. MODULE GENERATOR
5 .3 Logic synthesis
• and can be y <= a and b; VHDL Statement
mapped directly
5 .4 Technology mapping into gate-level
implementation. a
5 .5 Effective use of synthesis Software b
y
Hardware
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW. 2. MODULE GENERATOR 6.4. VHDL SYNTHESIS FLOW. 2. MODULE GENERATOR
The other components They usually show some
Predesigned Predesigned
are quite complex Module generator
module library kind of repetitive structure Module generator
module library
and sometimes are known
• and need special software, Logic synthesis gate library
as regular logic. Logic synthesis gate library
27
6.4. VHDL SYNTHESIS FLOW. 2. MODULE GENERATOR 6.4. VHDL SYNTHESIS FLOW. 2. MODULE GENERATOR
A module generator can
Predesigned
produce modules in Module generator
module library
different levels of detail:
Logic synthesis gate library
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW 6.4. VHDL SYNTHESIS FLOW. 3. LOGIC SYNTHESIS
.1 RT-level Synthesis Logic synthesis is the RT-LEVEL
5 netlist
process of generating a
structural view Predesigned
.2
Module generator
• using an optimal
.3
Logic synthesis gate library
5 Logic synthesis number of generic
primitive gate-level Gate-level
.4
netlist
28
6.4. VHDL SYNTHESIS FLOW. 3. LOGIC SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 3. LOGIC SYNTHESIS
At this level, a circuit can RT-LEVEL
netlist
RT-LEVEL
netlist
be expressed by a
Predesigned Predesigned
Boolean function, Module generator
module library
Module generator
module library
• and these generic Logic synthesis gate library Logic synthesis gate library
components are
Gate-level Gate-level
essentially the operators netlist netlist
of Boolean algebra.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW. 3. LOGIC SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 3. LOGIC SYNTHESIS
Logic synthesis can be RT-LEVEL
netlist
An example is shown Other two-level forms can easily
divided into two-level a b c d e be derived from the sum-of-
synthesis and multilevel Module generator Predesigned
module library products form.
synthesis. y a b c d e
Logic synthesis gate library
The most commonly used
two-level form is the Gate-level
netlist y
6.4. VHDL SYNTHESIS FLOW. 3. LOGIC SYNTHESIS 6.4. VHDL SYNTHESIS FLOW. 3. LOGIC SYNTHESIS
a b c d e
a b c d e
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
29
CHAPTER 6 CONTENTS of CHAPTER 6
Fundamental limitations of
1
EDA software
1 2 Realization of VHDL operator
6 2
3 Realization of VHDL data types
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW 6.4. VHDL SYNTHESIS FLOW. 4. TECHNOLOGY MAPPING
.1 RT-level Synthesis Technology mapping is the
5
process of transforming the
.2 Module generator netlist
5
using components from the Gate-level
5 .3 Logic synthesis
netlist
target device’s library.
Technology mapping
cell library
5 .4 Technology mapping Cell-level
netlist
6.4. VHDL SYNTHESIS FLOW. 4. TECHNOLOGY MAPPING 6.4. VHDL SYNTHESIS FLOW. 4. TECHNOLOGY MAPPING
These components are
commonly referred to as cells,
and the technology library is
normally provided by a Gate-level
30
6.4. VHDL SYNTHESIS FLOW. 4. TECHNOLOGY MAPPING CHAPTER 6
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
5 .5 Effective use of synthesis Software
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE 6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE
Despite its undamental limitation, A good designer should
synthesis software is still a understand the capabilities and
powerful and necessary tool, limitation of software,
which can automate many design and know what this tool can
tasks and perform certain tedious and cannot do as well as when
and repetitive computations. to compromise.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
31
6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE 6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE
VHDL description of logical operators VHDL description of logical operators
6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE 6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE
VHDL description of arithmetic and relational operators VHDL description of arithmetic and relational operators
• Optimization at the RT level • Human intervention is required,
involves complex arithmetic and and
relational operators and routing
• we have to specify explicitly the
structure.
desired design in a VHDL
• It is not well developed and is description.
frequently done on an ad hoc • Simple modifications on code
basis. frequently can improve circuit
efficiency significantly.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE 6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE
VHDL description of arithmetic and relational operators VHDL description of arithmetic and relational operators
• There is no comprehensive • It frequently depends on the
procedure or algorithm to detect designer’s insight and knowledge
sharing and of a circuit.
• to perform optimization for • VHDL is a good vehicle to explore
arithmetic and relational design at this level.
operators.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
32
6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE 6.4. VHDL SYNTHESIS FLOW. 5. EFFECTIVE USE OF SYNTHESIS SOFTWARE
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
33
6.5. TIMING CONSIDERATIONS 6.5. TIMING CONSIDERATIONS. 1. PROPAGATION DELAY
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.5. TIMING CONSIDERATIONS. 1. PROPAGATION DELAY 6.5. TIMING CONSIDERATIONS. 1. PROPAGATION DELAY
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.5. TIMING CONSIDERATIONS. 1. PROPAGATION DELAY 6.5. TIMING CONSIDERATIONS. 1. PROPAGATION DELAY. System delay
Once cell delays are known,
Cw1 Cg1
we can calculate the delay of a
path by adding the individual
cell delays along the path.
a
b
Cw2
Cg2
A digital system typically has many paths between input and
output ports, and their delays are different.
Cw3 Cg3
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
34
6.5. TIMING CONSIDERATIONS. 1. PROPAGATION DELAY. System delay 6.5. TIMING CONSIDERATIONS. 1. PROPAGATION DELAY. System delay
Since the system has to accommodate the worst-case
scenario, the system delay is defined as the longest delay.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.5. TIMING CONSIDERATIONS 6.5. TIMING CONSIDERATIONS. 2. SYNTHESIS WITH TIMING CONSTRAINTS
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
35
6.5. TIMING CONSIDERATIONS. 2. SYNTHESIS WITH TIMING CONSTRAINTS 6.5. TIMING CONSIDERATIONS. 2. SYNTHESIS WITH TIMING CONSTRAINTS
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.5. TIMING CONSIDERATIONS. 2. SYNTHESIS WITH TIMING CONSTRAINTS 6.5. TIMING CONSIDERATIONS. 2. SYNTHESIS WITH TIMING CONSTRAINTS
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
36
6.5. TIMING CONSIDERATIONS 6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS
The propagation delay of a system is the time required to
generate a valid, steady-state output value.
.1 Propagation delay
Timing hazards are the fluctuations occurring during the
3 Synthesis With Timing transient period.
3 .2
3 Constraints
.3 Timing Hazards
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS 6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS
In a digital system, many a
ab
A static hazard is the condition that a circuit’s output
paths may lead to the b sh
produces a glitch when it should remain at a steady value.
b
same output port.
c
It is further divided into static-1 hazard and static-0 hazard.
bc
6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS 6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS
An example bc
a=1 ab=0 a
sh 00 01 11 10 c
b=1 b=0
• Assume that a 0
0 1 3
1
2
0 sh=1 b
bc
changes from ab a=1 ab=0
a
‘1’ to ‘0’. b=0 b=1
ab
b sh sh=1
b
sh
c=1 bc=0
c (b) At t1 t0 t1 t2 t3
bc
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
37
6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS 6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS
a=1 ab=1 a There are some techniques to eliminate hazards caused by a
b=0 b=1
c single input change.
sh=0 b
For example, we can add a redundant product term to
bc=0
c=1
(c) At t2
b eliminate the previous static hazard:
bc a
a=1 ab=1 Sh = a.b’ + b.c + a.c ab
b b
b=0 b=1 sh=1 ab bc
sh 00 01 11 10 sh
0 1 3 2
c
bc
bc=0
sh 0 1 0
c=1 a 4 5 7 6 ac
(d) At t3
t0 t1 t2 t3 1 1 1 1
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS 6.5. TIMING CONSIDERATIONS. 3. TIMING HAZARDS
a ab
b b
bc
sh 00 01 11 10 sh
0 1 3 2
c
bc
0 1 0
a 4 5 7 6 ac
1 1 1 1
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
6 Synthesis guidelines
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
38
6.6. SYNTHESIS GUIDELINES 6.6. SYNTHESIS GUIDELINES
Be aware of the theoretical limitation of synthesis software.
Unless there is a compelling reason, use a multiplexer instead
Be aware of the hardware complexity of different VHDL of an internal tri-state bus.
operators. Avoid using the ’-’ value of the std-logic data type as an input
value.
Isolate tri-state buffers from other logic and code them in a
separate segment.
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
THANK
YOU
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 6: Synthesis of VHDL code. www.hcmute.edu.vn
39
6.6. CÁC CÂU HỎI KIỂM TRA 6.6. CÁC CÂU HỎI KIỂM TRA
Câu 6.1 Câu 6.2
Hãy vẽ ký hiệu cổng Hãy vẽ ký hiệu cổng Hãy vẽ mạch port IO Hãy vẽ mạch port IO
các dạng cổng 3 trạng 3 trạng thái dùng 1 cổng 3 trạng dùng 2 cổng 3 trạng
thái thái thái
Các bảng trạng thái Viết lệnh mô tả cổng 3 Viết lệnh mô tả tương Viết lệnh mô tả tương
tương ứng trạng thái ứng ứng
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 5: Sequential signal assignment of VHDL. www.hcmute.edu.vn
6.6. CÁC CÂU HỎI KIỂM TRA 6.6. CÁC CÂU HỎI KIỂM TRA
Câu 6.3 Câu 6.4
6.6. CÁC CÂU HỎI KIỂM TRA 6.6. CÁC CÂU HỎI KIỂM TRA
Câu 6.5 Câu 6.6
Hãy vẽ sơ đồ mạch so Hãy liệt kê các toán tử Hãy vẽ sơ đồ khối, bảng Hãy vẽ sơ đồ khối và sơ
sánh bằng của 2 số. so sánh trạng thái, phương trình, đồ mạch cộng 2 số nhị
sơ đồ mạch cộng toàn phân 4 bit sử dụng mạch
Hãy vẽ sơ đồ khối phần 1 bit cộng nhị phân 1 bit
Viết phương trình so sánh:
tương ứng
1 bit, 2 bit, 3 bit, 4 bit
Hàm mô tả theo tài Hãy cho biết khi ngõ vào
nguyên và thời gian của tăng thì tài nguyên và
Vẽ mạch so sánh 3 bit thời gian theo hàm nào
toán tử so sánh bằng?
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 5: Sequential signal assignment of VHDL. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 5: Sequential signal assignment of VHDL. www.hcmute.edu.vn
40
6.6. CÁC CÂU HỎI KIỂM TRA 6.6. CÁC CÂU HỎI KIỂM TRA
Câu 6.7 Câu 6.8
Hãy vẽ sơ đồ khái niệm Hãy vẽ sơ đồ khái niệm Hãy đơn giản các phương trình dùng bìa K chuẩn:
mạch mã hóa ưu tiên ngõ mạch mã hóa ưu tiên ngõ
vào bit cao, có 6 ngõ vào. vào bit thấp, có 7ngõ X = f(d,c,b,a) = Σ(1,4,5,7,13,15)
Dùng lệnh gán có điều vào. Dùng lệnh if
kiện Y = f(d,c,b,a) = Σ(1,2,4,5,7,8,13,15)
Hãy cho biết khi ngõ vào Hãy cho biết khi ngõ vào Z = f(d,c,b,a) = Σ(0,1,4,5,7,9,11,13,15)
tăng thì tài nguyên và thời tăng thì tài nguyên và
gian theo hàm nào thời gian theo hàm nào V = f(d,c,b,a) = Σ(1,3,4,5,7,8,13,14,15)
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 5: Sequential signal assignment of VHDL. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 5: Sequential signal assignment of VHDL. www.hcmute.edu.vn
6.6. CÁC CÂU HỎI KIỂM TRA 6.6. CÁC CÂU HỎI KIỂM TRA
Câu 6.8 Câu 6.8
Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 5: Sequential signal assignment of VHDL. www.hcmute.edu.vn Nguyễn Đình Phú. ĐHSP kỹ thuật tp HCM. Thiết kế vi mạch với VHDL. Chapter 5: Sequential signal assignment of VHDL. www.hcmute.edu.vn
6.6. CÁC CÂU HỎI KIỂM TRA 6.4. VHDL SYNTHESIS FLOW. 4. LOGIC SYNTHESIS
Câu 6.4 Because of the large number of fan-ins for the and and or
gates, the two-level sum-of-products form can only be
Hãy giải thích bảng sau implemented by using a special ASIC structure, known as
programmable logic array (PLA), and, with some
modification, by using programmable array logic (PAL)-based
CPLD devices.
41
6.2. REALIZATION OF VHDL OPERATORS
6.4. VHDL SYNTHESIS FLOW. 4. LOGIC SYNTHESIS - PAL - PLA 5. REALIZATION OF AN OPERATOR WITH CONSTANT OPERANDS
AB+AB
AB+AB
AB+AB
Give: x = “00000000”
AB+AB
42