systemverilog 中的bind 的使用和语法

本文介绍了SystemVerilog中的bind关键字,用于实现设计和验证代码的分离。bind可以将模块、接口等绑定到目标模块上,使得每个目标实例都能关联到绑定的组件。示例展示了如何将fpu_props绑定到cpu模块,以及如何参数化target module和bind file,并利用(*)通配符链接所有信号进行检查。
摘要由CSDN通过智能技术生成
  1. 目的:

为了设计和验证代码的分离。

target module只可以是module,interface。

bind file可以是program,module,interface,checker。

(note:可以target module 是module, bind file 是interface)

 

 下面的例子是把 fpu_props绑定到cpu 上,每个cpu的实例化都会被绑定一个fpu_props,fpu_props实例化的名字是fpu_rules_1。层级结构显示为 cpu0.fpu_rules_1,  cpu1.fpu_rules_1...

 下面的例子是把 fpu_props绑定到cpu 的实例化cpu1 上,层级结构显示为 cpu1.fpu_rules_1。

 

 bind file 可以包含所有的systemverilog

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
There are some simple tricks that every design engineer should know to facilitate the usage of SystemVerilog Assertions. Although this paper is not intended to be a comprehensive tutorial on SystemVerilog Assertions, it is worthwhile to give a simplified definition of a property and the concurrent assertion of a property. 1.1 What is an assertion? An assertion is basically a "statement of fact" or "claim of truth" made about a design by a design or verification engineer. An engineer will assert or "claim" that certain conditions are always true or never true about a design. If that claim can ever be proven false, then the assertion fails (the "claim" was false). Assertions essentially become active design comments, and one important methodology treats them exactly like active design comments. More on this in Section 2. A trusted colleague and formal analysis expert[1] reports that for formal analysis, describing what should never happen using "not sequence" assertions is even more important than using assertions to describe always true conditions. 1.2 What is a property? A property is basically a rule that will be asserted (enabled) to passively test a design. The property can be a simple Boolean test regarding conditions that should always hold true about the design, or it can be a sampled sequence of signals that should follow a legal and prescribed protocol. For formal analysis, a property describes the environment of the block under verification, i.e. what is legal behavior of the inputs. 1.3 Two types of SystemVerilog assertions SystemVerilog has two types of assertions: (1) Immediate assertions (2) Concurrent assertions Immediate assertions execute once and are placed inline with the code. Immediate assertions are not exceptionally useful except in a few places, which are detailed in Section 3.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值