用 Verilog HDL 语言设计带异步清0、异步置1 端的D触发器

如题所述

首先,你可以利用QUARTUS里面,tools菜单里的mega wizard功能来产生系统自带的各类触发器,应该是各种类型的触发器都有。下面简单编写verilog代码,假设是1位T触发器。module T(rst1,rst0,clk,in,out)input rst,rst0,clk,in;output out;reg out;always @(posedge clk or negedge rst1 or negedge rst0)beginif(rst1)out<=1;else if(rst0)out<=0;elsebegin if(in) out<=in; else out<=out;endendendmodule
温馨提示:答案为网友推荐,仅供参考
相似回答