老古开发网首页
导航:老古开发网首页文章索引文章分类EDA/IC设计→[VHDL学习之触发器]
| -文章搜索 - 最新文章 - |

VHDL学习之触发器

发布时间:2006年10月15日 点击次数:1636
来源:   作者:
 
  第三章节  触发器


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;

 


欢迎进入老古论坛进行讨论
[EDA/IC设计] 相关文章:
硅统参与AMD笔记型计算机技术论坛并展出新款芯片
简介:
&#30789;&#32479;科技(SiS)宣布参与在法国举行的&#65;&#77;&#68;年度「&#31508;&#35760;&#22411;&#35745;&#31639;&#26426;&#24179;&#21488;&#25216;&#26415;&#35770;&#22363;」,并将于现场展现AMD平台架构之SiSM771笔记型计算机,以及SiS771桌上型&#35745;&#31639;&#26426;&#33455;&#29255;的发展效能。硅统表示,该公司与AMD一向保持良好的合作关系,在这次展示会场,硅统将以笔记型......

印政府推迟颁发投资许可,华为进军印度软件业受阻
Cadence与IBM深入EDA合作
美国国半新推高度集成的电源管理单元,
Rabbit半导体推出植入PLC应用套件
智原科技向StorLink提供双核网络处理器SoC设计
Freescale和ELMOS加强汽车领域半导体合作
英飞凌推出基于双核架构的高度集成的SoC解决方案
TI携手Brix将提供广泛深入的IP端点服务保障管理
西门子旗下公司选择UGS Teamcenter Express作为其PLM平台
 
下一个:[EDA/IC设计]VHDL学习之时序逻辑电路
简介:
第四章节 时序逻辑电路 4.1 寄存器的设计 源程序: library ieee; usr ieee.std_logic_1164.all; entity jcq is port(clk:in std_logic; r:in std_logic; d:in std_logic_vector(3 dowmto 0)......
 

上一个:[EDA/IC设计]VHDL学习之组合逻辑电路

老古开发网版权所有 2006年9月 asp.Net V2.0 设计:老古
页面缓存:10分钟 执行时间:31毫秒