当前位置:网站首页>触 发 器
触 发 器
2022-06-22 05:33:00 【傻童:CPU】
触 发 器
由正跳变沿触发的D触发器的最简单的SystemVerilog模型如下所示:
module dff loutput logic q, input logic d,clk);
always_ff @(posedge clk)
q<=d;
endmodule
因为这是时序逻辑,所以必须用非阻塞赋值。同样,负跳变沿触发的触发器可以通过检测逻辑电平从1跳变到0来建立模型。
异步置位和复位

这两个输入应该只用于触发器的初始化。在系统正常运行期间,用R和S信号来设置触发器的状态是一个坏习惯,必须改正。这样做是因为在同步系统中,触发器的状态改变只允许由时钟的跳变沿触发。由于置位或复位输人信号是异步的,因此不能确保触发器输出的改变发生在特定时刻。这会引起各种时序问题。总而言之,在设计中必须保持严格的同步,或者遵循结构化的异步设计方法,才能设计出稳定可靠的时序电路。
下面是一个带异步复位的D触发器的SystemVerilog模型,该触发器的输出变化必须发生在时钟的正跳变沿和复位信号的负跳变沿时刻:
module dffr (output logic q,
input logicd,clk,n_reset);
always ff @(posedge clk,negedge n_reset)
if(~n_reset)
q <= '0;
else
q <= d;
endmodule
边栏推荐
- 空调(春季每日一题 50)
- Global and Chinese aluminum electrolytic capacitor market survey and future development strategic planning report 2022-2027
- Grabcut analysis
- open source hypervisor
- Market survey and future production and marketing demand analysis report of China's zinc oxide nanoparticle industry 2022-2027
- 亚马逊和独立站,不是简单的二选一
- Machine learning note 7: powerful neural network representation
- Global and Chinese silicon carbide barrier Schottky diode market demand and future prospect report 2022-2027
- vscode 远程连接错误:Server status check failed - waiting and retrying
- 用简单方法实现对象的深克隆封装js
猜你喜欢
随机推荐
Vue des nombres élevés du point de vue de l'espace vectoriel (1) - - Introduction à la série
Academic circle of cattle II (daily question 49 in spring)
Which is the trend of cross-border policy frequent adjustment of "independent stations & platforms"?
关于图片懒加载的实现(总结梳理)
跨境政策频调整 “ 独立站&平台 ” 哪个才是趋势所在?
串口(RS - 232)
Market survey and future production and marketing demand analysis report of China's zinc oxide nanoparticle industry 2022-2027
A reminder to cross-border sellers who are still "shopping"!
MinGW下载安装
机器学习笔记 七:强大的神经网络表述
Go language uses JWT
mysql基础面试题
U disk as startup disk to reinstall win10 system (no other software required)
Gerrit Code Review Setup
How wechat applet assigns values to sub components
大厂晋升学习方法三:链式学习法
Write optimized DSP code for cortex-m4
自控原理之系统辨识
Parameter serialization
Grabcut analysis









