101InnovationDriveSanJose,CA95134(408)544-7000©2007AlteraCorporation.Allrightsreserved.Altera,TheProgrammableSolutionsCompany,thestylizedAlteralogo,specificdevicedes-ignations,andallotherwordsandlogosthatareidentifiedastrademarksand/orservicemarksare,unlessnotedotherwise,thetrademarksandservicemarksofAlteraCorporationintheU.S.andothercountries.Allotherproductorservicenamesarethepropertyoftheirrespectiveholders.Al-teraproductsareprotectedundernumerousU.S.andforeignpatentsandpendingapplications,maskworkrights,andcopyrights.AlterawarrantsperformanceofitssemiconductorproductstocurrentspecificationsinaccordancewithAltera'sstandardwarranty,butreservestherighttomakechangestoanyproductsandservicesatanytimewithoutnotice.Alteraassumesnoresponsibilityorliabilityarisingoutoftheap-plicationoruseofanyinformation,product,orservicedescribedhereinexceptasexpresslyagreedtoinwritingbyAlteraCorporation.Alteracustomersareadvisedtoobtainthelatestversionofdevicespecificationsbeforerelyingonanypublishedin-formationandbeforeplacingordersforproductsorservices.PrintedonrecycledpaperiiAlteraCorporationAlteraCorporationiiiContentsHowtoContactAltera..............................................................................................................................vTypographicConventions........................................................................................................................vIntroduction............................................................................................................................................1–1DesignFlow......................................................................................................................................1–1BeforeYouBegin..............................................................................................................................1–2WhatYouWillLearn.......................................................................................................................1–2GetStarted..............................................................................................................................................1–3DesignEntry...........................................................................................................................................1–6AddaPLLMegafunction..............................................................................................................1–14AddaMultiplexer..........................................................................................................................1–25AssignCycloneIIIDeviceandPins.............................................................................................1–32CompileYourProject..............................................................................................................................36ProgramtheDevice.............................................................................................................................1–39VerifyinHardware.............................................................................................................................1–43NextSteps.............................................................................................................................................1–43ivAlteraCorporationMyFirstFPGADesignTutorialContentsAlteraCorporationvAboutthisTutorialThistutorialprovidescomprehensiveinformationthatwillhelpyouunderstandhowtocreateanAltera®FPGAdesignandrunitonyourdevelopmentboard.HowtoContactAlteraForthemostup-to-dateinformationaboutAlteraproducts,refertothefollowingtable.TypographicConventionsThisdocumentusesthetypographicconventionsshownbelow.InformationTypeContact(1)Technicalsupport@altera.comProductliterature@altera.comFTPsiteftp.altera.comNotetotable:(1)YoucanalsocontactyourlocalAlterasalesofficeorsalesrepresentative.VisualCueMeaningBoldTypewithInitialCapitalLettersCommandnames,dialogboxtitles,checkboxoptions,anddialogboxoptionsareshowninbold,initialcapitalletters.Example:SaveAsdialogbox.boldtypeExternaltimingparameters,directorynames,projectnames,diskdrivenames,filenames,filenameextensions,andsoftwareutilitynamesareshowninboldtype.Examples:fMAX,\qdesignsdirectory,d:drive,chiptrip.gdffile.ItalicTypewithInitialCapitalLettersDocumenttitlesareshowninitalictypewithinitialcapitalletters.Example:AN75:High-SpeedBoardDesign.ItalictypeInternaltimingparametersandvariablesareshowninitalictype.Examples:tPIA,n+1.Variablenamesareenclosedinanglebrackets()andshowninitalictype.Example:filename,projectname.poffile.viAlteraCorporationTypographicConventionsMyFirstFPGADesignTutorialInitialCapitalLettersKeyboardkeysandmenunamesareshownwithinitialcapitalletters.Examples:Deletekey,theOptionsmenu.“SubheadingTitle”Referencestosectionswithinadocumentandtitlesofon-l