CAD_for_Codesign
Download
Report
Transcript CAD_for_Codesign
Computer-Aided Co-design
Methods and Tools
Part of
HW/SW Codesign of Embedded
Systems Course (CE 40-226)
Winter-Spring 2001
Codesign of Embedded Systems
1
Today programme
Introduction to HW/SW Codesign
Computer-aided codesign methods and
tools
Winter-Spring 2001
Codesign of Embedded Systems
2
Motivations
System designer goals
Satisfy system-level specifications in a
short time
Maximize system value
Performance, power consumption, applicability
to various user demands
Minimize cost
Number of HW parts, size of silicon die, cost of
SW development
Winter-Spring 2001
Codesign of Embedded Systems
3
Motivations (cont’d)
CAD tools are useful, because
Require formal system-level specification =>
structured design methodology
Facilitate HW and SW reuse
Support analysis and validation tools
Facilitate design-space exploration
Overall objective in codesign tool R&D
Provide IDE for concurrent specification,
validation, and synthesis of both HW and SW
Winter-Spring 2001
Codesign of Embedded Systems
4
Modeling
Model of computation vs. HW/SW language
Computation model:
Languages:
Has an underlying mathematical structure: FSM, Petri net
Some are means of expressing a computation model
Some don’t have a formal semantics
Functional modeling of digital systems
Normally C or C++, to check generic properties
and derive some measure of performance & cost
Too general. Do not capture all necessary
specifications of HW component
Winter-Spring 2001
Codesign of Embedded Systems
5
Modeling (cont’d)
Some specification models
“FSM or interconnection of FSMs” Model
Partial-orders of tasks
Graphical representation: Statecharts
Textual languages: SDL, Esterel
HW components: Verilog / VHDL
Synchronous data-flows: Silage, DFL
A perfect language for system is idealistic
Heterogeneity of system components
Conflicting interests of CAD developers and users
Lack of a formalism to capture well all features
6
Winter-Spring 2001
Codesign of Embedded Systems
Validation
Validation vs. verification
Approaches to validation
Formal verification
Simulation (co-simulation)
Emulation
Winter-Spring 2001
Codesign of Embedded Systems
7
Validation (cont’d)
Simulation
cannot ensure correctness, but still useful
Heterogeneity
Weakly heterogeneous
Lumped, GP computing systems. Simple control systems
Can be simulated by extending HDL simulators
Strongly heteroneous
Cellular phones, avionics
Require specialized simulation environments
Winter-Spring 2001
Codesign of Embedded Systems
8
Validation (cont’d)
Simulator features for weakly
heterogeneous systems
Adequate timing accuracy
Fast execution
Visibility of internal registers for debugging
Strategy 1: Use HDL simulator + HDL
models for processor and ASICs
Long HW simulation time for each
instruction: accuracy vs. speed tradeoff
Winter-Spring 2001
Codesign of Embedded Systems
9
Validation (cont’d)
Strategy 2: avoid processor HDL model
Use HW/SW comm. Protocol
SW is compiled and communicates with the
HDL simulator which models ASIC
HDL simulator is bottle-neck
Internal registers not visible
Winter-Spring 2001
Codesign of Embedded Systems
10
Validation (cont’d)
Strategy 3: Emulate HW on a reconfigurable platform
Automatic partitioning tools to minimize
system-simulation time have been
developed
Visibility of internal states is limited =>
probable slow debugging
Winter-Spring 2001
Codesign of Embedded Systems
11
Validation (cont’d)
Simulation of strongly heterogeneous
and distributed systems
Specialized simulators: Ptolemy
Extesible, OO kernel
Supports several computation models
Models are not implemented in simulation
kernel, but in domains that can interact without
knowing their semantics
Some developed domains: data-flow, discreteevent. More domains are user-insertable.
Winter-Spring 2001
Codesign of Embedded Systems
12
Synthesis
What’s Synthesis/Co-Synthesis
System-level Partitioning
Hardware synthesis
Software synthesis and retargetable
compilation
Interface synthesis
Winter-Spring 2001
Codesign of Embedded Systems
13
Synthesis (cont’d)
HW: HDL
(Behavioral,
DataFlow, Structural),
Schematic
Specification
Co-Synthesis
SW: Algorithm,
Textual/Graphical
representation
Synthesis
RTL, Gate level,
Transistors,
Layout
Winter-Spring 2001
Detailed Representation
of Implementation
Codesign of Embedded Systems
Executable or
Compilable
code: The
program(s), OS
routines 14
Synthesis (cont’d)
Traditional System Design Process
Tasks
SW design
SW test
System
design
PCB test
ASIC design
Fabrication
Test
Time
Copyright J. Madsen,
some modifications applied
Winter-Spring 2001
Codesign of Embedded Systems
15
Synthesis (cont’d)
Co-Design Process
Tasks
SW design
SW test
System
design
Shared Design
ASIC design
Fabrication
PCB test
Test
Time
System-Level Partitioning
Winter-Spring 2001
Codesign of Embedded Systems
16
Synthesis (cont’d)
Some special cases
Synthesis of ISPs
HLS techniques are applicable to high-level models
of processors
Many high-level decisions are not automatic yet
Example: Pipeline organization, Datapath design
Reason:
Few new ISPs compared to ASICs
Performance is very sensitive
High production-volume recovers high design costs
HLS is, however, used for control functions
Winter-Spring 2001
Codesign of Embedded Systems
17
Synthesis (cont’d)
Some special cases
Design of compilers
Corresponds to the processor architecture
Compilers are co-designed with processors
Automated tools for synthesis of pipeline control
unit + compiler
Synthesis of lumped embedded systems
Natural evolution of HLS
Uniform specification + manually or
automatically partitioning into
HW+SW+interface
Winter-Spring 2001
Codesign of Embedded Systems
18
Synthesis (cont’d)
System-Level Partitioning
One extreme: Full HW solution
Other extreme: Full SW solution
High performance due to Parallelism
High cost and long time of ASIC fabrication
High-performance, low-cost processors
Operation serialization
Lack of support for specific tasks
Best solution is a mix of HW and SW
Winter-Spring 2001
Codesign of Embedded Systems
19
Synthesis (cont’d)
System-Level Partitioning
Major approaches to Partitioning
Co-synthesis of dedicated co-processors for
SW execution acceleration
Migration of non-critical functions to SW
Complementary objectives
Maximize performance
Minimize system cost, subject to required
performance
Winter-Spring 2001
Codesign of Embedded Systems
20
Synthesis (cont’d)
System-Level Partitioning
Coprocessor approach:
COSYMA tool suite
System model in C*
SW implementation of
system readily available
Uses CDFG
Identifies performance
bottlenecks
Migrates bottleneck to
corresponding ASIC
Three times faster execution
of an algorithm in HDTV
Winter-Spring 2001
Migration to SW approach:
VULCAN tool suite
System model in HardwareC
System is HW synthesizable
using Olympus
Uses CDFG
Partitions CDFG into SW
threads and HW circuits
Automatically generates
units to interface processor
to the ASIC
Codesign of Embedded Systems
21
Synthesis (cont’d)
System-Level Partitioning
Problems in Partitioning
Quality of partition depends on performance/cost
estimators
Estimators base on abstract system representation
(CDFG)
Estimators need to be fast
A coarse-grained partition may be of more interest
Module/Unit level partition instead of operation-level
Less degree of freedom
Designers’ expertise can be more easily exploited by
allowing macroscopic choices
Winter-Spring 2001
Codesign of Embedded Systems
22
Synthesis (cont’d)
HW synthesis
Mostly based on Graph-theoretic approaches
and algorithms
(To be presented as an extra class)
Winter-Spring 2001
Codesign of Embedded Systems
23
Synthesis (cont’d)
SW synthesis
SW Synthesis and Retargetable Compilation
SW synthesis Compilation
Maybe preceded by automatic SW generation steps
Compilation specialties in embedded systems
Code is compiled once=> compilation time not important,
maximum optimization is desired
RT constraints=>code must be tight and fast => assembly
Embedded systems often use ASIPs=>unordinary
architectures=>hard to compilers
Winter-Spring 2001
Codesign of Embedded Systems
24
Synthesis (cont’d)
SW synthesis
Retargetable Compilers
Developing a new compiler for each new
ASIP is unreasonable=>retargetable
compilers
Classification according to retargeting time
Portable compiler
Compiler-compiler
Machine-independent compiler
Winter-Spring 2001
Codesign of Embedded Systems
25
Synthesis (cont’d)
SW synthesis
Compiler components
Source-code-dependant
Front-end
Code-generation/optimization
intermediate stage
Code-generation
back-end
instruction
selection
Winter-Spring 2001
register
allocation
Codesign of Embedded Systems
instruction
scheduling
26
Synthesis (cont’d)
SW synthesis
Other topics in retargetable compilation
Micro-programmed ASIPs
Compacting the micro-program
Winter-Spring 2001
Determine ILP (Instruction-Level Parallelism)
Encoding of each word
Codesign of Embedded Systems
27
Synthesis (cont’d)
Interface synthesis
Interface Synthesis
Generation of SW routines and/or HW circuits to
interface processor and ASIC to a communication
channel operating under a given protocol (e.g. PCI,
VME)
Several standards available & system-level model
should avoid specifying details of comm.
mechanism
An approach: model comm. protocol with a language
(Promela) and derive C++ routines and gate-level HW out
of it
Winter-Spring 2001
Codesign of Embedded Systems
28
Synthesis (cont’d)
Interface synthesis
Interface Synthesis (cont’d)
Specific problems arise from:
Partitioning a system into interacting HW and SW
Interfacing processors to peripherals (sensors, actuators)
Communication and synchronization
CHINOOK: automatic (processor port allocation, deciding
to implement device drivers in HW or SW)
Scheduling the processor communication
Winter-Spring 2001
Complicated under RT constraints
Complicated under data-dependant delays
Codesign of Embedded Systems
29
Summary
System
Specification
Verification
Co-Synthesis
Partitioning
Verification
HW Parameter
Estimation
SW Parameter
Estimation
HW
Synthesis
SW
Synthesis
ASIC
OS
EXE Code
System
Integration
Winter-Spring 2001
Verification
Codesign of Embedded Systems
Verification
Final Verification
30
Summary (cont’d)
CAD Tools are essential to progress in electrical
system design
Design of digital components of systems benefit from
HW/SW Codesign
At present, Codesign CAD support is still weak
Co-simulators commercially available
Others (co-synthesis, verification, IDEs, etc) growing up
Impact of CAD tools on system-level design will be
more profound than their impact on IC design
Winter-Spring 2001
Codesign of Embedded Systems
31
What we learned today
CAD tools are essential to success in this field
They must support Modeling (specification),
Validation, and Synthesis in a single integrated
environment
Major constituents of codesign
Modeling (Specification)
Validation (Verification)
Synthesis (Co-synthesis)
Winter-Spring 2001
System-level partitioning
HW synthesis
SW synthesis
Interface synthesis
Codesign of Embedded Systems
32
Complementary notes
Postponed Verilog Short Course
Instructor:
Farshid Soheili, Emad Semicon. Co.
First session
Saturday: Esfand 13th
“CE-202” room, 15 o’clock
Take the first chapter of DeMicheli’s
book from “Publications Room”
Winter-Spring 2001
Codesign of Embedded Systems
33
Complementary notes (cont’d)
Optional paper presentation
Any subtopic from last and today
programme:
Computer-Aided Codesign Methods and Tools
Project
Today is date to choose and announce your
partner for the final project
Winter-Spring 2001
Codesign of Embedded Systems
34