Random Sequence Generation问题,编译有点问题,望大家帮忙看看
时间:10-02
整理:3721RD
点击:
我在学习Random Sequence Generation时,编译有点问题,不知什么原因?望大家帮忙看看,多谢!
我把书上的代码编译了下,有错误。代码如下:
编译错误如下:
....
我把书上的代码编译了下,有错误。代码如下:
- program p;
- initial begin
- randsequence()
- main : repeat (10) TOP;
- TOP: RJ {$display("");};
- RJ: rand join (1.0) S1 S2 S3;
- S1 : A B;
- S2 : C D;
- S3 : E F G;
- A : {$write ("A");};
- B : {$write ("B");};
- C : {$write ("C");};
- D : {$write ("D");};
- E : {$write ("E");};
- F : {$write ("F");};
- G : {$write ("G");};
- endsequence
- end
- endprogram
编译错误如下:
- irun: 10.20-s100: (c) Copyright 1995-2011 Cadence Design Systems, Inc.
- TOOL:irun10.20-s100: Started on Sep 26, 2013 at 12:47:57 CST
- irun
- -sv
- -seed random
- RSG.sv
- Recompiling... reason: file './RSG.sv' is newer than expected.
- expected: Thu Sep 26 12:36:35 2013
- actual:Thu Sep 26 12:47:56 2013
- file: RSG.sv
- RJ : rand join (1.0) S1 S2 S3
- |
- ncvlog: *E,RSNOPROD (RSG.sv,6|20): randsequence production has no production items [SystemVerilog LRM, randsequence].
- RJ : rand join (1.0) S1 S2 S3
- |
- ncvlog: *E,RSSEMICLN (RSG.sv,6|20): Expected semicolon after a randsequence production [SystemVerilog LRM, randsequence].
- RJ : rand join (1.0) S1 S2 S3
- |
- ncvlog: *E,RSENDSEQ (RSG.sv,6|25): randsequence must end with "endsequence".
- RJ : rand join (1.0) S1 S2 S3
- |
- ncvlog: *E,NOTSTT (RSG.sv,6|27): expecting a statement [9(IEEE)].
- RJ : rand join (1.0) S1 S2 S3
- |
- ncvlog: *E,MISEXX (RSG.sv,6|37): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
- RJ : rand join (1.0) S1 S2 S3
- |
- ncvlog: *E,MISEXX (RSG.sv,6|40): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
- S1 : A B;
- |
- ncvlog: *E,MISEXX (RSG.sv,7|13): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
- S1 : A B;
- |
- ncvlog: *E,NOLABL (RSG.sv,7|13): Labels are not supported on this statement type.
- S1 : A B;
- |
- ncvlog: *E,MISEXX (RSG.sv,7|19): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
- S2 : C D;
....
使用vcs2012.09和ius12.20都可以编译通过并仿真。
不过还是有个针对rand join (1.0) ... 中的1.0的warning,没用过这个,不太清楚为什么还有wanrning。
莫非是版本问题,我用的是irun 2011跑的,会不会是版本不支持呢?
有这个可能性。仿真器版本不同,对systemverilog标准实现的程度是不一样的。
另外,你用的不叫irun 2011,而是ius10.20。
哦,多谢!
哦,感谢,的确是ius10.20-s100