# Presentation: 720105

## Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- Jonah Weber
- May 2, 2006

## Overview

- Basics of embedded processors
- Design process
- Design examples
- Demo immediately following this talk

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
Basics – Intro to embedded processors – what they are and how they can be used in a system
Design Process – including using embedded development tools
Design Examples – show designs built or in progress at Berkeley Lab
Demo – brief demo of an FPGA evaluation board running an EPICS server on VxWorks

## Types of Embedded Processors

- Hard Core
- Embedded processor is a dedicated physical component of the chip, separate from the programmable logic
- E.g. Xilinx Virtex families w/ PowerPC 405
- Soft Core
- Embedded processor is built out of the programmable logic on the chip
- E.g. Xilinx MicroBlaze, Altera NIOS

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
- What is an FPGA w/ embedded processor?
- 2 types: hard core and soft core

## Hard Core vs. Soft Core(Xilinx FPGAs) 

- Hard Core

- Soft Core

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
Screen shots show resources used on 2 FPGA designs
Colored blocks represent resources used by design
Left is an FPGA with embedded hard core (pink)
Right is a standard FPGA using a soft core (yellow)
Buy FPGA chips with or without an embedded hard core

## Hard Core vs. Soft CoreConsiderations

- Both cores utilize about the same % of total chip resources
- Hard core performance = 3-4x faster than fastest soft cores
- FPGAs with hard cores are more expensive
- Soft cores more flexible
- Multiple cores can be used in a single chip
- Can be used in a chip with a hard core

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

## FPGA

- Embedded
- Processor

- Internal Bus

- Analog I/O I/F

- Dig I/O I/F

- External
- Memory
- I/F

- Ethernet I/F

- I/O Pins

- Custom Peripherals

- Standard Peripherals

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
Grey block represents FPGA
In design, place embedded processor
Custom Peripherals
Standard Peripherals (paid or free provided with devel tools)
Connect processor to other logic via internal bus
Connect logic to off-chip components via FPGA I/O pins

## Custom Board

- Ethernet Phy

- ADC

- DAC

- Digital I/O

- Analog I/O

- External
- Memory

- FPGA

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
Place FPGA (now represented by grey block) onto a board (green block)
Connect digital i/o i/f to buffers/drivers
Connect analog i/o i/f to ADCs and DACs
Connect to Ethernet Phy, network interface
External Memorys

## System

- Ethernet Network

- Instrument 1

- Instrument 2

- Instrument 3

- I/O

- I/O

- I/O

- Custom
- Board

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
Board is heart of system
Board I/O connects to instruments depending on application (BPMs, kickers, magnet power supplies, etc)
Connects to ethernet network and control system

## Advantages of FPGA Embedded Processor Systems

- Merge CPU and I/O functions onto a single board
- Flexible design template – optimize power, data, and form factor to match application and I/O requirements
- Tightly coupled high speed logic and control system interface on a single chip – versatile tradeoff between hardware and software tasks
- Advanced tools bridge software and logic development, provide BSP generation for Linux, VxWorks

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
- Bullet 3 Example: Current ALS booster ramping all done in software, new design ramping is shifted to logic

## Design Process

- Step 1: Choose an evaluation board
- Supported by development software
- Closely matches I/O and peripheral requirements
- There are at least 30 unique evaluation boards supported by Xilinx development tools!
- Alternatively, select an FPGA
- Step 2: Construct printed-circuit board design based on evaluation board or FPGA
- Step 3: Create embedded design project

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

## Xilinx Embedded Design Flow

- Base System Builder

- Configure Software Platform

- Create Custom Peripherals

- Populate and Connect Design

- Build Hardware

- Generate Complete
- Hardware/Software System

- Develop & Debug Software Applications

**Hardware Design**

**Software Design**

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

**Notes:**
Software = code run on embedded processor
Hardware = logic design
Firmware = sw + hw combined into a single configuration file
Base System Builder = tool that uses templates for customizing evaluation board peripherals

## Design Examples

- PEP-II TFB
- Old system: 8 bit fixed delay on large power hungry boards
- New system: 12-bit 2-tap programmable delay, extensive diagnostics
- ALS Bunch Cleaning
- Zero crossing method increases excitation of parasite bunches, eliminates need for scrapers
- ALS Mini IOC
- Booster ramp control for ALS top off operation
- Flexible design for potential future applications

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

## PEP-II TFB

- Started with Xilinx ML300 evaluation board set
- Used supplied CAD design files (PADS and DxDesigner) to modify design of ML300 CPU board
- Used ML300 Power I/O board as is

- Xilinx ML300 CPU Board

- PEP-II TFB CPU Board

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

## ALS Bunch Cleaning

- Used Xilinx ML403 evaluation board as is
- Customized FPGA firmware
- Added external components: connectorized mixer and signal source

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

## ALS Mini IOC

- Started with Avnet/Memec Mini Module
- Designed custom baseboard
- Use Mini Module as is

- Mini Module on evaluation base board

- ALS Mini IOC base board

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

## Conclusion

- FPGAs with embedded processors can simplify design of instrument interfaces
- Starting with an evaluation board decreases development time
- Flexible physical implementation
- Use evaluation board as is
- Modify design files
- Build custom design around selected FPGA

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006

## Demo

- Avnet/Memec Mini Module evaluation board
- FPGA = Xilinx Virtex-4
- Embedded Processor = PPC-405 hard core
- Mini Module is running EPICS on VxWorks with channels corresponding to LEDs and DIP switches on the base board
- Control and monitor the channels over Ethernet using Winprobe on a laptop

- Using FPGAs with Embedded Processors for Complete Hardware and Software Systems

- 5/2/2006