winter-spring 2001codesign of embedded systems1 computer-aided co-design methods and tools part of...

34
Winter-Spring 2001 Codesign of Embedded System s 1 Computer-Aided Co- design Methods and Tools Part of HW/SW Codesign of Embedded Systems Course (CE 40-226)

Upload: owen-mosley

Post on 28-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms1

Computer-Aided Co-design Methods and Tools

Part ofHW/SW Codesign of

Embedded Systems Course (CE 40-226)

Page 2: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms2

Today programme Introduction to HW/SW Codesign

Computer-aided codesign methods and tools

Page 3: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms3

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

Page 4: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms4

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

Page 5: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms5

Modeling Model of computation vs. HW/SW language

Computation model: Has an underlying mathematical structure: FSM, Petri net

Languages: 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

Page 6: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms6

Modeling (cont’d) Some specification models

“FSM or interconnection of FSMs” Model Graphical representation: Statecharts Textual languages: SDL, Esterel

Partial-orders of tasks 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

Page 7: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms7

Validation Validation vs. verification Approaches to validation

Formal verification Simulation (co-simulation) Emulation

Page 8: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms8

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

Page 9: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms9

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

Page 10: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms10

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

Page 11: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms11

Validation (cont’d) Strategy 3: Emulate HW on a re-

configurable platform Automatic partitioning tools to

minimize system-simulation time have been developed

Visibility of internal states is limited => probable slow debugging

Page 12: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms12

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, discrete-event. More domains are user-insertable.

Page 13: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms13

Synthesis What’s Synthesis/Co-Synthesis System-level Partitioning Hardware synthesis Software synthesis and

retargetable compilation Interface synthesis

Page 14: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms14

Synthesis (cont’d)

Specification

Detailed Representation of Implementation

Synthesis

HW: HDL (Behavioral, DataFlow,

Structural), Schematic

RTL, Gate level,

Transistors, Layout

SW: Algorithm,Textual/Graphical

representation

Executable or Compilable code: The

program(s), OS routines

Co-Synthesis

Page 15: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms15

Fabrication Test

Synthesis (cont’d)

Systemdesign

ASIC design

SW design

PCB test

SW test

Time

Tasks

Copyright J. Madsen, some modifications applied

Copyright J. Madsen, some modifications applied

Traditional System Design Process

Page 16: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms16

Synthesis (cont’d)

Shared Design

Co-Design Process

SW design

ASIC design Fabrication Test

PCB test

SW test

Time

Tasks

Systemdesign

System-Level Partitioning

Page 17: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms17

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

Page 18: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms18

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

Page 19: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms19

Synthesis (cont’d)System-Level Partitioning One extreme: Full HW solution

High performance due to Parallelism High cost and long time of ASIC fabrication

Other extreme: Full SW solution High-performance, low-cost processors Operation serialization Lack of support for specific tasks

Best solution is a mix of HW and SW

Page 20: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms20

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

Page 21: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms21

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

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

Page 22: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms22

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

Page 23: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms23

Synthesis (cont’d)HW synthesis Mostly based on Graph-theoretic

approaches and algorithms (To be presented as an extra class)

Page 24: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms24

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

Page 25: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms25

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

Page 26: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms26

Code-generationback-end

Synthesis (cont’d)SW synthesis Compiler components

Code-generation/optimizationintermediate stage

Source-code-dependantFront-end

instructionselection

registerallocation

instructionscheduling

Page 27: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms27

Synthesis (cont’d)SW synthesis Other topics in retargetable

compilation Micro-programmed ASIPs

Compacting the micro-program Determine ILP (Instruction-Level Parallelism) Encoding of each word

Page 28: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms28

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

Page 29: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms29

Synthesis (cont’d)Interface synthesis Interface Synthesis (cont’d)

Specific problems arise from: Partitioning a system into interacting HW and SW

Communication and synchronization Interfacing processors to peripherals (sensors,

actuators) CHINOOK: automatic (processor port allocation,

deciding to implement device drivers in HW or SW) Scheduling the processor communication

Complicated under RT constraints Complicated under data-dependant delays

Page 30: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms30

Summary

Co-Synthesis

SystemSpecification

Partitioning

HW ParameterEstimation

SW ParameterEstimation

SystemIntegration

Verification

Verification

Verification

Verification

Final Verification

SWSynthesis

HWSynthesis

ASIC OS

EXE Code

Page 31: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms31

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

Page 32: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms32

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)

System-level partitioning HW synthesis SW synthesis Interface synthesis

Page 33: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms33

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”

Page 34: Winter-Spring 2001Codesign of Embedded Systems1 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 Syste

ms34

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