No recent searches
Popular Articles
Sorry! nothing found for
Posted 5 months ago by Orimitsu Serizawa
I found the following bugs.
1. variables/objects declared below their reference point is not properly recognized in a class.
Example)
class my_class; //int a; // O.K function new(); a = 3; //this.a = 3; //O.K endfunction int a; // Compile Error endclass
The code above is complied normally if 'this' is not omitted.
2. Similarly, if the signal is declared outside the class inside a module, then, its declaration point must be above the class.
module tb; //int a; // O.K class my_class; function new(); a = 3; endfunction endclass int a; // Compile Error endmodule
3. In the same way, the signal must be declared above the class inside package.
package my_pkg; //int a; // O.K class my_class; function new(); a = 3; endfunction endclass int a; // Compile Error endpackage
Each complete test bench file is attached.
I hope these issues are resolved in the future release of DSim.
Attachments (3)
tb.sv332 Bytes
tb.sv289 Bytes
tb.sv341 Bytes
0 Votes
David Jones posted 5 months ago Admin Best Answer
The LRM states (section 6.21):
A variable declaration shall precede any simple reference (non-hierarchical) to that variable.
It is possible that another vendor accepts your code; however, I cannot find any statement in the LRM that specifically allows this.
1 Votes
2 Comments
Orimitsu Serizawa posted 5 months ago
Hi David,
It looks you are right. Thanks.
David Jones posted 5 months ago Admin Answer
Login to post a comment
People who like this
This post will be deleted permanently. Are you sure?
I found the following bugs.
1. variables/objects declared below their reference point is not properly recognized in a class.
Example)
The code above is complied normally if 'this' is not omitted.
2. Similarly, if the signal is declared outside the class inside a module, then, its declaration point must be above the class.
Example)
3. In the same way, the signal must be declared above the class inside package.
Example)
Each complete test bench file is attached.
I hope these issues are resolved in the future release of DSim.
Attachments (3)
tb.sv
332 Bytes
tb.sv
289 Bytes
tb.sv
341 Bytes
0 Votes
David Jones posted 5 months ago Admin Best Answer
The LRM states (section 6.21):
It is possible that another vendor accepts your code; however, I cannot find any statement in the LRM that specifically allows this.
1 Votes
2 Comments
Orimitsu Serizawa posted 5 months ago
Hi David,
It looks you are right. Thanks.
0 Votes
David Jones posted 5 months ago Admin Answer
The LRM states (section 6.21):
It is possible that another vendor accepts your code; however, I cannot find any statement in the LRM that specifically allows this.
1 Votes
Login to post a comment