Upload
duongcong
View
241
Download
0
Embed Size (px)
Citation preview
Jim Duckworth, WPI Embedded Microprocessors2
Topics
• Microcontrollers versus FPGAS
– What is the best for your application?
• Debugging embedded designs
– Chipscope Pro and Agilent FPGA Dynamic Probe
– Use VHDL/Verilog models of system components (e.g. SDRAM)
• Xilinx Virtex-4,5,6 Spartan-6, 7 Series (Kintex etc)
– DSPslices, Ethernet MAC, integrated processors
• Adding Microcontrollers to FPGAs
– Picoblaze, Microblaze, Power PC (405 and 440), ARM
• Xilinx Zynq-7000
– Programmable System on Chip (SoC)
• Dual ARM Cortex-A9 MPCore
• Plus FPGA logic with up to 218,600 LUTs and 437,200 FFs
Jim Duckworth, WPI Embedded Microprocessors3
Microcontrollers versus FPGAs
• Microcontrollers
– Execute compiled programs written in ‘C’ or Assembler
• Program may be on the micro or in external flash memory
• Micro fetches instructions, decodes, manipulates data or I/O
– Sequential execution
• Requires multiple clock cycles for most operations
– Can be easily optimized for battery powered operations
• Only wake up in response to external interrupts
– Limited I/O of standard logic
• FPGAs
– ‘Sea of gates’ can be configured for any required logic
– Very good for high-speed parallel data processing (e.g. graphics, networks)
– Lots of I/O – versatile logic interface (LVDS etc)
– Can be easily partitioned into different functional blocks
– Not appropriate for simple control applications
Jim Duckworth, WPI Embedded Microprocessors4
Digital Controller Board – Virtex II FPGA
SDRAM
Config
PROMLVDS
Interface
FPGA
Ethernet Transceiver
Jim Duckworth, WPI Embedded Microprocessors10
Debugging Embedded Designs
• VHDL and Verilog models of standard devices
– Micron models of all SDRAM devices – simulates behavior
– Use as part of Test Benches
• will report functional errors (initialization, setup/hold time violations)
• Xilinx ChipScope Pro
– Poor man’s logic analyzer!
– Connected and analyzed through JTAG port
– See on-line introduction (with CoreGen)
• Agilent FPGA Dynamic Probe
– Interfaces through special core inside FPGA
Jim Duckworth, WPI Embedded Microprocessors11
Embedded Software Tools
CPU
Logic Design Tools
I/O
FPGA
Memory
Logic Design Tools
FPGA +
Memory + IP +
High Speed IO
(4K & Virtex)
Embedded Software Tools
CPU
Inte
gra
tio
n o
f F
un
ctio
ns
Inte
gra
tio
n o
f F
un
ctio
ns
TimeTime
Logic Design Tools
Embedded Software Tools
Logic + Memory
+ IP +
Processors +
RocketIO
(Virtex-II Pro)
Programmable Systems
usher in a new era of system
design integration
possibilities
Programmable Systems
usher in a new era of system
design integration
possibilities
Integration in System Design
Jim Duckworth, WPI Embedded Microprocessors12
Embedded Processors
• Soft core processors – use on any FPGA– Picoblaze 8-bit microcontroller
• Programmed in assembler
• Very useful for handling serial IO (UART, SPI interface) and replacing complex state machines
– Microblaze 32-bit microcontroller
• Use Xilinx EDK – base system builder (Program in ‘C’)
• Now part of IP Catalog Core Generator
• Hard Processor cores – IBM Power PC 405and 440 32/64-bit Processor
• 16 KB data cache and 16 KB instruction cache
• Virtex-5 FXT FPGA Power PC 440 (550MHz) 1100+ DMIPS
– Dual Arm Cortex-A9 MP Core (1GHz) – on Zynq SoC Devices
• Can add and mix multiple processors!– Need to be familiar with micros (as well as logic design)
Jim Duckworth, WPI Embedded Microprocessors21
Embedded DevelopmentTool Flow Overview
Data2MEM
Bitstream
Compiler/Linker
(Simulator)
C Code
Debugger
Standard Embedded SWDevelopment Flow
CPU code in on-chip memory
?
CPU code in off-chip memory
Download to Board & FPGA
Object Code
Standard FPGA HWDevelopment Flow
Synthesizer
Place & Route
Simulator
VHDL/Verilog
?
Download to FPGA
Microblaze MCS - FPGA Resources Used
• Basys3 board (Artix-7 XC7A35T)
– See tutorial
Jim Duckworth, WPI Embedded Microprocessors23
Utilization Available %
LUT 704 20,800 3.4
FF 300 41,600 0.7
BRAM 8 50 16
Xilinx Zynq-7000 SoC Device
• Dual-core Cortex-A9
• DDR3 memory
controller
• Ethernet, USB, SDIO
• SPI, UART, I2C
• Logic
– Logic Cells
– Block RAM
– DSP Slices
– Dual-channel, 12-bit,
1MSPS ADC
Jim Duckworth, WPI Embedded Microprocessors24
ZedBoard Example Design*
*Avnet Zedboard “Getting Started Guide”
Jim Duckworth, WPI Embedded Microprocessors26
ZedBoard Example Design*
*Avnet Zedboard “Getting Started Guide”
Jim Duckworth, WPI Embedded Microprocessors27