简体   繁体   English

为什么 uvm_top 消失了?

[英]Why has uvm_top disappeared?

I compiled my first IEEE 1800.2-2017 UVM code this week and was surprised to discover that uvm_top no longer exists.本周我编译了我的第一个 IEEE 1800.2-2017 UVM 代码,并惊讶地发现uvm_top不再存在。 A quick search of IEEE 1800.2-2017 reveals no occurrence of "uvm_top" and a quick look at the source code reveals that it really has disappeared.快速搜索 IEEE 1800.2-2017 发现没有出现“uvm_top”,快速查看源代码发现它真的消失了。 Here are two workarounds:这里有两种解决方法:

Instead of, eg:而不是,例如:

comp = uvm_top.find("*.m_agent.m_seqr"); // uvm 1.2

you could do:你可以这样做:

comp = uvm_root::get().find("*.m_agent.m_seqr"); // IEEE 1800.2-2017

or, if you prefer:或者,如果您愿意:

uvm_root uvm_top = uvm_root::get();
comp = uvm_top.find("*.m_agent.m_seqr"); 

I have two questions:我有两个问题:

i) Why did the creators of IEEE 1800.2-2017 get rid of uvm_top ? i) 为什么 IEEE 1800.2-2017 的创建者摆脱了uvm_top ii) What do they intend us to do instead? ii) 他们想让我们做什么? (one of those things above or something else?) (上面的那些东西之一还是别的什么?)

Speculations:猜测:

  1. Dogmatism that global variables are evil and should be avoided (even if in this case the variable is const ).认为全局变量是邪恶的,应该避免的教条主义(即使在这种情况下变量是const )。

  2. It's easier for them to generate the class reference, because the tool can handle classes and functions, but not variables inside packages.它们更容易生成类引用,因为该工具可以处理类和函数,但不能处理包内的变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM