28
Rapidly Developing Embedded Systems Using Configurable Processors Steven Knapp ([email protected]) Triscend Corporation www.triscend.com Class 413 © Copyright 1998-99, Triscend Corporation. All rights reserved. (Booth 160)

Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

  • Upload
    others

  • View
    9

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Rapidly DevelopingEmbedded Systems

Using Configurable Processors

Steven Knapp([email protected])

Triscend Corporationwww.triscend.com

Class 413

© Copyright 1998-99, Triscend Corporation. All rights reserved.

(Booth 160)

Page 2: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Agenda

• What is a Configurable Processor?• Configurable Processors architectures• Building custom peripherals• Hardware/software trade-offs, algorithmic

acceleration• Comparing the alternatives• Configurable Processor technical challenges

– Communication– Software development environment– Debugging

• Summary

Page 3: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Terminology Used in this Session

• Configurable Processor– Embedded processor core– Programmable logic to build peripherals– Dedicated System Bus– On-chip memory

• User-Definable Processor– Parameterized or changeable processor

hardware description– Typically synthesizable from VHDL/Verilog– Usually targeted to ASIC or system-on-a-chip– Examples: ARC, Tensilica, etc.

Page 4: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Trends Toward theConfigurable Processor

• Decreasing Time-to-Market– Fast iterations– Fast in-system, real-time debugging– Fast component availability

• More Adaptability– During design and debug– In the field or in the application

• Higher Performance– Match the architecture to the problem– Fast response to real-time events– Parallel operations

• Increased Differentiation• Ever-improving Process Technology

Page 5: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Toward a Configurable Processor

2000

Incr

easi

ng F

unct

iona

lity,

Den

sity

, and

Per

form

ance

1980

MCU TTL

TTL

Periph-eral

PAL

Periph-eral

EPROM

RAM

TTL

Discrete Solutions

"Systemon a

Chip"

1990Year

MCUDerivative

Periph-eral

CPLD/FPGA

RAM

EPROM/FLASH

MCU Derivatives andProgrammable Logic

MCUDerivative ASIC

"Roll-Your-Own" MCU in

FPGA

EPR

OM

ConfigurableProcessor EP

RO

M/

FLA

SH

ConfigurableProcessors

Page 6: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

What Is a Configurable Processor?

• Industry-standard processor

• Dedicated bus• Programmable

Logic– Soft peripherals– User-defined

functions– Hardware

acceleration• On-Chip Memory

DedicatedProcessor RAM

DedicatedPeripherals

HardwareBreakpoint

Syst

em B

us

ProgrammableLogic

Prog

ram

mab

le I/

O

Programmable I/O

Prog

ram

mab

le I/

O

Programmable I/OProgrammable I/O

Softperipherals

Userlogic

Page 7: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Configurable ProcessorsVendor/Family Processor Status

DedicatedResources

ProgrammableResources

Embedded BusStructure

Triscend/E5

8032"Turbo" Sampling

2-channel DMA8K-64K bytes RAMHardware debugJTAG

TriscendCoarse-grained,bus oriented

8-bit Data32-bit Address

Triscend ARM7TDMI

InDevelopment

TriscendCoarse-grained,bus oriented

32-bit Data32-bit Address

Motorola/CORE+ ColdFire Cancelled

2-channel DMA3K bytes RAMDRAM controllerHardware debug

Motorola MPAFine-grained

Multiple bussesUnknownformat

National/NAPA1000

Compact-RISC

InDevelopment

16K RAM8x256 RAMTimerJTAG debugger

ConcurrentFine-grained

Siemens TriCore PlansAnnounced

GatefieldFine-grained

Atmel ? PlansAnnounced

Atmel AT40KCoarse-grained

SIDSA/FIPSOC 8031 Sampling? Programmable

analogSIDSACoarse-grained

None,Memory-mapped

Page 8: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Motorola CORE+

3KbyteEmbedded

RAM

ExternalBus

InterfaceI2C

Controller

DUART

TimersSlave BusInterface

DMAController

ParallelPort

MasterBus

Interface1Kbyte

EmbeddedRAM

DRAMController

ExternalBus

Interface

ChipSelects

InterruptController

