Design Methodologies and Circuit Technologies for Embedded Systems...

41
Benny Thörnberg Associate Professor in Electronics Design Methodologies and Circuit Technologies for Embedded Systems

Transcript of Design Methodologies and Circuit Technologies for Embedded Systems...

Page 1: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Benny Thörnberg

Associate Professor in Electronics

Design Methodologies and Circuit Technologies for Embedded Systems

Page 2: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Goal with this lecture

• Introduce you to the concepts of software hardware co-design

• Stimulate you to analyze and reflect on the Xilinx Vivado system development methodology that you are using in your projects

• How good is the Vivado workflow to handle co-design?

• Introduce basics concepts of circuit technologies for programmable hardware

• FPGA development towards SoC

Page 3: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Example - Video surveillance of a carpark

Background estimation -

+

Dynamic segmentation

Image component

labelling

Computation of descriptors

Classification of intruder

Video input

Human, Animal, Car, Motorcycle

Page 4: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Example - Video surveillance of a carpark

Background

estimation -+

Dynamic

segmentation

Image

component

labelling

Computation of

descriptors

Classification

of intruder

Video input

Human,

Animal, Car,

Motorcycle …

• What is the cost of implementing each operation?

• Cost can be a combination of speed, power, NRE cost, time-to-market …

• Estimate cost for software and different hwplatforms

• How can development work move on in parallel for all operations and for both sw and hw?

• How can we gradually refine a system specification into a synthesizable system model?

• How to verify functionality of sw on a hw platform that is not yet fully developed?

• Can High Level Synthesis be used with satisfactory result?

Page 5: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

What is hardware software co-design?

• The meeting of system level objectives by exploiting the tradeoffs between hardware and software in an embedded system through their concurrent design

• Concurrent design of hardware and software

• Integrated design environments

• Whole system functionality is captured in one executable specification

• No unjustified early assumptions on hardware software partitioning of functionality

• Partitioning is instead based on a Design Space Exploration where performance parameters are estimated on different HW/SW platforms

Page 6: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Importance of co-design?

• Improves design quality, reduce design cycle time and cost

• Good methodology to handle growing design complexity

• Exploits advances in tools and technologies• Processor cores and multi-processor architectures

• High Level Synthesis (HLS)

• Asic design, FPGA System on Chip

Page 7: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Why is co-design needed?

• Complexity of embedded systems is increasing• Control system for a washing machine

• Vision based ADAS or autonomous vehicles

• Large variation of complexity among different tasks

• Variation of nature of tasks, e.g. reactive and control flow intensive or data dominated tasks

• Most systems today include both custom designed hardware and software running on processors

• Reduce time to market

• Exploits Processor cores and heterogeneous multi-processor architectures

Page 8: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

The co-design problem?

• Specification of system

• Partitioning of functionality into smaller tasks executed as software or hardware modules

• Scheduling of software tasks

• Modelling of software and hardware during the design refinement process

Page 9: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Traditional design flow of an embedded system

Reference

Page 10: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Design flow for hardware/software co-design

Reference

Page 11: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Comparison

Reference

Page 12: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

The SystemC approach to co-design

• C++ Class library for system modelling • Single model for both software and hardware

• Explore hardware architecture

• Support for different abstraction levels • Untimed Functional (UTF)

• Timed Functional (TF)

• Bus Cycle Accurate (BCA)

• Pin Cycle Accurate (PCA)

• Register Transfer Accurate (RT)

• Provides clear separation of communication and behavior

• Enables gradual refinement of abstraction levels for behavior and communication separately

• SystemC community at www.accellera.org

• SystemC was adopted as standard IEEE 1666-2011

Page 13: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

The SystemC approach to co-design

Page 14: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

SystemC abstractions and design flow

Page 15: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Example of RTL modelling using VHDL

D Flip-Flop with Asynchronous Reset

Page 16: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Example of SystemC modelling

D Flip-Flop with Asynchronous Reset

Page 17: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Functional modelling using channel communication

Sequential inter-process communication and execution

Page 18: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Producer

Page 19: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Consumer

Page 20: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Putting it all together

Page 21: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

The execution order in this example is A, A11, A12, A13A21, A22

Top most master port is assumed being accessed first.

In-Lined Execution

Page 22: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Sequential execution semantics in multi-point

communication links

Page 23: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

The refinement procedure

