Regarding assertion

In reply to Maitri@07:

If drv_count is a class object then you cannot write the assertion as you did. The error message points you to this situation:
‘Expressions involving real, string, event and dynamic SystemVerilog types
are not allowed in Boolean expressions in properties and sequences.’
A class type is a dynamic type.