Integrated Development Environment - National Chiao Tung...

78
1 WWW.ANDESTECH.COM Integrated Development Environment Integrated Development Environment

Transcript of Integrated Development Environment - National Chiao Tung...

Page 1: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

1

WWW.ANDESTECH.COM

Integrated Development EnvironmentIntegrated Development Environment

Page 2: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

2

Page 2

�IDE

Page 3: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

3

Page 3

AndeShape

AICE

IDEAndESLiveSimulator

AndESLiveBuilder

Toolchains

AndeSight AndESLive

Page 4: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

4

Page 4

AndeSight IDEAndeSight IDE

�Window

�View

�Perspective

�Editor

�Preferences…

�Help

�Advanced features

Page 5: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

5

Page 5

Andes Total SW SolutionAndes Total SW Solution

user

Integrated Development Environment (IDE)Integrated Development Environment (IDE)

Toolchains: Compiler

AssemblerLinker

Debugger

Toolchains: Compiler

AssemblerLinker

Debugger

Evaluation Board

Evaluation Board

ICEICE

SoC Builder

SoC Builder

SimulationEngine

SimulationEngine

AndeSightAndeSight™™

AndESLiveAndESLive™™ AndeShapeAndeShape™™

AndESLive™AndESLive™ AndeSight™AndeSight™ AndeShape™AndeShape™Andes SW SolutionAndes SW Solution == ++ ++

Page 6: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

6

Page 6

Integrated Development EnvironmentIntegrated Development Environment

Toolbar

Page 7: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

7

Page 7

WindowsWindows

�What is window

� The overall outer frame

�New window

� Menu bar � Window � New Window• Same workspace and perspective

� Start another AndeSight

• Different workspace

Page 8: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

8

Page 8

WindowsWindows

Page 9: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

9

Page 9

ViewsViews

�What is view

� View provides alternative presentations as well as ways to navigate the information in your Workbench.

Page 10: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

10

Page 10

ViewsViews

Page 11: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

11

Page 11

PerspectivesPerspectives

�What is perspective

� The initial set and layout of views in the Workbench window.

� Each perspective provides a set of functionality aimed at accomplishing a specific type of task or works.

�We provide

� C/C++ coder

� Debug

� VEP Config (Andeslive)

� Profiling

Page 12: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

12

Page 12

PerspectivesPerspectives

Page 13: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

13

Page 13

Perspectives – Debug and ProfilerPerspectives – Debug and Profiler

Page 14: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

14

Page 14

Perspectives – VEP (Virtual Evalution Platform) Config

Perspectives – VEP (Virtual Evalution Platform) Config

Page 15: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

15

Page 15

Perspectives – Others…Perspectives – Others…

Page 16: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

16

Page 16

EditorEditor

�Editors we provide

� C/C++

� Makefile

� Assembly

� Binary Hex

� VEP

Page 17: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

17

Page 17

Features of C/C++ EditorFeatures of C/C++ Editor

�Content assistant

�Function Definition

�Auto completion

�Syntax highlight

�Formatter

Page 18: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

18

Page 18

Content assistantContent assistant

Page 19: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

19

Page 19

Show Function DefinitionShow Function Definition

Page 20: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

20

Page 20

Text Auto CompletionText Auto Completion

Page 21: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

21

Page 21

Template SupportTemplate Support

Page 22: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

22

Page 22

FormatterFormatter

Page 23: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

23

Page 23

PreferencesPreferences

�What settings are provided?

� Is used to set user preferences

� Can be searched using the filter function

Page 24: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

24

Page 24

PreferencesPreferences

Page 25: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

25

Page 25

Preference to Change FontsPreference to Change Fonts

Page 26: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

26

Page 26

Commands and FunctionsCommands and Functions

Page 27: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

27

Page 27

Help SystemHelp System

�Context sensitive help

� Hot key: F1

�Help Content

�Search …

Page 28: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

28

Page 28

ProfilingProfiling

Andesight IDE

Andeslive Simulator

ProfilingProfiling

AnalysisAnalysis

EngineEngine

Prof.out

Profiling data preparationProfiling data preparation

Trigger Profiling

Page 29: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

29

Page 29

Profiling OptionsProfiling Options

� Function Level� Pure function profiling without branch and cache information� With Branch Summary� With Cache Summary� With Branch and Cache Summary

