Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Prerequisites:
XilinxISE/EDK/SDKversion13.2(eitherLinuxorWindows).IfinstallingtheXilinxtools onaLinuxmachine,pleaserefertotheAppendixforworkaroundstopotential installationissues. Linuxworkstation(IusedanetbookrunningUbuntu10.10)withgitinstalled XilinxML605Virtex6FPGAevaluationboardand12Vpoweradapter Two(2)USBAtoUSBminiBcables
Procedure:
1) DownloadtheAXI4interconnectbasedML605referencedesignforISEDesignSuite13.2 fromhttp://www.xilinx.com/products/boards/v6embd/reference_designs.htm(You'llneed aXilinxaccountandwillbeaskedtoagreetoalicensepriortodownloading.) 2) ExtracttheISEprojecttoadirectoryofyourchoice. 3)OpenuptheprojectinXilinxISEbydoubleclickingon:
<ise_project_dir>/ug668_13_2_AXI4_PRODN/ML605_Embedded_Kit/ML605_System/HW/ise_proj.xise
Page1of10
4)FireupXPSbydoubleclickingonsystem.xmp.
Page2of10
9)GobacktotheISEProjectNavigatorwindow.RightclickonExportHardwareDesigntoSDK withBitstreamandselectRunfromthepulldown.Gogetacupofcoffee.
Page4of10
16)ThenextstepsinvolvecrosscompilationoftheLinuxkernelfortheMicroblazeonaLinux workstation.FollowthedirectionsatthebottomofthefollowingpagetoinstalltheLittle EndianToolsandRamdiskImage:http://xilinx.wikidot.com/mbgnutools 17)Notethat<dirwheretoolsareuntarred>MUSTbeginwithaforwardslashorthecross compilerwillgetconfused.(e.g.,/home/yourhomedir/microblaze,NOT home/yourhomedir/microblaze).OnUbuntu,youcanaddthePATHandCROSS_COMPILE settingstoyour.bashrcfile.Exityourterminalwindowandopenupanewoneforthesettings totake. 18)GettheLinuxkernelfromtheXilinxgitarchive: gitclonegit://git.xilinx.com/linux2.6xlnx.gitmaster 19)ReferringbacktoStep#15,copytheXilinxDeviceTreefilegeneratedbySDK(xilinx.dts)to <kernel_dir>/arch/microblaze/boot/dts/xilinx.dts. 20)CopytheLinuxfilesystemgziparchivedownloadedinStep#16 (initramfs_minimal_le.cpio.gz)to<kernel_dir>. 21)NowfortheconfigurationofthekernelMakesureyou'rein<kernel_dir>.Startwiththe defaultkernelconfigurationfileprovidedwiththekernelfortheSP605AXIreferencedesign. >makeARCH=microblazesp605_le_defconfig 22)TocustomizethekernelforusewiththeMicroblazecoredefinedinXPSontheVirtex6 FPGAontheML605board: >makeARCH=microblazemenuconfig 23)GotoPlatformOptions.MakesuretheDefinitionsforMICROBLAZE0looklikethispicture:
24)Buildthekernel: >makeARCH=microblazesimpleImage.xilinx 25)Getanothercupofcoffee. 26)Findthekernelimage<kernel_dir>/arch/microblaze/boot/simpleImage.xilinxandcopyitto someplaceconvenient. 27)FindtheFPGAbitstream <ise_project_dir>/ug668_13_2_AXI4_PRODN/ML605_Embedded_Kit/ML605_System/HW/ise_top.bitand copyitintothesamedirectoryasthekernelimage. 28)StartXilinxSDKandLaunchaXilinxshell:XilinxTools>LaunchShell.YoucanexitSDKif you'dlike. 29)IntheXilinxshell,navigatetothelocationwheretheFPGAbitstreamandtheLinuxKernel imagelive. Page5of10
30)Makesurethe2USBcablesareconnectedfromthehostPCtothefrontpaneloftheML605 boardandpowerontheML605board. 31)Openupaserialconsoleconnection.ForWindowsmachines,followthedirectionsonp.11 15ofhttp://www.xilinx.com/support/documentation/boards_and_kits/ug533.pdftoinstallthe USBtoUARTdriverandconfiguretheRS232serialconnection. 32)Startupaserialconsole(e.g.TeraTermorscreen/dev/ttyUSB09600fromaLinuxterminal). Serialconnectionsettings:9600baud,8bits,1stopbit,noparity,noflowcontrol.TheML605 willbydefaultbootuptoatestproject.Fearnot! 33)FromtheXilinxshell,startuptheXilinxMicroprocessorDebugger: >xmd 34)LoadtheFPGAandtheLinuxkernelimage: XMD%fpgafise_top.bit XMD%connectmbmdm XMD%dowsimpleImage.xilinx (Spewageonthescreen.Waitforaminuteortwo...) XMD%con 35)Linuxshouldnowbootintheserialconsolewindow.Waitforacommandprompt.Itcan't doallthatmuch,butyoucannavigatearoundthedirectorytreeandtopworks.Voila! CreationofaCompactFlashImage(New!) 1) IntheXilinxshell,navigatetothelocationwheretheFPGAbitstreamandtheLinuxKernel imagelive. 2) Copythefilegenace.tclfrom%XILINX%/ISE_DS/EDK/data/xmd 3) LaunchaXilinxshell(seestep#28above). 4) Createthefilelinuxmb.acefilebytyping:
xmdtclgenace.tclhwise_top.bitelfsimpleImage.xilinxacelinuxmb.aceboardml605targetmdm
5) IfyoudonthaveaCompactFlashcardformattedwithaFAT16filesystem,followthe directionshere:http://billauer.co.il/blog/2011/07/systemacebitstreammicroblazeprocessor compactflash/ 6) DeleteallofthefilesandfoldersfromtheCompactFlashcard. 7) Copylinuxmb.acetotheCompactFlashcardandinsertitintotheslotontheML605board. 8) PoweruptheML605boardandopenaserialconsoleasinstep#32above.Linuxwillboot. MountinganNFSFilesystem(New!) 1) CreateanewdirectorycallednfsbootinaconvenientlocationontheLinuxworkstationthat willactastheNFSserverandcdtoit. 2) UncompresstheLinuxfilesystemtothenfsbootdirectory:
>zcat<kernelpath>/initramfs_minimal_le.cpio.gz|sudocpioidHnewcnoabsolutefilenames
Replace192.168.1.2withtheNFSserverIPaddress. #
# Networking options # CONFIG_PACKET=y CONFIG_UNIX=y CONFIG_XFRM=y CONFIG_INET=y CONFIG_IP_FIB_HASH=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_XFRM_MODE_BEET=y CONFIG_INET_LRO=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_DNS_RESOLVER=y
MakesurethatCONFIG_IP_PNP_DHCP=y. 10) Rebuildthekernel:>makeARCH=microblazesimpleImage.xilinx 11) Getanothercupofcoffee. 12) Findthekernelimage<kernel_dir>/arch/microblaze/boot/simpleImage.xilinxandcopyitto someplaceconvenient. 13) DownloadthekerneltotheML605boardbyrepeatingSteps3035orcreateaSystemAce CompactFlashimage.Success! Page7of10
Nextsteps:
GetMicroblazeubootworking:http://xilinx.wikidot.com/ubootnew BuildaCapplicationprograminSDKandrunitontheMicroblaze. ConnectcustomIPtotheAXI4busintheVirtex6FPGA. Worlddomination.
Page8of10
TuxthePolyesterPenguinapprovesofthismessage. ThankyoutoAnalogDevicesLyricLabs(www.lyricsemi.com)forsponsoringthisexercise.
Appendix:UbuntuLinuxInstallationHiccups
ThankstoAndySchweitzerforuncoveringtheseissues. TogettheXilinxtoolstoruncorrectlyonaLinuxmachine,addthefollowinglinesto.bashrc: source/opt/Xilinx/13.2/ISE_DS/settings32.sh>/dev/null ToworkaroundotherISEandEDKpathissues,itmaybenecessarytocreatesomesoftlinksand movesomefilesaround: sudoln/usr/bin/make/usr/bin/gmake cd/opt/Xilinx/13.2/ISE_DS/ISE/lib/lin/ sudomkdirorig sudomvlibstdc++*orig cd/opt/Xilinx/13.2/ISE_DS/common/lib/lin/ sudomkdirorig sudomvlibstdc++*orig References: http://forums.xilinx.com/t5/EDKandPlatformStudio/SynthesisproblemofEDKprojectattachedin theISE124/tdp/135438 http://forums.xilinx.com/t5/InstallationandLicensing/ISE131onkubuntu1104/tdp/151626 USBcabledriverproblems: DownloadthisalternativeXilinxUSBcabledriver(requireslibusb): http://rmdir.de/~michael/xilinx/ Page9of10
Copythefollowingfiles(assudo)to/etc/udev/rules.d 50xilinxusbpav.rules: ACTION=="add",BUS=="usb",SYSFS{idVendor}=="03fd",MODE="666" xusbdfwu.rules: #version0003 ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="0008",MODE="666" SUBSYSTEMS=="usb",ACTION=="add",ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="0007", RUN+="/sbin/fxloadvtfx2I/usr/share/xusbdfwu.hexD$tempnode" SUBSYSTEMS=="usb",ACTION=="add",ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="0009", RUN+="/sbin/fxloadvtfx2I/usr/share/xusb_xup.hexD$tempnode" SUBSYSTEMS=="usb",ACTION=="add",ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="000d", RUN+="/sbin/fxloadvtfx2I/usr/share/xusb_emb.hexD$tempnode" SUBSYSTEMS=="usb",ACTION=="add",ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="000f", RUN+="/sbin/fxloadvtfx2I/usr/share/xusb_xlp.hexD$tempnode" SUBSYSTEMS=="usb",ACTION=="add",ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="0013", RUN+="/sbin/fxloadvtfx2I/usr/share/xusb_xp2.hexD$tempnode" SUBSYSTEMS=="usb",ACTION=="add",ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="0015", RUN+="/sbin/fxloadvtfx2I/usr/share/xusb_xse.hexD$tempnode"
Page10of10