VHDL实验之T触发器与T’触发器实验环境:WindowsXP仿真软件:QuartusIIv5.0设计方法:行为描述法T触发器功能概述•CP=0时,触发器不工作,处于维持状态•CP=1时,触发器的功能如下:•T=0时,次态=现态;•T=1时,次态与现态相反:触发器翻转T触发器状态转移真值表T触发器激励表TQn+10Qn1NOT(Qn)QnQn+1T000011101110T触发器实验编码LIBRARYIEEE;USEIEEE.std_logic_1164.ALL;ENTITYbasic_tffISPORT(T:INstd_logic;CP:INstd_logic;Q:OUTstd_logic;QB:OUTstd_logic);ENDbasic_tff;ARCHITECTURErtlOFbasic_tffISSIGNALq_temp:std_logic;BEGINPROCESS(CP)BEGINIF(CP'eventANDCP='1')THENIF(T='1')THENq_temp=NOTq_temp;ELSEq_temp=q_temp;ENDIF;ENDIF;ENDPROCESS;Q=q_temp;QB=NOTq_temp;ENDrtl;T’触发器功能概述CPCP=0时,处于维持状态CP=1时,次态与现态相反:触发器翻转T’触发器实验编码LIBRARYIEEE;USEIEEE.std_logic_1164.ALL;ENTITYExtended_tffISPORT(CP:INstd_logic;Q:OUTstd_logic;QB:OUTstd_logic);ENDExtended_tff;ARCHITECTURErtlOFExtended_tffISSIGNALq_temp:std_logic;BEGINPROCESS(CP)BEGINIF(CP'eventANDCP='1')THENq_temp=NOTq_temp;ELSEq_temp=q_temp;ENDIF;ENDPROCESS;Q=q_temp;QB=NOTq_temp;ENDrtl;演示完毕,谢谢•制作人:仝珂