微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微电子和IC设计 > IC验证交流 > 一个compile error引起的思考,还未解决,大家讨论一下~

一个compile error引起的思考,还未解决,大家讨论一下~

时间:10-02 整理:3721RD 点击:
ERROR: dynamic type(automatic varaible in this case) cannot be used on the left-hand side of non blocking assignments.
对于这个问题,我的理解是:
动态变量如果使用非阻塞赋值(NBA),那这个赋值的update event就要放在此刻 time slot 的 Re-NBA region 来执行,而程序段中需要在同一时刻运行(判定?)的其它语句所代表的 event 可能会在前面的 Reactive region 或者 Re-Inactive region 中进行。
而如果使用阻塞赋值的话,阻塞赋值的 update event 会在 Reactive region 执行。
所以,使用 NBA 和 BA 会导致程序运行结果不同,可能会违背编程者的意愿,为了规避这种可能,compiler 拒绝使用 NBA 给 Dynamic 类型赋值。
只是我的猜想,请大家讨论。

这个问题发生编译testbench时,语言是SystemVerilog,环境是 VCS 1306 in Linux.

这个问题发生编译testbench时,语言是SystemVerilog,环境是 VCS 1306 in Linux.

这个问题发生编译testbench时,语言是SystemVerilog,环境是 VCS 1306 in Linux.

更正一下,根据SV standard 2012,主题中的对应段落更正为:
“而如果使用阻塞赋值的话,阻塞赋值会被 scheduled in Re-inactive region。”

强调一下,语言是SV,环境是VCS1306 in Linux。

因为这么做没什么意义

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top