在线咨询 切换到宽版
eetop公众号 创芯大讲堂 创芯人才网

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜帖子
查看: 5080|回复: 3

what's the syntax

[复制链接]
发表于 2009-2-9 14:11:56 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
I just started to read ovm and systemverilog.But got puzzled in the example of ovm:

        "class xbus_master_driver extends ovm_driver #(xbus_transfer);"

what's the meaning of "#(xbus_transfer)"?
what's the difference from "class xbus_master_driver #(xbus_transfer extends ovm_driver #(xbus_transfer);".

Thanks if you can explain or tell me where I can find explanation.
发表于 2009-2-9 15:49:30 | 显示全部楼层
what's the meaning of "#(xbus_transfer)"?

parameterized class, similar to parameterized module in verilog
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-9 16:02:32 | 显示全部楼层
find in sv ref:

A parameterized class can extend another parameterized class. For example:
class C #(type T = bit); ... endclass // base class
class D1 #(type P = real) extends C; // T is bit (the default)
class D2 #(type P = real) extends C #(integer); // T is integer
class D3 #(type P = real) extends C #(P); // T is P
Class D1 extends the base class C using the base class’s default type (bit) parameter. Class D2 extends the base
class C using an integer parameter. Class D3 extends the base class C using the parameterized type (P) with
which the extended class is parameterized.
回复 支持 反对

使用道具 举报

发表于 2009-2-9 16:36:21 | 显示全部楼层
please paste the source code of ovm_drvier.

Without sufficient information the question can't be answered.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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


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

GMT+8, 2025-8-9 19:54 , Processed in 0.014746 second(s), 3 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表