� Branch Level� Pure branch profiling without cache information � With Cache Summary

� Views� Flat View� Call View� Timeline View� Chart View

� C and C++ Support� Fast Mode and Extended Mode� Goto Source

Page 30: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

30

Page 30

Profiling OptionsProfiling Options

Page 31: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

31

Page 31

Performance TuningPerformance Tuning

CoCo--SimSim

ProfilingProfiling

Meet Spec.Meet Spec.

ENDEND

Tune Performance by CPU ConfigurationTune Performance by CPU Configuration

Tune Performance by Software WorksTune Performance by Software Works

Yes

No

Page 32: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

32

Page 32

Tune Performance by ProfilerTune Performance by Profiler

Profile Result of 8KB I$/D$

Profile Result of 64KB I$/D$

Page 33: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

33

Page 33

Profiling – Timeline ViewProfiling – Timeline View

Page 34: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

34

Page 34

Profiling – Call ViewProfiling – Call View

Page 35: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

35

Page 35

Profiling – Flat ViewProfiling – Flat View

Page 36: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

36

Page 36

Branch Level with Cache SummaryBranch Level with Cache Summary

Page 37: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

37

Page 37

Build OptionsBuild Options

Page 38: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

38

Page 38

Endian – SWEndian – SW

SW endian setting gives –EL or –EB option to compiler

Page 39: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

39

Page 39

Endian – HWEndian – HW

HW endian setting gives option to simulator

Page 40: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

40

Page 40

Library – SWLibrary – SW

SW library setting gives –mlib option to linker

Page 41: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

41

Page 41

Library – HWLibrary – HW

HW library setting should enable Virtual IO support and select proper library for simulator

Window > Show View > Other

VEP > System Call Emulation

Page 42: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

42

Page 42

Toolchain – SWToolchain – SW

Toolchain includes one for hardcore, one for softcore

Page 43: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

43

Page 43

CPU SelectionCPU Selection

Virtual SoC Builder provides one hardcore and one softcore

Page 44: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

44

Page 44

�Virtual Platform IntroductionFrom physical to virtual and vice versa

Page 45: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

45

Page 45

What is Virtual Platform?What is Virtual Platform?

“It is a system-level simulation model that characterizes real system behavior. It operates at the level of processor instructions, function calls, memory accesses and data packet transfers, as opposed to the bit-accurate, nanosecond-accurate logic transitions of a register transfer level (RTL) model.”*

*from the book ESL Design and Verification: A Prescription for Electronic System Level Design Methodology. B. Bailey, G. Martin and A. Piziali.

Elsevier Morgan Kaufmann, 2007

Andes Development Platform Andes Virtual Platform

Page 46: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

46

Page 46

Integrated Development Environment

S/W Development with Physical H/W PlatformS/W Development with Physical H/W Platform

SW Developer Desktop Target Hardware

DEVICE SOFTWARE STACK

External System Connectivity

Physical Target Connection

On-Chip-Debug, Ethernet, USB, …

PHYSICAL HARDWARE

Operating Systems

BSP/Device Drivers

Middleware

Applications

Operating Systems

BSP/Device Drivers

Middleware

Applications

Editor

Compiler

Debugger

Source Code Analysis

Build

Profiling Tools

CM

Other plug-in tools

Page 47: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

47

Page 47

Integrated Development Environment

S/W Development with Virtual PlatformS/W Development with Virtual Platform

SW Developer Desktop

DEVICE SOFTWARE STACK

Virtual Platform

Operating Systems

BSP/Device Drivers

Middleware

Applications

Operating Systems

BSP/Device Drivers

Middleware

Applications

Editor

Compiler

Debugger

Source Code Analysis

Build

Profiling Tools

CM

Other plug-in tools

Tools/API

External System Connectivity

Page 48: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

48

Page 48

�Andes Virtual Evaluation Platform

Page 49: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

49

Page 49

Andeshape™ Platform SoC: AG101Andeshape™ Platform SoC: AG101

N1213N1213Bus

Controller

BusController

MAC10/100

MAC10/100 USB2.0USB2.0

LCDController

LCDController

SDRAM Controller

SDRAM Controller

DMA Controller

DMA Controller

SRAMController

SRAMController

PWMPWM I2CI2C GPIOGPIO INTCINTC WDTWDT TimerTimer RTCRTC

