In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "what is SystemVerilog Downcast". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Imagine a people with the ability to fly, and no other people can fly. People must not want them to jump off a cliff and fall to pieces, only to find that they can't fly. So before jumping off a cliff, you need an early warning to make sure that the people is capable of flying.
The same is true in SystemVerilog, where you need to get a compilation error message before the simulation starts, and you don't want the simulation to be suddenly interrupted two days after the simulation is executed because of an incorrect assignment. When assigning a base class handle to a subclass handle, you need to downcast explicitly.
In the following people example, use the fly () method to make it clear that the people has the ability to fly. Assigning a base class people handle to a subclass people handle is called downcast.
Virtual class normal_people
...
Endclass: normal_people
Class flying_people extends normal_people
Virtual function void fly ()
. . .
Endfunction
Endclass:flying_people
Module top
Task fly_if_you_can (normal_people peoples [])
Fly_ people this_people
For (int iuvmconfigured config db# (uvm_bitstream_t):: set (cntxt, …) Set_config_string (…) = > uvm_config_db# (string):: set (cntxt, …) Set_config_object (…) = > uvm_config_db# (uvm_object):: set (cntxt, …)
71. How do I access the signal in DUT in component or sequence?
The interface signal can be accessed through the virtual interface pointing to the specific interface, and the internal signal of DUT can be accessed through the signal path.
72. How to debug the mismatch of the name or path of config_db in UVM?
Use + UVM_CONFIG_DB_TRACE to get set/get information
73. How do I connect monitor to scoreboard, driver and sequencer?
Use analysis port to connect monitor and scoreboard in connect phase. Driver has a seq_item_port that can be connected to sequencer's seq_item_export in agent's connect phase
That's all for "what SystemVerilog Downcast is". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 227
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.