Professional Documents
Culture Documents
Theresa Chou
Agenda
MB OverView MB Bus & IP SW Flow MB OS & 3th party tool
MB architecture
Embedded soft RISC Processor 32-bit data 32-bit instruction word (three addresses and two addressing modes) 32 registers (32-bit wide) 3 pipe stages (single issue) Big-endian format Buses Full Harvard-architecture OPB (CoreConnect), instruction and data LMB for connecting to local BRAM (faster), instruction and data
MicroBlaze is a soft processor core that can be implemented into any Virtex architecture:
MB architecture
ADD/SUB
PROGRAM COUNTER
SHIFT/LOGICAL MULTIPLY
BUS IF
MICROBLAZE CORE
ee more in http://www.xilinx.com/ipcenter/processor_central/microblaze/architecture.htm
MB performance
All instruction takes one clock cycle except Load and store (two clock cycles) Multiply (two clock cycles) Branches (three clock cycles, can be one clock cycle)
OPB Memory
Master
Arbiter
Slave
Slave
MicroBlaze Busses
Local Memory Bus (LMB) 32-bit high speed memory access Single-cycle to on-chip BRAM ILMB (Instruction LMB) DLMB (Data LMB) On-Chip Peripheral Bus (OPB) 32-bit processor interface 8/16/32-bit peripheral interface IOPB (Instruction OPB) DOPB (Data OPB)
DLMB Bus
DOPB Bus
DLMB
DOPB
OPB Interface
MicroBlaze Processor
Data Memory Memory Controller Dual Port Memory (8K Bytes) Instruction Memory
ILMB
FPGA
External
Free Cores
OPB Arbiter OPB TimeBase/WDT OPB Timer/Counter OPB GPIO OPB UART-Lite OPB JTAG UART OPB EMC Memory Controller
Flash SRAM ZBT System ACE
PPC System Reset DCR Interrupt Controller DCR Interface PLB Arbiter PLB EMC Memory Controller PLB BRAM Controller PLB DDR Controller PLB SDRAM Controller PLB2OPB Bridge OPB2PLB Bridge OPB2OPB Bridge OPB2OPB Bridge-Lite
Bus-to-Bus communication
Custom IP - dkgpio
OPB Bus
dkgpio
opb_ipif_ssp0 dk_logic
IPIC Interface
LED[0:3]
Software Flow
SW Flow Chart
HW Description
EDK
Create SW source
Synthesize P&R
Compile Simulate
ISE
BIT File/ Download DATA2BRAM ELF File/ Download
Xilinx EDK
Embedded Development Kit Xilinx Platform Studio (XPS) GUI interface Supports MicroBlaze and PPC development Tools for HW and SW platform specification Xilinx Microprocessor Debug (XMD) Board Support Package (BSP) generator Interface to industry standard simulation tools MicroBlaze Core & License Peripheral IP (Parameterizable) GNU Tools (Compiler, Debugger) Application Examples
Hardware Flow
Specify Processor, Bus & Peripherals, Hardware Configuration
Bitstream
JTAG CNTL PPC405
PLB EMC
OPB GPIO
PLB / Arbiter
OPB / Arbiter
Download to FPGA
BRAM Block
OPB UART
Bitstream
Download to FPGA
IO Port Delcarations
BEGIN lmb_v10 PARAMETER INSTANCE = d_lmb PARAMETER HW_VER = 1.00.a PARAMETER C_EXT_RESET_HIGH = 0 PORT LMB_Clk = sys_clk PORT SYS_Rst = sys_rst END
BEGIN lmb_v10 PARAMETER INSTANCE = i_lmb PARAMETER HW_VER = 1.00.a PARAMETER C_EXT_RESET_HIGH = 0 PORT LMB_Clk = sys_clk PORT SYS_Rst = sys_rst END BEGIN opb_v20 PARAMETER INSTANCE = myopb PARAMETER HW_VER = 1.10.b PARAMETER C_EXT_RESET_HIGH = 0 PORT OPB_Clk = sys_clk PORT SYS_Rst = sys_rst END
Bitstream
Download to FPGA
Peripheral name, type and HDL source code type Bus interface information
Parameters/Generics that can be customized by user. Includes default values and variable type.
"", OPB_Rst, "", OPB_ABus, OPB_BE, OPB_RNW, OPB_select, OPB_seqAddr, OPB_DBus, Sl_DBus, Sl_errAck, Sl_retry, Sl_toutSup, Sl_xferAck, "", "",
DIR=IN, BUS=SOPB, SIGIS=CLK DIR=IN, BUS=SOPB DIR=OUT, EDGE=RISING, SIGIS=INTERRUPT DIR=IN, DIR=IN, DIR=IN, DIR=IN, DIR=IN, DIR=IN, DIR=OUT, DIR=OUT, DIR=OUT, DIR=OUT, DIR=OUT, DIR=IN DIR=OUT BUS=SOPB, BUS=SOPB, BUS=SOPB BUS=SOPB BUS=SOPB BUS=SOPB, BUS=SOPB, BUS=SOPB BUS=SOPB BUS=SOPB BUS=SOPB VEC=[0:C_OPB_AWIDTH-1] VEC=[0:C_OPB_DWIDTH/8-1]
VEC=[0:C_OPB_DWIDTH-1] VEC=[0:C_OPB_DWIDTH-1]
OPB Port Declarations. These get automatically connected since they are specified to be part of the OPB Slave Bus Interface
User Ports.
Bitstream
Download to FPGA
Xflow / ProjNav
Bitstream
Download to FPGA
Software Flow
Specify Software Architecture
After peripheral hardware definition, the software flow is independent of the hardware flow.
Software Compilation
Executable in on-chip memory
Download to FPGA
GDB / XMD
PLB OPB JTAG EMC GPIO CNTL PLB2OPB PLB / BridgeOPB / PPC405 OPB2PLB Arbiter Arbiter Bridge PLB BRAM OPB BRAM Block UART I/F
Download to FPGA
MSS
Microprocessor Software Specification (MSS) Auto-generated/user modifiable file Contains all project software options (Ccompiler options, driver info, etc.)
Software Compilation
Executable in on-chip memory
Executable
Download to FPGA
GDB / XMD
PLB OPB JTAG EMC GPIO CNTL PLB2OPB PLB / BridgeOPB / PPC405 OPB2PLB Arbiter Arbiter Bridge PLB BRAM OPB BRAM Block UART I/F
Download to FPGA
MSS
Software Compilation
Library Generator (LibGen) Configures libraries and device drivers Creates xparameters.h include file for driver definitions Creates libc.a, libm.a, libxil.a libraries that contain functions that the processor can access
Executable
MSS
.c
Executable
Design your Cpu and Cpu Bus by Graphic Set each component attribute , port , memory mapping Finish your CPU design Use tool bar to run your HW and SW flow
Step through the XPS Hardware Flow Create a new project Setup project options Insert peripherals Make connections Create ports Set parameters Set STDIO
From the XPS Menu Options>Project Options Target Device Allows you to retarget the design to another device Peripheral Repository Directory Allows you to specify the location of your peripherals
Project Options Hierarchy and Flow Design Hierarchy Allows you to place the design as a sub-module within another design Netlist Generation Targets the synthesis tool and allows for flat netlist creation Implementation Tool Flow Targets Xflow or ISE Project Navigator
Project Options HDL and Simulation HDL Selects the language of the peripheral wrappers Simulator Selects between ModelSim or Verilog-XL ModelSim Libraries Path Browse to the directories where you have compiled the Xilinx Models Simulation Models Select the models desired for simulation Refer to Getting Started Guide for library compile info
All hardware information is stored in the MHS file and can be edited in multiple ways using XPS Select Project>Add/Edit Cores(dialog) This dialog allows you to add Peripherals, Bus Connections, Ports, Parameters, etc.
Hardware Implementation
Software Implementation
Generate Libraries
MicroBlaze BSP
MHS MSS
LibGen
Xmdstub.elf *.h *.a
Libraries
Drivers for IP
Downloading Bitstreams
Downloading Bitstreams Tools>Download Runs iMPACT in batch mode Uses download.cmd batch file from the etc directory to properly describe JTAG chain User must create download.cmd for their system
DEMO Flow