当前位置:网站首页>Assertion based validation
Assertion based validation
2022-06-22 05:52:00 【Silly boy: CPU】
Assertion based verification
The concept of assertion is very simple . Just state in the program , We say that something must be true , If it's not true , Then the error message can be printed on the screen . stay SystemVerilog In language , Assertions can be made immediately (immediate) And concurrency (concurrent) Two different forms of assertions are used to express . Immediate assertions are very concise , It can be used if、else Wait for a statement to say . Concurrent assertions are very powerful , So this section uses most of the articles to explain how to write concurrent assertions .
stay always This fact can be declared as an immediate assertion in the procedure block ( This assertion is equivalent to a always_comb Process block , But to avoid conceptual confusion , We are only in the integrable RTL Use... In the module always_comb).
always @*
assert(~(dispense&&ready))
else $error("dispense and ready both lit!");
The above assertion whenever dispense perhaps ready When the signal changes , Just check if they are both 1. But it is best to detect this condition at the positive jump edge of the clock , Because we are checking a synchronization system . First, write this condition as the following attribute property:
property NotDispenseAndReady;
@(posedge clock)(~(dispense && ready));
endproperty
then , As part of concurrent assertions , Test this property , The code is as follows :
assert property(NotDispenseAndReady);
Attribute definitions and assertion declarations can be combined to write . But common programming style suggestions , For the reuse of attributes , It is best to write attribute definitions and assertion declarations in two parts .
Usually , Concurrent assertions
边栏推荐
- Write optimized DSP code for cortex-m4
- c files always get rebuild when make -------- . PHONY in Makefile
- 记录在处理SIF数据中,遇到的一些问题及解决过程
- Analysis report on market demand trend and investment prospect of global and Chinese pulse transistor industry 2022-2027
- \[\e]0; \[email protected]\h: \w\a\]\[\033[01;32m\]\[email protected]\h\[\033[
- 总有人问我:独立站该怎么玩?3个案例,你看完就懂了
- SCM future employment development direction, learn SCM must know some entry-level knowledge and industry prospects, read the benefit
- C language pointer (Advanced)
- Development forecast and investment risk outlook report of China's GaAs industry during the 14th Five Year Plan period 2022-2027
- 触 发 器
猜你喜欢

Working method: 3C scheme design method

Go language uses zap log Library

MySQL basic interview questions

Xshell下载安装(解决评估过期问题)

JTAG接口
Throw away electron and embrace Tauri based on Rust

MinGW download and installation
Wanzi detailed data warehouse, data lake, data middle platform and lake warehouse are integrated

Xshell download and installation (solve the problem of expired evaluation)

Want to put Facebook ads but don't know where to start? This article takes you to know more about
随机推荐
错误:note: module requires Go 1.17
Throw away electron and embrace Tauri based on Rust
Market consumption survey and investment prospect forecast report of China's graphite industry 2022-2027
Research Report on demand and investment opportunities in key areas of global and Chinese strontium tungstate industry 2022-2027
面对Google流量红利期,独立站卖家如何借势营销?
Go语言使用zap日志库
tmux -- ssh terminal can be closed without impact the server process
C指针的理解
Machine learning Note 6: number recognition of multiple classification problems in logistic regression
Want to put Facebook ads but don't know where to start? This article takes you to know more about
Go语言使用JWT
Network, IO flow, reflection, multithreading, exception
触 发 器
Adaboost
Mobile terminal layout adaptation
Global and Chinese carbon conductive filler market demand trend and future prospect report 2022-2027
Data storage (Advanced)
代码走查的优化方向(接口请求便捷、动态class判断条件过长、去除无用console、抽离公共方法)
Optimization direction of code walk through (convenient interface requests, long dynamic class judgment conditions, removal of useless consoles, separation of public methods)
Development forecast and investment risk outlook report of China's GaAs industry during the 14th Five Year Plan period 2022-2027