ST

UART

STUART

BT

UART

BTUART SSPSSP CFCF I2SI2S SD/

MMC

SD/MMC

PowerManager

PowerManager

AHB to APB

Bridge

AHB to APB

Bridge

AHB Bus

APB Bus

Page 50: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

50

Page 50

Virtual Evaluation PlatformVirtual Evaluation Platform

Page 51: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

51

Page 51

Integrated Development Environment

S/W Development with Andes ToolsS/W Development with Andes Tools

SW Developer Desktop (AndeSight)

DEVICE SOFTWARE STACK

VEP (AndESLive)

Operating Systems

BSP/Device Drivers

Middleware

Applications

Operating Systems

BSP/Device Drivers

Middleware

Applications

Editor

Compiler

Debugger

Assembler

Program Builder

Profiler

SOC Builder

Other plug-in tools

AndESLive/API

AndeSoft

Virtual I/O Connectivity

Page 52: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

52

Page 52

AndeESLive VEP EnvironmentAndeESLive VEP Environment

VEP module

Module descriptor

SID component

User-defined Models

Peripheral IP Models

AndesCore Model

Customer SoC

Andes AG101Andes AG101

AndESLive™

C/C++

Page 53: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

53

Page 53

VEP ModuleVEP Module

User-defined Models

Essential IP Models

AndesCore

Customer SoC

Andes AG101Andes AG101

AndESLive™VEP module

Module descriptor

SID component

C/C++

slave port

master port

write port read port

bus port

Page 54: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

54

Page 54

Andes VEP (a quick summary)Andes VEP (a quick summary)

� SID, an open-source framework for building simulated Embedded Systems, has been integrated into AndESLiveas backbone simulator

� Simulated component, or a SID component, can be written in C/C++, or Tcl to which the SID API is bound

� VEP module is a SID component wrapped with XML-based Module Descriptor in which the parameters and attributes are described

� Andes provides sample code (C++-based) and SID example for modeling target (bus slave) and initiator (bus master) components that run on Andeslive

� Depending on the requirements from customers, Andes can provide Modeling Training and Services as well

Page 55: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

55

Page 55

�SID SimulatorThe AndESLive simulation backbone

Page 56: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

56

Page 56

SID OverviewSID Overview

� The SID simulator consists of an engine that loads and connectssimulated components, based on a simulator configuration file, and runs simulation sessions.

� The SID simulator configuration file is a text file that configures a SID simulation run. The configuration file defines the simulation contents, connections, and initial states.

� SID comes with a number of simulated components (or SID components), each of which can be modified, configured, or connected to any other independently.

� Adding new components is straightforward and does not require any modifications to SID. More info on SID Component Library, refer to the SID Component Developer’s Guide.

� While running a simulation, SID can interface with standard I/O, such as a Tk-based visual simulation monitor, the gdb debugger, and the gprof profiler.

Page 57: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

57

Page 57

SID Architecture (1 of 2)SID Architecture (1 of 2)

� SID is a simulation framework for supporting embedded systems software development.

� SID features a modular architecture of loosely-coupled software components that interact with each other to simulate the behavior of physical hardware parts.

� SID components share a fixed low-level API, which defines all possible inter-component communication mechanisms.

� SID is packaged as a standalone command-line program that reads and executes a configuration file.

� A typical session with SID begins with compiling or assembling code for the simulated system to run, using standard cross-development toolchain, and proceeds through loading the target binary into the simulation environment.

Page 58: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

58

Page 58

SID Architecture (2 of 2)SID Architecture (2 of 2)

� Four Component Types are supported in SID� Hardware model (hw-xxx)� Software model (sw-xxx)� Bridge (Tcl/Tk bridge)� Special function (event scheduler, host network interface, etc)

� Communication mechanisms between Components:� SID API is used to model these mechanisms:

• pin, bus, attribute, and relation

� The SID API can be thought as the socket on a circuit board. The SID Component is like the IC that plugs into these sockets and the SID simulator configuration file is like the circuit wiring that connects the sockets to each other

Page 59: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

59

Page 59

SID Configuration FileSID Configuration File

� The configuration file consists of three major sections:

� A listing of component libraries to be loaded (dynamically loaded libraries)

• load

� A command to instantiate components

• new

