CPLD/FPGA2MAX+plusIIlicense4MAX+plusIIlicense2.1MAX+plusII52.2MAX+plusIIlicense62.3MAX+plusII10VHDL3.1MAX+plusII193.2VHDL203.3213.4223.5243.6symbol263.7303.83646verilog-HDL47Downloadfromwww.fpga.com.cnwrittenbyCaijs1CPLD/FPGAFPGA/CPLD70CPLDComplexProgramableLogicDeviceFPGAXilinxSRAM,EPROMPLDFPGA,FlashEEPROM,PLDCPLD;AlteraPLDMAXEEPROM,FLEX/ACEX/APEXSRAMCPLD,PLD(ComplexPLD),FLEX/ACEX/APEXSRAM,EPROM,XilinxFPGAAlteraFELX/ACEX/APEXFPGA.FPGACPLDFPGACPLDALTERAMAX+plusIIEPM7128SLC84-15CPLD/FPGAVHDLVerilog-HDLJX002Bwww.caijs.comJX002BSW1SW2SW3Downloadfromwww.fpga.com.cnwrittenbyCaijs2CPLD/FPGALEDL2L1L2L1fpga@caijs.com.2004.1shanghaiDownloadfromwww.fpga.com.cnwrittenbyCaijs3CPLD/FPGAMAX+plusIIlicenseMAX+plusIIA@caijs.comMAX+plusIILICENSE.DATwww.caijs.comDownloadfromwww.fpga.com.cnwrittenbyCaijs4CPLD/FPGAMAX+plusIIlicense2.1MAX+plusIIbaseline10.210.2setup.exe*.exe--alteraMAX+plusIIDownloadfromwww.fpga.com.cnwrittenbyCaijs5CPLD/FPGA2.2MAX+plusIIlicenselicenseWIN2000Downloadfromwww.fpga.com.cnwrittenbyCaijs6CPLD/FPGAlicense.datSettingupLicensinginWindowsNTTospecifythelicensefileintheWindowsNTControlPanel,followthesesteps:1chooseSettingsControlPanelfromtheWindowsStartmenu.2Double-clicktheSystemiconintheControlPanelwindow.3ClicktheEnvironmenttabintheSystemPropertiesdialogbox.4ClicktheSystemVariablelisttohighlightit,andthenintheVariablebox,typeLM_LICENSE_FILE.5Typepathtolicensefilelicense.datintheValuebox.Example:C:maxpluslicense.dat6ClickSET,andthenclickOK.7YoucannowruntheAlterasoftware.SettingUpLicensinginWindows2000WINDOWS2000licensingTospecifythelicensefileintheWindows2000ControlPanel,followthesesteps:Windows2000licensechooseSettingsControlPanelfromtheWindowsStartmenu.Downloadfromwww.fpga.com.cnwrittenbyCaijs7CPLD/FPGAWINDOWSDouble-clicktheSystemiconintheControlPanelwindow.ClicktheAdvancedtabintheSystemPropertiesdialogbox.ClicktheEnvironmentVariablesbutton.ClicktheSystemVariablelisttohighlightit,andthenclickNew.TypeLM_LICENSE_FILEintheVariablebox.LM_LICENSE_FTypepathtolicensefilelicense.datintheValuebox.Example:C:MAXPLUSlicense.datlicenseC:MAXPLUSlicense.datClickOK.YoucannowruntheAlterasoftware.AlteraSettingupLicensinginWindows98TospecifythelicensefileinWindows98,followthesesteps:Downloadfromwww.fpga.com.cnwrittenbyCaijs8CPLD/FPGApenyourPC'sautoexec.batfilewithatexteditor.Typethefollowingenvironmentvariableonitsownlineintheautoexec.batfile:setLM_LICENSE_FILE=pathtolicensefilelicense.dat.Example:setLM_LICENSE_FILE=C:maxpluslicense.datSavetheautoexec.batfile.RestartthePC.YoucannowruntheAlterasoftware.Downloadfromwww.fpga.com.cnwrittenbyCaijs9CPLD/FPGA2.3MAX+plusIIWin98MAX+plusIIByteBlasterMVByteBlasterWIN2000WINXPWIN2000WINXPByteBlasterMVWIN20001/2/Downloadfromwww.fpga.com.cnwrittenbyCaijs10CPLD/FPGA34Downloadfromwww.fpga.com.cnwrittenbyCaijs11CPLD/FPGA56Downloadfromwww.fpga.com.cnwrittenbyCaijs12CPLD/FPGA7MaxPlus2-Drivers-Win2000inf8AlteraByteBlasterDownloadfromwww.fpga.com.cnwrittenbyCaijs13CPLD/FPGAWINXP1Downloadfromwww.fpga.com.cnwrittenbyCaijs14CPLD/FPGA23Downloadfromwww.fpga.com.cnwrittenbyCaijs15CPLD/FPGA45Downloadfromwww.fpga.com.cnwrittenbyCaijs16CPLD/FPGA67Downloadfromwww.fpga.com.cnwrittenbyCaijs17CPLD/FPGA8MaxPlus2-Drivers-Win2000inf9AlteraByteBlasterNOTE:WINXP10ALTERADownloadfromwww.fpga.com.cnwrittenbyCaijs18CPLD/FPGAVHDL3.1MAX+plusIIMAX+PLUSIIMAX+PLUSIIMAX+PLUSIIMAX+PLUSII-MAX+PLUSIIDownloadfromwww.fpga.com.cnwrittenbyCaijs19CPLD/FPGA3.2VHDLverilog-HDLFILE-NEWTextEditorFileOKDownloadfromwww.fpga.com.cnwrittenbyCaijs20CPLD/FPGA3.3VHDL--Designedby@caijs.compleasehavefun!--*********************************************LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;--*********************************************ENTITYmajority_voterISPORT(SW:INstd_logic_vector(3DOWNTO1);L:OUTstd_logic_vector(2DOWNTO1));--L2isayellowLEDANDL1isaREDLEDENDmajority_voter;--*********************************************ARCHITECTUREconcurrentOFmajority_voterISBEGINWITHSWSELECTL=10WHEN011,10WHEN101,10WHEN110,10WHEN111,01WHENOTHERS;ENDconcurrent;--*********************************************Downloadfromwww.fpga.com.cnwrittenbyCaijs21CPLD/FPGA3.4FILE-SAVEmajority_voter.vhdAutomaticExtension.vhdDownloadfromwww.fpga.com.cnwrittenbyCaijs22CPLD/FPGAFILE-PROJECT-SETPROJECTTOCURRENTFILEMAX+PLUSIIDownloadfromwww.fpga.com.cnwrittenbyCaijs23CPLD/FPGA3.5Assign-Deviceshowonlyfastestspeedgrades,EPM7128SLC84-15DebiceFamilyMAX7000SDEVICEEPM7128SLC84-15IOL1L2109Assign-Pin/Location/ChipDownloadfromwww.fpga.com.cnwrittenbyCaijs24CPLD/FPGAAssign-Pin/Location/ChipNodeNameSW3ChipResourcePin41PintypeinputADDNodenamepinPintypeSW244inputDownloadfromwww.fpga.com.cnwrittenbyCaijs25CPLD/FPGASW145inputL110outputL29outputL2OK(IOMAX+plusII-FroorplanEditor,)File-Project-save&CompileWARNINGprojecthasuserpinorlogiccellassignments,butneverbeencompiledbefore.Forbestfittingresults,letthecompilerchooseth