收藏 分销(赏)

触发器代码VHDL.doc

上传人:仙人****88 文档编号:8553525 上传时间:2025-02-18 格式:DOC 页数:2 大小:22.50KB 下载积分:10 金币
下载 相关 举报
触发器代码VHDL.doc_第1页
第1页 / 共2页
触发器代码VHDL.doc_第2页
第2页 / 共2页
本文档共2页,全文阅读请下载到手机保存,查看更方便
资源描述
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_temp :std_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; JK触发器 library ieee; use ieee.std_logic_1164.all; entity jk is port(pset,clr,clk,j,k:in std_logic; q,qb:out std_logic); end entity jk; architecture rt1 of jk is signal q_s,qb_s:std_logic; begin process(pset,clr,clk,j,k)is begin if(pset='0')then q_s<='1'; qb_s<='0'; elsif(clr='0')then q_s<='0'; qb_s<='1'; elsif(clk'event and clk='1')then if(j='0')and(k='1')then q_s<='0'; qb_s<='1'; elsif(j='1')and (k='0')then q_s<='1'; qb_s<='0'; elsif(j='1')and (k='1')then q_s<=not q_s; qb_s<=not qb_s; end if; end if; q<=q_s; qb<=qb_s; end process; end architecture;
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 教育专区 > 小学其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服