




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Introduction to MicroBlaze PeripheralsAfter completing this module, you will be able to:ObjectivesSpecify the free MicroBlaze peripherals and their functionSpecify the function of the MPD, PAO and BBD FilesDescribe the differences between EDIF and HDL flowsDescribe attributes and how they affect imp
2、lementationExplain the concept of drivers and the MDD fileOutlineMicroBlaze PeripheralsPeripheral DefinitionCommon LibrariesSummaryWhat is a MicroBlaze Peripheral?A piece of hardware that connects to a bus to provide extra functionality to the systemUARTEthernetArbiterInterrupt controllerMemory cont
3、rollerGPIOUARTGPIOMemory ControllerEthernetInterrupt ControllerArbiterMicroBlaze PeripheralsSome peripherals that come with the EDK:ArbiterBlock RAM ControllerGeneral Purpose I/OInterrupt ControllerIPIFJTAG UARTMemory Controller (EMC)SPI ControllerWatchdog TimerTimerUART LiteZBT ControllerThe Xilinx
4、 Embedded Processor IP Handbook gives full descriptions of each peripheral and how to use it.MicroBlaze PeripheralsArbiterUsed in Multiple-Master OPB systemsControls access to the OPBDetects OPB bus timeouts and resolves themILMBILMBArbiterDOPBOPBMasterMicroBlazeJTAG UARTUART LiteGPIORS-232IEEE 1149
5、.1LMBBramDLMBEMCINTCExternal RamIOPBI/OSample SystemMicroBlaze PeripheralsUART Lite / JTAG UARTUsed as in input / output deviceCommunicates by RS-232 or JTAGCan be a standard I/O (STDIO) or debug deviceILMBILMBArbiterDOPBOPBMasterMicroBlazeJTAG UARTUART LiteGPIORS-232IEEE 1149.1LMBBramDLMBEMCINTCExt
6、ernal RamIOPBI/OSample SystemMicroBlaze PeripheralsGPIOUsed as a general-purpose input / output peripheralConfigurable widthILMBILMBArbiterDOPBOPBMasterMicroBlazeJTAG UARTUART LiteGPIORS-232IEEE 1149.1LMBBramDLMBEMCINTCExternal RamIOPBI/OSample SystemMicroBlaze PeripheralsInterrupt ControllerExpands
7、 the number ofinterrupts MicroBlaze soft processor can handleLevel / edge sensitiveUp to 32 interruptsILMBILMBArbiterDOPBOPBMasterMicroBlazeJTAG UARTUART LiteGPIORS-232IEEE 1149.1LMBBramDLMBEMCINTCExternal RamIOPBI/OSample SystemMicroBlaze PeripheralsExternal Memory ControllerInterfaces to external
8、Flash / SRAMUp to 8 memory banksAddress mapableILMBILMBArbiterDOPBOPBMasterMicroBlazeJTAG UARTUART LiteGPIORS-232IEEE 1149.1LMBBramDLMBEMCINTCExternal RamIOPBI/OSample SystemOutlineMicroBlaze PeripheralsPeripheral DefinitionCommon LibrariesSummaryPeripheral DefinitionA peripheral consists of:Bus con
9、nectionsSettingsCustom I/OSource codeDriversE.g., GPIOOPB BusI/O WidthUser I/O PinsVHDLread / writeE.g., UART LiteOPB BusBaud rateTX/RXVHDLOutbyte / inbytePeripheral specifications are defined in System Interface Format - This consists of files to specify the peripheral, dependencies, drivers, and f
10、unctionalityPeripheral DefinitionA peripheral can be included in a system as:HDL E.g., GPIO peripheralEDIF netlist A mixture of the HDL and EDIFAll flows have a MicroProcessor Peripheral Definition (.mpd), to describe bus / I/O connectivityHDL peripherals have a Peripheral Analyze Order (.pao) file
11、to specify the HDL to synthesize, and in what orderEDIF has a Black Box Definition file (.bbd) to specify which netlist to use for a given configurationA mixed HDL / EDIF peripheral contains both .pao and .bbd filesPeripheral SIF File Structure.vhd.vhd.vhd/my_peripheral/data/hdl/netlist/simmodels.mp
12、d.pao.bbd.vhd.vhd.vhd.vhd.edn.vhd.vhd.vhd.vhd/my_peripheral/Drivers/Processor/IP2Peripheral DefinitionAll installed peripherals are under the Xilinx_EDK DirectoryAll have an .mpd file in the data directoryMost have VHDL, in the HDL directory, but this is often encrypted IPSome have EDIFPeripheral De
13、finition - .mpdThe MicroProcessor Peripheral Definition file defines the interface of a systemPorts and default connectivity for bus interfacesParameters and default valuesAny parameters and default values can be overwritten by the MicroProcessor Hardware Specification file, which defines the system
14、Peripheral Definition - .mpdSELECT slave opb_gpio, EDIF=TRUE# Generics for vhdl or parameters for verilogCSET attribute C_BASEADDR = 0 x20000000, std_logic_vectorCSET attribute C_HIGHADDR = 0 x200000FF, std_logic_vectorCSET attribute C_OPB_DWIDTH = 32, integerCSET attribute C_OPB_AWIDTH = 32, intege
15、r CSET attribute C_GPIO_WIDTH = 32, integer CSET attribute C_ALL_INPUTS = 0, integer CSET bus_interface BUS=SOPB, BUS_STD=OPB, BUS_TYPE=SLAVE# Global portsCSET signal OPB_Clk = OPB_Clk, in, ISCLOCK=TRUECSET signal OPB_Rst = OPB_Rst, in# OPB signalsCSET signal OPB_ABus = OPB_ABus, in, 0:C_OPB_AWIDTH-
16、1, BUS=SOPBCSET signal OPB_BE = OPB_BE, in, 0:C_OPB_DWIDTH/8-1, BUS=SOPBCSET signal OPB_DBus = OPB_DBus, in, 0:C_OPB_DWIDTH-1, BUS=SOPBCSET signal OPB_RNW = OPB_RNW, in, BUS=SOPBCSET signal OPB_select = OPB_select, in, BUS=SOPBCSET signal OPB_seqAddr = OPB_seqAddr, in, BUS=SOPBCSET signal GPIO_errAc
17、k = Sl_errAck, out, BUS=SOPBCSET signal GPIO_retry = Sl_retry, out, BUS=SOPBCSET signal GPIO_toutSup = Sl_toutSup, out, BUS=SOPBCSET signal GPIO_xferAck = Sl_xferAck, out, BUS=SOPB# gpio signalsCSET signal GPIO_IO = , inout, 0:C_GPIO_WIDTH-1, ENABLE=MULTIENDAttributesBus AddressRangeSignalsNo defaul
18、t signal nameDefault signal namePeripheral TypeCommon .mpd CommandsSelectSpecifies peripheral type, name, and configurationCset AttributesHDL Flow - Get passed into the HDL as generic parametersEDIF Flow - Can be used in the .bbd as a lookup table parameterCset SignalsSpecifies the signals (in, out,
19、 bidirectional) that connect to the peripheralSELECT slave opb_gpio, EDIF=TRUECSET attribute C_BASEADDR = 0 x20000000, std_logic_vectorCSET signal OPB_ABus = OPB_ABus, in, 0:C_OPB_AWIDTH-1, BUS=SOPBPeripherals The .pao FileThe Peripheral Analyse Order file contains a list of HDL files that are neede
20、d for synthesisAdditionally, it defines the analyze order for compilation lib common_v1_00_a common_types_pkglib common_v1_00_a pselectlib opb_gpio_v1_00_a gpio_corelib opb_gpio_v1_00_a opb_gpioLibrary NameHdl File to includeCommon FunctionsSupplied with MDKUsers HDL files in Analyze orderPeripheral
21、s The .bbd FileThe Black Box Definition file manages the file locations of optimized hardware netlists for black-box peripheralsIt is a look-up table that lists netlist filesC_FAMILY CONFIGURATION Files#virtex1virtex/my_ip_1.edfvirtex2virtex/my_ip_2.edfvirtex3virtex/my_ip_3.edfvirtex4virtex/my_ip_4.
22、edfvirtex5virtex/my_ip_5.edfvirtex6virtex/my_ip_6.edfspartan21spartan2/my_ip_1.edfspartan22spartan2/my_ip_2.edfspartan23spartan2/my_ip_3.edfspartan24spartan2/my_ip_4.edfspartan25spartan2/my_ip_5.edfspartan26spartan2/my_ip_6.edfLookup TableHeaderComparison FieldsConfiguration NetlistsLookup TablePeri
23、pherals Defining the DriversThe MicroProcessor Driver Definition file contains directives for customising software driversUsed by the Library Generator (Libgen) to customize the driver depending on different options in the software specificationOnly really of interest when generating custom peripher
24、alsPeripherals Defining the DriversBEGIN driver XUartLiteconstant VERSION = 2.0.0 # uses SIF 2.0.0parameter LEVEL = 0 # default levelENDBEGIN level 0constant INBYTE = XUartLite_RecvByte, DEFINED_IN = xuartlite_lconstant OUTBYTE = XUartLite_SendByte, DEFINED_IN = xuartlite_lconstant COPYFILES = (xuar
25、tlite_l.c xuartlite_l.h Makefile)constant DEPENDS = (common_v1_00_a)constant CONFIG_INCLUDE = xparameters, VALUES = ( NUM_INSTANCES C_BASEADDR )parameter INT_HANDLER = XIntc_DefaultHandler, INT_PORT = InterruptENDBEGIN level 1constant COPYFILES = ALLconstant DEPENDS = (common_v1_00_a)constant CONFIG
26、_INCLUDE = xparameters, VALUES = ( NUM_INSTANCES C_BASEADDR DEVICE_ID )constant CONFIG_FILE = xuartlite_g, VALUES = ( DEVICE_ID C_BASEADDR )parameter INT_HANDLER = XUartLite_InterruptHandler, INT_PORT = InterruptENDLevel 1 -OS-levelDriversSTDIO DriversC files to copy into system projectDriver Depend
27、enciesPreprocessor configurationsInterrupt service rouineFull details of the .mdd file format can be found in the Embedded System Tools GuideOutlineMicroBlaze PeripheralsPeripheral DefinitionCommon LibrariesSummaryCommon LibrariesThe EDK includes some useful VHDL librariesOptimized functionalityComm
28、on MicroProcessor functionsMultiplexers - (Mux_encode_sel, Mux_onehot)Gates - (or_bits, or_gate)Address Decoders - (pselect , pselect_top)Common LibrariesPselect.vhd - Parameterizable Peripheral Select (Address Decoder) generic ( C_AB : integer := 9; C_AW : integer := 32; C_BAR : std_logic_vector(0
29、to 31) := X33000000 ); port ( A : in std_logic_vector(0 to C_AW-1); AValid : in std_logic; PS : out std_logic );end entity pselect;Example Pselect implementation for decoding the address range 0 xFFFF8000 to 0 xFFFF803FC_AB = number of address bits to decodeC_AW = width of address busC_BAR = base ad
30、dress of peripheralOptimized for XilinxArchitectures (MuxCY)OutlineMicroBlaze PeripheralsPeripheral DefinitionCommon LibrariesSummarySkills CheckReview QuestionsThe JTAG UART and UART Lite can perform two functions. What are they?Which configuration file is required for all peripherals?What extra fi
31、le is required for HDL flows ? for EDIF flows?Using the .BBD slide, which netlist is selected if the .mhs file has :C_FAMILY=Virtex Configuration=3?What is the purpose of Pselect?AnswersThe JTAG UART and UART Lite can perform two functions. What are they?It can run as a STDIO (Standard I/O Periphera
32、l) and also as a debug peripheralWhich configuration file is required for all peripherals?Every peripheral has a Microprocessor Peripheral Definition (.mpd) file. This specifies the ports and attributes that can be set for the peripheral along with default signal assignmentsWhat extra file is required for HDL flows? A Peripheral Analyze Order (.pao) file. This spe
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 三年级数学故事解读
- 小王子书中纯真之爱读后感
- 自然资源开发与保护合作协议
- 智能家电销售与保修协议
- 初中生历史故事解读
- 运输合同运输补充协议
- 办公区域布局调研报告
- 环保咨询服务协议
- 电子设备销售及安装维护合同
- 物流行业运输损坏物品赔偿协议
- 建筑材料分类及明细图片
- 三年级心理健康全册课件
- 黄河流域生态保护与高质量发展课件
- 工厂奠基仪式策划书
- 人员能力矩阵图
- 用户需求(URS)编写及管理规程
- 分班后第一次班会——起航剖析
- 牛羊定点屠宰厂项目可行性研究报告-甲乙丙资信
- 03SG520-1实腹式钢吊车梁(中轻级工作制A1~A5_Q235钢_跨度6.0m、7.5m、9.0m)
- (完整word版)消化系统知识点整理
- 全国防返贫监测信息系统业务管理子系统操作手册
评论
0/150
提交评论