Page 24: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

•Sequential communication channels are refined to concurrent cycle accurate

communication channels with a bus protocol.

•Functional processes are refined to synchronous processes, which have clocks

and resets.

Module refinement

Channel refinement

SystemC comes with three pre-defined bus protocols:

•No-handshake

•Enable-handshake

•Full-handshake

The refinement procedure

Page 25: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Ex. Module refinement of producer to RTL

Page 26: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Xilinx Vivado Design Suite High Level Design Flow

Reference: Xilinx User Guide 892

Page 27: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Xilinx Vivado handoff to software development in SDK

Reference: Xilinx User Guide 898

Page 28: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Xilinx Vivado is an IP centric system development suite

• IP core – Intellectual Property is a bundle of:• Synthesizable hardware description

• Software driver

• Test bench

• An IP-XACT xml-file description of meta-data

• IP-XACT is standardized in IEEE 1685-2009

Page 29: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Vivado High Level Synthesis (HLS)

Reference: Xilinx User Guide 902

Page 30: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Circuit Technologies for Programmable Logic

• Historical review – Programmable Array Logic

• Field Programmable Gate Arrays• CLB – Configurable Logic Block

• IOB – I/O Block

• Programmability

• From FPGA to SoC

Page 31: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

History - Programmable Array Logic – PAL

• Pre-fabricated building blocks with many AND/OR gates

• Is really build on NOR or NAND gates

• The circuit can be configured (programmed) by breakinginterconnection

• Block diagram for programmable circuit implementing logicexxpressions on sum-of-product form

• • •

inputs

AND

matrix

• • •

outputs

OR

matrixproduct

term

Page 32: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Before Programming

• All possible connections are available before programming

AND-plane

Programmable connection

OR-plane

Page 33: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

• Connections are removed

• ’Fuse’ normally connected, remove not needed ones

• ’Anti-fuse’ (normally no-connection, create connections)

A B C

F1 F2 F3F0

AB

B'C

AC'

B'C'

A

After Programming

Page 34: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

• Simplified notation – all wires are not drawn

• Show that there is a connection to the input

• Implement F0=AB + A’B’ and F1=CD’ + C’D

AB+A'B'CD'+C'D

AB

A'B'

CD'

C'D

A B C D

Example

Page 35: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

• Alternative 1: ”CPLD” (Complex Prog. Logic Device)

• Put lots of PALs onto the same chip

• Add programmable interconnects between the PALs

• Alternative 2: ”FPGA”

• Pool of logic building blocks and pool of signal routing

• Called Field Programmable Gate Array (FPGA)

• That requires

• A way to implement configurable logic gates

• A way to make the configurable interconnections

Building large programmable circuits

Page 36: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

• Logic block

• Implements combinatorialand sequential logic

• Interconnects

• Wires connecting in-and outputs to logic blocks

• I/O block

• Special block for external connection of signals

Field Programmable Gate Array - FPGA

Page 37: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Configurable Logic Block - CLB

3-input

LUT

3-input

LUT

*

*

*O

A

B

C

D

D-FF

D Q*

Out

Clk

O

O

O

O

O

• Simplified model for a CLB

• Lookup tables – LUTs are memories

Page 38: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Configurable I/O Block - IOB

• Simplified model for an IOB

Pad*

D-FF

D Q*

Clk

D-FF

Q D

*

*

Out

In

Page 39: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Programmability

• Volatile configuration

• Non Volatile configuration

SRAM

FLASH

One Time Programmable - OTP • Actel• QuickLogic• MicroChip

• Actel• QuickLogic• Lattice

• Xilinx• Altera

Page 40: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

Programmability

SRAM memory cell Floating gate transistor � FLASH

Source Drain

Gate

Floating gate

Example of OTP

metal-to-metal connection

Volatile Non Volatile

Page 41: Design Methodologies and Circuit Technologies for Embedded Systems …apachepersonal.miun.se/~bentho/ec/download/f5.pdf · What is hardware software co-design? • The meeting of

From FPGA towards System on Chip - SoC

• FPGAs have evolved towards a heterogeneous platform for computation

• Programmable Logic Area – PLA

• CLBs

• Block-RAMs

• Pool of ALU blocks

• Adders

• Multipliers

• Dynamic memory controllers

• Configurable Processor System

• Memory controller

• Communication interfaces

• System bus connection to PLA