� A set of commands that connect and configure the components

• set

• connect-pin, disconnect-pin (point-to-pint)

• connect-bus, disconnect-bus (broadcast)

• relate, unrelate

Page 60: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

60

Page 60

Component Connection in SIDComponent Connection in SID

CPU

(master)

Memory

(slave)

system-mem(accessor)

data-bus(bus)

bus port

bus port

connect-bus CPU system-mem Memory data-bus

CPU

(master)

Timer

(slave)

write port

read port

connect-pin CPU out1 -> Timer in1

out1 in1

CPU

(master)

Memory

(slave)

system-mem(accessor)

data-bus(bus)

master port

slave port

Page 61: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

61

Page 61

�SID Component Modeling

Page 62: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

62

Page 62

#include <sidcomp.h>

#include <sidtypes.h>

#include <iostream>

using sid::component;

using sid::host_int_4;

class sp_timer : public virtual component

{

public: sp_timer();

~sp_timer() throw() {};

protected:

input_pin a, b, c;

output_pin d, e, f;

private:

in_out_handler();

}

Basic Component Outline (Class Declaration)Basic Component Outline (Class Declaration)

SID and C++ header files

Namespace using

Declare this class asSID component and use other predefined utilities

Data I/O

Inaccessible data and function

Page 63: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

63

Page 63

Component Declaration (1/3)common header files & utility

Component Declaration (1/3)common header files & utility

� Header filessidattrutil.h

sidbusutil.h

sidcomp.h

sidcomputil.h

sidmiscutil.h

sidpinattrutil.h

sidpinutil.h

sidscheutil.h

sidtypes.h

sidwatchutil.h

� Tens of utilities

� For simplicity issue

using namespace sid;

using namespace sidutil

Page 64: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

64

Page 64

Component Declaration (2/3) class inheritance

Component Declaration (2/3) class inheritance

class sp_timer

: public virtual component

//each component class need to inherit from this

, public fixed_attribute_map_component

//if the component provide configure attribute such as “verbose?” else use //“no_attribute_map_component”

, public fixed_pin_map_component

//if the component provide input/output pin else use “no_pin_map_component”

, public fixed_bus_component

//if the component provide bus access else use “no_bus_map_component”

, public no_relation_component

//no relation utility requirement

, public no_accessor_component

//not a bus master

Page 65: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

65

Page 65

Component Declaration (3/3)Data I/O

Component Declaration (3/3)Data I/O

//input type

input_pin din_pin;

friend class callback_pin<sp_timer>;

callback_pin<sp_timer> rst_pin;

//output type

output_pin intr_pin;

//clock type (connected to scheduler)

friend class scheduler_event_subscription<sp_timer>;

scheduler_event_subscription<sp_timer> clk;

Page 66: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

66

WWW.ANDESTECH.COM

Integrating SID Component in

AndESLive

Integrating SID Component in

AndESLiveWrapping SID component with VEP module

Page 67: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

67

Page 67

�Integrating SID Component in AndESLive

Wrapping SID component with VEP module

Page 68: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

68

Page 68

Integrating Component in AndESLiveIntegrating Component in AndESLive

� To integrate SID component in AndESLive, an XML-based component descriptor is created for each component. The component descriptor defines the properties to be used in AndESLive (such as bus, pin, and attributes)

� Once the user-defined component descriptor is completed, save the XML file in the folder:� $ANDESIGHT_ROOT/vep/component/user

VEP module

component

descriptor

SID

component

slave port

master port

write port read port

bus port

Page 69: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

69

Page 69

Sample Component Descriptor Sample Component Descriptor

� Component Definition:

� <defcomponent name="hw-sample" shortname="sample" type="SID">

� <sid-lib dlsym="sample_component_library" name="libsample.la" />

� Bus Definition:

� <busmaster name="master" type="AHB"/>

� <busslave name="registers" type="AHB"/>

� Pin Definition:

� <defpins name="sample-out-" from="0" to="5" direction="out"/>

� <defpins name="sample-in-" from="0" to="5" direction="in"/>

Page 70: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

70

Page 70

QuestionsQuestions

�We want to know how a component is modeled in AndESLive and what language/description by which the modeling is based upon?

�Where can we find the document/tutorial for modeling user-defined components and if Andes can provide modeling training/services?

