VHDL语言教程QUARTUSii设计
14.1.3 频率计功能模块的vHDL描述 垦1以上的测试原理与各模块的功能描述‘ ]C74Tl/CNT2 LIBRARY压EE: USE正EE.STD LOGIClE64.AL巳; USEIE蓖E.Sm LoG汇uNsIGNED.A比; RN丁ITY CNT 15 以下给心相应的vHD巳逻辑描述 PORT(A.B。CLK,CeR:则STD LOGIC: OO:OUT STD UGIC VECTOR(7DOWNTO 0); Q:OUT STD—LOGIC—VECTOR(31DOWN了O 0))z FXD CNT. ARCHITECTU佃behav OFCNTIS SIGNAL CNT:STD LOGIC VECTOR(3l DOWNTO 0): SIGNAL SEL:S1D一山GIC—VbL’1”0R(1DOWN丁O o)5 REGE4 PROCE5S(CeKl CLR) DEGIN IF CLR=’1’THEN CNT<= ENDIF; END PROCESS: PROCESS(A、B) BEGIN S僵l〔0)<;A: SEL(1)‘=B: f SEL=”Oo” THEN OO<=CNT(7D0wNTO 0); ELqIF SEL=”01”THEN OO<=CNT(15DOwNTO 8): EI‘SIF SEL=“10”THEN OO<=CNT(23DOWNTO[6X ELSIF SEL:“11”THEN Oo<=CNT(31DOwNTO 24); EIjE OO<=”00000000”; ENDIF; ...... THEN OO<=CNT(7D0wNTO 0); ELqIF SEL=”01”THEN OO<=CNT(15DOwNTO 8): EI‘SIF SEL=“10”THEN OO<=CNT(23DOWNTO[6X ELSIF SEL:“11”THEN Oo<=CNT(31DOwNTO 24); EIjE OO<=”00000000”; ENDIF; ......
用户评论
感谢分享~~~~~~~