在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 5126|回复: 5

[求助] Random Sequence Generation问题,编译有点问题,望大家帮忙看看

[复制链接]
发表于 2013-9-26 14:07:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
我在学习Random Sequence Generation时,编译有点问题,不知什么原因?望大家帮忙看看,多谢!
我把书上的代码编译了下,有错误。代码如下:




  1. program p;
  2. initial begin
  3. randsequence()
  4. main : repeat (10) TOP;
  5. TOP: RJ {$display("");};
  6. RJ: rand join (1.0) S1 S2 S3;
  7. S1 : A B;
  8. S2 : C D;
  9. S3 : E F G;
  10. A : {$write ("A");};
  11. B : {$write ("B");};
  12. C : {$write ("C");};
  13. D : {$write ("D");};
  14. E : {$write ("E");};
  15. F : {$write ("F");};
  16. G : {$write ("G");};
  17. endsequence
  18. end
  19. endprogram


复制代码



编译错误如下:




  1. irun: 10.20-s100: (c) Copyright 1995-2011 Cadence Design Systems, Inc.
  2. TOOL:        irun        10.20-s100: Started on Sep 26, 2013 at 12:47:57 CST
  3. irun
  4.         -sv
  5.         -seed random
  6.         RSG.sv
  7. Recompiling... reason: file './RSG.sv' is newer than expected.
  8.         expected: Thu Sep 26 12:36:35 2013
  9.         actual:   Thu Sep 26 12:47:56 2013
  10. file: RSG.sv
  11.             RJ : rand join (1.0) S1 S2 S3
  12.                     |
  13. ncvlog: *E,RSNOPROD (RSG.sv,6|20): randsequence production has no production items [Systemverilog LRM, randsequence].
  14.             RJ : rand join (1.0) S1 S2 S3
  15.                     |
  16. ncvlog: *E,RSSEMICLN (RSG.sv,6|20): Expected semicolon after a randsequence production [SystemVerilog LRM, randsequence].
  17.             RJ : rand join (1.0) S1 S2 S3
  18.                          |
  19. ncvlog: *E,RSENDSEQ (RSG.sv,6|25): randsequence must end with "endsequence".
  20.             RJ : rand join (1.0) S1 S2 S3
  21.                            |
  22. ncvlog: *E,NOTSTT (RSG.sv,6|27): expecting a statement [9(IEEE)].
  23.             RJ : rand join (1.0) S1 S2 S3
  24.                                      |
  25. ncvlog: *E,MISEXX (RSG.sv,6|37): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
  26.             RJ : rand join (1.0) S1 S2 S3
  27.                                         |
  28. ncvlog: *E,MISEXX (RSG.sv,6|40): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
  29.             S1 : A B;
  30.              |
  31. ncvlog: *E,MISEXX (RSG.sv,7|13): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
  32.             S1 : A B;
  33.              |
  34. ncvlog: *E,NOLABL (RSG.sv,7|13): Labels are not supported on this statement type.
  35.             S1 : A B;
  36.                    |
  37. ncvlog: *E,MISEXX (RSG.sv,7|19): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
  38.             S2 : C D;



复制代码


....
发表于 2013-9-27 11:22:37 | 显示全部楼层
使用vcs2012.09和ius12.20都可以编译通过并仿真。
不过还是有个针对rand join (1.0) ... 中的1.0的warning,没用过这个,不太清楚为什么还有wanrning。
 楼主| 发表于 2013-9-27 15:06:20 | 显示全部楼层
回复 2# remnant


   莫非是版本问题,我用的是irun 2011跑的,会不会是版本不支持呢?
发表于 2013-9-27 16:59:32 | 显示全部楼层




    有这个可能性。仿真器版本不同,对systemverilog标准实现的程度是不一样的。
    另外,你用的不叫irun 2011,而是ius10.20。
 楼主| 发表于 2013-9-28 09:12:01 | 显示全部楼层
回复 4# remnant


   哦,多谢!
 楼主| 发表于 2013-9-28 09:13:33 | 显示全部楼层
回复 4# remnant


   哦,感谢,的确是ius10.20-s100
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-27 23:38 , Processed in 0.038273 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表