Intro To SoC
Intro To SoC
Tools
A Complete Solutions Portfolio
Lowest Cost, Lowest Cost, Cost- and Power-Optimized Highest Bandwidth Lowest Risk,
Lowest Power Lowest Power FPGA FPGA Lowest Total Cost
CPLDs FPGA ASICs
MIPS Technology
Embedded FPGA
Hard & Soft Processors Intellectual Design Development
Property (IP) Software Kits
& Development Suites
2
2
SoC System Architecture Hard Processor System (HPS)
Processor ARM Cortex-A9
NEON / FPU
ARM Cortex-A9
NEON / FPU
USB
OTG
Ethernet
(x2) (1)
L1 Cache L1 Cache (x2) (1)
- Dual-core ARM® Cortex™-A9 MP Core™
processor L2 Cache GPIO
I2C
(x2)
(x4)
HPS I/Os
- 4,000 MIPS (up to 800 MHz per core)
QSPI JTAG
- NEON coprocessor with double-precision FPU Flash
64-KB
Debug /
SPI CAN
RAM (x2)
(x4) (x2)
Control Trace (1)
- Rich set of embedded peripherals
NAND SD /
Timers DMA UART
- 32-KB/32-KB L1 caches per core Flash SDIO/
(x11) (8 Channels) (x2)
(1) (2)
MMC (1)
- 512-KB shared L2 cache
FPGA
Shared Multiport DDR HPS to FPGA
Configu
SDRAM Controller (2) FPGA to HPS
ration
Multiport SDRAM controller
- Up to 533-MHz DDR3 and LPDDR2*
3 3
SoC Software Development Tools
Software Development Tools
- Altera’s SoC Embedded Development Suite (EDS)
GNU Tools, Utilities, Libraries
ARM Design Studio 5 (DS-5)
Altera – Exclusive FPGA Adaptive
- Lauterbach TRACE32
- Wind River Workbench
- ENEA Optima
4 4
Embedded SW Availability
Development
Vendor OS/RTOS Availability
Tools
Open Source Linux 3.7 Linaro compiler Now through Altera
Wind River Systems VxWorks 6.9.2 Workbench 3.3.2 Q2 2013 (beta now)
Micriµm µC/OS-II, µC/OS-III GNU compiler Q2 2013 (beta now)
Enea OSE 5.5.3 Optima 2.6 Q2 2013 (beta now)
Express Logic ThreadX 5.5.3 GNU compiler Q2 2013 (June)
Wind River Systems Wind River Linux 5 Workbench/GNU Q2 2013 (June-Wind River EAR)
QNX QNX/Neutrino 6.5.3 Momentics Q3 2013 (July)
Fujisoft Android GNU compiler Q2 2013 (June)
Green Hills INTEGRITY Multi/Green Hills Q3 2013 (July)
Windows Embedded
Microsoft Microsoft/Studio Q3 2013 (August)
7
5 5
Arrow’s SoCkit Overview
Arrow’s SoCkit Development Board
Based on:
Cyclone V SoC FPGA
7
Arrow Cyclone V SoCKit
Button Switch x8
8
Golden Reference Design
HPS configuration
- DRAM, QSPI, SD/Card
- All peripheral functions
exposed at least once
FPGA configuration
- Simple Qsys “sandbox”
system
First experience in ARM /
FPGA integration
- Getting started guide to walk
them through the process on
integrating IP
HW simulation
Verification via system
console
Verification via CPU
HW/SW hand-off
9
Arrow’s SoCkit Dev Board – HW Features
Cyclone V SOC FPGA
Compact Board Size: ~15x10 cm (6” x 4”)
ARM Cortex-A9 based Hard Processor System (HPS)
Full set of peripherals (Flash I/F’s, GbE, USB, SD, SPI, I2C, CAN, UARTs, DMA’s, Timers…)
10 10
Arrow’s SoCkit Dev Board – HW Features (2)
General Peripheral: LEDs / Buttons / Switches / IR
Audio CODEC: Line-In, Line-Out, Mic-In
Temperature Sensor
G-Sensor
On-Board USB-Blaster II (Config/Debug cable interface)
Expansion Headers
HPS IP: LTC (Linear Tech) Header
Note: For Mictor Dstream connectors – see the Altera SoC Dev kit
11 11
Altera’s SoC Embedded Design Suite
(SoC EDS)
Altera SoC Embedded Design Suite
Comprehensive Suite of SW Dev Tools:
Hardware / Software Handoff Tools
- Preloader Generator: Parameterizes files for Preloader/BSP
- Device Tree Builder (Linux) (13.0 SP1)
13 13
SoC EDS Contents
Web Subscription 30-Day
Component Key Feature
Edition Edition Evaluation
Hardware/Software
Preloader Image Generator x x x
Handoff Tools
Flash Image Creator x x x
Device Tree Generator (Linux) x x x
ARM DS-5 Altera
Eclipse IDE x x x
Edition
Debugging over Ethernet (Linux) x x x
Debugging over USB-Blaster II JTAG x x
Automatic FPGA Register Views x x
Hardware Cross-triggering x x
CPU/FPGA Event Correlation x x
Compilers Linaro Tool Chain (Linux) x x x
CodeBench Lite EABI (Bare-metal) x x x
Hardware Libraries Bare-metal programming Support x x x
SoC Programming
Golden System Reference Design x x x
Examples
14 14
Altera SoC EDS Additional Deliverables
Golden Hardware Reference Design (GHRD)
Pre-built: Linux Kernel, Root FileSystem, U-Boot
- Pre-built with full source (Linux snapshot)
- Link to community website for updates
15 15
Software Process: HPS Boot Stages
Boot ROM code
• Hardened by Altera into device.
• Scans boot select pins to determine clocks/boot
source
Reset - NAND, QSPI, SD/MMC, FPGA or On-chip RAM
• Sets up PLL’s if selected by clock pins
• Configure minimal set of HPS I/O pins to read flash SW / FW
• Performs CRC checking & loads ISW into On-Chip
Developer’s
Boot ROM RAM
PreLoader (Initial Software) efforts
• Altera Reference code + generated system .c & .h
files
• Runs from On-Chip memory
PreLoader • Configures scan manager with pin configuration data
• Initializes and calibrates SDRAM
• Loads Boot Loader code into SDRAM
Boot Loader
Boot Loader • Application / OS specific
• Altera provides U-Boot as a reference example
Operating System
OS • Linux, VxWorks, OSE, etc
• Device drivers and BSP
• Root FileSystem
Application
User Application
• IDE and Debug
• FPGA configuration
16 16
Hardware-Software Handoff: PreLoader Generator
Generates & Parameterizes files for making the PreLoader / BSP
Reset
Hard coded in HPS
Boot ROM
PreLoader “Initial Software (ISW)” or
“Secondary Program Loader (SPL)”
• Low level hardware-centric source code
PreLoader • Runs from On-Chip memory
• Configures scan manager with pin configuration data
• Initializes and calibrates SDRAM
• Loads Boot Loader code into SDRAM
Boot Loader
Application
17 17
SoC Boot Phases to Bare-metal or OS
Recommended Flow
18 18
HW Libraries & OS/Bare-Metal Development
Bare-metal
- No Operating System
19 19
APIs in HWLIB (Bare-metal) Phase 1 Phase 2
(V13.1)
Mem Coherence
Bridge Management Flash Memory Intrf
20 20
SoC EDS Includes ARM DS-5 Altera Edition
Industry’s most advanced multicore
debugger from ARM for ARM processors
Supports JTAG/Ethernet/Trace debug in
one package
Trace pod – Dstream – 4Gbyte trace
memory
True dual core/debugger capability
Streamline: Statistical analysis of
software load and bus traffic spanning
the CPUs and FPGA under Linux
Integrated OS-aware analysis
and debug capability
Yocto plugin to enable
Linux based application development
21 21
One Device, Two Debugging Tools?
ARM® DS-5™ Toolkit Altera Quartus™ II Software
JTAG
DSTREAM™
22 22
One Device, Two Debugging Tools?
ARM® DS-5™ Toolkit Altera Quartus™ II Software
Deb u g g in g
Barrier
a b le to v is ualize
No single
tool/c
tr o l b o th C PU and
a nd c on
P G A d o m ains
F F P G A to
a n d
w a y for CPU
JTAG
N o
g e r a n d c orrelate
DSTREAM ™
cross trig s o ftw a r e events
h a r d w a r e and
Dedicated JTAG connection
e b u g g e r c an JTAG
No “fixed
”d
Visualize & control CPU
e ds o f
e s s t h e n e Dedicated JTAG connection
subsystem a dd r P G A h a r dwareVisualize & control FPGA
F
“changing”
23 23
Familiar Eclipse Framework
Select
Perspective
Project
s
Terminal
Window
24 24
DS-5 Altera Edition
Productivity-Boosting Features
Single USB-Blaster target connection
for software and hardware debug
Automatic creation of register views
of FPGA peripherals
Hardware cross-triggering between the CPU and FPGA
ONLY SoC Technology… Altera’s SoC’s can achieve this
domains
Non-intrusive trace of CPU software instructions correlated
with application events and FPGA hardware events
Simultaneous debug and trace for Cortex-A9 cores AND
cores synthesized on FPGA*
Streamline support: Statistical analysis of software load
and* For
bus traffic-compliant
CoreSight
™ spanning cores: IPthe CPUs
added and
using proper FPGA
handoff files (CMSIS)
25 25
Altera SoC EDS - Key Benefits
Faster time to market, lower development costs
Covers full software development flow for Altera SoC
devices
All necessary tools and examples in one package to
enable rapid start for developers
Provides software debug views of full SoC by adapting to
changing FPGA designs (Subscription)
Unprecedented visibility and control across
processor cores and across CPU, FPGA domains
OEM packing ensures ease of licensing and ease of use
26 26
Software Debug & Trace
Interfaces & Tools
Interfaces for SW Developers
Flash / QSPI / SD
SW tools Ethernet
Host Machine
Bottom side
SD
Trace
JTAG
28 28
Software Debug Interfaces
JTAG
- Direct connection to hardware
- Halts processor, can master system via control of processor
- Debug any code at low level – driver, OS kernel, bare metal application
- OS aware debugger display optional
Note: Other debuggers require 2 debugger interfaces for dual-core processors
Ethernet
- Requires running software to drive it
- Processor/OS cannot be halted
- OS Application can be halted
- Good for high level programming (fast, easy)
- Debuggers usually have OS aware GUIs and features
- Cannot do low level debug (kernel, driver, bare metal) as OS cannot be
stopped
29 29
Real-Time Trace (JTAG/Ethernet/USB)
Processor ‘data logger’ system
Runs at full speed to identify and debug real-time software issues
Hardware triggers on predefined condition
- Address value, data value or a combination
Stores instruction or data flow information to on-chip or off-chip memory for
analysis in debugger
30
SoC Development Flow
Middleware
e
W
a
r
e
O
Hardware BS
DS Firmware
abstraction SrP
Software Engineer
oHi
CWv
RALe
r
SeLi
iIgb
lPi(
i sL
cCti
ooeb
nrr)
es
Ds
e
v
32 32
System Development Flow
FPGA Design Flow Software Design Flow
Hardware Software
Development Development
• SignalTap™ II logic
• GNU, Lauterbach, DS5
analyzer Debug Debug
• System Console
• Quartus II Programmer
• In-system Update
Release Release • Flash Programmer
33
System Development Flow
FPGA Design Flow Software Design Flow
Hardware Software
Development Development
• ModelSim,etc.
• AMBA-AXI and Avalon bus Simulate Simulate • Software
Virtual Target
functional models (BFMs)
Development
• SignalTap™ II logic
• GNU, Lauterbach, DS5
analyzer Debug Debug
• System Console
• Quartus II Programmer
• In-system Update
Release Release • Flash Programmer
34
Quick Summary
FPGA:
- Looks like a FPGA
- Works like a FPGA
- Standard FPGA development flow
- Quartus II, Qsys, SignalTap, System Console, USB blaster...
ARM HPS:
- Looks like an ARM processor system
- Works like an ARM processor system
- Standard ARM development flow
- ARM Cortex-A9 compiler/debugger, JTAG tools, program trace...
Back
35 35
Software Process: HPS Boot Stages
Boot ROM code
• Hardened by Altera into device.
• Scans boot select pins to determine clocks/boot
source
Reset - NAND, QSPI, SD/MMC, FPGA or On-chip RAM
• Sets up PLL’s if selected by clock pins
• Configure minimal set of HPS I/O pins to read flash SW / FW
• Performs CRC checking & loads ISW into On-Chip
Developer’s
Boot ROM RAM
PreLoader (Initial Software) efforts
• Altera Reference code + generated system .c & .h
files
• Runs from On-Chip memory
PreLoader • Configures scan manager with pin configuration data
• Initializes and calibrates SDRAM
• Loads Boot Loader code into SDRAM
Boot Loader
Boot Loader • Application / OS specific
• Altera provides U-Boot as a reference example
Operating System
OS • Linux, VxWorks, OSE, etc
• Device drivers and BSP
• Root FileSystem
Application
User Application
• IDE and Debug
• FPGA configuration
36 36
Hardware / Software Handoff Tools
37 37
Hardware / Software Handoff
Qsys system info, SDRAM calibration files,
ID / timestamp, HPS IOCSR data
Hardware
ISW_handoff.sys system.sopcinfo
User
Options
.c & .h Linux
Software source files Device Tree
38 38
Hardware/Software Design Flow Overview
PreLoader
Settings Handoff
Directory files
Preloader
Handoff Preloader
Generator
DS-5
HW Design ACDS .svd Debugger
DeviceTree
.sopcinfo Device Tree
Generator
For
SoC EDS Linux
.sof
39 39
Hardware/Software Design Flow Overview
Eclipse/GCC/GDB Software Design Flow
Hardware Software
Development Development
Open New
BSP Project
Import
HW/SW
HW/SW
Handoff files
Handoff Files
Build
Flash
Programmer
40
Design Areas on SoC FPGA Devices
Processor System
The domain of software engineers
Problem areas
FPGA Fabric
The domain of hardware engineers
41
Altera SoC FPGA Based Peripherals
FPGA MEMORY MAP
FPGA IP mapped
To 3GB and above
FPGA IP
32/64/128-bit AXI
AXI (LW)
AXI
AXI
Bridges plus
Lightweight Bridge
32-bit
L3 interconnect
L2 Cache
Cortex-A9 Cortex-A9
Cortex-A9 0-3(+)GB
memory space
HPS
42
Cortex-A9 Debug
Interactive Debug
- Controlled via JTAG or CPU monitor code
- 6 HW Breakpoints, 2 with Context ID compare
- 4 HW Watchpoints
Performance Monitoring
- Each A9 has a Performance Monitoring Unit (PMU)
- Each PMU can monitor 58 different events
6 counters to count events
Events may be triggers or put in trace
Back
43 43
Visualization of SoC FPGA Peripherals –
FPGA Adaptive
Register views assist the debug of FPGA
peripherals
- File generated by FPGA tool flow
- Automatically imported in
DS-5 Debugger
- Changes dynamically
CMSIS
Peripheral register
descriptions
44
Altera SoC Debug Architecture STM: System trace module
PTM: Proc trace module
TPIU: Trace port I/F Unit
28 HW signal events CTI: Cross trigger I/F
injected into trace stream FPGA CTM: Cross trigger module
DAP: Debug Access Port
FPGA IP
Trace
Cross-triggers between CPUs and
FPGA(8) and CPUs (8) CoreSight compatible IP
SWD/ implemented in FPGA logic
JTAG accessible from Debugger
CTI
DAP
Debug bus
TMC
STM Trace bus
ETR
Export trace
System bus
Mictor Connector
peripheral or
PTM PTM memory
Full trace capability on
hardened part of the SoC Ability to inject FPGA TPIU
hardware debug data into
the CoreSight trace stream
CTI Cortex-A9 CTI Cortex-A9
Infrastructure to trace
CPUs synthesized on HPS
the FPGA
45
System-Level
Performance Analysis
Performance
bottlenecks in SoCs ARM® DS-5™ Streamline
often come from the Linux OS Counters
CPU interaction with
the rest of the SoC
Processor Counters,
Streamline visualizes Aggregated, or Per Core
software activity with
performance counters
Power Consumption
from the SoC and
FPGA to enable full FPGA Block Counters
system-level analysis
Streamline only Process/Thread Heat Map
requires a TCP/IP
connection to the SoC Application Events
46
Synthesizing CPUs on FPGA
CPUs and CoreSight compatible IP synthesized on the FPGA are
accessible via the Debug Access Port (DAP) and therefore detectable
and debuggable by DS-5
DSP
IP
FPGA
SWD/
JTAG
DAP Debug
bus
Cortex-A9
Cortex-A9
HPS
47
Key Benefits for Developers
Removes Debugging Barrier!
Faster time to market,
lower development costs
Significant productivity gains
Provides software debug views
of full SoC by adapting to changing FPGA designs
Unprecedented visibility and control across
processor cores and across CPU, FPGA domains
Standard, widely used, familiar DS-5 user interface
provides SW engineers with rapid starts
OEM packing ensures ease of licensing and ease of use
48 48
Embedded Linux for SoC
50 50
SoC Linux: Key Takeaways
Linux & tools available for SoC
One of the first ARM multi-vendor platforms
supported by a single Linux Kernel v3.7
Leverages new, efficient community
methodology for generating custom Linux
distributions - Yocto
Innovation on Device Tree to support
“changing” hardware profile
- Device Tree Generator (DTG), available v13.0 SP1
51 51
Linux for SoC: Innovative Approach
We discussed the low level hardware handoff:
52 52
What’s a Linux Device Tree?
A Data Structure for describing hardware
53
Device Tree Generator
Altera SoC
Embedded Design Suite
Directory
Board/User Info
54 54
Why Use a Device Tree?
Single compiled kernel and set of drivers used on a
number of boards
Key with FPGA’s where hardware is easily and
frequently changed
Facilitates changing hardware on the fly
Dynamic Device Tree
- Ability to update your FPGA/Device Tree Source without rebooting the
kernel
- Available soon
55 55
SoC Linux Board Support Package
U-Boot (not pictured)
Kernel User Space
(debug, compiler, shell, applications etc)
Drivers for SoC
Drivers for the board BSP
components Kernel
SoC specific layer
Drivers
Source code for the root
file system Machine Specific Layer
Build environment
SoC
SoC Linux BSP release provides Board
all of the components in source
code form
56 56
What is Yocto?
As stated by the project page:
The Yocto Project™ is an open source collaboration project that
provides templates, tools and methods to help you create custom
Linux-based systems for embedded products regardless of the
hardware architecture.
57 57
Benefits of Yocto Project
Less time spent on things which don’t add value
(build system, core Linux components)
Increased ability to enable key silicon features
Transparent Upstream changes
Vibrant Developer Community
Start with a validated collection of software (tool
chain, kernel, user space).
Easy transition to a commercial embedded Linux
58 58
How does Altera use Yocto?
Added SoC FPGA layer to Yocto
59 59
Linux Software Development Workflow
Target
Portal
Host Machine
Router
60 60
Boot Image & Flash Image
Boot Image storage location
Preloader : SD/MMC, QSPI, NAND, FPGA
U-Boot : SD/MMC, QSPI, NAND
Linux : SD/MMC, QSPI, NAND, mass storage, network via
tftp, remote PC via UART
61 61
Altera SoC Linux: Key Features and Benefits
Feature Benefit
Yocto Standard Build System
Adapts software to changing
Device Tree Generator
hardware
62 62
Advanced Debug
Cross-Domain Debug 1
Trigger from software world to FPGA world
SOFTWARE TRIGGER
OR BREAKPOINT TRIGGER
HARDWARE TRIGGER!
64
Cross-Domain Debug 2
Trigger from FPGA world to software world
HARDWARE TRIGGER
65
Correlate HW and SW Events
66 66
Cross-Domain Debug 3
Exploiting the power of CoreSight trace
PTM
CPUs Timestamp
STM
Timestamp
28 FPGA
Events STM
Global
timestamp BREAKING THROUGH THE DEBUG BARRIER!
unit
67
Altera and the Linux Community
Open Source
Code
Repository
Code
Founders
Repository
/ Admin
Community Founders
/ Admin
69 69
Linux Distribution
Linux OS Utilities
SW
Kernel.org Busybox.net
Development Applications
Tools
GNU.org x.org
Linux Build
Distribution Tools
70 70
Altera in the Linux Community
Altera awarded maintainership for the
‘SoC FPGA’ architecture Open Source Community
Kernel.org, U-Boot, Yocto, Android
- Kernel (arch/arm/mach-socfpga)
- U-Boot (altera/socfpga_cyclone5)
upstream
71 71
Software Delivery
SoC Embedded Development Suite (EDS) will be shipped
with the Altera ACDS distribution (Quartus II, etc.)
- Stand alone install
72 72
Welcome to the RocketBoards.org!
http://rocketboards.org
Alter here
•Silicon
•Boards
a.co •Soft IP
•Major Linux release
m •SDK
•Static docs
rock •Forum •
New developer
etbo starts here
•FOSWiki
ards. •Links to partners
org •Dynamic Docs
•gitweb
git.roc •Frequent Updates
ketbo •Project
ards.o Repositories
•Kernel Repository
rg
•U-Boot Repository
lists.r •Mailman
ocket •Support
board •Mail list
s.org
server
Linux Portal
One User Experience
73 73
Coordinated Multi-Channel Delivery
74 74
Linux Mainline Release Cycle
~Weeks: 0 ~12 Weeks ~24 Weeks
Community
Accepted New No New Features New No New Features
New
Features
Code & Features Bug Fix Only Features Bug Fix Only
Altera
Upstream
75 75
Altera Linux Executive Summary
Altera always moves to the latest kernel version
(~3 months) – See Addendum release cycle info
76 76
Linux Availability Summary
77 77
Resources & Next Steps
-Training
-Altera’sCyclone V SoC Development Kit
-Links & Support
-Next Steps
Altera SoC Dev Kit Contents
FPGA Design Software:
- Quartus II Web Edition, ModelSim (Altera Starter Ed)
- Golden Hardware Reference Design
Out-of-Box Experience
- Web Server (Linux) Application
Links to resources web resources
(documentation & downloads)
Board update portal
- Board test system (board HW verification)
- Golden HW reference design (getting started)
- Web portal for one-stop Embedded SW download
79 79
Altera’s Dev Kit: Golden Reference Design
HW simulation
Verification via system console FPGA JTAG
Master
Verification via CPU Memory SYSID
PIO
HW/SW hand-off
PIO
80
Resources, Links & Support
SoC Altera.com Site here
Altera Dev Tools
- Quartus II Design Suite – includes Qsys
- Quartus II Literature, Handbook, etc.
- SoC Embedded Design Suite (EDS)
- Design Software & Download Center Sites
ARM Dev Tools
- DS-5 Altera Edition
- www.arm.com , ARM SW dev tools
Altera Forum Community: www.alteraforum.com
Altera Wiki Community: www.alterawiki.com
SoC / Linux Web Portal: http://rocketboards.org
Support info & Links
- Altera’s MySupport – for submitting Service Requests – GO SIGN UP!
- Altera’s Design Resources Site
81 81