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

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 4665|回复: 3

what's the syntax

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

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

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

x
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.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-12-18 20:34 , Processed in 0.014969 second(s), 7 queries , Gzip On, Redis On.

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