9.3.2 The force and release procedural statements
Frm: IEEE Std 1364™-2001, IEEE Standard Verilog® Hardware Description Language
Another form of procedural continuous assignment is provided by the force and release procedural statements. These statements have a similar effect to the assign-deassign pair, but a force can be applied to nets as well as to variables. The left-hand side of the assignment can be a variable, a net, a constant bit-select of a vector net, a part-select of a vector net, or a concatenation. It cannot be a memory word (array reference) or a bit-select or a part-select of a vector variable.
A force statement to a variable shall override a procedural assignment or procedural continuous assignment that takes place on the variable until a release procedural statement is executed on the variable. After the release procedural statement is executed, the variable shall not immediately change value (as would a net that is assigned with a procedural continuous assignment). The value specified in the force statement shall be maintained in the variable until the next procedural assignment takes place, except in the case where a procedural continuous assignment is active on the variable.
A force procedural statement on a net overrides all drivers of the net—gate outputs, module outputs, and continuous assignments—until a release procedural statement is executed on the net.
Releasing a variable that currently has an active procedural continuous assignment shall re-establish that assignment.
Example:
module test;
reg a, b, c, d;
wire e;
and and1 (e, a, b, c);
initial begin
$monitor("%d d=%b,e=%b", $stime, d, e);
assign d = a & b & c;
a = ;
b = ;
c = ;
#;
force d = (a | b | c);
force e = (a | b | c);
# $stop;
release d;
release e;
# $finish;
end
endmodule
Results:
d=,e=
d=,e=
d=,e=
In this example, an and gate instance and1 is “patched” as an or gate by a force procedural statement that forces its output to the value of its logical or inputs, and an assign procedural statement of logical and values is “patched” as an assign procedural statement of logical or values.
The right-hand side of a procedural continuous assignment or a force statement can be an expression. This shall be treated just as a continuous assignment; that is, if any variable on the right-hand side of the assignment changes, the assignment shall be re-evaluated while the assign or force is in effect. For example:
force a = b + f(c) ;
Here, if b changes or c changes, a will be forced to the new value of the expression b+f(c).
9.3.2 The force and release procedural statements的更多相关文章
- 9.3.1 The assign and deassign procedural statements
IEEE Std 1364™-2001, IEEE Standard Verilog® Hardware Description Language The assign procedural cont ...
- verilog behavioral modeling--procedural continous assignment(不用)
assign / deassgin force /release the procedural continuous assignments(using keywords assign and for ...
- verilog behavioral modeling --procedural assignments
1.procedural assignments are used for updating reg ,integer , time ,real,realtime and memory data ty ...
- HANA SQLScript
数据类型 日期时间类型 DATE(日期) DATE 数据类型由年.月.日信息组成,表示一个日期值. DATA 类型的默认格式为‘YYYY-MM-DD’. YYYY 表示年, MM 表示月而 DD 表示 ...
- 关于Verilog中的几种赋值语句
1. 连续赋值语句(Continuous Assignments) 连续赋值语句是Verilog数据流建模的基本语句,用于对线网进行赋值,等价于门级描述,是从更高的抽象角度来对电路进行描述.连续赋值语 ...
- JAVA NIO FileChannel 内存映射文件
文件通道总是阻塞式的. 文件通道不能创建,只能通过(RandomAccessFile.FileInputStream.FileOutputStream)getChannel()获得,具有与File ...
- udhcpc 参数使用说明
当没有网络的时候,板子一直发送dhcp请求,导致程序不往下执行,解决的办法是把它切换到后台运行,可是如何切换到后台呢,有办法,它自带参数可以实现该功能.如下: udhcpc -b -i eth0 -p ...
- Verilog HDL常用的行为仿真描述语句
一.循环语句 1.forever语句 forever语句必须写在initial模块中,主要用于产生周期性波形. 2.利用for.while循环语句完成遍历 for.while语句常用于完成遍历测试.当 ...
- 对Verilog 初学者比较有用的整理(转自它处)
*作者: Ian11122840 时间: 2010-9-27 09:04 ...
随机推荐
- 【LeetCode 16】最接近的三数之和
题目链接 [题解] 上一道题那个算法求三个数的和为0的时候,其实就是一个不断在逼近本题中x=0的情况. 那么就套用上面那道题的做法. 在逼近的时候,取个差值的最小值就好了. [代码] class So ...
- 思维——cf1178E
一开始少看了条件:相邻两个字符不相等,字符集只有abc 那么我们取开头结尾各两个字符,一定有两个是相等的 #include<bits/stdc++.h> using namespace s ...
- centos修改、保存文件的详细步骤
[一]修改文件 如果是使用普通用户登录的,需要先切换到管理员用户,打开终端,输入:su,接着按提示输入密码即可:然后使用命令进入需要修改文件的所在目录,常用的几个命令如下: ① cd + 目录名 ② ...
- DLL中使用字符串时的注意事项。
library dll1; uses SysUtils, Classes; {$R *.res} function TESTDLL:string;stdcall; begin Result:='tes ...
- jmeter之-用Firefox录制https协议证书问题
录制脚本的时候,比如录制https协议的百度网站 https://www.baidu.com ,所有录制设置均正常,但是在jmeter录制控制器里面就是没有任何录制的请求. 这个时候提示说证书不对 1 ...
- CF C. Fly
题目 题目大意:第一行给出一个数n,代表有n个点,第二行给出火箭的自重,第三行给出每个点去时每吨需要的燃料,第四行给出每个点返程时每吨需要的燃料.求出发时携带的最小燃料数 分析:这题我们只要逆向思维就 ...
- 2018ACM-ICPC EC-Final 现场赛I题 Misunderstanding...Missing 倒着DP
目录 Catalog Solution: (有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 Catalog @ Problem: 很多acm群里有题面PDF了,我就不赘述了.简单说一 ...
- linux R环境安装以及注意事项
安装Ryum install Ryum install readline-develyum install libXt-devel 1.安装后在R命令行启动Rserve,在脚本中不要重复加载Rserv ...
- CSS template
ylbtech-CSS3: 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 作者:ylbtech出处:http://ylbtech.cn ...
- 模拟栈&&模拟队列
模拟栈:class Stack { private List list = new ArrayList( ); public void push( Object obj ) { this.list.a ...