Professional Documents
Culture Documents
HỒ CHÍ MINH
TRƯỜNG ĐẠI HỌC BÁCH KHOA
KHOA ĐIỆN-ĐIỆN TỬ
BỘ MÔN KỸ THUẬT ĐIỆN TỬ
om
.c
ng
ASIC CHIP AND IP CORE DESIGN
co
an
th
ng
Chapter 1: Introduction to ASIC chip and IP design
o
du
1.3 IP design
1 CuuDuongThanCong.com https://fb.com/tailieudientucntt
1.1 ASIC and FPGA-based chip design flow
• Hardware design flow
om
.c
ng
co
an
th
o ng
du
u
cu
an
Design
Flow th
o ng
du
u
cu
om
Language VHDL, Verilog, System C VHDL, Verilog, System C
.c
Simulator ModelSim, VCS ModelSim, VCS
Synthesis -Synopsys -Atera: Quartus, Maxplus
ng
-Cadence -Xilinx: Vivado, ISE
co
-Mentor Graphic -Lattice: Lattice Diamond
an
-Apollo, Astro, Daracula, DIVA, (tools depended on FPGA
th
Ansoft, Synplify ng vendors)
Advantage -for massive products -for prototype products
o
/disadvant -optimized in area, timing, -not optimized in area, timing,
du
quantities quantities
-slow to market -fast to market
om
.c
ng
co
an
th
o ng
du
u
cu
om
– Expected functionality
.c
– Technology
Maximum allowable delay times
ng
–
Silicon area
co
–
– Power dissipation
an
• As an example specs for a one-bit binary full adder circuit:
th
ng
– Technology: 0.8 um twin-well CMOS
o
– Propagation delay of "sum" and "carry_out" signals < 1.2 ns (worst case)
du
om
design
.c
• The resulting schematics describe
ng
– main electrical properties of all components and their interconnections.
co
– the power supply and ground connections
an
– input and output signals
th
• Corresponding netlist is generated for later stages of the design
o ng
du
u
cu
om
• This step largely simplifies the schematic representation of
.c
the overall system
ng
• Default symbol icon is a simple rectangular box with input and
co
output pins.
an
th
o ng
du
u
cu
om
• The initial simulation phase also serves to detect some
.c
of the design errors
ng
– Missing connection
co
– Unintended crossing of two signals
an
th
o ng
du
u
cu
om
• Physical layout design is very tightly linked to overall circuit
.c
performance (area, speed and power dissipation)
ng
• The detailed mask layout of logic gates requires a very intensive
co
and time-consuming design effort.
an
th
• The layout design must not violate any of the Layout Design
ng
Rules
o
du
u
cu
om
• Design Rule Checker, is used to detect any design rule violations
.c
• The designer must perform DRC, and make sure that all layout
ng
errors are eventually removed
co
an
th
o ng
du
u
cu
om
.c
ng
co
an
th
o ng
du
u
cu
om
• The extracted net-list can provide a very accurate estimation of
.c
the actual device dimensions and device parasitic
ng
• The extracted net-list file and parameters are subsequently used
co
in Layout-versus-Schematic comparison and in detailed
an
transistor-level simulations
th
o ng
du
u
cu
om
– compare the original network with the one extracted from the mask
layout
.c
– prove that the two networks are indeed equivalent
ng
• A successful LVS will not guarantee that the extracted circuit
co
will actually satisfy the performance requirements.
an
th
o ng
du
u
cu
om
clear assessment of the circuit speed, the influence of circuit parasitic, and
any glitches.
.c
• Note that a satisfactory result in post-layout simulation is still no guarantee
ng
for a completely successful product
co
• the actual performance of the chip can only be verified by testing the
fabricated prototype
an
th
o ng
du
u
cu
om
Front-end
.c
ng
co
an
th
Back-end
o ng
du
u
cu
Sign-off
om
.c
ng
co
• Design Flow
an
by Synopsys
th
o ng
du
u
cu
om
2. Design Compiler uses technology libraries, synthetic or
.c
DesignWare libraries, and symbol libraries to implement
ng
synthesis and to display synthesis results graphically.
co
3. During the synthesis process, Design Compiler translates the
an
HDL description to components extracted from the generic
th
technology (GTECH) library and DesignWare library.
ng
– The GTECH library consists of basic logic gates and flip-flops.
o
du
om
technology library, known as the target library.
.c
5. After the design is optimized, test synthesis is performed to
ng
integrate test logic into a design during logic synthesis.
co
6. After test synthesis, the design is ready for the place and
an
route tools, which place and interconnect cells in the design.
th
Based on the physical routing, the designer can back-
ng
annotate the design with actual interconnect delays; Design
o
du
timing analysis.
cu
om
Specification :
Customize, re-configurable & SoC (Specification, timing/ block
(Architecture, block & timing diagram) diagram, datasheet, etc)
.c
etc
Packaged soft-IP :
RTL design coding :
ng
Logic simulation & debug (Encrypted Verilog files, installation
Soft
(Verilog, VHDL files) scripts & manual ) IP
co
Specification group
an
Gate synthesis & verification : Packaged soft-IP :
th
Synthesis, gate-level simulation & debug (Netlist file) (evaluation netlist, evaluation C-
model)
ng
Verification group
o
Layout :
Place & route, timing simulation & anal. Packaged hard-IP
du
(GDSII file)
Physical design group
Hard
u
cu
Customize IP core theo yêu cầu sử dụng của khách hàng và mô phỏng trong SoC :
(GUI for Core Parameterization)
om
• Time-to-market pressure
.c
• Increasing design complexity
ng
co
– HW/SW co-development
an
– System-level verification
th
ng
– Integration on various levels and areas of
o
expertise
du
om
– configurable, parameterizable
.c
• Design for use in multiple technologies
ng
– synthesis script with a variety of libraries
co
– portable for new technologies
an
• Design with complete verification
process th
o ng
– robust and verified
du
confidence
– physical prototype, demo system
• Design with complete document set
Bộ môn Kỹ Thuật Điện Tử
CuuDuongThanCong.com https://fb.com/tailieudientucntt
22
Parameterized IP Design
• Why to parameterize IP?
om
– Provide flexibility in interface and functionality
.c
– Facilitate verification
ng
• Parameterizable types
co
– Logic/Constant functionality
an
– Structural functionality
th
• Bit-width, depth of FIFO, regulation and selection of submodule
o ng
– Design process functionality (mainly in test bench)
du
• Test events
u
om
– Power dissipation, code size, application performance, die size
– Types, numbers and sizes of functional unit, including processor
.c
– User-defined instructions.
ng
• Tool generates
co
– RTL code, diagnostics and test reference bench
an
– Synthesis, P&R scripts
th
– Instruction set simulator, C/C++ compiler, assembler, linker, debugger,
ng
profiler, initialization and self-test code
o
du
u
cu
om
– Synthesizable code – Synthesizable code
assign tRC_limit=
.c
always @(posedge clock) begin
(`RC_CYC > (`RCD_CYC + burst_len)) ?
ng
if (reset==`ResetLevel) begin
`RC_CYC - (`RCD_CYC + burst_len) : 0;
co
…
end – For test bench
an
else begin always #(`T_CLK/2) clock = ~clock;
…
th …
ng
initial begin
end
o
#(`T_CLK) event_1;
du
…
cu
end
om
– Automatically adjusted when IP design is changed
– Partition test events to reduce redundant cases when test for all
.c
allowable parameter sets at a time
ng
• Debug mode
co
– Test for the specific parameter set at a time
an
– Test for all allowable parameter sets at a time
–
th
Test for the specific functionality
ng
– Step control after the specific time point
o
du
om
• bench
.c
• – E.g.: bus topology of IEEE 1394
ng
co
an
th
o ng
du
u
cu
om
.c
ng
co
an
th
o ng
du
u
cu
om
– Use simple constructs, basic types, and simple clocking schemes
.c
– Use a consistent coding style, consistent naming conventions, and a
consistent structure for processes and state machines
ng
– Use a regular partitioning scheme, with all module outputs registered
co
and with modules roughly of the same size
an
– Make the RTL code easy to understand, by using comments, meaningful
th
names, and constants or parameters instead of hard-coded numbers
o ng
du
u
cu
om
• General Naming Conventions
.c
• Example 5-1 Using downto in port declarations
ng
entity DW_addinc is
co
generic(WIDTH : natural);
an
port (
th
A,B : in std_logic_vector(WIDTH-1 downto 0);
ng
CI : in std_logic;
o
du
);
end DW01_addinc;
om
Signal naming conventions
.c
ng
Convention Use
co
*_r Output of a register (for example, count_r)
an
*_a
th
Asynchronous signal (for example, addr_strobe_a)
o ng
du
*_nxt Data before being registered into a register with the same name
om
• Background
.c
– VITAL libraries can have two levels of compliance with the standard :
ng
VITAL_Level0 and VITAL_Level1
co
– VITAL_Level1 is more rigorous and deals with the architecture of a library
an
cell
th
– VITAL_Level0 is the interface specification that deals with the ports and
ng
generics specifications in the entity section of VHDL library cell
o
• Rules
du
om
Table 5-2 Architecture naming conventions
.c
ng
Architecture Naming Convention
co
an
synthesis ARCHITECTURE rtl OF my_syn_model IS
th
or
model ARCHITECTURE str OF my_structural_design IS
o ng
du
u
or
model ARCHITECTURE tb OF my_test_bench IS
om
.c
– Filename
ng
– Author
co
– Description of function and list of key features of the nodule
an
– Date the file was created
–
th
Modification history including date,name of modifier, and
ng
description of the change
o
du
u
cu
om
-- only as authorized by a licensing agreement from
.c
-- synopsys Inc.
ng
-- In the event of publication, the following notice is
co
-- applicable:
an
--
th
-- ( C ) COPYRIGHT 1996 SYNOPSYS INC.
ng
-- ALL RIGHTS RESERVED
o
--
du
-- authorized copies.
--
-- File : Dwpci_core.vhd
-- Author : Jeff Hackett
Bộ môn Kỹ Thuật Điện Tử
CuuDuongThanCong.com https://fb.com/tailieudientucntt
35
Examples
-- Date : 09/17/96
-- version : 0.1
om
-- Abstract : This file has the entity, architecture
.c
-- and configuration of the PCI 2.1
ng
-- MacroCell core module.
co
-- The core module has the interface,
an
-- config, initiator,
th
-- and target top-level modules.
ng
-- Modification History:
o
-- Date BY Version Change Descroption
du
--------------------------------------------------
u
cu
om
• Example 5-3 Comments for a subtype declaration
.c
-- Create subtype INTEGER_256 FOR built_in error
ng
-- checking of legal values.
co
subtype INTEGER_256 is type integer range 0 to 255;
an
th
ng
• Comments should be placed logically, near the code that they
o
describe
du
om
– Use a separate line for each HDL statement
.c
– Although both VHDL and Verilog allow more than one statement per
ng
line, the code is more readable and maintainable if each statement or
command is on a separate line.
co
an
th
o ng
du
u
cu
om
• Example: Continuing a line of HDL code
.c
hp_req <= (x0_hp_req or t0_hp_req or x1_hp_req or
ng
co
t1_hp_req or s0_hp_req or t2_hp_req or s1_hp_req or
an
x2_hp_req or x3_hp_req orx4_hp_req or x5_hp_req or
th
wd_hp_req and ea and pf_req nor iip2);
o ng
du
u
cu
om
• Example: Indentation in a nested if loop
.c
if (bit_width(m+1) >= 2) then
for I in 2 to bit_width(m+1) loop
ng
spin_j := 0;
for j in 1 to m loop
co
if j > spin_j then
if (matrix(m) (I-1) (j) /= wht) then
an
if (j=m) and (matrix(m) (I) (j) = wht) then
matrix(m) (I) (j) := j;
th
else ng
for k in j+1 to m loop
if (matrix(m) (I-1) (k) /= wht) then
o
matrix(m) (I) (k) := j;
du
spin_j := k ;
exit;
u
end if;
cu
end loop -- k
end if;
end if;
end if;
end loop; -- j
end loop; -- I
end if;
Bộ môn Kỹ Thuật Điện Tử CuuDuongThanCong.com https://fb.com/tailieudientucntt
40
Do Not Use HDL Reserved Words
• Rule
om
• Do not VHDL or Verilog reserved words for names of any
.c
elements in your RTL source files.
ng
• Because macro designs must be translatable from VHDL to
co
Verilog and from Verilog to VHDL,
an
• It is important not to use VHDL reserved words in Verilog
th
code, and not to use Verilog reserved words in VHDL code.
ng
o
du
u
cu
om
consistent throughout the design.
.c
• Guideline – Declare one port per line, with a comment
ng
following it (preferably on the same line)
co
• Guideline – Declare the ports in the following order:
an
– Input :
th
• Clocks, Resets, Enables, other control signals
ng
• Data and address lines
o
– Outputs:
du
• Data
om
generic (
.c
DATA_WIDTH : positive;
COEF_WIDTH : positive;
ng
ACC_WIDTH : positive;
co
ORDER : positive;
an
);
th
port (
-- control Inputs
ng
--
o
clk : in std_logic;
du
rst_n : in std_logic;
u
run : in std_logic;
cu
load : in std_logic;
tc : in std_logic;
--
Data Inputs
om
coef_in : in std_logic_vector(COEF_WIDTH-1 downto 0);
.c
sum_in : in std_logic_vector(ACC_WIDTH-1 downto 0);
--
ng
Control Outputs
co
--
an
start : out std_logic;
hold : out std_logic;
th
ng
--
o
du
Data Outputs
u
--
cu
om
• Example 5-7 Using named association for port mapping
.c
-- instantiate my_add
ng
U_ADD: my_add
co
generic map (width => WORDLENGTH)
an
port map (
th
a => in1, ng
b => in2,
o
ci => carry_in,
du
u
cu
om
my_add #(‘WORDLENGTH) U_ADD (
.c
.a (in1 ),
ng
co
.b (in2 ),
an
.ci (carry_in ),
th
ng
.sum (sum ),
o
du
.co (carry_out )
u
);
cu
om
• Example 5-8 Using pragmas to comment out VHDL
.c
configurations for synthesis
ng
-- pragma translate_off
co
configuration cfg_example_struc of example is
an
th
for struc ng
use example_gate;
o
end for;
du
end cfg_example_struc;
u
cu
-- pragma translate_on
om
• Example 5-9 Creating a reusable function
.c
VHDL:
ng
-- This function converts the incoming address to the
co
-- corresponding relative address.
an
function convert_address
th
ng
(input_address, offset : integer)
o
du
return integer is
u
begin
cu
om
// corresponding relative address.
.c
ng
co
function [‘BUS_WIDTH-1 : 0] convert_address;
an
input input_address, offset;
th
integer input_address, offset;
o ng
du
begin
u
end
end function // convert_address
om
• Example 5-10 Using loops to improve readability
.c
shift_delay_loop: for I in 1 to (number_taps-1) loop
delay(I) := delay (I-1);
ng
and loop shift_delay_loop;
co
• Example 5-11 Register bank using an array
an
type reg_array is array(natural range <>) of
th
std_logic_vector (REG_WIDTH-1 downto 0);
signal reg: reg_array (WORD_COUNT-1 downto 0);
ng
begin
o
REG_PROC:process (clk)
du
begin
if clk=‘1’ and clk’event then
u
if we=‘1’ then
cu
om
function my_xor (bbit : std_logic;
.c
avec : td_logic_vector (x downto y) )
ng
return std_logic_vector is
co
variable cvec :
an
std_logic_vector(avec’range-1 downto 0);
th
begin
ng
for i in avec’range loop -- bit-level for loop
o
du
return(cvec);
end;
om
function my_xor ( bbit : std_logic;
.c
evec : std_logic_vector (x downto y) )
ng
return std_logic_vector is
co
variable cvec, temp :
an
std_logic_vector(avec’range-1 downto 0);
begin
th
ng
temp := (others => bbit);
o
du
return (cvec);
end;
om
• Guideline –Label each process block <name>_PROC
.c
• Rule – Do not duplicate any signal, variable, or entity names.
ng
• Example 5-13 Meaningful process label
co
-- synchronize requests (hold for one clock).
an
th
SYNC_PROC : process (req1, req2, rst, clk)
ng
o
du
om
You will create code that is technology-independent, compatible with various
simulation tools, and easily translatable from VHDL to Verilog ( or from Verilog to
.c
VHDL).
ng
co
Rule (VHDL only) - Use only IEEE standard types.
an
th
--Create new 16-bit subtype ng
subtype WORD_TYPE is std_logic_vector (15 downto 0);
o
( Example 5-14 Creating a subtype from std_logic_vector )
du
om
- Be conservative in the number of subtypes you create.
.c
: Using too many subtypes make the coder difficult to understand.
ng
co
Guideline (VHDL only)
an
th
- Do not uese the type bit or bit_vector.ng
: Many simulators do not provide built-in arithmetic functions for
o
these types.
du
u
cu
Use ieee.std_logic_arith.all;
Signal a, b, c, d : std_logic_vector (y downto x);
( Example 5-15 using built-in arithmetic functions for std_logic_vector )
om
- Do not use hard-coded numeric values in your design.
.c
: As an exception, you can use the values 0 and 1 (but not in com-
ng
bination, as in 1001).
co
an
Poor coding style Recommended coding style
th
wire [7 : 0 ] my_in_bus; `define MY_BUS_SIZE 8
ng
reg [7 : 0 ] my_out_bus; wire [ ` MY_BUS_SIZE-1 : 0 ] my_in_bus;
o
reg [ ` MY_BUS_SIZE-1 : 0 ] my_out_bus;
du
om
Guideline (VHDL only)
.c
- Collect all parameter values and function definitions for a design
ng
into a single separate file (a “package”) and name the file
co
DesignName_package.vhd.
an
th
ng
Include Files
o
du
om
− Although it is possible to embed dc_shell synthesis commands
.c
directly in the source code, this practice is not recommended.
ng
− Others who synthesize the code may not be aware of the hidden
co
commands, which may cause their synthesis scripts to produce
an
poor result.
th
o ng
du
u
cu
om
- Use the DesignWare Foundation Library to maintain technology
.c
independence.
ng
co
Guideline
an
- Avoid instantiating gates in the design.
th
- Gate-level designs are very hard to read, and thus difficult to
ng
maintain and reuse.
o
du
om
- If you must use technology-specific gates, then isolate these gates
.c
in a separate module.
ng
co
Guideline – The GTECH library
an
th
- If you must instantiate a gate, use a technology-independent library such as
the Synopsys generic technology library, GETCH.
o ng
du
u
cu
om
- Do not use generate statements.
.c
: There is no equivalent construct in Verilog.
ng
co
Guideline (VHDL only)
an
- Do not use block constructs.
th
ng
: There is no equivalent construct in Verilog.
o
du
om
chip design?
.c
2. What are steps of ASIC design flow for analog chip?
ng
3. What are steps of ASIC design flow for digital chip?
co
4. Explain about Layout-versus-Schematic (LVS) Check
an
5. What is IP core?
th
ng
6. List the needed characteristics of IP core
o
du
om
– Subtractor
.c
– Multiplier
ng
– Divider
• Configurable parameters
co
– Width of input data
an
– Reset level
th
– Unsigned / signed number
ng
• Required deliverable set
o
du
– Behavior model
– RTL code
u
cu
– Synthesis report
– Testbench
– Verification report