factory机制
UVM factory is a mechanism to improve flexibility and scalability of the testbench by allowing the user to substitute anexisting class object by any of its inherited child class objects.
For this purpose, the factory needs to know all the types of classes created within the testbench by a process called asregistration.There are UVM macros that allow classes to be registered with the factory, and methods that allow certain typesand instances of class objects to be overridden by its derived types.