SV program与module的区别

A module and a program block carry many similarities.

Similar to a module, a program block may have zero or more inputs, outputs and inout ports.A program block can contain zero or more initial blocks, cont assignments, generate and specparam statements, concurrent assertions and timunit declarations.Type and data declarations, functions and tasks can be defined within a program block similar to what you can do in a module.A hierarchy can contain any number of program blocks. These program blocks may interact throughtheir ports or may be isolated from one other. This is how modules work too in a design environment.

 

However, the similarities end there. Here are some of the differences.

A program block can not contain any always statement, UDP, module, interface or other program. Thus a program block is always a leaf level node in a hierarchy.A program definition can occur within a module as we saw earlier. Obviously, a module can not be defined this way.A program can call a task or function in modules or other programs. But a module can not call a task or function in a program.

However, the biggest difference between a program and a module is the way they handle variable assignments in procedural blocks. We will see in the next section this is where the utility of a program comes into effect.

reference

http://www.project-veripage.com/program_blocks_2.php 

转载于:https://www.cnblogs.com/chenrui/archive/2012/04/06/2434000.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值