chenyong Posted October 5, 2011 Report Share Posted October 5, 2011 Hi, I found such codes as this: package uvm_config_prop_pkg; .... class uvm_config_prop #(type T=int) extends uvm_object; ..... static function void set_config (string target, string field, T value, uvm_component cntxt=null); uvm_config_prop #(T) wrapper = new(value); .... endfunction : set_config ... I was confused by the code with this: uvm_config_prop #(T) wrapper = new(value); how can a function belongs to a class to "new" a class as itself? Can anybody help me to understand this? thanks. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.