Home

Microblaze MCS Tutorial Jim Duckworth, WPI 1 Microblaze MCS

image

Contents

1. New Hardware Project New Hardware Project Create a new Hardware Project Project name hw_platform_0 Use default location Location L EC E5 4 microblaz e m Esi mecs t utoria hw_platform_ Browse Choose file syster default Target Hardware Specification Provide the path to the hardware specification file exported from Project Navigator or APS or Vivado or IPL This file usually resides in SDK SDK_Export hw folder relative to the XPS Vivado project location The speciticaterrtite and associated bitstream content will be copied into the workspace Next gt Note At this point modified the Project Name to just hw_platform_O but you can leave with the default name provided when you provided the path to the hardware specification file Click Finish to perform the import e C C hw_platform_0 system xml Xilinx SDK l o B File Edit Source Refactor Navigate Search Project lm Tools Run Window Help ri sert GE SS ep a ee Eis Gry Gy adl DL e OR ie Cl sais v e Quick Access P Fie C C C C LC Project Explorer 53 Se systemaml 2 SANRI CS Ou X Ma EZ B bed e H asl yv hw_platform_0 Hardware Platform Specification Ee 4 E hw_platform_0 An outline is not available E microblaze_mcs_0 bmm Design Information E system xml a Target FPGA Device xc7al00t Created With Vivado 2015 1 Created On Fri Sep 25 20 07 28 2015 Address Map for processor microblaze_mcs_0 d
2. turn on LEDs channel 1 cleanup_platform return 0 ge COM3 PuTTY 23
3. Associate an ELF file with a processor instance Address Map ELF files are available after running generate on your embedded design sources aii ELF File Associations Processors Address Maps El g Design Sources Ed mes_0 mb bootloop Je elt Simulation Sources C L sim 1 EL A mc 0 mb_bootloop Je elt Initially the default infinite loop ELF file mb _bootloop_le elf is associated with the Microblaze MCS core Click on browse under Design Sources Select Add Files and browse to the hello_world elf file in mcs_tutorial hello_world debug d Select ELF Files Select an ELF file to associate with Design Sources U0 microblaze_I Deselect all files to remove the file association ELF Files hello world elt C ECES74 microblaze_mecs mcs_tutorial hello_ world Debug mb bootloop Je elt c ECES74 microblaze_mcs mcs_tutorial mcs_tutorial srcs sources_1 jp microb Select OK 15 Microblaze MCS Tutorial Jim Duckworth WPI We now have the hello_wrold elf file containing our software progeam associated with the hardware design A Associate ELF File Associate an ELF file with a processor instance Address Map ELF files are available after running generate on your embedded design sources po Processors Address Maps Associated ELF File gv Design Sources C A mes_0 i gt UO microblaze_I B E Simulation Sources El sim_1 El gh mes_0 Click OK 16 Microblaze MCS Tutorial Jim Duckworth WPI In
4. More detailed info on SDK actions dialogs and buttons Initializing s w repositories wem e KE _ EE RE Kg SSC L I KE Close the Welcome screen and the Project Explorer Window will open Microblaze MCS Tutorial Jim Duckworth WPI E P C C Xilinx SDK oje File Edit Source Refactor Navigate Search Project XilinxTools Run Window Help rir sr e E SS el REI VEER CECR KK SE EE gt e v v sl Quick Access E gt Project Explorer 33 A B om X Mak P DSlg y An outline is not available fh Target Connections 2 E A8 BG B Problems Tasks El Console 2 E Properties Terminal gd E For 7 D E SDKLog X Ecg amp Hardware Server No consoles to display at this time 19 49 01 INFO Launching gt 4 amp Linux TCF Agent 19 49 24 INFO XSDB server LG QEMU TcfGdbClient 4 w b We need to import the Microblaze Hardware Description Select File gt New gt Project in the menu Expand Xilinx and select Hardware Platform Specification 3 New Project Select a wizard Wizards type filter text gt L General gt e C C A Xilinx GA Application Project Wh Board Support Package I5 Hardware Platform Specification Finish Cancel Click Next Click Browse and navigate to the hardware description file which will be located at project name srcs sources_1 ip component_name component name_sdk xml Microblaze MCS Tutorial Jim Duckworth WPI
5. Project Manager add a constraint source file to match your board for all the FPGA connections For example am C ECE5 74 microblaze_mcs mcs_tutorial mcs_tutorial srcs constrs_1 new mes_tutorial wde 5 41 4 Buttons ua 43 set property PACKAGE PIN C12 get_ports reset he 44 set property IOSTANDARD LVCHOS33 get ports reset 45 46 USB RS232 Interface 48 set property PACKAGE PIN C4 get ports rx 49 set property TOSTANDARD LVYCMO533 get ports rx z 50 set property PACKAGE PIN D4 get ports tx set property TOSTANDARD LVCMOS533 get ports tx 10 LIIN T1 SKCC 35 Seh uart rxd A comment regarding the UART connection In the Nexys4DDR board reference manual the UART TX and RX are shown as follows This is showing the direction of transmission as seen by the UART 4 JTAG 4 gt JTAG TXD _ CA Micro USB RXD q _ D4 J6 CTS D3 RTS E5 FT2232 Artix 7 This means that the FPGA transmits on D4 port tx in the XDC file and receives on C4 port rx For comparison on the Basys3 board the FPGA transmits on A18 and receives on B18 4 JTAG lt gt JTAG TXD gt B18 Micro USB RXD a A18 J4 FT2232 Artix 7 17 Microblaze MCS Tutorial Jim Duckworth WPI We can now Implement the Project and then create a bit file by running the Generate Bitstream step You may receive 8 warning messages after implementation 7 war
6. K 11 Microblaze MCS Tutorial Jim Duckworth WPI You should eventually see in the SDK Console Window at the bottom of the window select the Console Tab Compiling iomodule Running Make libs in microblaze mcs 0 libsrc standalone v5 1 src make C microblaze mcs 9 libsrc standalone v5 1 src s libs SHELL CMD COMPILER mb gcc ARCHIVER mb ar COMPILER_FLAGS 02 c mcpu v9 5 mlittle endian mno xl reorder mxl soft mul EXTRA_COMPILER_FLAGS g Compiling standalone Finished building libraries Now we will create a new C program Select File gt New Project and select Application Project under Xilinx Select a wizard Wizards type filter text gt General gt Lk CfC gt fe Java a Xilinx GA Application Project Wh Board Support Package E Hardware Platform Specification SPM Project F4 j Finish Click Next Type hello_world for the project name Select the existing Board support Package 12 Microblaze MCS Tutorial Jim Duckworth WPI New Project Application Project Create a managed make application project K i Project name hello_world se default location ation C ECE574 microblaze_mcs mcs_tutorial hello_world Browse e system default Target Hardware process Target Software Language Board Support Packager 7 Create New hello_world_bsp standalone_bsp_0 Click Next Templates Create one of the available t
7. Microblaze MCS Tutorial Jim Duckworth WPI Microblaze MCS Tutorial for Xilinx Vivado 2015 1 This tutorial shows how to add a Microblaze Microcontroller System MCS embedded processor to a project including adding a simple C program The design was targeted to an Artix 7 FPGA ona Nexys4DDR board but the steps should be general enough to work on other platforms Create a new project and create a top level module for the inputs and outputs we will use with the microblaze MCS Create a constraints file to connect the ports to the appropriate FPGA pins to match your board C ECE574 microblaze_mcs mcs_tutorial mes_tutorial srcs sources_1 new mcs_top v ha LA 22 module mes_top input clk Coop input reset input rH output tx input 7 0 aw output 7 0 leds l Bi A me GA wom om mh oh AD Oo WwW DD zl oF Un P 32 33 endmodule I Search Q Ces Ga Name fa CC Vivado Repository H 5 Alliance Partners H Automotive amp Industrial DL AXI Infrastructure H BaselP Basic Elements HL Communication amp Networking LC Debug amp Verification jc Digital Signal Processing Embedded Processing H AXI Infrastructure E E AXI Peripheral lc Clock amp Reset EME Debug amp Verification ENG Interprocessor Communication LC Memory and Memory Controller KE di x a El AXI4 AXI4 Stream Production Included line comp DL Utility DL FPGA Features and Design Math Func
8. ated from your C program look in the hello_world gt Debug gt Src folder top left pane in the Xilinx SDK application and double click on the hello_world_0 elf file If you scroll down this file until you find int main you will see your C instructions and the corresponding assembler and machine code values Interesting stuff 21 Microblaze MCS Tutorial Jim Duckworth WPI Extra Accessing the GPIO using xil_printf and using the UART include lt stdio h gt include platform h include xparameters h add include xiomodule h add void print char str int main Inc platrorm u32 data XIOModule iomodule iomodule variable for gpi gpo and uart u8 msg 15 This is a test buffer for sending message using XIOModule_Send ug rx but IERT gt receive buffer using XIOModule_Recv u32 counter example using xil_printf counter 1234 xil_printf The counter value is d in decimal and x in hex n r counter counter print Read switches write to LED port and UART send and receive chars n r Initialize module to obtain base address data XIOModule_Initialize amp iomodule XPAR_IOMODULE_0_DEVICE_ID data XIOModule Start amp iomodule Need to call CfgInitialize to use UART Send and Recv functions int XIOModule_CfgInitialize XIOModule InstancePtr XIOModule_Config Config u32 EffectiveAddr note config and effective address arguments are
9. aze_mcs_0 veo 54 in parentheses to your own signal names Begin Cut here for INSTANTIATION Template INST TAG s imicroblaze mcs 0 your instance name 58 Clk Clk j input wire Clk 59 Reset Reset j input wire Reset 60 UART Rx UART Rx input wire UART Rx 61 UARI Tx UARI Tx f output wire UART Tx 62 GPO1L GPO1 output wire 7 0 GPO1 63 GPI1 GPI1 Z4 input wire 7 0 GPIi 64 GPI1 Interrupt GPL Interrupt output wire GPIL Interrupt 65 66 INST TAG END a 3 Hi A a Lo I g i input clk fpga input reset input Iz output tx input 7 0 aw output 7 0 leds 1 Microblaze mes 0 your instance name C1k Clk f f input rire Clk Reset Reset ff input wire Reset UART Rx UART Rx f input wire UART Rx UART Tx UART Tx Z4 output wire UART Ix GPO1 GPO1 f output wire 7 0 GO GPI1 GPI1 ff input Fire 7 0 GPTi GPI1 Interrupt GPI1 Interrupt output rire GPIi Interrupt BD ay Microblaze MCS Tutorial Jim Duckworth WPI Change the instance_name to mcs_0O and modify the signal names in the instantiation to match your top level port names as shown below Note you may see a GPI1_Interrupt signal you can ignore this port just leave it open C ECES74 microblaze_mces mecs_tutorial mecs_tutorial srcs sources_1 new mecs_top v 21 22 module mca top SA input clk fpga 24 input reset 25 input ES 26 output tz zt inp
10. configures it to baud rate 115200 gt R platform_config h EE EE Le platform c UART TYPE BAUD RATE gt h platform h TARERE el Iscript id i uartns550 9600 vartlite Configurable only in HW design z 8 pe eed ps7 uart 115200 configured by bootrom bsp B microblaze_mcs_0 bmm Lt system xml E standalone_bsp_0 include lt stdio h gt include platform h void print char str gt int maint init_platform print Hello World n r cleanup_platform return 4 p oy ath Target Connections 2 E US Gi Ri Problems F Tasks El Console 33 E Properties Si Terminal gt amp Hardware Server CDT Build Console hello_world pol G2a Ble8 rt amp Linux TCF Agent text data DSS dec hex Tilename amp QEMU TcfGdbClient A 4412 372 2104 6888 lae8 hello_world elf Finished building hello_world elf size 19 55 24 Build Finished took 1s 17 ms 4 eee eee al p 4 am 19 49 01 INFO 19 49 24 INFO 19 51 37 INFO 19 52 55 INFO Toy xX gt B re X Mak D LRO H stdio h platform h print char void mam int D SDK Log amp Launching XSDB serve Project t BSP Projec Le hello_world src helloworld c We now need to associate the ELF file with our hardware Go back to Vivado Select Tools gt Associate ELF file in the menu 14 Microblaze MCS Tutorial Jim Duckworth WPI d Associate ELF File
11. d will be removed from module microblaze_mcs 99 more like this Microblaze MCS Tutorial Jim Duckworth WPI Software Development The next steps are related to the software development using SDK Software Development Kit You can download this from the Xilinx website if you do not already have this installed Start SDK and select the Workspace to match where your design is stored for example the project is located in this example at C ece574 microblaze_mcs mcs_tutorial Workspace Launcher Select a workspace Xilinx SDK stores your projects in a folder called a workspace Choose a workspace folder to use for this session Workspace C ECES 4 microblaze_mcs mecs_tutorial C Use this as the default and do not ask again Click OK SDK Starts SOK eme Ak a mm File Edit Source Refactor baste Search Project XilinxTools Run Window Help amp O Welcome 33 iy Ye aie i XI LI NX Software Development Kit Paro x ALL PROGRAMMABLE Getting Started Ae Create Application Project he Import Project Create an application project for a selected hardware platform E Import one of the existing projects Documentation amp Tutorials Cheat Sheets Quick Take Videos Select one of the existing cheat sheets on Xilinx SDK View short video tutorials on various SDK features sg Release Notes Guide a zb User Guide 5 Information about installation and new features in this release Vex
12. emplates to generate a fully functioning application project Available Templates Peripheral Tests Let s say Hello World in C lwIP Echo Server Memory Tests RSA Authentication App SREC Bootloader SREC SPI Bootloader Ailkernel POSIX Threads Demo fyng DRAM tests yng FSBL Finish Select Hello World and click Finish Hello_world_0O elf is produced ELF is Executable and Linkable Format 13 Microblaze MCS Tutorial Jim Duckworth WPI tee hello world elf size text data bss dec 4412 372 2104 Finished building hello world elf size mb size hello world elf 6888 Filename hello world elf You can view the C program for Hello World by expanding the src folder under hello_world and selecting the helloworld c file C C hello_world src helloworld c Xilinx SDK File Edit Source Refactor Navigate Search Project XilinxTools Run Window Help ri Se o SS ei we biss Gs Ze OO Oe OR Ais g Wl e al ei Quick Access roject Explorer 53 E em am ir em mss elloworld c 23 Ga o Outl LC Project Explorer 33 DU P L i helloworld O B Out amp P Y gr Copyright C 2009 2014 Xilinx Inc All rights reserved LU E 4 E hello_world gt d i D D gt Binaries helloworld c simple test application a CU Includes 4 gt Debug This application configures UART 16550 to baud rate 9600 e 4 se PS7 UART Zynq is not initialized by this application since IER See bootrom bsp
13. imb_cntlr 0200000000 Ox00007fff ilmb_cntlr OxO0000000 0x00007f ff iomodule_0 Ox80000000 0x8000ff f iomodule 0 OxcO000000 Oxffffffff IP blocks present in the design dimb Imb_v10 3 0 dimb_cntlir Imb_bram_if_cntlr 4 0 filter_reset proc_sys_reset 5 0 ilmb Imb_v10 3 0 ilmb_cntlr Imb_bram_if_cntlr 4 0 iomodule_0 iomodule 3 0 Imb_bram_I blk_mem_gen 8 2 microblaze_mcs_0 microblaze 9 5 Overview if Target Connections 2 E UW O UE Problems Tasks EI Console 52 E Properties 8 Terminal m E SDK Log X E Melle Hardware Server d El F v 19 49 01 INFO Launchil a gt amp Linux TCF Agent No consoles to display at this time 19 49 24 INFO XSDB sel CG QEMU TcfGdbClient id ee ae CES 19 51 37 INFO Project lt fo 10 Microblaze MCS Tutorial Jim Duckworth WPI Now we have imported the hardware description a standalone board support package can be created Select File gt New gt Board Support Package New Board Support Package Project Xilinx Board Support Package Project Create a Board Support Package Project name standalone_bsp_0 Use default location Location G ECES74 micreblaze_mes mes_tutorial standalone_bsp_0 Browse Choose file system default Hardware Platform hw_platform_0 r CPU microblaze_mes 0 xilkernel tandalone is a simple low level software layer It provides access to basic standalo
14. k 5 asly 7 UART TYPE BAUD RATE S DIV ee Y C e 4 Le hello_world warten BR stdio h Binaries yvartlite Configurable only in HW design l platform h ps7_uart 115200 configured by bootrom bsp print char void e mam int include lt stdio h gt gt A helloworld c include platform h i lat form configs Le platform c void print char str b h platform h T Iscript td 8 ER main GN hw platform_0 init_platform E standalone_bsp_0 print Hello World New Version n r cleanup_platform return Ka 4 p 7 Problems 2 Tasks El Console 5 Properties EI Terminal 1 m E SDK Log CC Es cp j g Daa E Rl r 51 23 INFO Launching E CDT Build Console hello_world 4 7 51 46 XSDB serv ath Target Connections 3 If A 01 56 Connected Invoking MicroBlaze Print Size 01 56 targets 1 gt Gp Haniware Sever mb size hello_world elf tee hello_world elf size 01 58 FPGA conf gt amp Linux TCF Agent text data bss dec hex filename 7 02 19 Connected gt gt QEMU TcfGdbClient 4428 372 2104 6904 laf8 hello_world elf 2 19 targets Finished building hello world elt size EEN FPGA cont S 20 Connected targets 7 t Writable SmartInset 57 41 Modify the statements as required for example change the Hello World to add your name and then press save A
15. le_v1_00_a Click on Files xiomodule h for a list of functions 20 Microblaze MCS Tutorial Jim Duckworth WPI Extra Modifying the C Program to use xil_ printf The usual printf function is too large to fit into the small memory of the Microblaze but you can use the Xilinx light weight version of printf called xil_ printf Here is an example of its use in my C program counter 1234 xil_ printf The counter value is d in decimal and x in hex counter counter And this is what is displayed in hyperterminal The counter value is 1234 in decimal and 4D2 in hex xil_ printf is defined in stdio h Note However found out that in Xilinx version 14 1 the declaration was missing in this header file and you will see an implicit function declaration warning It did seem to link without errors and run OK This seems to be corrected in Version 14 2 and later so you can probably ignore this step But if you see the warning and want to fix it on your own system right click on the stdio h at the top of your C program include lt stdio h gt and select Open Declaration Add this to line 230 void _EXFUN xil_ printf const char so the nearby lines look like int _EXFUN remove const char int _EXFUN rename const char const char void _EXFUN xil_ printf const char endif Assembler instructions If you want to see the assembler instructions that are cre
16. ne processor features such as caches interrupts and exceptions as well as the basic features of a hosted environment such as standard input and output profiling abort and exit Make sure standalone for the Board Support Package OS is selected and then Click Finish e Board Support Package Settings Board Support Package Settings Control various settings of your Board Support Package a Overview standalone e a drivers OSType standalone Standalone is a simple low level software layer It provides access to basic processor BT EEN OS Versi 51 features such as caches interrupts and exceptions as well as the basic features of a hosted en ersion MM environment such as standard input and output profiling abort and exit Hardware Specification C ECE3829 microblaze_mcs mcs_tutorial hw_platform_0 system xml Processor microblaze_mcs_0 Check the box next to the libraries you want included in your Board Support Package You can configure the library in the navigator on the left Name Version Description lwip141 11 IwIP TCP IP Stack library lwIP v1 4 1 xilffs 3 0 Generic Fat File System Library F xilflash 4 0 Xilinx Flash library for Intel AMD CFI compliant paral xilisf 5 2 Xilinx In system and Serial Flash Library xilmfs 2 0 Xilinx Memory File System F xilrsa 11 Xilinx RSA Library F xilskey 21 Xilinx Secure Key Library Click O
17. new ELF file is automatically generated Back in Vivado we will now see a message that says write_bitsream Out of date This is due to hello world elt changing Rerun the Generate Bitstream process to create an updated bit file with the new C program added you do not need to redo any of the previous synthesis or implementation steps unless you also change the hardware design Download the new bit file to the board and verify the new changes 19 Microblaze MCS Tutorial Jim Duckworth WPI Extra Accessing the GPIO To access GPI GPO use XIOModule_DiscreteRead and XIOModule_DiscreteWrite with channel 1 4 for GPI1 4 and GPO1 4 For example include lt stdio h gt include platform h include xparameters h 77 adad include xiomodule h add void print char str int main init plattorm u32 data XIOModule gpi XIOModule gpo print Reading switches and writing to LED port n r data XIOModule_Initialize amp gpi XPAR_IOMODULE_0O_DEVICE_ID j data XIOModule_Start amp gpl data XIOModule_Initialize amp gpo XPAR_IOMODULE_0O_DEVICE_ID data XIOModule_Start amp gpo while 1 data XIOModule_DiscreteRead amp gpi 1 read switches channel 1 XIOModule_DiscreteWrite amp gpo 1 data turn on LEDs channel 1 cleanup_platform return 0 You can find the API documentation in the SDK Project Explorer under lt BSP Name gt BSP Documentation iomodu
18. nings are related to the Microblaze core that you can ignore 1 warning is related to the clk_fpga 100MHz2 being driven directly by an IO rather than a Clock Buffer In this simple example we did not use an MMCM for the clock but this would be recommended Note On the Nexys4DDR and Basys3 boards the USB UART bridge Serial Port allows a PC application to communicate with the board using standard Windows COM port commands The same USB is also used for the Digilent USB JTAG circuitry but the functions behave independent of each other read the Digilent user manual for more information Once a bitstream is created use the Hardware Manager to program the device Connect to the USB UART using a serial communications link connected to the correct serial com port Press the reset button on the board and you should see Hello World appear on a serial communications link such as Putty or a Hyperterminal window eP COM18 PuTTY 18 Microblaze MCS Tutorial Jim Duckworth WPI Extra Modifying the C Program In the Xilinx XDK program expand the src folder from the C project and double click on the hello _world c file You can see the C statements Eel C C hel File Edit Source Refactor Navigate Search Project XilinxTools Run Window Help Dis Sle REENE Wes LE aa DARA AE A DE DE E E UE A DAEA Quick Access E R gt Project Explorer 33 D gp systemxml 18 system mss L helloworld c 53 GE Out 2 Ma
19. not used data XIOModule_CfgInitialize amp iomodule NULL 1 xil_printf CFInitialize returned 0 success d n r data Send 12 characters using Send Send is non blocking so must be called in a loop may return without sending a character unsigned int XIOModule_Send XIOModule InstancePtr u8 DataBufferPtr unsigned int NumBytes const int count 14 int index 0 while index lt count data XIOModule_Send amp iomodule amp msg index count index index data xil_printf n rThe number of bytes sent was d n r index Another way to send individual characters outbyte X g tbyte 0x37 J7 number 7 outbyte Z o tbyte Tyn 77 line feed Receive a character and store in rx buf unsigned int XIOModule_Recv XIOModule InstancePtr u8 DataBufferPtr unsigned int NumBytes while data XIOModule_Recv amp iomodule rx_buf 1 0 22 Microblaze MCS Tutorial Jim Duckworth WPI xil_printf The number of bytes received was d n r data xil_printf Recv The received char was c n r rx_buf 0 Another way to receive a single character rx_buf 0 inbyte xil_printf inbyte The received char was c n r rx_buf 0 while 1 data XIOModul _Discr eteRcad ciomodule 23 ZZ gread switches channel data XIOModule_DiscreteRead amp iomodule 2 read push channel 2 XIOModule_DiscreteWrite amp iomodule 1 data
20. roblaze MCS Tutorial Jim Duckworth WPI Add an 8 bit GPI we will connect to the slider switches later MicroBlaze MCS 2 3 f Documentation 0 IP Location 3 Switch to Defaults E Show disabled ports Component Name microblaze_mcs_0 Use GPI Number of Bits 8 CPI Interrupt Generate Interrupt None Click on OK d Generate Output Products The following output products will be generated V Preview A FG microblaze_mcs_0 xci 00C per IP 21 Instantiation Template 71 Synthesized Checkpoint dop T Behavioral Simulation 21 Change Log Gei G t Gei Synthesis Options 5 Global Out of context per IP Run Settings Number of jobs 4 e Click on Generate Microblaze MCS Tutorial Jim Duckworth WPI Generate Output Products Click OK You will now see the microblaze_mcs_0O core in the Design Sources window IP Sources Libraries Compile Order We now need to access the Instantiation Template so we can add the mcs to our top level module Select the IP sources tab then select the template Qz22 ea B IP 1 icroblaze_mcs_O 95 7 6 Instantiation Template 1 a microblaze_mecs_O veo thesis 45 H 4 Change Log i Garry mes i Selecting the file you can now scroll down the veo file and copy the template portion Microblaze MCS Tutorial Jim Duckworth WPI c ECE574 microblaze_mcs mcs_tutorial mcs_tutorial srcs sources_1 ip microblaze_mcs_0 microbl
21. th the MicroBlaze MCS core This can be achieved by using the Associate ELF files dialog found in the Tools menu See the Product Guide for more information and examples We can use the default component name of microblaze_mcs_0 e Set the Input Clock Frequency to match your Nexys4DDR board 100MHz e Increase the memory size from 8KB to 32KB allows for slightly larger C program Microblaze MCS Tutorial Jim Duckworth WPI Select the UART Tab and enable the receiver and transmitter and select your baud rate F Customize IP MicroBlaze MCS 2 3 Wl Documentation IP Location J Switch to Defaults F Show disabled ports Component Name microblaze_mcs_0 MS FIT PIT GPO GPI Interrupts V Enable Receiver 7 Enable Transmitter Define Baud Rate Programmable Baud Rate Number of Data Bits Even or Odd Parity Implement Receive Interrupt Implement Transmit Interrupt Implement Error Interrupt Universal Asynchronous Receiver Transmitter Information The Universal Asynchronous Receiver Transmitter UART provides a standard full duplex Receiver and transmitter can be individually enabled to save implementation Add an 8 bit GPO we will connect to LEDs later MicroBlaze MCS 2 3 lif Documentation IP Location 3 Switch to Defaults Show disabled ports F Use GPO ck UART ch Number ofits 5 Reset PICIA Initial Value of GPO 0x00000000 Mic
22. tions Details Name MicroBlaze MCS Version 23 Description MicroBlaze Micro Controller System MCS is a light weight general purpose micro controller system based on the MicroBlaz J a hardware solution would be less flexible and more difficult to implement Software development with the Xilinx Software C peripherals Debugging including UART is available either via SDK or directly with the Xilinx Microprocessor Debugger The Iv AKE to 128KB up to 4 Fixed Interval Timers up to 4 Programmable Interval Timers up to 4 32 bit General Purpose Output Controller with up to 16 external interrupt inputs Microblaze MCS Tutorial Jim Duckworth WPI The Customize IP for the Microblaze MCS opens Re Customize IP MicroBlaze MCS 2 3 iif Documentation IP Location J Switch to Defaults Show disabled ports Component Name microblaze_mcs_0 CS UART FIT PIT if Micro Controller System Input Clock Frequency MHz Memory Size Enable 10 Bus Enable Debug Support NONE Debug JTAG User defined Register USER 2 E Enable MicroBlaze Trace Bus A Vivado Information Software Information After generating the core there are a few steps necessary in Vivado mainly to ensure that software is associated with the bit stream When the core is generated a BMM file is created describing the memory of the MicroBlaze MCS core Before generating the bitstream the software program ELF file should be associated wi
23. ut 7 0 aw 28 output 7 0 leds 29 E 30 31 microblaze mes 0 mes 0 32 Clk clk pont ZZ input wire Clk 33 Reset reset Z input wire Reset 34 UART Ru rx f input wire UART Rx 35 UART TX tx output wire UART Tx 36 GPO1 leds f f output wire 7 0 GPOI1 37 GPI1 sw f f input wire 7 0 GPTi 36 GPI1 Interrupt output wire GPIi Interrupt ao 40 41 endmodule Ea in A tA da ia D g V E In this simple project we just have the microblaze_mcs module but of course you could add extra components or modules or other logic as required Select Run Synthesis to synthesize your project You will notice there are 106 Synthesis Warnings but you can ignore these A V 108 warnings 597infos C 36 statuses eE ERC Vivado Commands 2 warnings Eli Synthesis 106 warnings ia ea Out of Context Module Runs 106 warnings C S microblaze_mecs_0_synth_1 106 warnings SR IP_Flow 19 3664 IP microblaze_mcs_0 generated file not found c ECES74 microblaze_mcs mcs_tutorial mcs_tutorial srcs sources_1 ip microblaze_mcs_0 microblaze_mcs_0 dop Please regenerate to continue 4 more like this S Synth 8 312 ignoring unsynthesizable construct assertion statement ram module top vhd 356 E i Synth 8 3332 Sequential element wicroblaze_I MicroBlaze_Core_1I Area Core Data_Flow_I Result_Mux_1 Result_Mux_Bits 31 Result_Mux_Bit_I EX_Result_DFF Using_FPGA Native is unused an

Download Pdf Manuals

image

Related Search

Related Contents

Panasonic DMC-G2K Digital Camera User Manual  shc25_ds_esla_web - SOKKIA Latin America  

Copyright © All rights reserved.
Failed to retrieve file