Hi,
I am willing to check the properties of some of the variables inside a class.But i am getting an error like this
ncvlog: *E,ADBLCK (class_rand.sv,35|11): SystemVerilog assertion, property or sequence declarations are illegal as a function declaration item.
property p_m_clk_lo;
|
ncvlog: *E,ADBLCK (class_rand.sv,41|11): SystemVerilog assertion, property or sequence declarations are illegal as a function declaration item.
ap_hi: assert property(p_m_clk_hi)
Question : Can we use properties inside a class? If it is valid can you please explain with an example.
In reply to perumallatarun:
Concurrent assertions are not allowed in classes; this is because classes are dynamic, and there are issues in having concurrent assertions in classes. However, you can put the assertions in SystemVerilog interfaces. I address that topic in the following papers:
“Using SVA for scoreboarding and TB designs”
In reply to perumallatarun:
I am on the SV-AC committee. Issues are with the dynamic nature of classes.
Concurrent assertions require some synthesis-like analysis, and someone needs to come up with the synthesis semantics for class-based code for this to work.
5068: concurrent assertions in classes
That was a suggestion for consideration, but the SVA committee decided not to adopt it because of its complexities.
Ben systemverilog.us
In reply to sarang.p:
5068: concurrent assertions in classes
That was a suggestion for consideration, but the SVA committee decided not to adopt it because of its complexities.
Ben systemverilog.us
Lots of high level synthesis stuff such as Mentor Catapult tool support class synthesis without any issues.
So I assume it is matter of time, after while SV will support concurrent assignment in the class.
“So I assume it is matter of time, after while SV will support concurrent assignment in the class”
I wouldn’t hold my breath on having concurrent assertions in classes.
Because of the dynamic life of a class (newed, killed, copied or relinked} classes offer too many complexities to be addressed. Also, is typically time-limited, and the importance of SVA in classes is not something of high demand. My paper shows that the assertions can exist in interfaces and class vari3can be copied into the interfaces.
In general, making big changes in a spec is very difficult and requires lots of backup material and need and analysis to make that happening.
Ben systemverilog.us
The example you provided in this link https://accellera.mantishub.io/file_download.php?file_id=5950&type=bug is not working in my tool.
I used cadence tool. It showing an error like SystemVerilog assertion, property or sequence declarations are illegal as a function declaration item
Can you give some information about this??