Example #1
0
    def set(self, context, inst_name, field_name, value):
        """
        Stores an object in the db using the context and
        inst_name to create a retrieval path, and the field
        name.
        :param context: A handle to a component
        :param inst_name: The instance name within the component
        :param field_name: The field we're setting
        :param value: The object to be stored
        :return: None
        """

        if not set(field_name).issubset(self.legal_chars):
            raise error_classes.UVMNotImplemented(
                f"pyuvm does not allow wildcards in field names ({field_name})"
            )

        context, inst_name = self._get_context_inst_name(context, inst_name)

        if inst_name not in self._path_dict:
            self._path_dict[inst_name] = {}

        if field_name not in self._path_dict[inst_name]:
            self._path_dict[inst_name][field_name] = {}

        precedence = self.default_precedence
        if uvm_root().running_phase is uvm_build_phase:
            precedence = self.default_precedence - context.get_depth()

        self._path_dict[inst_name][field_name][precedence] = value

        self.trace("SET", context, inst_name, field_name, value)
Example #2
0
 def print(self):
     """
     Not implemented. Use __str__() and print()
     """
     raise error_classes.UVMNotImplemented(
         'There are better ways to do printing in Python using'
         'print() or str()')
Example #3
0
 def find_wrapper_by_name(self):
     """
     There are no wrappers in pyuvm so this is not implemented.
     """
     raise error_classes.UVMNotImplemented(
         "There are no wrappers in pyuvm. "
         "So find_wrapper_by_name is not implemented")
Example #4
0
 def get_object_type(self):
     """
     Not implemented because Python can implement the factory without
     these shenanigans.
     """
     raise error_classes.UVMNotImplemented(
         'Python provides better ways to do this '
         'so the uvm_object_wrapper is unimplemented')
Example #5
0
    def set_type_alias(self, alias_type_name, original_type):
        """
        Not implemented as it does not seem to exist in SystemVerilog UVM

        :param alias_type_name:A string that will reference the original type
        :param original_type:The original type toe be referenced
        :return:None
        """
        # This method does not seem to be implemented in SystemVerilog
        # so I'm skipping it now.
        raise error_classes.UVMNotImplemented(
            "set_type_alias is not implemented in SystemVerilog")
Example #6
0
 def wait_modified(self):
     raise error_classes.UVMNotImplemented(
         "wait_modified not implemented pending requests for it.")
Example #7
0
 def do_execute_op(self, op):
     raise error_classes.UVMNotImplemented("Policies not implemented")
Example #8
0
 def __not_implemented(self):
     raise error_classes.UVMNotImplemented(
         'This method is not implemented at this time.')
Example #9
0
 def reseed(self):
     """ Not implemented """
     raise error_classes.UVMNotImplemented('reseed not implemented')
Example #10
0
 def set_uvm_seeding(self, enable):
     """ Not implemented """
     raise error_classes.UVMNotImplemented(
         'set_uvm_seeding not implemented')
Example #11
0
 def get_active_policy(self):
     """
     Not implemented yet.
     """
     raise error_classes.UVMNotImplemented("policies not implemented yet")
Example #12
0
 def get_uvm_seeding(self):
     """Not implemented"""
     raise error_classes.UVMNotImplemented(
         'get_uvm_seeding not implemented')
Example #13
0
 def do_record(self):
     """
     Not implemented as we are not in a simulator
     """
     raise error_classes.UVMNotImplemented(
         'Python does not run in the simulator, so no recording')
Example #14
0
 def do_print(self):
     """ not implemented. Use __str__() and print()"""
     raise error_classes.UVMNotImplemented(
         'There are better ways to do printing in Python')