网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 61IC中国电子在线 >> EDA >> HDL >> 文章正文
  VHDL学习之触发器           ★★★ 【字体:
VHDL学习之触发器
作者:61IC录入    文章来源:本站原创    点击数:    更新时间:2006-9-30    
第三章节  触发器


3。1。RS触发器的设计


library ieee;
use ieee.std_logic_1164.all;
entity rsff is
   port(r,s:in std_logic;
        q,qb:out std_logic);
end rsff;


architecture rtl of rsff is
signal q_temp,qb_tempLstd_logic;
begin
process(r,s)
begin
  if(s='1'and r='0')then
  q_temp<='0';
 qb_temp<='1';
 elsif(s='0'and r='1') then
 q_temp<='1';
qb_temp<='0';
else
q_temp<=q_temp;
  qb_temp<=qb_temp;
end if;
end process;
q<=q_temp;
qb<=qb_temp;
end rtl;


3。2主从JK触发器的设计

 

源程序:
library ieee;
use ieee.std_logic_1164.all;
  entity jkff is
  port(j,k,cp,r,s:in std_logic;
          q,pb:out std_logic);
end jkff;
architecture rtl of kff is
signal q_temp,qb_temp:std_logic;
begin
process(j,k,cp)
begin
if(r='0' and s='1')then
   q_temp<='0';
   qb_temp<='1';
elsif(r='1'and s='0')then
   q_temp<='1';
  qb_temp<='0';
elsif(cp'event and cp='0')then
   if(j='0' and k='1')then
      q_temp<=not q_temp;
     qb_temp<=not qb_temp;
  end if;
end if;

q<=q_temp;
qb<=qb_temp;
end process;
end rtl;

 

3。3,D触发器的设计


源程序:
 
library ieee;
usre ieee.std_logic)_1164.all;
 
entity dff is
  port(d,cp,r,s:in std_logic;
          q,qb:out std_logic);
 end dff;
architecture rtl of dff is
signal q_temp,qb_temp:std_logic;
begin
   process(cp)
   begin
if(r='0' and s='1')then
   q_temp<='0';
  qb_temp<='1';
elsif(r='1' and s='0')then
  q_temp<='1';
  qb_temp<='0';
elsif(r='0' and s='0')then
  q_temp<=q_temp;
 qb_temp<=qb_temp;
elsif(cp'event and cp='0')then
  q_temp<=d;
 qb_temp<=not d;
end if
end process;
q<=q_temp;
qb<=qb_temp;
end rtl;

               欢迎点击进入:TI德州中文网   (国内唯一针对TI应用的中文技术网站)    文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    国外VHDL& Verilog IP Resou…
    VHDL易忘语句语法摘要
    VHDL快速参考手册
    在FPGA中实现SPI与总线接口转…
    VHDL信号
    异步通信起始位正确检测的VH…
    FPGA驱动VGA接口的VHDL语言实…
    VHDL实现VGA接口设计
    FPGA设计中对输入信号的处理
    《同步电路设计中clock skew…
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    站长:61IC 湘ICP备05002478号