MotorolaColdFire

CPU Core

MAC

H/WDivide

Debug Module

JTAG

8KbyteSRAM

8KbyteInstruction

Cache

Clock

Fine-GrainedFPGAArray

SystemBus

Controller

Shared PinsFPGA I/O

Page 9: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

National NAPA

NationalCompactRISC

CPU

Bus InterfaceUnit

PeripheralDevices

ToggleBusTransceiver

ReconfigurablePipeline

Controller

PipelineMemory Array

ScratchpadMemory Array

ExternalMemoryInterface

SystemPort

Con

figur

able

I/OAdaptive

LogicProcessor

(fine-grainFPGA

architecture)

Page 10: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Triscend E5 Configurable Processor

ConfigurableSystem Logic

(CSL)Matrix

PIOPIOPIOPIOPIO

PIO

8032"Turbo"Micro-

controller

PowerControl

Clock andCrystal

OscillatorControl

Power-OnReset

MemoryInterface

Unit

BusArbiter

Byte-wideSystem

RAM

JTAGInterface

HardwareBreakpoint

Unit

AddressMappers Add

ress

Bus

Dat

a B

us

Configurable SystemInterconnect (CSI) bus

Two-channel

DMAController

SelectorSelector

Selector

CSI Socket

Page 11: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Configurable Processor Applications

• Custom Peripheral Set– Practically any digital function– Matched specifically to the application– Derivative on demand

• Hardware Acceleration– Algorithms in hardware– Handling odd-size math– Faster real-time response– Multiple operations in parallel– Bit manipulation

Page 12: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Custom Peripherals(Hardware/Software Trade-Offs)

• Software Solution (µs to ms)– Slow peripherals (serial ports, etc.)– Limited by CPU performance (Scenix, Teragen)– Easy to modify– Cheap, re-use existing silicon

• Hardware Solution (ns to µs)– Standard derivative (no differentiation)– CPU + ASIC/FPGA (difficult to modify)– Configurable Processor (easy to modify)– Additional silicon/cost

Page 13: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Example: SPI Interface• Find a processor derivative that matches

your requirements– It has SPI, but does it have everything else you

need?– Availability? Software support?

• Implement your peripheral in software (ex. Scenix)

• Build your peripheral in an external ASIC or FPGA

• Use a SPI soft peripheral in your configurable processor

Page 14: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Design Techniques

• ‘C’ language• Assembly• Instruction-set

simulator• Function library

• Schematic capture• VHDL/Verilog entry• Digital logic simulator• Soft macros available

Peripherals in Software Peripherals in Hardware

Software Hardware

Page 15: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Hardware Acceleration Example

• Calculate the instantaneous average of four 8-bit values

