12
Vivado Debugging Tutorial Introduction This tutorial guides you through the process of creating and inserting debugging cores into a simple VHDL design in Vivado. Using debug cores in Vivado for debugging is similar to using testbenches. The main difference is that, while testbenches are used with simulations, debug cores are used while the program is running on the board. Samples are taken from the signals that are marked for debugging, showing the status of those signals at a point in time. This can be helpful when working with designs where the status of all the signals is not visible. Start Step 1. Create a new project and add the design source files provided as shown in the image below. Step 2. If you look at the Top Level file, you will see an internal signal has been set for the LED outputs, the reset input, and the divided clock signal. An internal signal should exist for each signal you want to debug.

Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Embed Size (px)

Citation preview

Page 1: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

VivadoDebuggingTutorial

IntroductionThistutorialguidesyouthroughtheprocessofcreatingandinsertingdebuggingcoresintoasimpleVHDLdesigninVivado.UsingdebugcoresinVivadofordebuggingissimilartousingtestbenches.Themaindifferenceisthat,whiletestbenchesareusedwithsimulations,debugcoresareusedwhiletheprogramisrunningontheboard.Samplesaretakenfromthesignalsthataremarkedfordebugging,showingthestatusofthosesignalsatapointintime.Thiscanbehelpfulwhenworkingwithdesignswherethestatusofallthesignalsisnotvisible.

StartStep1.Createanewprojectandaddthedesignsourcefilesprovidedasshownintheimagebelow.

Step2.IfyoulookattheTopLevelfile,youwillseeaninternalsignalhasbeensetfortheLEDoutputs,theresetinput,andthedividedclocksignal.Aninternalsignalshouldexistforeachsignalyouwanttodebug.

Page 2: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step3.Foreachsignalyouwanttodebug,youwillalsoneedtosetthemark_debugattributeforthemasshownintheimagebelow.Makesuretoplacethisgroupofstatementsaftertheinternalsignaldeclarations.Youmaygeterrorsstatingasignalhasn’tbeendeclaredotherwise.

Step4.Aftersavingthefile,clickonRunSynthesisintheFlowNavigator.

Step5.Insteadofmovingontotheimplementationstage,clickonOpenSynthesizedDesign.

Page 3: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step6.Ifyouarenotalreadythere,changethelayouttoDebug.

Step7.Intheconsoleatthebottomyou’llseethesignalsyoumarkedfordebugginglistedasunassigned.

Step8.Beforemovingtothenextstep,makesuretoswitchbacktoI/OPlanningandsetyourconstraints.

Page 4: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step9.StarttheDebugWizardbyselectingSetUpDebugfromtheFlowNavigatorunderSynthesizedDesign.

Step10.ClickNext.

Page 5: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step11.Allthesignalsyoudebugmusthaveaclockdomain,generallytheyshouldallbeunderthesameclockdomain.

Step12.RightclickUndefinedandselectSelectClockDomain.

Step13.Inthisdesignthereshouldonlybetheoneclockdomain.MakesureitisselectedandclickOK.

Page 6: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step14.Thelistofnetsshouldlooklikethisnow.

Step15.MakesurethatCaptureControlandAdvancedTriggerarebothselectedthenclickNext.

Step16.Confirmyoursummarylookslikethis,thenclickFinish.

Page 7: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step17.Allofthesignalsyou’vemarkedforDebughavenowbeenmovedoutoftheunassignedfolder.

Step18.NowclockonGenerateBitstreamintheFlowNavigator.

Step19.ClickonSavetosavethenewdebugsettingstotheconstraintsfile.

Page 8: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step20.ClickOK.

Step21.ClickYes.

Step22.ClickYesandthedesignwillgothroughtheSynthesis,ImplementationandBitstreamGenerationprocesses.TheimplementationandBitstreamGenerationcantakeseveralminutes.

Page 9: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step23.SelectOpenHardwareManager.

Step24.Ifyoulookattheconstraintfilenow,youwillseethatalonglistofdebugcorecommandshavebeenadded.Onceyou’refamiliarwithdebugcores,thesecanbemanuallyaddedtotheconstraintsfileinsteadofusingthewizard.

Page 10: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step25.Gothroughtherestoftheboardprogrammingsteps.Youwillnoticethat,unlikeprevioustimes,thereisanactualdebugprobefiletoaddtothedesignnow.

Step26.Withtheboardconnectedandprogrammed,youwillseeanewhardwareelementislistedinthehardwaremanager.ThisistheILA,orIntegratedLogicAnalyzer.ThiswillallowyoutoanalyzethesignalsofyourdesignattheyarerunningthroughtheZybo.

Page 11: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step27.Ontherightsidethereisawindowwhereyoucanviewthewaveformsofeachofthesignalsyousetupfordebugging.

Step28.Toviewacurrentsampleofthesignalstates,clickontheRunTriggerbutton.Thiswillbringupasamplingofthestatesofthesignalsyouaredebuggingontheboardatthemomentintime.

Page 12: Vivado Debugging Tutorial - umb.edueng.umb.edu/~cuckov/classes/engin341/Labs/Debug Tutorial/Vivado... · Vivado Debugging Tutorial Introduction This tutorial guides you through the

Step29.AfterclickingtheRunTriggerbutton,youwillseeawaveformfromtheboard.Forthisdesign,youcanconfirmthatthesignalsarebeingdisplayedcorrectlybyclicktheRunTriggerbuttoneachtimetheLED’schange,andseethestateeachsignalisatonthewaveformwindow.