in the first example, base class has no constraints, when we point derived class object with base class handle and then we randomize. since base class handle does not have constraint "cst" why does it randomize with object's constraints ?
You ask why? That's the intent. If you ask how, I don't know for sure, but every class has inherited randomize function. Let's pretend randomize() comes from the base class, if that helps you to visualise it better. As a pointer, it just points to an object and call its randomize. Every object randomize function would locate its object rand variables and constraints and behave accordingly.
Thank you, clear and precise.
Thanks. Glad it helps
Thanks for sharing.
Thanks for your comment
in the first example, base class has no constraints, when we point derived class object with base class handle and then we randomize. since base class handle does not have constraint "cst" why does it randomize with object's constraints ?
You ask why? That's the intent. If you ask how, I don't know for sure, but every class has inherited randomize function. Let's pretend randomize() comes from the base class, if that helps you to visualise it better. As a pointer, it just points to an object and call its randomize. Every object randomize function would locate its object rand variables and constraints and behave accordingly.
@@openlogic925 Thank you !!
Hi, I like your video very much, can I download it and translate it into Chinese?
我其实会讲中文。我有想过做一个中文的解说,但是没太多时间,而且很多专属名词的翻译还蛮困难的。你的意思是说你想下载,翻译,再上载?我觉得TH-cam应该会禁止吧。你如果是下载翻译私用,那就还好。谢谢你的评语哦 😀
谢谢你回复我。我是刚毕业的硕士,现在在做验证。翻译主要用于学习,有些同学英语不太好,没法看懂这些视频,所以我想翻译一下,不是用于商业用途,也不在TH-cam上传。
@@jarviswang5753 你对你的同学真好。希望这些视频对你和同学们有帮助
非常感谢你的视频!清晰易懂,生动有趣,这对中国的一些想学习SystemVerilog的学生帮助很大,期待你的每一次更新。
@@openlogic925 你真优秀,方便问下您是哪国人吗?