Chapter 4
Chapter 4
C. W. Jen 任建葳
[email protected]
Outline
• IP Core Designs
Institute of Electronics, National Chiao Tung University
• IP Core Verification
• IP Core Modeling and Deliverables
• System-Level Verification
IP Core Design, Modeling and Verification
1/91
Outline
• IP Core Designs
Institute of Electronics, National Chiao Tung University
• IP Core Verification
• IP Core Modeling and Deliverables
• System-Level Verification
IP Core Design, Modeling and Verification
2/91
Problem in SoC Era
• Productivity gap
Institute of Electronics, National Chiao Tung University
• Time-to-market pressure
• Increasing design complexity
– HW/SW co-development
IP Core Design, Modeling and Verification
– System-level verification
– Integration on various levels and areas of expertise
– Timing closure due to deep submicron
3/91
Design for Reuse IPs
• Design to maximize the flexibility
Institute of Electronics, National Chiao Tung University
– configurable, parameterizable
• Design for use in multiple technologies
– synthesis script with a variety of libraries
IP Core Design, Modeling and Verification
4/91
Parameterized IP Design
• Why to parameterize IP?
Institute of Electronics, National Chiao Tung University
– Logic/Constant functionality
– Structural functionality
• Bit-width、depth of FIFO、regulation and selection of sub-
module
– Design process functionality (mainly in test bench)
• Test events
• Events report (what, when and where)
• Automatic check event
– Others4 (Hardware component Modeling, 1996)
4Authors: Vicktor Preis and Sabine Marz-Rossel, Modeling Highly Flexible and Self-generating Parameterizable Components In VHDL
Collected in book "Hardware component Modeling", 1996, by Jean-Michel Berge, Oz Levia and Jacques Rouillard 5/91
IP Generator/Compiler
• User specifies
Institute of Electronics, National Chiao Tung University
processor
– User-defined instructions.
• Tool generates
– RTL code, diagnostics and test reference bench
– Synthesis, P&R scripts
– Instruction set simulator, C/C++ compiler, assembler,
linker, debugger, profiler, initialization and self-test code
6/91
Logic/Constant Functionality
• Logic Functionality • Constant Functionality
Institute of Electronics, National Chiao Tung University
end
else begin – For test bench
… always #(`T_CLK/2) clock = ~clock;
end …
initial begin
end
#(`T_CLK) event_1;
#(`T_CLK) event_2;
…
end
7/91
Reusable Design - Test Suite
• Test events
– Automatically adjusted when IP design is changed
Institute of Electronics, National Chiao Tung University
– Partition test events to reduce redundant cases when test for all
allowable parameter sets at a time
• Debug mode
– Test for the specific parameter set at a time
IP Core Design, Modeling and Verification
8/91
Reusable Design - Test Bench
• Use Global Connector to configure desired test
Institute of Electronics, National Chiao Tung University
bench
– E.g.: bus topology of IEEE 1394
IP Core Design, Modeling and Verification
Device 0 Device 0
Device 3 Device 3
Device 1 Device 1
Device 2 Device 2
9/91
Traditional ASIC Design Flow
Specification development
Institute of Electronics, National Chiao Tung University
Functional verification
IP Core Design, Modeling and Verification
Synthesis
Timing verificaiton
software
• Parallel verification and synthesis of modules
• Floorplanning and place-and-route included in the
IP Core Design, Modeling and Verification
synthesis process
11/91
Spiral SoC Design Flow
System Design and Verification
Physical Timing Hardware Software
Institute of Electronics, National Chiao Tung University
Completed behavioral
DEVELOP behavioral model DEVELOP testbench model for HW/SW
cosimulation and test
development
TEST behavioral model
CERATE BEHAVIROAL MODEL
IP Core Design, Modeling and Verification
" Source: Michael Keating and Pierrr Bricaud, Reuse Methodology Manual, 2nd ed. 1999. 13/91
Macro Integration Process
Subblock 1 Subblock 1 Subblock 1
Institute of Electronics, National Chiao Tung University
MEASURE
test coverage PERFORM final timing
and power analysis
15/91
Specification at Every Level
• Overview
Institute of Electronics, National Chiao Tung University
• Functional requirements
• Physical requirements
• Design requirements
IP Core Design, Modeling and Verification
• Block diagram
• Interface to external system
• Manufacturing test methodology
• Software model
• Software requirement
• Deliverables
• Verification
16/91
Top-Level Macro Design Flow
Macro specification
Institute of Electronics, National Chiao Tung University
DEVELOP detailed
technical specification
IP Core Design, Modeling and Verification
PARTITION
the block into subblocks
" Source: Michael Keating and Pierrr Bricaud, Reuse Methodology Manual, 2nd ed. 1999. 17/91
Top-Level Macro Design
• Updated macro hardware specification
Institute of Electronics, National Chiao Tung University
– document
• Executable specification
– language description
IP Core Design, Modeling and Verification
SYNTHESIS SIMULATE
Design Compiler Verilog/VHDL
" Source: Michael Keating and Pierrr Bricaud, Reuse Methodology Manual, 2nd ed. 1999. 19/91
Subblock Design
• Design elements
Institute of Electronics, National Chiao Tung University
– Specification
– Synthesis script
– Testbench
IP Core Design, Modeling and Verification
– Verification suite
– RTL that pass lint and synthesis
20/91
Linter
• Fast static RTL code checker
Institute of Electronics, National Chiao Tung University
– timing check
– testability checks
– reusability checks
• Shorten design cycle by avoiding lengthy iterations
21/91
Subblock Integration Flow
Subblock 1 Subblock 1 Subblock 1
Institute of Electronics, National Chiao Tung University
23/91
Macro Productization
From block integration
VERIFY timing
FABRICATE
24/91
Soft Macro Production
• Produce the following components
Institute of Electronics, National Chiao Tung University
• synthesis script
– Documentation
25/91
Principles of RTL Coding Styles
• Readability
Institute of Electronics, National Chiao Tung University
• Simplicity
• Locality
• Portability
IP Core Design, Modeling and Verification
• Reusability
• Reconfigurability
26/91
Naming Conventions
• Lowercase letters for signal names
Institute of Electronics, National Chiao Tung University
• Suffixes
– _n for active-low, _a for async, _z for tri-state, …
• Identical names for connected signals and ports
• Do not use HDL reserved words
• Consistency within group, division and corporation
27/91
File Header
• Should be included for all source files
Institute of Electronics, National Chiao Tung University
• Contents
– author information
– revision history
IP Core Design, Modeling and Verification
– purpose description
– available parameters
– reset scheme and clock domain
– critical timing and asynchronous interface
– test structures
• A corporation-wide standard template
28/91
Ports
• Ordering
Institute of Electronics, National Chiao Tung University
29/91
Coding Practices
• Little-endian for multi-bit bus
Institute of Electronics, National Chiao Tung University
30/91
Portability
• Do not use hard-coded numbers
Institute of Electronics, National Chiao Tung University
31/91
Clocks and Resets
• Simple clocking is easier to understand, analyze,
Institute of Electronics, National Chiao Tung University
and maintain
• Avoid using both edges of the clock
– duty-cycle sensitive
IP Core Design, Modeling and Verification
32/91
Low Power (1/2)
• Memory
Institute of Electronics, National Chiao Tung University
32KB
64KB
32KB
33/91
Low Power (2/2)
• Clock gating
Institute of Electronics, National Chiao Tung University
Clock generation
and gating
Block A
9 D Q
always @(posedge clk)
if (en) en
q <= q_nxt; clk
8
Assign clk1 = clk & en; D Q
always @(posedge clk1)
if (en)
q <= q_nxt; en
clk
34/91
Synchronicity
• Infer technology-independent registers
Institute of Electronics, National Chiao Tung University
35/91
Combinational and Sequential Blocks
• Combinational block
Institute of Electronics, National Chiao Tung University
• Sequential block
– use non-blocking assignments (<= in Verilog)
– avoid race problems in simulation
• Comb./Seq. Logic should be separated
36/91
Coding for Synthesis (1/2)
• Specify complete but no redundant sensitivity lists
Institute of Electronics, National Chiao Tung University
– simulation coherence
– simulation speed
• If-then-else often infers a cascaded encoder
IP Core Design, Modeling and Verification
37/91
Coding for Synthesis (2/2)
• FSM
Institute of Electronics, National Chiao Tung University
38/91
Partitioning (1/2)
• Register all outputs
Institute of Electronics, National Chiao Tung University
TOP
Clock PADs
Generation
Core Logic
JTAG
MIDDLE
40/91
Coding for DFT
• Avoid tri-state buses
Institute of Electronics, National Chiao Tung University
41/91
Outline
• IP Core Designs
Institute of Electronics, National Chiao Tung University
• IP Core Verification
• IP Core Modeling and Deliverables
• System-Level Verification
IP Core Design, Modeling and Verification
42/91
IP Core Verification
• To ensure the IP macro is 100 percent correct in
Institute of Electronics, National Chiao Tung University
43/91
Verification Plan (1/2)
• Develop the verification environment
Institute of Electronics, National Chiao Tung University
DUT
• The verification plan include
– a description of the test strategy, both at the block and
the top level
– a description of the simulation environment, including a
block diagram
– a list of testbench components
– a list of required verification tools, including simulators
and testbench creation tools
44/91
Verification Plan (2/2)
– a list of specific tests, along with the objective and
Institute of Electronics, National Chiao Tung University
45/91
Verification Strategy
• Macro verification: 3 phases
Institute of Electronics, National Chiao Tung University
46/91
Verification Tools
• Simulation
Institute of Electronics, National Chiao Tung University
• Emulation
• Prototyping
47/91
Verification Support
• Protocol Checker
Institute of Electronics, National Chiao Tung University
48/91
Testbench Design
• The testbench design differs depending on the
Institute of Electronics, National Chiao Tung University
bus monitors
• Subblock testbench
Output Interface
Input Interface
Input Output
Transaction Transaction
Generator Checker
49/91
Macro Testbench
Application
Software
Institute of Electronics, National Chiao Tung University
Drivers
IP Core Design, Modeling and Verification
HW/SW cosim
Environment
Translator
Application
PCI Bus
Bus
Monitor
Monitor
50/91
Bus Functional Models (BFM)
• To model the bus transactions on the bus, each read
Institute of Electronics, National Chiao Tung University
51/91
Automated Response Checking
• Compare the output response with a reference
Institute of Electronics, National Chiao Tung University
design
8051 chip
IP Core Design, Modeling and Verification
Hardware Modeler
Stimulus Compare response
8051 macro
(RTL)
52/91
Verification Suite Design
• Once built the testbench , we can develop a set of
Institute of Electronics, National Chiao Tung University
53/91
Outline
• IP Core Designs
Institute of Electronics, National Chiao Tung University
• IP Core Verification
• IP Core Modeling and Deliverables
• System-Level Verification
IP Core Design, Modeling and Verification
54/91
The Intent of Different Level of IP Model
• Design exploration at higher level
Institute of Electronics, National Chiao Tung University
55/91
General Modeling Concepts
• Interface model
Institute of Electronics, National Chiao Tung University
Interface
– Abstract behavioral model out=AxB
M-Bus
CS
B B W_En
Interface
Interface
Interface
Interface
20
S
out=AxB out=AxB Data_Bus
B B 16
Addr_Bus
Clock
Detailed
Interface Behavioral Structural
Behavioral
Model Model Model
Model
56/91
Issues of IP Modeling
• Attributes
Institute of Electronics, National Chiao Tung University
specified?
• Two important dimensions of time
– Model development time is labor intensive: model
reusability
– Simulation time depends upon strategy chosen for
mixed domain simulations
57/91
From Requirement to Delivery
Hierarchy Hierarchy
Institute of Electronics, National Chiao Tung University
Refinemenet Validaton
Customer Product
Needs System Vaildation "Pattern" Deliver
IP Core Design, Modeling and Verification
Architecture Architecture
Verification
Behavioral Behavioral
RTL Test
Patern
Logical Netlist Logical Device
Layout
Wafer
Abstract Mask Real
Fab
58/91
Example: Hierarchical Design Refinement
Vertical refinement Horizontal refinement: Partition
Institute of Electronics, National Chiao Tung University
F1 F2 F3
F4 F5 F6 F1 F2 F3
F4 F5 F6
IP Core Design, Modeling and Verification
F1 F2 F3
In 1 In 2 Out 1
F4 F5 F6
In 1 In 2 Out 1
59/91
Example: Manage Size and Run-Time
Start at RTL
Institute of Electronics, National Chiao Tung University
Integration Test
IP Core Design, Modeling and Verification
60/91
IP Modeling
General Modeling Concept
Institute of Electronics, National Chiao Tung University
Circuit-Level Model
Precision Axis
Temporal Precision Axis
Data Precision Axis
Functional Precision Axis
Structural Precision Axis
Software Programming Precision Axis
61/91
CPU Model
• CPU model enable
– Estimate software performance
Institute of Electronics, National Chiao Tung University
I/O Bus
Compile to transactions Bus functional Events Hardware
Application code
host processor model simulator
62/91
ARM Modeling (1/4)
Efficiency
Concept
Institute of Electronics, National Chiao Tung University
System model
Instruction set simulators (ISS)
Co-verification model
IP Core Design, Modeling and Verification
Hardware modeling
Gate Level netlist model
Silicon Accuracy
63/91
ARM Modeling (2/4)
• System Model • Co-verification model
Institute of Electronics, National Chiao Tung University
64/91
ARM Modeling (3/4)
• Bus interface models (BIM) • Design signoff models
Institute of Electronics, National Chiao Tung University
65/91
ARM Modeling (4/4)
• Hardware Modeling • Fault grading netlist
Institute of Electronics, National Chiao Tung University
66/91
Intent of ModelGen
• Key requirements for ARM’s modeling
Institute of Electronics, National Chiao Tung University
environment:
– Deliver highly secure models
– Minimize time spent creating, porting and re-verifying
IP Core Design, Modeling and Verification
models
– Support mixed-source languages—HDL, C and full
custom modeling
– Support multiple design and verification environments
– Enable efficient simulation
– Provide a timing annotation solution that does not
compromise IP security
67/91
“ModelGen” Timing Shell
• Overview:
Institute of Electronics, National Chiao Tung University
– Black-box model
• Obscured IP
ModelGen Source
– User supplied timing (MGS)
IP Core Design, Modeling and Verification
(SDF)
– Single model
• Easily verifiable
– Exported State
– Programmer model
• Nine-value Logic/Full
– Supports checkpointing
68/91
Example of Model Generation Flow
Institute of Electronics, National Chiao Tung University
IP Core Design, Modeling and Verification
Frequency Frequency
Behavioral Model Block Detail Model
70/91
Functional/Timing Digital Simulation Model
• Used to tie in functional verification and timing simulation
Institute of Electronics, National Chiao Tung University
71/91
Interface Model
• Describes the operation of a component with respect to its
Institute of Electronics, National Chiao Tung University
surrounding environment.
• The external connective points (e.g ports or parameters),
functional and timing details of the interface are provided
to show how the component exchanges information with
IP Core Design, Modeling and Verification
its environment.
• Also named as bus functional model and interface
behavioral model
• For A/MS VC
– Only the digital interface is described
– Analog inputs and outputs are not considered
72/91
Peripheral Interconnect Model
• Specifies the interconnection RCs for the peripheral
Institute of Electronics, National Chiao Tung University
VC
Block
VC Internal VC
Model
Peripheral Peripheral
Interconnection Interconnection
73/91
Power Model
• Defines the power specification of the VC
Institute of Electronics, National Chiao Tung University
short-circuit currents
– Static power may be due to state-dependent static
currents
• Required for all types of power analysis: average,
peak, RMS, etc.
• Abstract level
– Black/gray box, RTL source code and cell level
74/91
Basic Power Analysis Requirements
• Any power analysis should include effects caused
Institute of Electronics, National Chiao Tung University
75/91
Physical Modeling
• Physical block implementation of hard, soft and firm VCs.
Institute of Electronics, National Chiao Tung University
76/91
Deliverables
• Deliverables in different processes
Institute of Electronics, National Chiao Tung University
– VC transfer process
• To find, evaluate and deliver VC
– VC Integration process
IP Core Design, Modeling and Verification
77/91
RMM Soft Macro Deliverables
– Product files
• Synthesizable source code
Institute of Electronics, National Chiao Tung University
– Verification files
• Bus functional model/monitors used in testbench
• Testbench files including representative verification tests
– Documentation
• User guide/Functional specification
• Datasheet
– System integration files/tools
• Cycle-based/emulation models as appropriate for macro and/or its
testbenches and BFMs
• Compilers, debuggers, real-time operating systems and software
drivers for programmable processor IP
• Installation scripts
– Documentation
• User guide/functional specification
IP Core Design, Modeling and Verification
• Datasheet
• Documentation contains version of library used and tools used
– System integration files /tools
• ISA and/or behavioral model
• Bus functional model
• Cycle-based/emulation models as appropriate for macro and/or
its testbenches and BFMs
• Compilers, debuggers, real-time operating systems and
software drivers for programmable processor IP
79/91
OpenMORE
• Open Measure of Reuse Excellence (Open
Institute of Electronics, National Chiao Tung University
MORE)
– A collaboration between Mentor Graphics and
Synopsys
IP Core Design, Modeling and Verification
80/91
Motorola's SRS
• Semiconductor Reuse Standards (SRS)
Institute of Electronics, National Chiao Tung University
81/91
Motorola's SRS
• Current four standards in SRS V2.0
Institute of Electronics, National Chiao Tung University
– IP Interface (IPI)
• Colored line standard and signal definition
• Bus Interface operation
– Verilog HDL Coding
IP Core Design, Modeling and Verification
• Coding style and module partition for test, synthesis and reuse
• Based on IEEE 1364.1 synthesizable Verilog subset,
Synopsys/Mentor RMM and Motorola's experience in direct design
– Documentation
• Defines the content and format of documents required for IP/VC such
as Processor Cores, Analog/Mixed-Signal etc.
• Document types include Creation, Use, Integration, and Manufacturing
Test.
• Long-term goal: become as independent of software and platform
82/91
FPGA Reuse Manual
• Xilinx
– To facilitate design reuse in SoRC
Institute of Electronics, National Chiao Tung University
83/91
Outline
• IP Core Designs
Institute of Electronics, National Chiao Tung University
• IP Core Verification
• IP Core Modeling and Deliverables
• System-Level Verification
IP Core Design, Modeling and Verification
84/91
System Verification
• It begins during system specification. The
Institute of Electronics, National Chiao Tung University
85/91
Verification Strategy
• Verify the individual IPs are functionally correct as
Institute of Electronics, National Chiao Tung University
stand-alone units
• Verify the interfaces between IPs are functional
correct, first in terms of the transaction type, and
IP Core Design, Modeling and Verification
86/91
IP-level Verification
• Use code coverage tools and a rigorous
Institute of Electronics, National Chiao Tung University
87/91
Interface Verification
• Interface: address/data bus. Protocols
Institute of Electronics, National Chiao Tung University
Block 1 Block 2
Bus
Block 1 RTL Block 2 RTL Transaction
Interface Interface Monitor
88/91
Functional Verification (1/2)
• Two basic approaches
Institute of Electronics, National Chiao Tung University
RTOS
90/91
Rapid Prototyping
• FPGA prototyping
Institute of Electronics, National Chiao Tung University
91/91