|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我在学习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: irun 10.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;
复制代码
.... |
|