System Modeling & HW/SW Co-Verification: Prof. Chien-Nan Liu TEL: 03-4227151 Ext:4534 Email: Jimmy@ee - Ncu.edu - TW
System Modeling & HW/SW Co-Verification: Prof. Chien-Nan Liu TEL: 03-4227151 Ext:4534 Email: Jimmy@ee - Ncu.edu - TW
Co-Verification
1
Outline
l Introduction
l System Modeling Languages
l SystemC Overview
l Data-Types
l Processes
l Interfaces
l Simulation Supports
l System Design Environments
l HW/SW Co-Verification
l Conclusion
2
Outline
l Introduction
l System Modeling Languages
l SystemC Overview
l Data-Types
l Processes
l Interfaces
l Simulation Supports
l System Design Environments
l HW/SW Co-Verification
l Conclusion
3
Design Challenges
Reference http://www.doulos.com 4
Silicon complexity v.s Software complexity
Reference http://www.doulos.com 5
Increasing Complexity in SoC Designs
6
How to Conquer the Complexity ?
l Modeling strategies
– Using the appropriate modeling for different levels
– The consistency and accuracy of the model
l Reuse existing designs
– IP reuse
– Architecture reuse (A platform based design)
l Partition
– Based on functionality
– Hardware and software
7
Traditional System Design Flow (1/2)
8
Traditional System Design Flow (2/2)
SystemLevel
nnSystem LevelDesign
Design
Hardwareand
nnHardware andSoftware
Software
AlgorithmDevelopment
nnAlgorithm Development
ProcessorSelection
nnProcessor Selection
Donemainly
nnDone mainlyininC/C++
C/C++
C/C++Environment
C/C++ Environment
ICDevelopment
nnIC Development Verification Process SoftwareDesign
wwSoftware Design
Hardware
nnHardware CodeDevelopment
wwCode Development
Implementation
nnImplementation RTOSdetails
wwRTOS details
Decisions
nnDecisions $$$ Donemainly
wwDone mainlyininC/C++
C/C++
Donemainly
nnDone mainlyininHDL
HDL
EDAEnvironment
EDA Environment C/C++Environment
C/C++ Environment
Reference : Synopsys
9
Typical Project Schedule
System Design
Hardware Design
Prototype Build
Hardware Debug
Software Design
Software Coding
Software Debug
10
Former Front-End Design Flow
Verilog
Verilog
Verilog
Testbench
Testbench
Analysis
Analysis
Simulation
Simulation
Results
Results
Refine
Synthesis
Synthesis
11
Problems with the Design Flow
Verilog
Verilog
Verilog
Testbench
Testbench
Analysis
Analysis
Not reusable
Simulation
Simulation
Results
Results
Refine
Synthesis
Synthesis
˝ Not done by designers
˝ The netlist is not preserved
14
Project Schedule with HW/SW Co-design
System Design
Hardware Design
Prototype Build
Hardware Debug
Software Design
Software Coding
Software Debug
15
Modern System Design Flow
Specification of the System
Architectural Exploration
18
Requirements of a System Design Language
19
Requirements of a System Design Language
20
Model Accuracy Requirements
l Structural accuracy
l Timing accuracy
l Functional accuracy
l Data organization accuracy
l Communication protocol accuracy
21
System Level Language
SystemC
Cynlib
Handel-C
A/RT
(Library)
VHDL/Verilog VHDL+
Replacements System
System-Level Modeling
Verilog
Language
SLDL
Entirely New Languages
SUPERLOG
Java-Based Java
22
Language Use
C/C++ SystemC TestBuilder, Verilog SUPERLOG
2.0 OpenVer,e VHDL
Very
Embedded NO NO NO
Good Good
SW
System
Level Very
OK Excel NO Good
Design Poor
Very
Verification OK Good Excel OK
Good
RTL
Design NO Good NO Excel Excel
25
Compatibility of SystemVerilog
ANSI C-style ports, named parameter passing,
comma-separated sensitivity lists and attributes
SystemVerilog 3.0/3.1
Verilog-1995
Verilog-
2001 earliest Verilog
29
Why C/C++ Based Language for System
Modeling
l Specification between architects and
implementers is executable
l High simulation speed due to the higher level
of abstraction
l Refinement, no translation into HDL (no
“semantic gap”)
l Testbench re-use
30
Advantages of Executable Specifications
l Ensure the completeness of specification
– Even components (e.g. Peripherals) are so complex
– Create a program that behave the same way as the system
l Avoid ambiguous interpretation of the specification
– Avoids unspecified parts and inconsistencies
– IP customer can evaluate the functionality up-front
l Validate system functionality before implementation
– Create early model and validate system performance
l Refine and test the implementation of the
specification
– Test automation improves Time-to-Market
31
Can Traditional C++ Standard Be Used?
33
SystemC is…
l A library of C++ classes
– Processes (for concurrency)
– Clocks (for time)
– Hardware data types (bit vectors, 4-valued logic,
fixed-point types, arbitrary precision integers)
– Waiting and watching (for reactivity)
– Modules, ports, signals (for hierarchy)
– Abstract ports and protocols (abstract
communications)
• Using channel and interface classes
34
SystemC Design Flow
C/C++ development
environment
Compiler
header files
Linker
systemC
libraries Debugger
Source file for system
and testbenches
make
Executable=simulator
Reference : DAC 2002 SystemC Tutorial
35
Outline
l Introduction
l System Modeling Languages
l SystemC Overview
l Data-Types
l Processes
l Interfaces
l Simulation Supports
l System Design Environments
l HW/SW Co-Verification
l Conclusion
36
SystemC Language Architecture
SystemC Language Layering Architecture
Not-standard
Event-Driven Simulation
Kernel
37
System Abstraction Level (1/3)
l Untimed Functional Level (UTF)
– Refers to both the interface and functionality
– Abstract communication channels
– Processes executed in zero time but in order
– Transport of data executed in zero time
l Timed Functional Level (TF)
– Refers to both the interface and functionality
– Processes are assigned an execution time
– Transport of data is assigned a time
– Latency modeled
– “Timed” but not “clocked”
38
System Abstraction Level (2/3)
l Bus Cycle Accurate (BCA)
– Transaction Level Model (TLM)
– Model the communications between system
modules using shared resources such as busses
– Bus cycle accurate or transaction accurate
• No pin-level details
l Pin Cycle Accurate (PCA)
– Fully described by HW signals and the
communications protocol
– Pin-level details
– Clocks used for timing
39
System Abstraction Level (3/3)
l Register Transfer Accurate
– Fully timed
– Clocks used for synchronization
– Complete functional details
• Every register for every cycle
• Every bus for every cycle
• Every bit described for every cycle
– Ready to RTL HDL
40
Core Language
l Time Model
– To define time unit and its resolution
l Event-Driven Simulation Kernel
– To operate on events and switch between
processes, without knowing what the events
actually represent or what the processes do
l Modules and Ports
– To represent structural information
l Interfaces and Channels
– To describe the abstraction of communication
between the design block
41
Time Model
42
Time Model (cont’)
l Time resolution
– Must be specified before any time objects (e.g
sc_time) are created
-12
– Default value is one pico-second ( 10 s )
l Time unit
SC_FS femtosecond Example for 42 picosecond
---12
15
93
6
Modules
l The basic building blocks for partitioning a design
l Declared with the SystemC keyword SC_MODULE
l Typically contain
– Ports that communicate with the environment
– Process that describe the functionality of the module
– Internal data and communication channels for the model
– Hierarchies (other modules)
l Modules can also Module
Ports
access a channel’s
RTL process
interface directly
Signals Sub-module
RTL process
44
Modules - Example
SC_MODULE (FIFO) {
Load
Full //ports, process, internal data, etc
Read FIFO sc_in<bool> load;
Empty sc_in<bool> read;
Data sc_inout<int>data;
sc_out<bool> full;
sc_out<bool> empty;
SC_CTOR(FIFO){
//body of constructor;
//process declaration, sensitivities, etc.
}
};
45
Module Instantiation
Top Module
Positional
Association
Named
Association
46
Similar Control Flow Descriptions
IF
CASE
FOR
47
Outline
l Introduction
l System Modeling Languages
l SystemC Overview
l Data-Types
l Processes
l Interfaces
l Simulation Supports
l System Design Environments
l HW/SW Co-Verification
l Conclusion
48
Data-Types
l SystemC allows users to use any C++ data types as well
as unique SystemC data types
– sc_bit – 2 value single bit type
– sc_logic – 4 value single bit type
– sc_int – 1 to 64 bit signed integer type
– sc_uint – 1 to 64 bit unsigned integer type
– sc_bigint – arbitrary sized signed integer type
– sc_biguint – arbitrary sized unsigned integer type
– sc_bv – arbitrary sized 2 value vector type
– sc_lv – arbitrary sized 4 value vector type
– sc_fixed - templated signed fixed point type
– sc_ufixed - templated unsigned fixed point type
– sc_fix - untemplated signed fixed point type
– sc_ufix - untemplated unsigned fixed point type
49
Type sc_bit
For Example :
sc_bit a,b; //Declaration
a = a & b;
a=a|b
50
Type sc_logic
l The sc_logic has 4 values, ’0’(false), ’1’(true), ’X’ (unknown),
and ’Z’ (high impedance or floating)
l This type can be used to model designs with multi-driver
busses, X propagation, startup values, and floating busses
l The most common type in RTL simulation
For Example
sc_logic x; // object declaration
x = '1';// assign a 1 value
x = 'Z';// assign a Z value
51
Fixed Precision Unsigned and Signed
Integers
l The C++ int type is machine dependent, but
usually 32 bits
l SystemC integer type provides integers from 1 to
64 bits in signed and unsigned forms
l sc_int<n>
– A Fixed Precision Signed Integer
– 2’s complement notation
l sc_uint<n>
– A Fixed Precision Unsigned Integer
52
The Operators of sc_int<n> and sc_uint<n>
53
Bit Select and Part Select
54
The Examples of sc_int<n> and sc_uint<n>
sc_int<64> x; // declaration example
sc_uint<48> y;// declaration example
sc_int<16> x, y, z;
z = x & y;// perform and operation on x and y bit
// by bit
z = x >> 4;// assign x shifted right by 4 bits to z
56
The Operators of the sc_bigint<n> and
sc_biguint<n>
l Type sc_bigint is a 2’s complement signed integer of any size
l Type sc_biguint is an unsigned integer of any size
l The precision used for the calculations depends on the sizes
of the operands used
57
Arbitrary Length Bit Vector Ísc_bv<n>
58
The New Operators for sc_bv<n>
sc_bv<64> databus;
sc_logic result;
result = databus.or_reduce();
If no 1 values are present the result of the reduction will be 0 indicating that
databus is all 0’s.
59
The Operators of the sc_bv<n>
60
Arbitrary Length Logic Vector Ísc_lv<n>
61
The Operators of the sc_lv<n>
sc_uint<16> uint16;
sc_int<16> int16;
sc_lv<16> lv16;
lv16= uint16; // convert uint to lv
int16 = lv16; // convert lv to int
63
Fixed Point Types (cont’)
l There are 4 basic types used to model fixed point
types in SystemC
– sc_fixed
– sc_ufixed
– sc_fix
– sc_ufix
l Types sc_fixed and sc_fix specify a signed fixed
point data type
l Types sc_ufixed and sc_ufix specify an unsigned
fixed point data type
64
Fixed Point Types (cont’)
l Types sc_fixed and sc_ufixed uses static
arguments to specify the functionality of the type
– Static arguments must be known at compile time
l Types sc_fix and sc_ufix can use argument
types that are non-static
– Non-static arguments can be variables
– Types sc_fix and sc_ufix can use variables to
determine word length, integer word length, etc.
65
Syntax of the Fixed Point Types
sc_fixed<wl, iwl, q_mode, o_mode, n_bits> x;
sc_ufixed<wl, iwl, q_mode, o_mode, n_bits> y;
sc_fix x(list of options);
sc_ufix y(list of options);
67
Overflow Modes
68
The Operators of Fixed Point
69
Outline
l Introduction
l System Modeling Languages
l SystemC Overview
l Data-Types
l Processes
l Interfaces
l Simulation Supports
l System Design Environments
l HW/SW Co-Verification
l Conclusion
70
Processes
l Processes are the basic unit of execution within
SystemC
l Processes are called to simulate the behavior of the
target device or system
l Processes provide the mechanism of concurrent
behavior to model electronic system
l A process must be contained in a module
l Processes cannot not be hierarchical
– No process will call another process directly
l Processes can call methods and functions that are
not processes
71
Processes (cont’)
l Processes have sensitivity lists
– a list of signals that cause the process to be invoked,
whenever the value of a signal in this list changes
72
Processes (cont’)
l Three types of SystemC processes
– Methods — SC_METHOD
– Threads — SC_THREAD
– Clocked Threads — SC_CTHREAD
73
Process — SC_METHOD
l A method that does not have its own thread of
execution
– Cannot call code with wait()
l Executed when events (value changes) occur on
the sensitivity list
l When a method process is invoked, it executes
and returns control back to the simulation kernel
until it is finished
l Users are strongly recommended not to write
infinite loops within a method process
– Control will never be returned back to the simulator
74
SC_METHOD (Example)
// rcv.h // rcv.cc
#include "systemc.h" #include "rcv.h"
#include "frame.h" #include "frame.h"
void rcv::extract_id() {
SC_MODULE(rcv) { frame_type frame;
sc_in<frame_type> xin; frame = xin;
sc_out<int> id; if(frame.type == 1) {
void extract_id(); id = frame.ida;
SC_CTOR(rcv) { } else {
SC_METHOD(extract_id); id = frame.idb;
sensitive(xin); }
} }
};
75
Process — SC_THREAD
l Thread process can be suspended and reactivated
l A thread process can contain wait() functions that
suspend process execution until an event occurs on
the sensitivity list
l An event will reactivate the thread process from the
statement that was last suspended
l The process will continue to execute until the next
wait()
76
SC_THREAD (Example of a Traffic Light)
// traff.h // traff.cc
#include "systemc.h" #include "traff.h"
SC_MODULE(traff) { void traff::control_lights() {
// input ports NSred = false;
sc_in<bool> roadsensor; NSyellow = false;
sc_in<bool> clock; NSgreen = true;
// output ports EWred = true;
sc_out<bool> NSred; EWyellow = false;
sc_out<bool> NSyellow; EWgreen = false;
sc_out<bool> NSgreen; while (true) {
sc_out<bool> EWred; while (roadsensor == false)
sc_out<bool> EWyellow; wait();
sc_out<bool> EWgreen; NSgreen = false; // road sensor triggered
void control_lights(); NSyellow = true;// set NS to yellow
int i; NSred = false;
// Constructor for (i=0; i<5; i++)
SC_CTOR(traff) { wait();
SC_THREAD(control_lights);// Thread Process NSgreen = false; // yellow interval over
sensitive << roadsensor; NSyellow = false; // set NS to red
sensitive_pos << clock; NSred = true;// set EW to green
} EWgreen = true;
}; EWyellow = false;
EWred = false;
for (i= 0; i<50; i++)
wait();
.
.
.
77
Process — SC_CTHREAD
l Clocked thread process is a special case of the thread processes
l A clocked thread process is only triggered on one edge of one
clock
– Matches the way that hardware is typically implemented with
synthesis tools
l Clocked threads can be used to create implicit state machines
within design descriptions
l Implicit state machine
– The states of the system are not explicitly defined
– The states are described by sets of statements with wait() function
calls between them
l Explicit state machine
– To define the state machine states in a declaration
– To use a case statement to move from state to state
78
SC_CTHREAD (Example of a BUS function)
Process or Channel
(owner or event)
event
trigger trigger
trigger
81
Events in Classical Hardware Modeling
82
Relationship Between the Events
l An event object may also be used directly by
one process P1 to control another process P2
– If P1 has access to event object E and P2 is
sensitive to or waiting on E, then P1 may trigger
the execution of P2 by notifying E
– In this case, event E is not associated with the
change in a channel, but rather with the execution
of some path in P1
83
Sensitivity
l The sensitivity of a process defines when this
process will be resumed or activated
l A process can be sensitive to a set of events.
l Whenever one of the corresponding events is
triggered, the process is resumed or activated.
l Two types
– Static Sensitivity
– Dynamic Sensitivity
84
Static Sensitivity
85
Dynamic Sensitivity
l It is possible for a process to temporarily override
its static sensitivity list
– During simulation a thread process may suspend itself
– To designate a specific event E as the current event on
which the process wishes to wait
– Then, only the notification of E will cause the thread
process to be resumed
– The static sensitivity list is ignored
86
Dynamic Sensitivity — wait()
wait(E)
next_trigger(200, SC_NS, E)
Otherwise, when the timeout expires, the method process will be triggered and
its static sensitivity list will be back in effect
89
Special Dynamic Sensitivity for
SC_CTHREAD — wait_until()
l The wait_until() method will halt the execution of
the process until a specific event has occurred.
l This specific event is specified by the expression
to the wait_until() method.
90
Special Dynamic Sensitivity for
SC_CTHREAD — watching()
91
Special Dynamic Sensitivity for
SC_CTHREAD — watching() (Cont’)
// datagen.h // datagen.cc
#include "systemc.h" #include "datagen.h"
SC_MODULE(data_gen) { void gen_data() {
sc_in_clk clk; if (reset == true) {
sc_inout<int> data; data = 0;
sc_in<bool> reset; }
void gen_data(); while (true) {
SC_CTOR(data_gen){ data = data + 1;
SC_CTHREAD(gen_data, clk.pos()); wait();
watching(reset.delayed() == true); data = data + 2;
} wait();
}; data = data + 4;
wait();
}
}
94
Example of Modules, Ports, Interfaces,
and Channels
port
Module with a port
interface
primitive channel
Hierarchical channel
with a port
Port-channel binding
Module 1 HC Module 2
95
Interfaces
l The “windows” into channels that describe the set of
operations
l Define sets of methods that channels must implement
l Specify only the signature of each operation, namely,
the operation’s name, parameters, and return value
l It neither specifies how the operations are
implemented nor defines data fields
96
Interfaces (cont’)
l All interfaces must be derived, directly or indirectly,
from the abstract base class : sc_interface
l The concept of interface is useful to model layered
design
– Connection between modules which are different level of
abstraction
l Relationship with ports
– Ports are connected to channels through interfaces
– A port that is connected to a channel through an interface
sees only those channel methods that are defined by the
interface
97
Interface Examples
99
Interface Examples
100
Ports
l A port is an object through which a module can
access a channel’s interface
l A port is the external interface that pass information to
and from a module, and trigger actions within the
module
l A port connects to channels through interfaces
101
Ports (cont’)
l A port can have three different modes of operation
– Input (sc_in<T>)
– Output (sc_out<T>)
– Inout (sc_inout<T>)
102
Ports (Cont’)
l A port of a module can be connected to
– Zero or more channels at the same level of hierarchy
– Zero or more ports of its parent module
– At least one interface or port
l sc_port allows accessing a channel’s interface
methods by using operator or operator [ ]
l In the following example:
– “input” is an input port of a process
– read() is an interface method of the attached channel
103
Access Ports
Read/Wrire
through
methods
Hardware
types cannot
be accessed
directly
104
Specialized Ports
105
Port-less Channel Access
106
Port-less Channel Access (cont’)
l For inter-module level communication, ports must be
used to connect modules to channels
– Ports are handles for communicating with the “outside
world” (channels outside the module)
– The handles allow for checking design rules and attaching
communication attributes, such as priorities
– From a software point-of-view they can be seen as a kind
of smart pointers
l For intra-module level communication, direct access
to channels is allowed
– Without using the ports.
– Access a channel’s interface in a “port-less” way by
directly calling the interface methods.
107
Channels
l A channel implements one or more interfaces, and
serves as a container for communication functionality
l A channel is the workhorse for holding and
transmitting data
l A channel is not necessarily a point-to-point
connection
l A channel may be connected to more than two
modules
l A channel may vary widely in complexity, from
hardware signal to complex protocols with embedded
processes
l SystemC 2.0 allows users to create their own channel
types
108
Channels (cont’)
l Primitive channels
– Do not exhibit any visible structure
– Do not contain processes
– Cannot (directly) access other primitive channels
l Hierarchical channels
– Basically are modules
– Can have structure
– Can contain other modules and processes
– Can (directly) access other channels
109
Primitive Channels
l The hardware signal
– sc_signal<T>
l The FIFO channel
– sc_fifo<T>
l The mutual-exclusion lock (mutex)
– sc_mutex
110
The Hardware Signal – sc_signal<T>
// controller.h SC_CTOR(controller) {
#include "statemach.h" // .... other module statements
s1 = new state_machine ("s1");
SC_MODULE(controller) { s1->clock(clk); // special case port to port binding
sc_in<sc_logic> clk; s1->en(lstat); // port en bound to signal lstat
sc_out<sc_logic> count; s1->dir(down); // port dir bound to signal down
sc_in<sc_logic> status; s1->st(status); // special case port to
sc_out<sc_logic> load; // port binding
sc_out<sc_logic> clear }
sc_signal<sc_logic> lstat; };
sc_signal<sc_logic> down;
state_machine *s1; //state is another module
111
The FIFO Channel – sc_fifo<T>
l To provide both blocking and nonblocking versions of access
l Sc_fifo<T> implements the interfaces sc_fifo_in_if<T> and
sc_fifo_out_if<T>
Blocking version
If the FIFO is empty
suspend until more data is available
If the FIFO is full
suspend until more space is available
NonBlocking version
If the FIFO is empty
do nothing
If the FIFO is full
do nothing
112
The Mutual-Exclusion Lock (Mutex)
– sc_mutex
113
Channel Design Rules
114
Channel Attributes
l Channel attributes can be used for a per-port
configuration of the communication
l Channel attributes are helpful especially when modules
are connected to a bus
l Attributes that can be used
– Addresses (in case the module doesn't use specialized ports,
addresses can be specified as arguments of the access
methods)
– Addressing schemes (e.g. constant address vs. auto-increment)
– Connect module as master or slave or master/slave
– Priorities
– Buffer sizes
115
Channel Attributes (Example)
l Let mod be an instance of a module and let port be a port
of this module
// create a local channel
message_queue mq;
...
// connect the module port to the channel
mod.port( mq );
...
116
Hierarchical Channels
l To model the new generation of SoC communication
infrastructures efficiently
l For instance, OCB (On Chip Bus)
– The standard backbone from VSIA
– The OCB consisting of several intelligent units
• Arbiter unit
• A Control
• Programming unit
• Decode unit
l For modeling complex channels such as the OCB
backbone, primitive channels are not very suitable
– Due to the lack of processes and structures
l For modeling this type of channels, hierarchical
channels should be used
117
Primitive Channels v.s Hierarchical
Channels
l Use primitive channels
– When you need to use the request-update scheme
– When channels are atomic and cannot reasonably
be chopped into smaller pieces
– When speed is absolutely crucial (using primitive
channels we can often reduce the number of delta
cycles)
– When it doesn’t make any sense trying to build up
a channel (such as a mutex) out of processes and
other channels
118
Primitive Channels v.s Hierarchical
Channels (Cont’)
119
Outline
l Introduction
l System Modeling Languages
l SystemC Overview
l Data-Types
l Processes
l Interfaces
l Simulation Supports
l System Design Environments
l HW/SW Co-Verification
l Conclusion
120
Clock Objects
l Clock objects are special objects which generate
timing signals to synchronize events in the simulation
l Clocks order events in time so that parallel events in
hardware are properly modeled by a simulator on a
sequential computer
l Typically clocks are created at the top level of the
design in the testbench and passed down through the
module hierarchy to the rest of the design
121
Clock Objects (Example)
This declaration will create a clock object named ck1 with a period of 20ns,
a duty cycle of 50%, the first edge will occur at 0 time units,
and the first value will be true
122
Simulation Control
simulate for
1000ns
due to the
use of wait
123
Design Example: 4-bit LFSR
X0
D D D D
R1 R2 R3 R4
131
Platform and Compiler
l Typically, a compiler for C++ standard can
compile the SystemC source code well
– SystemC just a extended template
l GNU gcc for many platform
l Sun with solaris
– Forte c++
l HP
– Hp aC++
l Intel with Microsoft OS
– MS Visual C++
132
System Design Environments
l Synopsys
– CoCentric System Studio (CCSS)
l Cadence
– Signal Processing Worksystem (SPW)
l Agilent
– Advanced Design System (ADS)
l CoWare
– N2C Design System
l ……
133
CoCentric System Level Design Platform
Processor Model
HW/SW Co-design
134
CoCentric System Level Design Platform
135
CoCentric System Level Design Platform
136
CoCentric System Level Design Platform
l Path to implementation
– Synthesizable SystemC code generated automatically
Available System
137
Advanced Design System
ADS
DSP Designer
C/C++ Measurement
HDL Models MATLAB
Models Instrumentation
138
Outline
l Introduction
l System Modeling Languages
l SystemC Overview
l Data-Types
l Processes
l Interfaces
l Simulation Supports
l System Design Environments
l HW/SW Co-Verification
l Conclusion
139
Traditional HW/SW Verification Flow
140
Pre-Silicon Prototype
l Virtual prototype
– Simulation environment
l Emulator
– Hundreds kilo Hz
l Rapid prototype
– Combination of FPGAs and dedicated chips that can be
interconnected to instantiate a design
– Tens mega Hz
l Roll-Your-Own (RYO) prototype
– FPGA and Board
– Tens mega Hz
141
Virtual Prototypes
l Definition
– A simulation model of a product , component, or
system
l Features
– Higher abstraction level
– Easily setup and modify
– Cost-effective
– Great observability
– Shorten design cycles
142
Verification Speed
RTL
Handshake? reset?
143
Verification Speed
Algorithm
Level 1000X
Transaction
Level 100X
1 10X
RTL
144
HW/SW Co-Simulation
l Couple a software execution environment with a
hardware simulator
l Provides complete visibility and debugger
interface into each environment
l Software normally executed on an Instruction Set
Simulator (ISS)
l A Bus Interface Model (BIM) converts abstract
software operations into detailed pin operations
145
Advantages of HW/SW Co-Simulation (1/2)
146
Advantages of HW/SW Co-Simulation (2/2)
l Software Engineers
– Simulation model replace stub code
– More time to develop & debug code
– Validate code against hardware as you develop
– Maintain software design integrity
l Hardware Engineer
– Embedded software replaces test bench
– Reduce the chance of an ASIC or Board spin
– Resolve gray areas before tape out
147
Synopsys’s SystemC Solution
l System Studio
– SystemC simulation System Studio
l SystemC Compiler DesignWare
– SystemC synthesis
l DesignWare SystemC
– AMBA/ARM SystemC Compiler
C/C++
models
Design Compiler/ Compiler
Physical Compiler
SoC
Reference : Synopsys
148
Synopsys System Studio
Architecture
Algorithm
ARM9 / AHB
SystemC
Simulation
Hardware
Software
Debugger
Memory
Bus
Unified Environment
Verilog SystemC
Single-kernel
VHDL PSL/Sugar
architecture
AMS Algorithm
Acceleration-on-Demand