4)( DCBAZ +++

=

• Issues– Concurrency (I/O, processing requirements)– Handling overflow (accumulator width)– Performance (processing time)

Page 16: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Two Solutions

• Processor Solution • Logic SolutionMove PortA to Accumulator

Add PortB to Accumulator

Add PortC to Accumulator

Add PortD to Accumulator

Shift Accumulator Right Twice(divide by four)

Move Accumulator to RegZ

A

B

C

D

Z÷4

More instances require additional time

More instances require additional logic

Page 17: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Comparing the Alternatives

Solution DeviceCost

DevelopmentTime/Cost Issues When to Use It

ProcessorDerivative $1 - $15 Quick/

LowAvailability, softwaresupport,differentiation

Lowest cost, if yourapplication fits

System-on-a-Chip

$5 - $50+ development

cost

Long/High

Acquiring cores,verification, NRE,vendor selection

Volume, complexity,performance justify it.

FastProcessor $5 - $50 Moderate/

LowCreating ‘soft’peripherals

If it fits and it’s fastenough, use it!

CPU +ASIC/FPGA $10 - $100 Moderate/

Moderate

Multi-chip solution,inter-chipcommunication,debugging support,multiple CAE tools

For applications wherea configurableprocessor does not yetexist.

ConfigurableProcessor $8 - $80 Moderate/

Moderate New technologyFast time to market,complete embeddedsystem

Page 18: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Configurable ProcessorTechnical Challenges

• Communication between the processor and programmable logic functions

• Maintaining a standard development flow• Debugging a system with both processor

and programmable logic

Page 19: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Communication between the Processor and Programmable Logic

• Distributing the data and address bus to the programmable logic

• Decoding/controlling bus transactions• Multi-master bus support• Register intimacy• Debugging support

Page 20: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

?

One Solution: CSI Bus Socket(Configurable System Interconnect)

• Distributes address and data to CSL matrix– Full access to data and

address bus– Dedicated address

decoding– Predictable,

synchronous timing– Forward compatible with

future configurable processors

– Wait-state and breakpoint control

– Contention-free bussing

Side-band Signals

CSI Socket Interface

Data Write

Data Read

Address

Sele

ctor

s

Bus Clock

Wait-StateControl

Con

figur

able

Sys

tem

Inte

rcon

nect

(CSI

) Bus

Con

figur

able

Sys

tem

Log

ic

(CSL

) Mat

rix

8032"Turbo"

Microcontroller

BreakpointControlHardware

Breakpoint Unit

DMA Request/Acknowledge

2-ChannelDMA Controller

Page 21: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Decoding Bus Transactions

Match0

Match1

An A0A1A2

CSI Bus Address

RDSEL

WRSEL

READ

WRITE

BCLK

Bus Clock

RdSel

DATAData Read[7:0]

CSI Selector Style

Decode delay is constant(less than 5 ns after clock)

Fast address decoding• Any address range• Access type

CodeDataExported Special Function Registers (SFR)

• Three modesSelectorChip SelectDMA Control Register

• Up to 200 selectors in a single device

Page 22: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Connecting the Two Development Worlds

• Design and “soft” module libraries

• Passing register addresses to compiler/assembler

• Vendor place and route software

• Device programming support

• System-wide in-system debugging support

Hardware Development Software Development• Compiler/assembler

support• Function libraries• Instruction-set

simulator• System-wide in-

system debugging support

Page 23: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Preserving Existing Tool Flow

Configurable Processor Tools MCU Development Tools

Designer’s standard tool flow

System Configuration

Soft ModuleLibrary

1Program

Development

SourceCodeLibrary

2

ProgramDebug

3System Testand Debug

4

DeviceProgramming

5

HeaderFile

ObjectFile

Page 24: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

System on a Chip FlowConfigurable ProcessorDevelopment Software

MCU Development Tools

Designer’s standard tool flow

System Configuration

SourceCodeLibrary

ProgramDevelopment

In-SystemDebug

System Testand Debug

DeviceProgramming

InstructionSimulation

Netlist

Capture or Synthesis

FunctionalSimulation

3rd PartyEDA Tools

Page 25: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Example System: FastChip Software“Soft” Module

Library

DedicatedResources

“Soft” peripherals dragged intoCSL matrix

Resources UsedIndicators

Page 26: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Real-Time, In-System Debugging• Difficult in most ASIC or system-on-a-chip

designs– Must rely on simulation before completing design

• Most debuggers only support the processor– Monitor bus activity– Monitor processor registers– Break on event and single-step

• Additional debugging desired for programmable logic functions– Monitor the state of logic and flip-flops in “soft”

peripherals– Monitor or force a breakpoint from programmable

logic

Page 27: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Configurable ProcessorDebugging Capabilities

8032 RAM Test and Control

Configurable System Logic

CSI Bus

Triscend E5

Commands from 3rd party debuggers translated to JTAG instructions

Access to all address mapped and other key processor resources

Breakpoint unit snoops the internal bus, providing complex runtime control features

All sequential and combinatorial logic nodes have complete observability

Page 28: Rapidly Developing Embedded Systems Using Configurable ... · VHDL/Verilog entry • Digital logic ... DMA Controller. Decoding Bus Transactions. Match0 Match1 An A2 A1 A0. CSI Bus

Summary

• Configurable Processors offer benefits in embedded system design:– Faster time to market than ASIC/SOC designs– Higher performance compared to most processors– Higher product differentiation

• Configurable processors are a new class of single-chip programmable devices designed for embedded systems applications– Industry-standard processor– Dedicated, high-performance internal bus– Programmable logic, connected to internal bus– On-chip, high-density memory