 |
|
|
|
|
|
|
|
|
|
|
|
|
SVUG Community Forum
|
|
| Author |
Messages |
|
Eric
Posts:4
 |
| 10/17/2008 2:27 PM |
|
I built my first object, and it compiles fine through questa from mentor graphics.
When I am trying to initialize the handle, the compiler does not like the "new" statement.
I am puzzled, I have tried all combinations...
Here is the snippet of code:
************************************************* `include "CLOCK_GEN_C.sv"
module CLK_GENERATOR(output bit SYS_CLK_O);
// Object CLOCK_GEN_C SYS_CLK;
SYS_CLK = new(); // Compilation error on this line.
... *************************************************
The compilation error: QuestaSim vlog 6.4a Compiler 2008.08 Aug 28 2008 ** Error: CLK_GENERATOR.sv(32): near "=": syntax error, unexpected '='
I need help!
Thank you,
Eric
|
|
|
|
|
Verifconsult
Posts:8
 |
| 10/18/2008 12:07 PM |
|
| You have put the procedural statement in a declarative region.
Put
SYS_CLK = new(); inside a initial block and not in a declarative region.
It should work. |
|
|
|
|
Eric
Posts:4
 |
| 10/22/2008 1:28 PM |
|
Thank you for your help!
Eric |
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|
|
|

|
|
|
|
|
|
|
|
|
|
 |
|