imicman的个人空间 https://blog.eetop.cn/1518355 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

class of systemverilog

已有 463 次阅读| 2016-5-29 22:01 |个人分类:验证杂谈


Key words of class of SV:
1. class & object
2. this super
3.interitance
4.encapsulation
5.polymorphism
6.abstract class
7. parameterised class
8.nested class
9.constant class
10.casting
11.scope resolution operator
12.external decleration
13.null
14.class and structers
15.pure
16.typdef class
17.copy(shallow copy,deep copy,clone)

class properties:
1.instance variables(non-static fields)
2.class variables(static fields)
3.local variables(inside the method)
4.parameter
5.constant
6.constraint

super-class  sub-class

The super keyword is used from within a derived class to refer to members of the parent class. It is necessary to use super to access members of a parent class when those members are overriden by the deriverd class.
Note: When using the super within new, super new should be the first statement executed in the constructor.This is because the super class must be initialized before the current class and ,if the user code does not provide an initilization,the compiler shall insert a call  to super new automatically.

In SystemVerilog, the class scope resolution operator applies to all static elements 
of a class: static class properties, static methods, typedefs, enumerations, 
structures, unions, and nested class declarations. Class scope resolved expressions 
can be read (in expressions), written (in assignments or subroutines calls), or 
triggered off (in event expressions). They can also be used as the name of a type or 
a method call. 
The class scope resolution operator enables the following: 
 1 Access to static public members (methods and class properties) from outside the 
class hierarchy. 
 2 Access to public or protected class members of a superclass from within the 
derived classes. 
 3 Access to type declarations and enumeration named constants declared inside 
the class from outside the class hierarchy or from within derived classes. 


A pure virtual method is a virtual method that you want to force derived classes to 
override. If a class has any unoverridden pure virtuals, it is an "abstract class" and 
you can't create objects of that type. 

点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 1

    粉丝
  • 0

    好友
  • 8

    获赞
  • 34

    评论
  • 访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-28 16:25 , Processed in 0.015316 second(s), 11 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部