�Will Andes support SystemC as a modeling constructor and what if we have SystemC models, how can we incorporate them into AndESLive?

Page 71: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

71

Page 71

AnswersAnswers

�We want to know how a component is modeled in AndESLive and what language/description by which the modeling is based upon?

�Where can we find the document/tutorial for modeling user-defined components and if Andes can provide modeling training/services?

�Will Andes support SystemC as a modeling interface and what if we have SystemC models, how can we incorporate them into AndESLive?

The behavior of user-defined model can be written inC/C++ and the SID API is used to compose a SIDcomponent by which a VEP-based module is created that runs on AndESLive.

There is a document in User Manual (release 1.3.1) for

creating a user-defined model. Tutorial is also being

prepared as well as application notes. Andes can provide

modeling training and/or services based on customer

requests.

In the current release (1.3.2), SystemC modeling/import is NOT supported in AndESLive. Andes is now developing SID-SystemC bridge which can communicate SystemC interface with SID-based pin and bus. Untimed SystemC models will be supported first.

Page 72: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

72

Page 72

�SystemC Modeling

�How VEP can be used in

Development CycleEnable early S/W development

Page 73: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

73

Page 73

VEP Use ModelsVEP Use Models

� VEP as an Early (or pre-silicon) Software Development and Software Validation Platform� Reduce SW bring-up and system test time

� Ideally start SW dev. in parallel to HW dev.

� Leave more time for SW dev. and quality assurance

� VEP as an Architecture Exploration Platform� Evaluate HW/SW configuration and/or system partitioning

� Optimize system architecture

� VEP as a RTL Verification Platform� Golden reference models for functional verification

� Verify architecture and system validation

Page 74: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

74

Page 74

VEP as Early SW Development & ValidationVEP as Early SW Development & Validation

� VEP can be used for developing & testing SW(only if the VEP can run as fast as HW board does)� Low-level device drivers and kernel� OS and middleware porting� App. SW development

� One scenario is as follows:� SW team extends existing device drivers based on updated IP

spec� At the same time, Platform team enhances/creates models (ex.

new features added) based on the VEP� SW team completely debugs and tests the driver functionality early

on the VEP� SW ‘bring-up’ in a shorter time after the HW (FPGA) is available

Page 75: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

75

Page 75

Development Cycle ImpactDevelopment Cycle Impact

PlatformSpecification

Hardware DevelopmentIntegration & Bring-up Debug

SW Development (OS & Device Driver Dev, Apps Dev) Final

System Testing

Scalable Development Reducing bring-up and final system test time

Traditional (or Past) Approach:

PlatformSpecification

Hardware Development

Scalable VEP

SW DevelopmentPre-silicon

System TestIntegrationBring-upDebug

FinalSystem Testing

VEP-based Approach:

• Enable Early SW Development

• Enable Scalable Development

• Pre-Silicon System Test

• Reduce Bring-up time

• Reduce Post-Silicon System Test

Page 76: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

76

Page 76

VEP as Architecture ExplorationVEP as Architecture Exploration

� VEP can be used to explore design alternatives to determine the appropriate architecture (or system)

� Some alternatives to evaluate are:� AndesCore configuration

• Cache, MMU, Local memory, branch prediction, etc

� SW profiling (in AndESLive) • code optimization

� HW/SW partitioning• HW accelerator engine or SW oriented

• Performance and cost tradeoff

� Bus Matrix or Multi-layer • currently NOT supported in AndESLive

Page 77: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

77

Page 77

VEP as RTL VerificationVEP as RTL Verification

� Currently NOT supported in AndESLive!

� Team-up Partnership possibilities� GUC (porting AndesCore ISS with SystemC TLM2.0)

� EVE (compiling AndesCore on ZeBu)

� CoWare (porting AndesCore ISS with SystemC/AMBA)

� Carbon (porting AndesCore ISS with CASI/SystemC)

� Cadence/Synopsys/Mentor…

� Speed is always an important concern and incentive� Transaction-based interface is the key

� HW accelerator/emulator may be too expensive to be justified

Page 78: Integrated Development Environment - National Chiao Tung …twins.ee.nctu.edu.tw/courses/embedlab_09/lecture... · 2009. 10. 13. · Integrated Development Environment S/W Development

78

WWW.ANDESTECH.COM

Thank You!!!Thank You!!!