verilog规范告诉我们:negedge 事件指的是如表43所示的跳变,发生negedge事件时才会执行操作。那么0时刻,是如何执行操作的呢?
鸽子在verilog标准中并没有找到0时刻赋值明确的说明。如下代码中,0时刻,rst_n为0,clk 处于低电平,那么cfg_mode的数值是多少呢?
always @(posedge clk or negedge rst_n) if (!rst_n) begin cfg_mode <= 1'b0; end else begin cfg_mode <= cfg_mode_in ;end
实际电路中:
在芯片上电之前,芯片的chip_reset一直处于复位状态,因此导致芯片内部的rst_n一直为0,且芯片内部pll还没有工作,也没有产生clk,此时没有任何信号的跳变,即clk没有跳变,rst_n一直为0也没有跳变。在实际电路中,从d触发器的结构图可以看到,当复位r一直是1时,即使时钟信号不跳变,q端输出也是0。
vcs在0时刻赋值
vcs 在0时刻会执行一次always块的赋值,而不是等到信号跳变。
module zero_time_test; reg rst_n; initial begin rst_n = 0; #20 rst_n = 1; end always@(posedge rst_n) begin: always_case1 $display(the always case1 executed @time %f, $time()); end always@(negedge rst_n) begin: always_case2 $display(the always case2 executed @time %f, $time()); end always@(rst_n) begin: always_case3 $display(the always case3 executed @time %f, $time()); end endmodulemodule zero_time_test; reg rst_n; initial begin rst_n = 1; #20 rst_n = 0; end always@(posedge rst_n) begin: always_case4 $display(the always case4 executed @time %f, $time()); end always@(negedge rst_n) begin: always_case5 $display(the always case5 executed @time %f, $time()); end always@(rst_n) begin: always_case6 $display(the always case6 executed @time %f, $time()); end endmodule
高速pcb电路设计中降低信号衰减方法
流量监控系统信号测量电子电路
俄罗斯首先试行区块链支付系统
自动救护无人机发展前景一片光明
基于以太网的桥梁健康监测系统的软件设计
异步复位寄存器的0时刻是如何进行赋值的呢?
我国人工智能将步入新一轮高速发展的轨道
智能医疗时代下健康大数据该如何使用
UV打印机产生拉丝的原因及解决办法
列车互联网络无线传输DS-CDMA系统设计
东芝为PLC和工厂自动化设备打造高速光电耦合器
5G来临!祝贺中国移动获得5G双频段商用牌照
三大运营商三季度财报相继公布,三大运营商累计实现净利润约1175.04亿元
元宇宙人才大战开启 元宇宙需要哪些人才
Envoy源码分析之Dispatcher
你对于边缘计算了解多少
芯森霍尔电流传感器在电气系统中的应用
雷蛇推出首款游戏手机Razer Phone,或将下月发布
世界传感器大会为何“花落”郑州
RGBLED键盘模块钢琴的制作